gdb/
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb
RW
661ALLOCA
662PYTHON_CFLAGS
ec685c5e 663python_prog_path
81ecdfbb
RW
664LTLIBEXPAT
665LIBEXPAT
666HAVE_LIBEXPAT
667READLINE_CFLAGS
668READLINE_DEPS
669READLINE
670MIG
671WINDRES
672DLLTOOL
673AR
674YFLAGS
675YACC
676LN_S
677REPORT_BUGS_TEXI
678REPORT_BUGS_TO
679PKGVERSION
680TARGET_OBS
681subdirs
682GDB_DATADIR
683DEBUGDIR
684am__fastdepCC_FALSE
685am__fastdepCC_TRUE
686AMDEPBACKSLASH
687AMDEP_FALSE
688AMDEP_TRUE
689am__quote
690am__include
691am__untar
692am__tar
693AMTAR
694AWK
695mkdir_p
696MKDIR_P
697INSTALL_STRIP_PROGRAM
698STRIP
699install_sh
700MAKEINFO
701AUTOHEADER
702AUTOMAKE
703AUTOCONF
704ACLOCAL
705VERSION
706CYGPATH_W
707am__isrc
708INSTALL_DATA
709INSTALL_SCRIPT
710INSTALL_PROGRAM
711PACKAGE
712GNULIB_STDINT_H
713LIBGNU_LTLIBDEPS
714LIBGNU_LIBDEPS
f434ba03
PA
715gltests_WITNESS
716HAVE_WINT_T
81ecdfbb 717HAVE_WCHAR_H
f434ba03
PA
718NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
719NEXT_WCHAR_H
81ecdfbb 720REPLACE_WCWIDTH
f434ba03
PA
721REPLACE_WCSNRTOMBS
722REPLACE_WCSRTOMBS
723REPLACE_WCRTOMB
724REPLACE_MBSNRTOWCS
725REPLACE_MBSRTOWCS
726REPLACE_MBRLEN
727REPLACE_MBRTOWC
728REPLACE_MBSINIT
729REPLACE_WCTOB
730REPLACE_BTOWC
731REPLACE_MBSTATE_T
81ecdfbb 732HAVE_DECL_WCWIDTH
f434ba03
PA
733HAVE_DECL_WCTOB
734HAVE_WCSNRTOMBS
735HAVE_WCSRTOMBS
736HAVE_WCRTOMB
737HAVE_MBSNRTOWCS
738HAVE_MBSRTOWCS
739HAVE_MBRLEN
740HAVE_MBRTOWC
741HAVE_MBSINIT
742HAVE_BTOWC
81ecdfbb 743GNULIB_WCWIDTH
f434ba03
PA
744GNULIB_WCSNRTOMBS
745GNULIB_WCSRTOMBS
746GNULIB_WCRTOMB
747GNULIB_MBSNRTOWCS
748GNULIB_MBSRTOWCS
749GNULIB_MBRLEN
750GNULIB_MBRTOWC
751GNULIB_MBSINIT
752GNULIB_WCTOB
753GNULIB_BTOWC
754NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
755NEXT_STRING_H
756STDINT_H
757WINT_T_SUFFIX
758WCHAR_T_SUFFIX
81ecdfbb 759SIG_ATOMIC_T_SUFFIX
f434ba03 760SIZE_T_SUFFIX
81ecdfbb
RW
761PTRDIFF_T_SUFFIX
762HAVE_SIGNED_WINT_T
763HAVE_SIGNED_WCHAR_T
764HAVE_SIGNED_SIG_ATOMIC_T
765BITSIZEOF_WINT_T
766BITSIZEOF_WCHAR_T
81ecdfbb 767BITSIZEOF_SIG_ATOMIC_T
f434ba03 768BITSIZEOF_SIZE_T
81ecdfbb
RW
769BITSIZEOF_PTRDIFF_T
770HAVE_SYS_BITYPES_H
771HAVE_SYS_INTTYPES_H
772HAVE_STDINT_H
f434ba03 773NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 774NEXT_STDINT_H
81ecdfbb
RW
775HAVE_SYS_TYPES_H
776HAVE_INTTYPES_H
777HAVE_UNSIGNED_LONG_LONG_INT
778HAVE_LONG_LONG_INT
f434ba03
PA
779NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
780NEXT_STDDEF_H
781PRAGMA_SYSTEM_HEADER
782INCLUDE_NEXT_AS_FIRST_DIRECTIVE
783INCLUDE_NEXT
784STDDEF_H
785HAVE_WCHAR_T
786REPLACE_NULL
787APPLE_UNIVERSAL_BUILD
788UNDEFINE_STRTOK_R
789REPLACE_STRTOK_R
81ecdfbb 790REPLACE_STRSIGNAL
f434ba03
PA
791REPLACE_STRNLEN
792REPLACE_STRNDUP
793REPLACE_STRNCAT
81ecdfbb 794REPLACE_STRERROR
f434ba03
PA
795REPLACE_STRCASESTR
796REPLACE_STRSTR
797REPLACE_STRDUP
798REPLACE_STPNCPY
799REPLACE_MEMMEM
800REPLACE_MEMCHR
801HAVE_STRVERSCMP
81ecdfbb 802HAVE_DECL_STRSIGNAL
81ecdfbb
RW
803HAVE_DECL_STRTOK_R
804HAVE_STRCASESTR
805HAVE_STRSEP
806HAVE_STRPBRK
807HAVE_DECL_STRNLEN
808HAVE_DECL_STRNDUP
81ecdfbb
RW
809HAVE_DECL_STRDUP
810HAVE_STRCHRNUL
811HAVE_STPNCPY
812HAVE_STPCPY
f434ba03 813HAVE_RAWMEMCHR
81ecdfbb
RW
814HAVE_DECL_MEMRCHR
815HAVE_MEMPCPY
816HAVE_DECL_MEMMEM
f434ba03
PA
817HAVE_MEMCHR
818HAVE_MBSLEN
819GNULIB_STRVERSCMP
81ecdfbb
RW
820GNULIB_STRSIGNAL
821GNULIB_STRERROR
822GNULIB_MBSTOK_R
823GNULIB_MBSSEP
824GNULIB_MBSSPN
825GNULIB_MBSPBRK
826GNULIB_MBSCSPN
827GNULIB_MBSCASESTR
828GNULIB_MBSPCASECMP
829GNULIB_MBSNCASECMP
830GNULIB_MBSCASECMP
831GNULIB_MBSSTR
832GNULIB_MBSRCHR
833GNULIB_MBSCHR
834GNULIB_MBSNLEN
835GNULIB_MBSLEN
836GNULIB_STRTOK_R
837GNULIB_STRCASESTR
838GNULIB_STRSTR
839GNULIB_STRSEP
840GNULIB_STRPBRK
841GNULIB_STRNLEN
842GNULIB_STRNDUP
f434ba03 843GNULIB_STRNCAT
81ecdfbb
RW
844GNULIB_STRDUP
845GNULIB_STRCHRNUL
846GNULIB_STPNCPY
847GNULIB_STPCPY
f434ba03 848GNULIB_RAWMEMCHR
81ecdfbb
RW
849GNULIB_MEMRCHR
850GNULIB_MEMPCPY
851GNULIB_MEMMEM
f434ba03 852GNULIB_MEMCHR
81ecdfbb
RW
853GL_COND_LIBTOOL_FALSE
854GL_COND_LIBTOOL_TRUE
855CATOBJEXT
856GENCAT
857INSTOBJEXT
858DATADIRNAME
859CATALOGS
860POSUB
861GMSGFMT
862XGETTEXT
863INCINTL
864LIBINTL_DEP
865LIBINTL
866USE_NLS
867SET_MAKE
868GMAKE_FALSE
869GMAKE_TRUE
870MAKE
871CCDEPMODE
872DEPDIR
873am__leading_dot
874target_os
875target_vendor
876target_cpu
877target
f434ba03
PA
878RANLIB
879EGREP
880GREP
881CPP
81ecdfbb
RW
882host_os
883host_vendor
884host_cpu
885host
886build_os
887build_vendor
888build_cpu
889build
81ecdfbb
RW
890OBJEXT
891EXEEXT
892ac_ct_CC
893CPPFLAGS
894LDFLAGS
895CFLAGS
896CC
897MAINT
898MAINTAINER_MODE_FALSE
899MAINTAINER_MODE_TRUE
900target_alias
901host_alias
902build_alias
903LIBS
904ECHO_T
905ECHO_N
906ECHO_C
907DEFS
908mandir
909localedir
910libdir
911psdir
912pdfdir
913dvidir
914htmldir
915infodir
916docdir
917oldincludedir
918includedir
919localstatedir
920sharedstatedir
921sysconfdir
922datadir
923datarootdir
924libexecdir
925sbindir
926bindir
927program_transform_name
928prefix
929exec_prefix
930PACKAGE_URL
931PACKAGE_BUGREPORT
932PACKAGE_STRING
933PACKAGE_VERSION
934PACKAGE_TARNAME
935PACKAGE_NAME
936PATH_SEPARATOR
937SHELL'
a4ce5b0d 938ac_subst_files='host_makefile_frag'
81ecdfbb
RW
939ac_user_opts='
940enable_option_checking
941enable_maintainer_mode
da2f07f1
JK
942enable_plugins
943enable_largefile
81ecdfbb
RW
944enable_dependency_tracking
945with_separate_debug_dir
946with_gdb_datadir
947with_relocated_sources
948enable_targets
949enable_64_bit_bfd
950enable_gdbcli
951enable_gdbmi
952enable_tui
953enable_gdbtk
954with_libunwind
955with_curses
956enable_profiling
957with_pkgversion
958with_bugurl
b040ad30 959with_zlib
81ecdfbb
RW
960with_libiconv_prefix
961with_system_readline
962with_expat
963with_gnu_ld
964enable_rpath
965with_libexpat_prefix
966with_python
967with_included_regex
968with_sysroot
969with_system_gdbinit
970enable_werror
971enable_build_warnings
972enable_gdb_build_warnings
973with_tcl
974with_tk
975with_x
976enable_sim
977enable_multi_ice
81ecdfbb
RW
978'
979 ac_precious_vars='build_alias
980host_alias
981target_alias
982CC
983CFLAGS
984LDFLAGS
985LIBS
986CPPFLAGS
987CPP
988YACC
989YFLAGS
990XMKMF'
991ac_subdirs_all='doc testsuite
992gdbtk
993multi-ice
994gdbserver'
c906108c
SS
995
996# Initialize some variables set by options.
bec39cab
AC
997ac_init_help=
998ac_init_version=false
81ecdfbb
RW
999ac_unrecognized_opts=
1000ac_unrecognized_sep=
c906108c
SS
1001# The variables have the same names as the options, with
1002# dashes changed to underlines.
bec39cab 1003cache_file=/dev/null
c906108c 1004exec_prefix=NONE
c906108c 1005no_create=
c906108c
SS
1006no_recursion=
1007prefix=NONE
1008program_prefix=NONE
1009program_suffix=NONE
1010program_transform_name=s,x,x,
1011silent=
1012site=
1013srcdir=
c906108c
SS
1014verbose=
1015x_includes=NONE
1016x_libraries=NONE
bec39cab
AC
1017
1018# Installation directory options.
1019# These are left unexpanded so users can "make install exec_prefix=/foo"
1020# and all the variables that are supposed to be based on exec_prefix
1021# by default will actually change.
1022# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1023# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1024bindir='${exec_prefix}/bin'
1025sbindir='${exec_prefix}/sbin'
1026libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1027datarootdir='${prefix}/share'
1028datadir='${datarootdir}'
c906108c
SS
1029sysconfdir='${prefix}/etc'
1030sharedstatedir='${prefix}/com'
1031localstatedir='${prefix}/var'
c906108c
SS
1032includedir='${prefix}/include'
1033oldincludedir='/usr/include'
81ecdfbb
RW
1034docdir='${datarootdir}/doc/${PACKAGE}'
1035infodir='${datarootdir}/info'
1036htmldir='${docdir}'
1037dvidir='${docdir}'
1038pdfdir='${docdir}'
1039psdir='${docdir}'
1040libdir='${exec_prefix}/lib'
1041localedir='${datarootdir}/locale'
1042mandir='${datarootdir}/man'
c906108c 1043
c906108c 1044ac_prev=
81ecdfbb 1045ac_dashdash=
c906108c
SS
1046for ac_option
1047do
c906108c
SS
1048 # If the previous option needs an argument, assign it.
1049 if test -n "$ac_prev"; then
81ecdfbb 1050 eval $ac_prev=\$ac_option
c906108c
SS
1051 ac_prev=
1052 continue
1053 fi
1054
81ecdfbb
RW
1055 case $ac_option in
1056 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1057 *) ac_optarg=yes ;;
1058 esac
c906108c
SS
1059
1060 # Accept the important Cygnus configure options, so we can diagnose typos.
1061
81ecdfbb
RW
1062 case $ac_dashdash$ac_option in
1063 --)
1064 ac_dashdash=yes ;;
c906108c
SS
1065
1066 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1067 ac_prev=bindir ;;
1068 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1069 bindir=$ac_optarg ;;
c906108c
SS
1070
1071 -build | --build | --buil | --bui | --bu)
bec39cab 1072 ac_prev=build_alias ;;
c906108c 1073 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1074 build_alias=$ac_optarg ;;
c906108c
SS
1075
1076 -cache-file | --cache-file | --cache-fil | --cache-fi \
1077 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1078 ac_prev=cache_file ;;
1079 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1080 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1081 cache_file=$ac_optarg ;;
1082
1083 --config-cache | -C)
1084 cache_file=config.cache ;;
c906108c 1085
81ecdfbb 1086 -datadir | --datadir | --datadi | --datad)
c906108c 1087 ac_prev=datadir ;;
81ecdfbb 1088 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1089 datadir=$ac_optarg ;;
c906108c 1090
81ecdfbb
RW
1091 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1092 | --dataroo | --dataro | --datar)
1093 ac_prev=datarootdir ;;
1094 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1095 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1096 datarootdir=$ac_optarg ;;
1097
c906108c 1098 -disable-* | --disable-*)
81ecdfbb 1099 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1100 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1101 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1102 as_fn_error "invalid feature name: $ac_useropt"
1103 ac_useropt_orig=$ac_useropt
1104 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1105 case $ac_user_opts in
1106 *"
1107"enable_$ac_useropt"
1108"*) ;;
1109 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1110 ac_unrecognized_sep=', ';;
1111 esac
1112 eval enable_$ac_useropt=no ;;
1113
1114 -docdir | --docdir | --docdi | --doc | --do)
1115 ac_prev=docdir ;;
1116 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1117 docdir=$ac_optarg ;;
1118
1119 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1120 ac_prev=dvidir ;;
1121 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1122 dvidir=$ac_optarg ;;
c906108c
SS
1123
1124 -enable-* | --enable-*)
81ecdfbb 1125 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1126 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1128 as_fn_error "invalid feature name: $ac_useropt"
1129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"enable_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
b4e70030 1137 esac
81ecdfbb 1138 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1139
1140 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1141 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1142 | --exec | --exe | --ex)
1143 ac_prev=exec_prefix ;;
1144 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1145 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1146 | --exec=* | --exe=* | --ex=*)
bec39cab 1147 exec_prefix=$ac_optarg ;;
c906108c
SS
1148
1149 -gas | --gas | --ga | --g)
1150 # Obsolete; use --with-gas.
1151 with_gas=yes ;;
1152
bec39cab
AC
1153 -help | --help | --hel | --he | -h)
1154 ac_init_help=long ;;
1155 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1156 ac_init_help=recursive ;;
1157 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1158 ac_init_help=short ;;
c906108c
SS
1159
1160 -host | --host | --hos | --ho)
bec39cab 1161 ac_prev=host_alias ;;
c906108c 1162 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1163 host_alias=$ac_optarg ;;
c906108c 1164
81ecdfbb
RW
1165 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1166 ac_prev=htmldir ;;
1167 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1168 | --ht=*)
1169 htmldir=$ac_optarg ;;
1170
c906108c
SS
1171 -includedir | --includedir | --includedi | --included | --include \
1172 | --includ | --inclu | --incl | --inc)
1173 ac_prev=includedir ;;
1174 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1175 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1176 includedir=$ac_optarg ;;
c906108c
SS
1177
1178 -infodir | --infodir | --infodi | --infod | --info | --inf)
1179 ac_prev=infodir ;;
1180 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1181 infodir=$ac_optarg ;;
c906108c
SS
1182
1183 -libdir | --libdir | --libdi | --libd)
1184 ac_prev=libdir ;;
1185 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1186 libdir=$ac_optarg ;;
c906108c
SS
1187
1188 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1189 | --libexe | --libex | --libe)
1190 ac_prev=libexecdir ;;
1191 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1192 | --libexe=* | --libex=* | --libe=*)
bec39cab 1193 libexecdir=$ac_optarg ;;
c906108c 1194
81ecdfbb
RW
1195 -localedir | --localedir | --localedi | --localed | --locale)
1196 ac_prev=localedir ;;
1197 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1198 localedir=$ac_optarg ;;
1199
c906108c 1200 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1201 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1202 ac_prev=localstatedir ;;
1203 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1204 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1205 localstatedir=$ac_optarg ;;
c906108c
SS
1206
1207 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1208 ac_prev=mandir ;;
1209 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1210 mandir=$ac_optarg ;;
c906108c
SS
1211
1212 -nfp | --nfp | --nf)
1213 # Obsolete; use --without-fp.
1214 with_fp=no ;;
1215
1216 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1217 | --no-cr | --no-c | -n)
c906108c
SS
1218 no_create=yes ;;
1219
1220 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1221 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1222 no_recursion=yes ;;
1223
1224 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1225 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1226 | --oldin | --oldi | --old | --ol | --o)
1227 ac_prev=oldincludedir ;;
1228 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1229 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1230 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1231 oldincludedir=$ac_optarg ;;
c906108c
SS
1232
1233 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1234 ac_prev=prefix ;;
1235 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1236 prefix=$ac_optarg ;;
c906108c
SS
1237
1238 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1239 | --program-pre | --program-pr | --program-p)
1240 ac_prev=program_prefix ;;
1241 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1242 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1243 program_prefix=$ac_optarg ;;
c906108c
SS
1244
1245 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1246 | --program-suf | --program-su | --program-s)
1247 ac_prev=program_suffix ;;
1248 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1249 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1250 program_suffix=$ac_optarg ;;
c906108c
SS
1251
1252 -program-transform-name | --program-transform-name \
1253 | --program-transform-nam | --program-transform-na \
1254 | --program-transform-n | --program-transform- \
1255 | --program-transform | --program-transfor \
1256 | --program-transfo | --program-transf \
1257 | --program-trans | --program-tran \
1258 | --progr-tra | --program-tr | --program-t)
1259 ac_prev=program_transform_name ;;
1260 -program-transform-name=* | --program-transform-name=* \
1261 | --program-transform-nam=* | --program-transform-na=* \
1262 | --program-transform-n=* | --program-transform-=* \
1263 | --program-transform=* | --program-transfor=* \
1264 | --program-transfo=* | --program-transf=* \
1265 | --program-trans=* | --program-tran=* \
1266 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1267 program_transform_name=$ac_optarg ;;
c906108c 1268
81ecdfbb
RW
1269 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1270 ac_prev=pdfdir ;;
1271 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1272 pdfdir=$ac_optarg ;;
1273
1274 -psdir | --psdir | --psdi | --psd | --ps)
1275 ac_prev=psdir ;;
1276 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1277 psdir=$ac_optarg ;;
1278
c906108c
SS
1279 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1280 | -silent | --silent | --silen | --sile | --sil)
1281 silent=yes ;;
1282
1283 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1284 ac_prev=sbindir ;;
1285 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1286 | --sbi=* | --sb=*)
bec39cab 1287 sbindir=$ac_optarg ;;
c906108c
SS
1288
1289 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1290 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1291 | --sharedst | --shareds | --shared | --share | --shar \
1292 | --sha | --sh)
1293 ac_prev=sharedstatedir ;;
1294 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1295 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1296 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1297 | --sha=* | --sh=*)
bec39cab 1298 sharedstatedir=$ac_optarg ;;
c906108c
SS
1299
1300 -site | --site | --sit)
1301 ac_prev=site ;;
1302 -site=* | --site=* | --sit=*)
bec39cab 1303 site=$ac_optarg ;;
3ace7edb 1304
c906108c
SS
1305 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1306 ac_prev=srcdir ;;
1307 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1308 srcdir=$ac_optarg ;;
c906108c
SS
1309
1310 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1311 | --syscon | --sysco | --sysc | --sys | --sy)
1312 ac_prev=sysconfdir ;;
1313 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1314 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1315 sysconfdir=$ac_optarg ;;
c906108c
SS
1316
1317 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1318 ac_prev=target_alias ;;
c906108c 1319 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1320 target_alias=$ac_optarg ;;
c906108c
SS
1321
1322 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1323 verbose=yes ;;
1324
bec39cab
AC
1325 -version | --version | --versio | --versi | --vers | -V)
1326 ac_init_version=: ;;
c906108c
SS
1327
1328 -with-* | --with-*)
81ecdfbb 1329 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1330 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1331 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332 as_fn_error "invalid package name: $ac_useropt"
1333 ac_useropt_orig=$ac_useropt
1334 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335 case $ac_user_opts in
1336 *"
1337"with_$ac_useropt"
1338"*) ;;
1339 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1340 ac_unrecognized_sep=', ';;
b4e70030 1341 esac
81ecdfbb 1342 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1343
1344 -without-* | --without-*)
81ecdfbb 1345 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1346 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1347 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1348 as_fn_error "invalid package name: $ac_useropt"
1349 ac_useropt_orig=$ac_useropt
1350 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1351 case $ac_user_opts in
1352 *"
1353"with_$ac_useropt"
1354"*) ;;
1355 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1356 ac_unrecognized_sep=', ';;
1357 esac
1358 eval with_$ac_useropt=no ;;
c906108c
SS
1359
1360 --x)
1361 # Obsolete; use --with-x.
1362 with_x=yes ;;
1363
1364 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1365 | --x-incl | --x-inc | --x-in | --x-i)
1366 ac_prev=x_includes ;;
1367 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1368 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1369 x_includes=$ac_optarg ;;
c906108c
SS
1370
1371 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1372 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1373 ac_prev=x_libraries ;;
1374 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1375 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1376 x_libraries=$ac_optarg ;;
c906108c 1377
81ecdfbb
RW
1378 -*) as_fn_error "unrecognized option: \`$ac_option'
1379Try \`$0 --help' for more information."
c906108c
SS
1380 ;;
1381
bec39cab
AC
1382 *=*)
1383 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1384 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1385 case $ac_envvar in #(
1386 '' | [0-9]* | *[!_$as_cr_alnum]* )
1387 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1388 esac
1389 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1390 export $ac_envvar ;;
1391
c906108c 1392 *)
bec39cab 1393 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1394 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1395 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1396 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1397 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1398 ;;
1399
1400 esac
1401done
1402
1403if test -n "$ac_prev"; then
bec39cab 1404 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1405 as_fn_error "missing argument to $ac_option"
c906108c 1406fi
c906108c 1407
81ecdfbb
RW
1408if test -n "$ac_unrecognized_opts"; then
1409 case $enable_option_checking in
1410 no) ;;
1411 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1412 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1413 esac
81ecdfbb 1414fi
b4e70030 1415
81ecdfbb
RW
1416# Check all directory arguments for consistency.
1417for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1418 datadir sysconfdir sharedstatedir localstatedir includedir \
1419 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1420 libdir localedir mandir
b4e70030 1421do
81ecdfbb
RW
1422 eval ac_val=\$$ac_var
1423 # Remove trailing slashes.
1424 case $ac_val in
1425 */ )
1426 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1427 eval $ac_var=\$ac_val;;
1428 esac
1429 # Be sure to have absolute directory names.
b4e70030 1430 case $ac_val in
81ecdfbb
RW
1431 [\\/$]* | ?:[\\/]* ) continue;;
1432 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1433 esac
81ecdfbb 1434 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1435done
1436
bec39cab
AC
1437# There might be people who depend on the old broken behavior: `$host'
1438# used to hold the argument of --host etc.
1439# FIXME: To remove some day.
1440build=$build_alias
1441host=$host_alias
1442target=$target_alias
1443
1444# FIXME: To remove some day.
1445if test "x$host_alias" != x; then
1446 if test "x$build_alias" = x; then
1447 cross_compiling=maybe
81ecdfbb 1448 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1449 If a cross compiler is detected then cross compile mode will be used." >&2
1450 elif test "x$build_alias" != "x$host_alias"; then
1451 cross_compiling=yes
1452 fi
1453fi
c906108c 1454
bec39cab
AC
1455ac_tool_prefix=
1456test -n "$host_alias" && ac_tool_prefix=$host_alias-
1457
1458test "$silent" = yes && exec 6>/dev/null
c906108c 1459
c906108c 1460
81ecdfbb
RW
1461ac_pwd=`pwd` && test -n "$ac_pwd" &&
1462ac_ls_di=`ls -di .` &&
1463ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1464 as_fn_error "working directory cannot be determined"
1465test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1466 as_fn_error "pwd does not report name of working directory"
1467
1468
c906108c
SS
1469# Find the source files, if location was not specified.
1470if test -z "$srcdir"; then
1471 ac_srcdir_defaulted=yes
81ecdfbb
RW
1472 # Try the directory containing this script, then the parent directory.
1473 ac_confdir=`$as_dirname -- "$as_myself" ||
1474$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1475 X"$as_myself" : 'X\(//\)[^/]' \| \
1476 X"$as_myself" : 'X\(//\)$' \| \
1477 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1478$as_echo X"$as_myself" |
1479 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1480 s//\1/
1481 q
1482 }
1483 /^X\(\/\/\)[^/].*/{
1484 s//\1/
1485 q
1486 }
1487 /^X\(\/\/\)$/{
1488 s//\1/
1489 q
1490 }
1491 /^X\(\/\).*/{
1492 s//\1/
1493 q
1494 }
1495 s/.*/./; q'`
c906108c 1496 srcdir=$ac_confdir
81ecdfbb 1497 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1498 srcdir=..
1499 fi
1500else
1501 ac_srcdir_defaulted=no
1502fi
81ecdfbb
RW
1503if test ! -r "$srcdir/$ac_unique_file"; then
1504 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1505 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1506fi
1507ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1508ac_abs_confdir=`(
1509 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1510 pwd)`
1511# When building in place, set srcdir=.
1512if test "$ac_abs_confdir" = "$ac_pwd"; then
1513 srcdir=.
1514fi
1515# Remove unnecessary trailing slashes from srcdir.
1516# Double slashes in file names in object file debugging info
1517# mess up M-x gdb in Emacs.
1518case $srcdir in
1519*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1520esac
1521for ac_var in $ac_precious_vars; do
1522 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1523 eval ac_env_${ac_var}_value=\$${ac_var}
1524 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1525 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1526done
c906108c 1527
bec39cab
AC
1528#
1529# Report the --help message.
1530#
1531if test "$ac_init_help" = "long"; then
1532 # Omit some internal or obsolete options to make the list less imposing.
1533 # This message is too long to be a string in the A/UX 3.1 sh.
1534 cat <<_ACEOF
1535\`configure' configures this package to adapt to many kinds of systems.
1536
1537Usage: $0 [OPTION]... [VAR=VALUE]...
1538
1539To assign environment variables (e.g., CC, CFLAGS...), specify them as
1540VAR=VALUE. See below for descriptions of some of the useful variables.
1541
1542Defaults for the options are specified in brackets.
1543
1544Configuration:
1545 -h, --help display this help and exit
1546 --help=short display options specific to this package
1547 --help=recursive display the short help of all the included packages
1548 -V, --version display version information and exit
1549 -q, --quiet, --silent do not print \`checking...' messages
1550 --cache-file=FILE cache test results in FILE [disabled]
1551 -C, --config-cache alias for \`--cache-file=config.cache'
1552 -n, --no-create do not create output files
1553 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1554
bec39cab
AC
1555Installation directories:
1556 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1557 [$ac_default_prefix]
bec39cab 1558 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1559 [PREFIX]
bec39cab
AC
1560
1561By default, \`make install' will install all the files in
1562\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1563an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1564for instance \`--prefix=\$HOME'.
1565
1566For better control, use the options below.
1567
1568Fine tuning of the installation directories:
81ecdfbb
RW
1569 --bindir=DIR user executables [EPREFIX/bin]
1570 --sbindir=DIR system admin executables [EPREFIX/sbin]
1571 --libexecdir=DIR program executables [EPREFIX/libexec]
1572 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1573 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1574 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1575 --libdir=DIR object code libraries [EPREFIX/lib]
1576 --includedir=DIR C header files [PREFIX/include]
1577 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1578 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1579 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1580 --infodir=DIR info documentation [DATAROOTDIR/info]
1581 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1582 --mandir=DIR man documentation [DATAROOTDIR/man]
1583 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1584 --htmldir=DIR html documentation [DOCDIR]
1585 --dvidir=DIR dvi documentation [DOCDIR]
1586 --pdfdir=DIR pdf documentation [DOCDIR]
1587 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1588_ACEOF
1589
1590 cat <<\_ACEOF
1591
1592Program names:
1593 --program-prefix=PREFIX prepend PREFIX to installed program names
1594 --program-suffix=SUFFIX append SUFFIX to installed program names
1595 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1596
1597X features:
1598 --x-includes=DIR X include files are in DIR
1599 --x-libraries=DIR X library files are in DIR
1600
1601System types:
1602 --build=BUILD configure for building on BUILD [guessed]
1603 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1604 --target=TARGET configure for building compilers for TARGET [HOST]
1605_ACEOF
1606fi
1607
1608if test -n "$ac_init_help"; then
1609
1610 cat <<\_ACEOF
1611
1612Optional Features:
81ecdfbb 1613 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1614 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1615 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1616 --enable-maintainer-mode enable make rules and dependencies not useful
1617 (and sometimes confusing) to the casual installer
da2f07f1
JK
1618 --enable-plugins Enable support for plugins (defaults no)
1619 --disable-largefile omit support for large files
e28b3332
DJ
1620 --disable-dependency-tracking speeds up one-time build
1621 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1622 --enable-targets=TARGETS
1623 alternative target configurations
c0993dbe 1624 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1625 --disable-gdbcli disable command-line interface (CLI)
1626 --disable-gdbmi disable machine-interface (MI)
1627 --enable-tui enable full-screen terminal user interface (TUI)
1628 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1629 --enable-profiling enable profiling of GDB
3841debe 1630 --disable-rpath do not hardcode runtime library paths
a1220294 1631 --enable-werror treat compile warnings as errors
32c1c914 1632 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1633 --enable-gdb-build-warnings
32c1c914 1634 enable GDB specific build-time compiler warnings if
a1220294 1635 gcc is used
32c1c914 1636 --enable-sim link gdb with simulator
bec39cab
AC
1637 --enable-multi-ice build the multi-ice-gdb-server
1638
1639Optional Packages:
1640 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1641 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1642 --with-separate-debug-dir=PATH
32c1c914 1643 look for global separate debug info in this path
62e4f60c 1644 [LIBDIR/debug]
b14b1491
TT
1645 --with-gdb-datadir=PATH look for global separate data files in this path
1646 [DATADIR/gdb]
29b0e8a2 1647 --with-relocated-sources=PATH
32c1c914
TT
1648 automatically relocate this path for source files
1649 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1650 --with-curses use the curses library instead of the termcap
1651 library
c16158bc
JM
1652 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1653 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1654 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1655 --with-libiconv-prefix=DIR
1656 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1657 --with-system-readline use installed readline library
5c39566f 1658 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1659 --with-gnu-ld assume the C compiler uses GNU ld default=no
1660 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1661 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1662 --with-python[=PYTHON] include python support
1663 (auto/yes/no/<python-program>)
a1220294
TT
1664 --without-included-regex
1665 don't use included regex; this is the default on
1666 systems with version 2 of the GNU C library (use
1667 with caution on other system)
81ecdfbb 1668 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1669 --with-system-gdbinit=PATH
32c1c914 1670 automatically load a system-wide gdbinit file
5062cc19
KS
1671 --with-tcl directory containing tcl configuration (tclConfig.sh)
1672 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1673 --with-x use the X Window System
bec39cab
AC
1674
1675Some influential environment variables:
1676 CC C compiler command
1677 CFLAGS C compiler flags
1678 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1679 nonstandard directory <lib dir>
81ecdfbb
RW
1680 LIBS libraries to pass to the linker, e.g. -l<library>
1681 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1682 you have headers in a nonstandard directory <include dir>
bec39cab 1683 CPP C preprocessor
81ecdfbb
RW
1684 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1685 the first program found out of: `bison -y', `byacc', `yacc'.
1686 YFLAGS The list of arguments that will be passed by default to $YACC.
1687 This script will default YFLAGS to the empty string to avoid a
1688 default value of `-d' given by some make applications.
1689 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1690
1691Use these variables to override the choices made by `configure' or to help
1692it to find libraries and programs with nonstandard names/locations.
1693
81ecdfbb 1694Report bugs to the package provider.
bec39cab 1695_ACEOF
81ecdfbb 1696ac_status=$?
bec39cab
AC
1697fi
1698
1699if test "$ac_init_help" = "recursive"; then
1700 # If there are subdirs, report their specific --help.
bec39cab 1701 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1702 test -d "$ac_dir" ||
1703 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1704 continue
bec39cab
AC
1705 ac_builddir=.
1706
81ecdfbb
RW
1707case "$ac_dir" in
1708.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1709*)
1710 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1711 # A ".." for each directory in $ac_dir_suffix.
1712 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1713 case $ac_top_builddir_sub in
1714 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1715 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1716 esac ;;
1717esac
1718ac_abs_top_builddir=$ac_pwd
1719ac_abs_builddir=$ac_pwd$ac_dir_suffix
1720# for backward compatibility:
1721ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1722
1723case $srcdir in
81ecdfbb 1724 .) # We are building in place.
bec39cab 1725 ac_srcdir=.
81ecdfbb
RW
1726 ac_top_srcdir=$ac_top_builddir_sub
1727 ac_abs_top_srcdir=$ac_pwd ;;
1728 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1729 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1730 ac_top_srcdir=$srcdir
1731 ac_abs_top_srcdir=$srcdir ;;
1732 *) # Relative name.
1733 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1734 ac_top_srcdir=$ac_top_build_prefix$srcdir
1735 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1736esac
81ecdfbb 1737ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1738
81ecdfbb
RW
1739 cd "$ac_dir" || { ac_status=$?; continue; }
1740 # Check for guested configure.
1741 if test -f "$ac_srcdir/configure.gnu"; then
1742 echo &&
1743 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1744 elif test -f "$ac_srcdir/configure"; then
1745 echo &&
1746 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1747 else
81ecdfbb
RW
1748 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1749 fi || ac_status=$?
1750 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1751 done
1752fi
1753
81ecdfbb 1754test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1755if $ac_init_version; then
1756 cat <<\_ACEOF
81ecdfbb
RW
1757configure
1758generated by GNU Autoconf 2.64
bec39cab 1759
81ecdfbb 1760Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1761This configure script is free software; the Free Software Foundation
1762gives unlimited permission to copy, distribute and modify it.
1763_ACEOF
81ecdfbb 1764 exit
bec39cab 1765fi
bec39cab 1766
81ecdfbb
RW
1767## ------------------------ ##
1768## Autoconf initialization. ##
1769## ------------------------ ##
bec39cab 1770
81ecdfbb
RW
1771# ac_fn_c_try_compile LINENO
1772# --------------------------
1773# Try to compile conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_c_try_compile ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 rm -f conftest.$ac_objext
1778 if { { ac_try="$ac_compile"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_compile") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } && {
1794 test -z "$ac_c_werror_flag" ||
1795 test ! -s conftest.err
1796 } && test -s conftest.$ac_objext; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1801
81ecdfbb
RW
1802 ac_retval=1
1803fi
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1805 return $ac_retval
1806
1807} # ac_fn_c_try_compile
1808
1809# ac_fn_c_try_cpp LINENO
1810# ----------------------
1811# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812ac_fn_c_try_cpp ()
bec39cab 1813{
81ecdfbb
RW
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_cpp conftest.$ac_ext"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1823 ac_status=$?
1824 if test -s conftest.err; then
1825 grep -v '^ *+' conftest.err >conftest.er1
1826 cat conftest.er1 >&5
1827 mv -f conftest.er1 conftest.err
1828 fi
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } >/dev/null && {
1831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1832 test ! -s conftest.err
1833 }; then :
1834 ac_retval=0
1835else
1836 $as_echo "$as_me: failed program was:" >&5
1837sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1838
81ecdfbb
RW
1839 ac_retval=1
1840fi
1841 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1842 return $ac_retval
bec39cab 1843
81ecdfbb 1844} # ac_fn_c_try_cpp
bec39cab 1845
81ecdfbb
RW
1846# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1847# -------------------------------------------------------
1848# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1849# the include files in INCLUDES and setting the cache variable VAR
1850# accordingly.
1851ac_fn_c_check_header_mongrel ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
1857if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1858 $as_echo_n "(cached) " >&6
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863else
1864 # Is the header compilable?
1865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1866$as_echo_n "checking $2 usability... " >&6; }
1867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 ac_header_compiler=yes
1874else
1875 ac_header_compiler=no
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1879$as_echo "$ac_header_compiler" >&6; }
bec39cab 1880
81ecdfbb
RW
1881# Is the header present?
1882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1883$as_echo_n "checking $2 presence... " >&6; }
1884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886#include <$2>
1887_ACEOF
1888if ac_fn_c_try_cpp "$LINENO"; then :
1889 ac_header_preproc=yes
1890else
1891 ac_header_preproc=no
1892fi
1893rm -f conftest.err conftest.$ac_ext
1894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1895$as_echo "$ac_header_preproc" >&6; }
bec39cab 1896
81ecdfbb
RW
1897# So? What about this header?
1898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1899 yes:no: )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1901$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1903$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1904 ;;
1905 no:yes:* )
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1907$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1909$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1911$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1913$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1915$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 ;;
1917esac
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
1920if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=\$ac_header_compiler"
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
1928fi
1929 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1930
81ecdfbb 1931} # ac_fn_c_check_header_mongrel
bec39cab 1932
81ecdfbb
RW
1933# ac_fn_c_try_run LINENO
1934# ----------------------
1935# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936# that executables *can* be run.
1937ac_fn_c_try_run ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 if { { ac_try="$ac_link"
1941case "(($ac_try" in
1942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943 *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947 (eval "$ac_link") 2>&5
1948 ac_status=$?
1949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951 { { case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957 (eval "$ac_try") 2>&5
1958 ac_status=$?
1959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960 test $ac_status = 0; }; }; then :
1961 ac_retval=0
1962else
1963 $as_echo "$as_me: program exited with status $ac_status" >&5
1964 $as_echo "$as_me: failed program was:" >&5
1965sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1966
81ecdfbb
RW
1967 ac_retval=$ac_status
1968fi
1969 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1970 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1971 return $ac_retval
bec39cab 1972
81ecdfbb 1973} # ac_fn_c_try_run
bec39cab 1974
81ecdfbb
RW
1975# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976# -------------------------------------------------------
1977# Tests whether HEADER exists and can be compiled using the include files in
1978# INCLUDES, setting the cache variable VAR accordingly.
1979ac_fn_c_check_header_compile ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
1984if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1985 $as_echo_n "(cached) " >&6
1986else
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990#include <$2>
bec39cab 1991_ACEOF
81ecdfbb
RW
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 eval "$3=yes"
1994else
1995 eval "$3=no"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
2002 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2003
81ecdfbb 2004} # ac_fn_c_check_header_compile
bec39cab 2005
81ecdfbb
RW
2006# ac_fn_c_try_link LINENO
2007# -----------------------
2008# Try to link conftest.$ac_ext, and return whether this succeeded.
2009ac_fn_c_try_link ()
b4e70030 2010{
81ecdfbb
RW
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 rm -f conftest.$ac_objext conftest$ac_exeext
2013 if { { ac_try="$ac_link"
2014case "(($ac_try" in
2015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016 *) ac_try_echo=$ac_try;;
2017esac
2018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019$as_echo "$ac_try_echo"; } >&5
2020 (eval "$ac_link") 2>conftest.err
2021 ac_status=$?
2022 if test -s conftest.err; then
2023 grep -v '^ *+' conftest.err >conftest.er1
2024 cat conftest.er1 >&5
2025 mv -f conftest.er1 conftest.err
2026 fi
2027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028 test $ac_status = 0; } && {
2029 test -z "$ac_c_werror_flag" ||
2030 test ! -s conftest.err
2031 } && test -s conftest$ac_exeext && {
2032 test "$cross_compiling" = yes ||
2033 $as_test_x conftest$ac_exeext
2034 }; then :
2035 ac_retval=0
2036else
2037 $as_echo "$as_me: failed program was:" >&5
2038sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2039
81ecdfbb
RW
2040 ac_retval=1
2041fi
2042 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2043 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2044 # interfere with the next link command; also delete a directory that is
2045 # left behind by Apple's compiler. We do this before executing the actions.
2046 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2047 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2048 return $ac_retval
bec39cab 2049
81ecdfbb 2050} # ac_fn_c_try_link
bec39cab 2051
81ecdfbb
RW
2052# ac_fn_c_check_func LINENO FUNC VAR
2053# ----------------------------------
2054# Tests whether FUNC exists, setting the cache variable VAR accordingly
2055ac_fn_c_check_func ()
2056{
2057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2059$as_echo_n "checking for $2... " >&6; }
2060if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2061 $as_echo_n "(cached) " >&6
2062else
2063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2066 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2067#define $2 innocuous_$2
bec39cab 2068
81ecdfbb
RW
2069/* System header to define __stub macros and hopefully few prototypes,
2070 which can conflict with char $2 (); below.
2071 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2072 <limits.h> exists even on freestanding compilers. */
bec39cab 2073
81ecdfbb
RW
2074#ifdef __STDC__
2075# include <limits.h>
2076#else
2077# include <assert.h>
2078#endif
bec39cab 2079
81ecdfbb 2080#undef $2
bec39cab 2081
81ecdfbb
RW
2082/* Override any GCC internal prototype to avoid an error.
2083 Use char because int might match the return type of a GCC
2084 builtin and then its argument prototype would still apply. */
2085#ifdef __cplusplus
2086extern "C"
2087#endif
2088char $2 ();
2089/* The GNU C library defines this for functions which it implements
2090 to always fail with ENOSYS. Some functions are actually named
2091 something starting with __ and the normal name is an alias. */
2092#if defined __stub_$2 || defined __stub___$2
2093choke me
2094#endif
bec39cab 2095
81ecdfbb
RW
2096int
2097main ()
2098{
2099return $2 ();
2100 ;
2101 return 0;
2102}
bec39cab 2103_ACEOF
81ecdfbb
RW
2104if ac_fn_c_try_link "$LINENO"; then :
2105 eval "$3=yes"
2106else
2107 eval "$3=no"
2108fi
2109rm -f core conftest.err conftest.$ac_objext \
2110 conftest$ac_exeext conftest.$ac_ext
2111fi
2112eval ac_res=\$$3
2113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114$as_echo "$ac_res" >&6; }
2115 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2116
81ecdfbb 2117} # ac_fn_c_check_func
bec39cab 2118
81ecdfbb
RW
2119# ac_fn_c_check_decl LINENO SYMBOL VAR
2120# ------------------------------------
2121# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2122ac_fn_c_check_decl ()
2123{
2124 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2126$as_echo_n "checking whether $2 is declared... " >&6; }
2127if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2128 $as_echo_n "(cached) " >&6
2129else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136#ifndef $2
2137 (void) $2;
2138#endif
bec39cab 2139
81ecdfbb
RW
2140 ;
2141 return 0;
2142}
bec39cab 2143_ACEOF
81ecdfbb
RW
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 eval "$3=yes"
2146else
2147 eval "$3=no"
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151eval ac_res=\$$3
2152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2153$as_echo "$ac_res" >&6; }
2154 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2155
81ecdfbb 2156} # ac_fn_c_check_decl
bec39cab 2157
81ecdfbb
RW
2158# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2159# --------------------------------------------
2160# Tries to find the compile-time value of EXPR in a program that includes
2161# INCLUDES, setting VAR accordingly. Returns whether the value could be
2162# computed
2163ac_fn_c_compute_int ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 if test "$cross_compiling" = yes; then
2167 # Depending upon the size, compute the lo and hi bounds.
2168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h. */
2170$4
2171int
2172main ()
2173{
2174static int test_array [1 - 2 * !(($2) >= 0)];
2175test_array [0] = 0
bec39cab 2176
81ecdfbb
RW
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_lo=0 ac_mid=0
2183 while :; do
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187int
2188main ()
2189{
2190static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2191test_array [0] = 0
bec39cab 2192
81ecdfbb
RW
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_hi=$ac_mid; break
2199else
2200 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2201 if test $ac_lo -le $ac_mid; then
2202 ac_lo= ac_hi=
2203 break
2204 fi
2205 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2206fi
81ecdfbb
RW
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208 done
c906108c 2209else
81ecdfbb
RW
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213int
2214main ()
2215{
2216static int test_array [1 - 2 * !(($2) < 0)];
2217test_array [0] = 0
bec39cab 2218
81ecdfbb
RW
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224 ac_hi=-1 ac_mid=-1
2225 while :; do
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2233test_array [0] = 0
bec39cab 2234
81ecdfbb
RW
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_compile "$LINENO"; then :
2240 ac_lo=$ac_mid; break
2241else
2242 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2243 if test $ac_mid -le $ac_hi; then
2244 ac_lo= ac_hi=
2245 break
2246 fi
2247 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250 done
2251else
2252 ac_lo= ac_hi=
2253fi
2254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257# Binary search between lo and hi bounds.
2258while test "x$ac_lo" != "x$ac_hi"; do
2259 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$4
2263int
2264main ()
2265{
2266static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2267test_array [0] = 0
bec39cab 2268
81ecdfbb
RW
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 ac_hi=$ac_mid
2275else
2276 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279done
2280case $ac_lo in #((
2281?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2282'') ac_retval=1 ;;
2283esac
2284 else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$4
2288static long int longval () { return $2; }
2289static unsigned long int ulongval () { return $2; }
2290#include <stdio.h>
2291#include <stdlib.h>
2292int
2293main ()
2294{
bec39cab 2295
81ecdfbb
RW
2296 FILE *f = fopen ("conftest.val", "w");
2297 if (! f)
2298 return 1;
2299 if (($2) < 0)
2300 {
2301 long int i = longval ();
2302 if (i != ($2))
2303 return 1;
2304 fprintf (f, "%ld", i);
2305 }
2306 else
2307 {
2308 unsigned long int i = ulongval ();
2309 if (i != ($2))
2310 return 1;
2311 fprintf (f, "%lu", i);
2312 }
2313 /* Do not output a trailing newline, as this causes \r\n confusion
2314 on some platforms. */
2315 return ferror (f) || fclose (f) != 0;
bec39cab 2316
81ecdfbb
RW
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_run "$LINENO"; then :
2322 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2323else
2324 ac_retval=1
2325fi
2326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2327 conftest.$ac_objext conftest.beam conftest.$ac_ext
2328rm -f conftest.val
bec39cab 2329
81ecdfbb
RW
2330 fi
2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2332 return $ac_retval
bec39cab 2333
81ecdfbb 2334} # ac_fn_c_compute_int
bec39cab 2335
81ecdfbb
RW
2336# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2337# ----------------------------------------------------
2338# Tries to find if the field MEMBER exists in type AGGR, after including
2339# INCLUDES, setting cache variable VAR accordingly.
2340ac_fn_c_check_member ()
2341{
2342 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2344$as_echo_n "checking for $2.$3... " >&6; }
2345if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2346 $as_echo_n "(cached) " >&6
2347else
2348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h. */
2350$5
2351int
2352main ()
2353{
2354static $2 ac_aggr;
2355if (ac_aggr.$3)
2356return 0;
2357 ;
2358 return 0;
2359}
2360_ACEOF
2361if ac_fn_c_try_compile "$LINENO"; then :
2362 eval "$4=yes"
2363else
2364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
2368main ()
2369{
2370static $2 ac_aggr;
2371if (sizeof ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$4=yes"
2379else
2380 eval "$4=no"
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385fi
2386eval ac_res=\$$4
2387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2388$as_echo "$ac_res" >&6; }
2389 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2390
81ecdfbb 2391} # ac_fn_c_check_member
bec39cab 2392
81ecdfbb
RW
2393# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2394# -------------------------------------------
2395# Tests whether TYPE exists after having included INCLUDES, setting cache
2396# variable VAR accordingly.
2397ac_fn_c_check_type ()
2398{
2399 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401$as_echo_n "checking for $2... " >&6; }
2402if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2403 $as_echo_n "(cached) " >&6
2404else
2405 eval "$3=no"
2406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h. */
2408$4
2409int
2410main ()
2411{
2412if (sizeof ($2))
2413 return 0;
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418if ac_fn_c_try_compile "$LINENO"; then :
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$4
2422int
2423main ()
2424{
2425if (sizeof (($2)))
2426 return 0;
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2432
81ecdfbb
RW
2433else
2434 eval "$3=yes"
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440eval ac_res=\$$3
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2442$as_echo "$ac_res" >&6; }
2443 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2444
81ecdfbb
RW
2445} # ac_fn_c_check_type
2446cat >config.log <<_ACEOF
2447This file contains any messages produced by compilers while
2448running configure, to aid debugging if configure makes a mistake.
d5af19ba 2449
81ecdfbb
RW
2450It was created by $as_me, which was
2451generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2452
81ecdfbb 2453 $ $0 $@
413ccac7 2454
81ecdfbb
RW
2455_ACEOF
2456exec 5>>config.log
2457{
2458cat <<_ASUNAME
2459## --------- ##
2460## Platform. ##
2461## --------- ##
413ccac7 2462
81ecdfbb
RW
2463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2464uname -m = `(uname -m) 2>/dev/null || echo unknown`
2465uname -r = `(uname -r) 2>/dev/null || echo unknown`
2466uname -s = `(uname -s) 2>/dev/null || echo unknown`
2467uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2468
81ecdfbb
RW
2469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2471
81ecdfbb
RW
2472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2479
81ecdfbb 2480_ASUNAME
bec39cab 2481
bec39cab
AC
2482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2487 $as_echo "PATH: $as_dir"
2488 done
2489IFS=$as_save_IFS
bec39cab 2490
81ecdfbb 2491} >&5
bec39cab 2492
81ecdfbb 2493cat >&5 <<_ACEOF
bec39cab 2494
bec39cab 2495
81ecdfbb
RW
2496## ----------- ##
2497## Core tests. ##
2498## ----------- ##
2499
2500_ACEOF
2501
2502
2503# Keep a trace of the command line.
2504# Strip out --no-create and --no-recursion so they do not pile up.
2505# Strip out --silent because we don't want to record it for future runs.
2506# Also quote any args containing shell meta-characters.
2507# Make two passes to allow for proper duplicate-argument suppression.
2508ac_configure_args=
2509ac_configure_args0=
2510ac_configure_args1=
2511ac_must_keep_next=false
2512for ac_pass in 1 2
2513do
2514 for ac_arg
2515 do
2516 case $ac_arg in
2517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2519 | -silent | --silent | --silen | --sile | --sil)
2520 continue ;;
2521 *\'*)
2522 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2523 esac
2524 case $ac_pass in
2525 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2526 2)
2527 as_fn_append ac_configure_args1 " '$ac_arg'"
2528 if test $ac_must_keep_next = true; then
2529 ac_must_keep_next=false # Got value, back to normal.
2530 else
2531 case $ac_arg in
2532 *=* | --config-cache | -C | -disable-* | --disable-* \
2533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2535 | -with-* | --with-* | -without-* | --without-* | --x)
2536 case "$ac_configure_args0 " in
2537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2538 esac
2539 ;;
2540 -* ) ac_must_keep_next=true ;;
2541 esac
2542 fi
2543 as_fn_append ac_configure_args " '$ac_arg'"
2544 ;;
2545 esac
2546 done
2547done
2548{ ac_configure_args0=; unset ac_configure_args0;}
2549{ ac_configure_args1=; unset ac_configure_args1;}
2550
2551# When interrupted or exit'd, cleanup temporary files, and complete
2552# config.log. We remove comments because anyway the quotes in there
2553# would cause problems or look ugly.
2554# WARNING: Use '\'' to represent an apostrophe within the trap.
2555# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2556trap 'exit_status=$?
2557 # Save into config.log some information that might help in debugging.
2558 {
2559 echo
2560
2561 cat <<\_ASBOX
2562## ---------------- ##
2563## Cache variables. ##
2564## ---------------- ##
2565_ASBOX
2566 echo
2567 # The following way of writing the cache mishandles newlines in values,
2568(
2569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2570 eval ac_val=\$$ac_var
2571 case $ac_val in #(
2572 *${as_nl}*)
2573 case $ac_var in #(
2574 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2576 esac
2577 case $ac_var in #(
2578 _ | IFS | as_nl) ;; #(
2579 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2580 *) { eval $ac_var=; unset $ac_var;} ;;
2581 esac ;;
2582 esac
2583 done
2584 (set) 2>&1 |
2585 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2586 *${as_nl}ac_space=\ *)
2587 sed -n \
2588 "s/'\''/'\''\\\\'\'''\''/g;
2589 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2590 ;; #(
2591 *)
2592 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2593 ;;
2594 esac |
2595 sort
2596)
2597 echo
2598
2599 cat <<\_ASBOX
2600## ----------------- ##
2601## Output variables. ##
2602## ----------------- ##
2603_ASBOX
2604 echo
2605 for ac_var in $ac_subst_vars
2606 do
2607 eval ac_val=\$$ac_var
2608 case $ac_val in
2609 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2610 esac
2611 $as_echo "$ac_var='\''$ac_val'\''"
2612 done | sort
2613 echo
2614
2615 if test -n "$ac_subst_files"; then
2616 cat <<\_ASBOX
2617## ------------------- ##
2618## File substitutions. ##
2619## ------------------- ##
2620_ASBOX
2621 echo
2622 for ac_var in $ac_subst_files
2623 do
2624 eval ac_val=\$$ac_var
2625 case $ac_val in
2626 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2627 esac
2628 $as_echo "$ac_var='\''$ac_val'\''"
2629 done | sort
2630 echo
2631 fi
2632
2633 if test -s confdefs.h; then
2634 cat <<\_ASBOX
2635## ----------- ##
2636## confdefs.h. ##
2637## ----------- ##
2638_ASBOX
2639 echo
2640 cat confdefs.h
2641 echo
2642 fi
2643 test "$ac_signal" != 0 &&
2644 $as_echo "$as_me: caught signal $ac_signal"
2645 $as_echo "$as_me: exit $exit_status"
2646 } >&5
2647 rm -f core *.core core.conftest.* &&
2648 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2649 exit $exit_status
2650' 0
2651for ac_signal in 1 2 13 15; do
2652 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2653done
2654ac_signal=0
2655
2656# confdefs.h avoids OS command line length limits that DEFS can exceed.
2657rm -f -r conftest* confdefs.h
2658
2659$as_echo "/* confdefs.h */" > confdefs.h
2660
2661# Predefined preprocessor variables.
2662
2663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_NAME "$PACKAGE_NAME"
2665_ACEOF
2666
2667cat >>confdefs.h <<_ACEOF
2668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2669_ACEOF
2670
2671cat >>confdefs.h <<_ACEOF
2672#define PACKAGE_VERSION "$PACKAGE_VERSION"
2673_ACEOF
2674
2675cat >>confdefs.h <<_ACEOF
2676#define PACKAGE_STRING "$PACKAGE_STRING"
2677_ACEOF
2678
2679cat >>confdefs.h <<_ACEOF
2680#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2681_ACEOF
2682
2683cat >>confdefs.h <<_ACEOF
2684#define PACKAGE_URL "$PACKAGE_URL"
2685_ACEOF
2686
2687
2688# Let the site file select an alternate cache file if it wants to.
2689# Prefer an explicitly selected file to automatically selected ones.
2690ac_site_file1=NONE
2691ac_site_file2=NONE
2692if test -n "$CONFIG_SITE"; then
2693 ac_site_file1=$CONFIG_SITE
2694elif test "x$prefix" != xNONE; then
2695 ac_site_file1=$prefix/share/config.site
2696 ac_site_file2=$prefix/etc/config.site
2697else
2698 ac_site_file1=$ac_default_prefix/share/config.site
2699 ac_site_file2=$ac_default_prefix/etc/config.site
2700fi
2701for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2702do
2703 test "x$ac_site_file" = xNONE && continue
2704 if test -r "$ac_site_file"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2706$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2707 sed 's/^/| /' "$ac_site_file" >&5
2708 . "$ac_site_file"
2709 fi
2710done
2711
2712if test -r "$cache_file"; then
2713 # Some versions of bash will fail to source /dev/null (special
2714 # files actually), so we avoid doing that.
2715 if test -f "$cache_file"; then
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2717$as_echo "$as_me: loading cache $cache_file" >&6;}
2718 case $cache_file in
2719 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2720 *) . "./$cache_file";;
2721 esac
2722 fi
2723else
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2725$as_echo "$as_me: creating cache $cache_file" >&6;}
2726 >$cache_file
bec39cab
AC
2727fi
2728
f434ba03
PA
2729gl_header_list="$gl_header_list sys/mman.h"
2730gl_func_list="$gl_func_list mprotect"
2731gl_func_list="$gl_func_list memchr"
2732gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2733gl_header_list="$gl_header_list stdint.h"
2734gl_header_list="$gl_header_list wchar.h"
2735gl_header_list="$gl_header_list string.h"
2736# Check that the precious variables saved in the cache have kept the same
2737# value.
2738ac_cache_corrupted=false
2739for ac_var in $ac_precious_vars; do
2740 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2741 eval ac_new_set=\$ac_env_${ac_var}_set
2742 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2743 eval ac_new_val=\$ac_env_${ac_var}_value
2744 case $ac_old_set,$ac_new_set in
2745 set,)
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2748 ac_cache_corrupted=: ;;
2749 ,set)
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2751$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2752 ac_cache_corrupted=: ;;
2753 ,);;
2754 *)
2755 if test "x$ac_old_val" != "x$ac_new_val"; then
2756 # differences in whitespace do not lead to failure.
2757 ac_old_val_w=`echo x $ac_old_val`
2758 ac_new_val_w=`echo x $ac_new_val`
2759 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2761$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2762 ac_cache_corrupted=:
2763 else
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2765$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2766 eval $ac_var=\$ac_old_val
2767 fi
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2769$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2771$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2772 fi;;
2773 esac
2774 # Pass precious variables to config.status.
2775 if test "$ac_new_set" = set; then
2776 case $ac_new_val in
2777 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2778 *) ac_arg=$ac_var=$ac_new_val ;;
2779 esac
2780 case " $ac_configure_args " in
2781 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2782 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2783 esac
2784 fi
2785done
2786if $ac_cache_corrupted; then
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2790$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2791 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2792fi
2793## -------------------- ##
2794## Main body of script. ##
2795## -------------------- ##
2796
2797ac_ext=c
2798ac_cpp='$CPP $CPPFLAGS'
2799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2801ac_compiler_gnu=$ac_cv_c_compiler_gnu
2802
2803
2804
2805
2806
2807ac_config_headers="$ac_config_headers config.h:config.in"
2808
2809
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2811$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2812 # Check whether --enable-maintainer-mode was given.
2813if test "${enable_maintainer_mode+set}" = set; then :
2814 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2815else
2816 USE_MAINTAINER_MODE=no
2817fi
2818
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2820$as_echo "$USE_MAINTAINER_MODE" >&6; }
2821 if test $USE_MAINTAINER_MODE = yes; then
2822 MAINTAINER_MODE_TRUE=
2823 MAINTAINER_MODE_FALSE='#'
2824else
2825 MAINTAINER_MODE_TRUE='#'
2826 MAINTAINER_MODE_FALSE=
2827fi
2828
2829 MAINT=$MAINTAINER_MODE_TRUE
2830
2831
2832
2833ac_ext=c
2834ac_cpp='$CPP $CPPFLAGS'
2835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2837ac_compiler_gnu=$ac_cv_c_compiler_gnu
2838if test -n "$ac_tool_prefix"; then
2839 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2840set dummy ${ac_tool_prefix}gcc; ac_word=$2
2841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2842$as_echo_n "checking for $ac_word... " >&6; }
2843if test "${ac_cv_prog_CC+set}" = set; then :
2844 $as_echo_n "(cached) " >&6
c906108c
SS
2845else
2846 if test -n "$CC"; then
2847 ac_cv_prog_CC="$CC" # Let the user override the test.
2848else
bec39cab
AC
2849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2850for as_dir in $PATH
2851do
2852 IFS=$as_save_IFS
2853 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2854 for ac_exec_ext in '' $ac_executable_extensions; do
2855 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2856 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2858 break 2
2859 fi
2860done
81ecdfbb
RW
2861 done
2862IFS=$as_save_IFS
bec39cab 2863
c906108c
SS
2864fi
2865fi
bec39cab 2866CC=$ac_cv_prog_CC
c906108c 2867if test -n "$CC"; then
81ecdfbb
RW
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2869$as_echo "$CC" >&6; }
c906108c 2870else
81ecdfbb
RW
2871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2872$as_echo "no" >&6; }
c906108c
SS
2873fi
2874
81ecdfbb 2875
b4e70030
JB
2876fi
2877if test -z "$ac_cv_prog_CC"; then
2878 ac_ct_CC=$CC
81ecdfbb
RW
2879 # Extract the first word of "gcc", so it can be a program name with args.
2880set dummy gcc; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2884 $as_echo_n "(cached) " >&6
b4e70030
JB
2885else
2886 if test -n "$ac_ct_CC"; then
2887 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2896 ac_cv_prog_ac_ct_CC="gcc"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2898 break 2
4e8d927d 2899 fi
b4e70030 2900done
81ecdfbb
RW
2901 done
2902IFS=$as_save_IFS
b4e70030
JB
2903
2904fi
2905fi
2906ac_ct_CC=$ac_cv_prog_ac_ct_CC
2907if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2909$as_echo "$ac_ct_CC" >&6; }
b4e70030 2910else
81ecdfbb
RW
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
b4e70030
JB
2913fi
2914
81ecdfbb
RW
2915 if test "x$ac_ct_CC" = x; then
2916 CC=""
2917 else
2918 case $cross_compiling:$ac_tool_warned in
2919yes:)
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2922ac_tool_warned=yes ;;
2923esac
2924 CC=$ac_ct_CC
2925 fi
b4e70030
JB
2926else
2927 CC="$ac_cv_prog_CC"
2928fi
2929
c906108c 2930if test -z "$CC"; then
81ecdfbb
RW
2931 if test -n "$ac_tool_prefix"; then
2932 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2933set dummy ${ac_tool_prefix}cc; ac_word=$2
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2935$as_echo_n "checking for $ac_word... " >&6; }
2936if test "${ac_cv_prog_CC+set}" = set; then :
2937 $as_echo_n "(cached) " >&6
c906108c
SS
2938else
2939 if test -n "$CC"; then
2940 ac_cv_prog_CC="$CC" # Let the user override the test.
2941else
bec39cab
AC
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945 IFS=$as_save_IFS
2946 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2947 for ac_exec_ext in '' $ac_executable_extensions; do
2948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2949 ac_cv_prog_CC="${ac_tool_prefix}cc"
2950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2951 break 2
2952 fi
2953done
81ecdfbb
RW
2954 done
2955IFS=$as_save_IFS
2956
2957fi
2958fi
2959CC=$ac_cv_prog_CC
2960if test -n "$CC"; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2962$as_echo "$CC" >&6; }
2963else
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2965$as_echo "no" >&6; }
2966fi
2967
2968
2969 fi
2970fi
2971if test -z "$CC"; then
2972 # Extract the first word of "cc", so it can be a program name with args.
2973set dummy cc; ac_word=$2
2974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2975$as_echo_n "checking for $ac_word... " >&6; }
2976if test "${ac_cv_prog_CC+set}" = set; then :
2977 $as_echo_n "(cached) " >&6
2978else
2979 if test -n "$CC"; then
2980 ac_cv_prog_CC="$CC" # Let the user override the test.
2981else
2982 ac_prog_rejected=no
2983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2984for as_dir in $PATH
2985do
2986 IFS=$as_save_IFS
2987 test -z "$as_dir" && as_dir=.
2988 for ac_exec_ext in '' $ac_executable_extensions; do
2989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2990 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2991 ac_prog_rejected=yes
2992 continue
2993 fi
2994 ac_cv_prog_CC="cc"
2995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2996 break 2
2997 fi
2998done
2999 done
3000IFS=$as_save_IFS
bec39cab 3001
c906108c
SS
3002if test $ac_prog_rejected = yes; then
3003 # We found a bogon in the path, so make sure we never use it.
3004 set dummy $ac_cv_prog_CC
3005 shift
bec39cab 3006 if test $# != 0; then
c906108c
SS
3007 # We chose a different compiler from the bogus one.
3008 # However, it has the same basename, so the bogon will be chosen
3009 # first if we set CC to just the basename; use the full file name.
3010 shift
bec39cab 3011 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3012 fi
3013fi
3014fi
3015fi
bec39cab 3016CC=$ac_cv_prog_CC
c906108c 3017if test -n "$CC"; then
81ecdfbb
RW
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3019$as_echo "$CC" >&6; }
c906108c 3020else
81ecdfbb
RW
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3022$as_echo "no" >&6; }
c906108c
SS
3023fi
3024
81ecdfbb 3025
bec39cab
AC
3026fi
3027if test -z "$CC"; then
3028 if test -n "$ac_tool_prefix"; then
81ecdfbb 3029 for ac_prog in cl.exe
bec39cab
AC
3030 do
3031 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034$as_echo_n "checking for $ac_word... " >&6; }
3035if test "${ac_cv_prog_CC+set}" = set; then :
3036 $as_echo_n "(cached) " >&6
c906108c
SS
3037else
3038 if test -n "$CC"; then
3039 ac_cv_prog_CC="$CC" # Let the user override the test.
3040else
bec39cab
AC
3041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042for as_dir in $PATH
3043do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3046 for ac_exec_ext in '' $ac_executable_extensions; do
3047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3048 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3050 break 2
3051 fi
3052done
81ecdfbb
RW
3053 done
3054IFS=$as_save_IFS
bec39cab 3055
c906108c
SS
3056fi
3057fi
bec39cab 3058CC=$ac_cv_prog_CC
c906108c 3059if test -n "$CC"; then
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3061$as_echo "$CC" >&6; }
c906108c 3062else
81ecdfbb
RW
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
c906108c 3065fi
bec39cab 3066
81ecdfbb 3067
bec39cab
AC
3068 test -n "$CC" && break
3069 done
3070fi
3071if test -z "$CC"; then
3072 ac_ct_CC=$CC
81ecdfbb 3073 for ac_prog in cl.exe
bec39cab
AC
3074do
3075 # Extract the first word of "$ac_prog", so it can be a program name with args.
3076set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3078$as_echo_n "checking for $ac_word... " >&6; }
3079if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3080 $as_echo_n "(cached) " >&6
bec39cab
AC
3081else
3082 if test -n "$ac_ct_CC"; then
3083 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3084else
3085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3086for as_dir in $PATH
3087do
3088 IFS=$as_save_IFS
3089 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3090 for ac_exec_ext in '' $ac_executable_extensions; do
3091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3092 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3094 break 2
c906108c 3095 fi
bec39cab 3096done
81ecdfbb
RW
3097 done
3098IFS=$as_save_IFS
bec39cab
AC
3099
3100fi
3101fi
3102ac_ct_CC=$ac_cv_prog_ac_ct_CC
3103if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3105$as_echo "$ac_ct_CC" >&6; }
bec39cab 3106else
81ecdfbb
RW
3107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3108$as_echo "no" >&6; }
c906108c
SS
3109fi
3110
81ecdfbb 3111
bec39cab
AC
3112 test -n "$ac_ct_CC" && break
3113done
c906108c 3114
81ecdfbb
RW
3115 if test "x$ac_ct_CC" = x; then
3116 CC=""
3117 else
3118 case $cross_compiling:$ac_tool_warned in
3119yes:)
3120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3122ac_tool_warned=yes ;;
3123esac
3124 CC=$ac_ct_CC
3125 fi
bec39cab
AC
3126fi
3127
3128fi
3129
3130
81ecdfbb
RW
3131test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3133as_fn_error "no acceptable C compiler found in \$PATH
3134See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3135
3136# Provide some information about the compiler.
81ecdfbb
RW
3137$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3138set X $ac_compile
3139ac_compiler=$2
3140for ac_option in --version -v -V -qversion; do
3141 { { ac_try="$ac_compiler $ac_option >&5"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
3146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3147$as_echo "$ac_try_echo"; } >&5
3148 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3149 ac_status=$?
81ecdfbb
RW
3150 if test -s conftest.err; then
3151 sed '10a\
3152... rest of stderr output deleted ...
3153 10q' conftest.err >conftest.er1
3154 cat conftest.er1 >&5
3155 rm -f conftest.er1 conftest.err
3156 fi
3157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158 test $ac_status = 0; }
3159done
bec39cab 3160
81ecdfbb 3161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3162/* end confdefs.h. */
3163
3164int
3165main ()
3166{
3167
3168 ;
3169 return 0;
3170}
3171_ACEOF
3172ac_clean_files_save=$ac_clean_files
81ecdfbb 3173ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3174# Try to create an executable without -o first, disregard a.out.
3175# It will help us diagnose broken compilers, and finding out an intuition
3176# of exeext.
81ecdfbb
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3178$as_echo_n "checking for C compiler default output file name... " >&6; }
3179ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3180
3181# The possible output files:
3182ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3183
3184ac_rmfiles=
3185for ac_file in $ac_files
3186do
3187 case $ac_file in
3188 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3189 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3190 esac
3191done
3192rm -f $ac_rmfiles
3193
3194if { { ac_try="$ac_link_default"
3195case "(($ac_try" in
3196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3197 *) ac_try_echo=$ac_try;;
3198esac
3199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3200$as_echo "$ac_try_echo"; } >&5
3201 (eval "$ac_link_default") 2>&5
3202 ac_status=$?
3203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3204 test $ac_status = 0; }; then :
3205 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3206# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3207# in a Makefile. We should not override ac_cv_exeext if it was cached,
3208# so that the user can short-circuit this test for compilers unknown to
3209# Autoconf.
3210for ac_file in $ac_files ''
bec39cab
AC
3211do
3212 test -f "$ac_file" || continue
3213 case $ac_file in
81ecdfbb 3214 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3215 ;;
3216 [ab].out )
3217 # We found the default executable, but exeext='' is most
3218 # certainly right.
3219 break;;
3220 *.* )
81ecdfbb
RW
3221 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3222 then :; else
3223 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3224 fi
3225 # We set ac_cv_exeext here because the later test for it is not
3226 # safe: cross compilers may not add the suffix if given an `-o'
3227 # argument, so we may need to know it at that point already.
3228 # Even if this section looks crufty: it has the advantage of
3229 # actually working.
b4e70030
JB
3230 break;;
3231 * )
3232 break;;
bec39cab
AC
3233 esac
3234done
81ecdfbb
RW
3235test "$ac_cv_exeext" = no && ac_cv_exeext=
3236
bec39cab 3237else
81ecdfbb
RW
3238 ac_file=''
3239fi
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3241$as_echo "$ac_file" >&6; }
3242if test -z "$ac_file"; then :
3243 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3244sed 's/^/| /' conftest.$ac_ext >&5
3245
81ecdfbb
RW
3246{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248{ as_fn_set_status 77
3249as_fn_error "C compiler cannot create executables
3250See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3251fi
b4e70030 3252ac_exeext=$ac_cv_exeext
b4e70030 3253
81ecdfbb 3254# Check that the compiler produces executables we can run. If not, either
bec39cab 3255# the compiler is broken, or we cross compile.
81ecdfbb
RW
3256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3257$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3258# If not cross compiling, check that we can run a simple program.
3259if test "$cross_compiling" != yes; then
3260 if { ac_try='./$ac_file'
81ecdfbb
RW
3261 { { case "(($ac_try" in
3262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3263 *) ac_try_echo=$ac_try;;
3264esac
3265eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3266$as_echo "$ac_try_echo"; } >&5
3267 (eval "$ac_try") 2>&5
bec39cab 3268 ac_status=$?
81ecdfbb
RW
3269 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3270 test $ac_status = 0; }; }; then
bec39cab 3271 cross_compiling=no
c906108c 3272 else
bec39cab
AC
3273 if test "$cross_compiling" = maybe; then
3274 cross_compiling=yes
3275 else
81ecdfbb
RW
3276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3278as_fn_error "cannot run C compiled programs.
bec39cab 3279If you meant to cross compile, use \`--host'.
81ecdfbb 3280See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3281 fi
c906108c 3282 fi
bec39cab 3283fi
81ecdfbb
RW
3284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3285$as_echo "yes" >&6; }
bec39cab 3286
81ecdfbb 3287rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3288ac_clean_files=$ac_clean_files_save
81ecdfbb 3289# Check that the compiler produces executables we can run. If not, either
b4e70030 3290# the compiler is broken, or we cross compile.
81ecdfbb
RW
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3292$as_echo_n "checking whether we are cross compiling... " >&6; }
3293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3294$as_echo "$cross_compiling" >&6; }
3295
3296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3297$as_echo_n "checking for suffix of executables... " >&6; }
3298if { { ac_try="$ac_link"
3299case "(($ac_try" in
3300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3301 *) ac_try_echo=$ac_try;;
3302esac
3303eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3304$as_echo "$ac_try_echo"; } >&5
3305 (eval "$ac_link") 2>&5
bec39cab 3306 ac_status=$?
81ecdfbb
RW
3307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3308 test $ac_status = 0; }; then :
b4e70030
JB
3309 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3310# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3311# work properly (i.e., refer to `conftest.exe'), while it won't with
3312# `rm'.
3313for ac_file in conftest.exe conftest conftest.*; do
3314 test -f "$ac_file" || continue
3315 case $ac_file in
81ecdfbb 3316 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3317 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3318 break;;
3319 * ) break;;
3320 esac
3321done
c906108c 3322else
81ecdfbb
RW
3323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3325as_fn_error "cannot compute suffix of executables: cannot compile and link
3326See \`config.log' for more details." "$LINENO" 5; }
c906108c 3327fi
b4e70030 3328rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3330$as_echo "$ac_cv_exeext" >&6; }
c906108c 3331
b4e70030 3332rm -f conftest.$ac_ext
bec39cab
AC
3333EXEEXT=$ac_cv_exeext
3334ac_exeext=$EXEEXT
81ecdfbb
RW
3335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3336$as_echo_n "checking for suffix of object files... " >&6; }
3337if test "${ac_cv_objext+set}" = set; then :
3338 $as_echo_n "(cached) " >&6
bec39cab 3339else
81ecdfbb 3340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3341/* end confdefs.h. */
3342
3343int
3344main ()
3345{
3346
3347 ;
3348 return 0;
3349}
3350_ACEOF
3351rm -f conftest.o conftest.obj
81ecdfbb
RW
3352if { { ac_try="$ac_compile"
3353case "(($ac_try" in
3354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3355 *) ac_try_echo=$ac_try;;
3356esac
3357eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3358$as_echo "$ac_try_echo"; } >&5
3359 (eval "$ac_compile") 2>&5
3360 ac_status=$?
3361 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3362 test $ac_status = 0; }; then :
3363 for ac_file in conftest.o conftest.obj conftest.*; do
3364 test -f "$ac_file" || continue;
bec39cab 3365 case $ac_file in
81ecdfbb 3366 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3367 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3368 break;;
3369 esac
3370done
c906108c 3371else
81ecdfbb 3372 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3373sed 's/^/| /' conftest.$ac_ext >&5
3374
81ecdfbb
RW
3375{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3377as_fn_error "cannot compute suffix of object files: cannot compile
3378See \`config.log' for more details." "$LINENO" 5; }
c906108c 3379fi
b4e70030 3380rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3381fi
81ecdfbb
RW
3382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3383$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3384OBJEXT=$ac_cv_objext
3385ac_objext=$OBJEXT
81ecdfbb
RW
3386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3387$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3388if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3389 $as_echo_n "(cached) " >&6
c906108c 3390else
81ecdfbb 3391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3392/* end confdefs.h. */
3393
3394int
3395main ()
3396{
3397#ifndef __GNUC__
3398 choke me
3399#endif
3400
3401 ;
3402 return 0;
3403}
3404_ACEOF
81ecdfbb 3405if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3406 ac_compiler_gnu=yes
3407else
81ecdfbb 3408 ac_compiler_gnu=no
bec39cab 3409fi
81ecdfbb 3410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3411ac_cv_c_compiler_gnu=$ac_compiler_gnu
3412
3413fi
81ecdfbb
RW
3414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3415$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3416if test $ac_compiler_gnu = yes; then
3417 GCC=yes
3418else
3419 GCC=
3420fi
bec39cab
AC
3421ac_test_CFLAGS=${CFLAGS+set}
3422ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3424$as_echo_n "checking whether $CC accepts -g... " >&6; }
3425if test "${ac_cv_prog_cc_g+set}" = set; then :
3426 $as_echo_n "(cached) " >&6
bec39cab 3427else
81ecdfbb
RW
3428 ac_save_c_werror_flag=$ac_c_werror_flag
3429 ac_c_werror_flag=yes
3430 ac_cv_prog_cc_g=no
3431 CFLAGS="-g"
3432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3433/* end confdefs.h. */
3434
3435int
3436main ()
3437{
3438
3439 ;
3440 return 0;
3441}
3442_ACEOF
81ecdfbb 3443if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3444 ac_cv_prog_cc_g=yes
3445else
81ecdfbb
RW
3446 CFLAGS=""
3447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3448/* end confdefs.h. */
3449
3450int
3451main ()
3452{
3453
3454 ;
3455 return 0;
3456}
3457_ACEOF
3458if ac_fn_c_try_compile "$LINENO"; then :
3459
3460else
3461 ac_c_werror_flag=$ac_save_c_werror_flag
3462 CFLAGS="-g"
3463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3464/* end confdefs.h. */
3465
3466int
3467main ()
3468{
c906108c 3469
81ecdfbb
RW
3470 ;
3471 return 0;
3472}
3473_ACEOF
3474if ac_fn_c_try_compile "$LINENO"; then :
3475 ac_cv_prog_cc_g=yes
3476fi
3477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3478fi
3479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3480fi
81ecdfbb
RW
3481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3482 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3483fi
81ecdfbb
RW
3484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3485$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3486if test "$ac_test_CFLAGS" = set; then
bec39cab 3487 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3488elif test $ac_cv_prog_cc_g = yes; then
3489 if test "$GCC" = yes; then
3490 CFLAGS="-g -O2"
3491 else
3492 CFLAGS="-g"
3493 fi
3494else
3495 if test "$GCC" = yes; then
3496 CFLAGS="-O2"
3497 else
3498 CFLAGS=
3499 fi
3500fi
81ecdfbb
RW
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3502$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3503if test "${ac_cv_prog_cc_c89+set}" = set; then :
3504 $as_echo_n "(cached) " >&6
bec39cab 3505else
81ecdfbb 3506 ac_cv_prog_cc_c89=no
bec39cab 3507ac_save_CC=$CC
81ecdfbb 3508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3509/* end confdefs.h. */
c906108c
SS
3510#include <stdarg.h>
3511#include <stdio.h>
3512#include <sys/types.h>
3513#include <sys/stat.h>
3514/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3515struct buf { int x; };
3516FILE * (*rcsopen) (struct buf *, struct stat *, int);
3517static char *e (p, i)
3518 char **p;
3519 int i;
3520{
3521 return p[i];
3522}
3523static char *f (char * (*g) (char **, int), char **p, ...)
3524{
3525 char *s;
3526 va_list v;
3527 va_start (v,p);
3528 s = g (p, va_arg (v,int));
3529 va_end (v);
3530 return s;
3531}
bec39cab
AC
3532
3533/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3534 function prototypes and stuff, but not '\xHH' hex character constants.
3535 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3536 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3537 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3538 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3539 that's true only with -std. */
bec39cab
AC
3540int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3541
81ecdfbb
RW
3542/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3543 inside strings and character constants. */
3544#define FOO(x) 'x'
3545int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3546
c906108c
SS
3547int test (int i, double x);
3548struct s1 {int (*f) (int a);};
3549struct s2 {int (*f) (double a);};
3550int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3551int argc;
3552char **argv;
bec39cab
AC
3553int
3554main ()
3555{
c906108c 3556return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3557 ;
3558 return 0;
3559}
3560_ACEOF
81ecdfbb
RW
3561for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3562 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3563do
3564 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3565 if ac_fn_c_try_compile "$LINENO"; then :
3566 ac_cv_prog_cc_c89=$ac_arg
c906108c 3567fi
81ecdfbb
RW
3568rm -f core conftest.err conftest.$ac_objext
3569 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3570done
81ecdfbb 3571rm -f conftest.$ac_ext
bec39cab 3572CC=$ac_save_CC
c906108c
SS
3573
3574fi
81ecdfbb
RW
3575# AC_CACHE_VAL
3576case "x$ac_cv_prog_cc_c89" in
3577 x)
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3579$as_echo "none needed" >&6; } ;;
3580 xno)
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3582$as_echo "unsupported" >&6; } ;;
bec39cab 3583 *)
81ecdfbb
RW
3584 CC="$CC $ac_cv_prog_cc_c89"
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3586$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3587esac
81ecdfbb 3588if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3589
b4e70030
JB
3590fi
3591
bec39cab
AC
3592ac_ext=c
3593ac_cpp='$CPP $CPPFLAGS'
3594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3596ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3597
f434ba03
PA
3598ac_aux_dir=
3599for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3600 for ac_t in install-sh install.sh shtool; do
3601 if test -f "$ac_dir/$ac_t"; then
3602 ac_aux_dir=$ac_dir
3603 ac_install_sh="$ac_aux_dir/$ac_t -c"
3604 break 2
3605 fi
3606 done
3607done
3608if test -z "$ac_aux_dir"; then
3609 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3610fi
3611
3612# These three variables are undocumented and unsupported,
3613# and are intended to be withdrawn in a future Autoconf release.
3614# They can cause serious problems if a builder's source tree is in a directory
3615# whose full name contains unusual characters.
3616ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3617ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3618ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3619
3620
3621# Make sure we can run config.sub.
3622$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3623 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3624
3625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3626$as_echo_n "checking build system type... " >&6; }
3627if test "${ac_cv_build+set}" = set; then :
3628 $as_echo_n "(cached) " >&6
3629else
3630 ac_build_alias=$build_alias
3631test "x$ac_build_alias" = x &&
3632 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3633test "x$ac_build_alias" = x &&
3634 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3635ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3636 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3637
3638fi
3639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3640$as_echo "$ac_cv_build" >&6; }
3641case $ac_cv_build in
3642*-*-*) ;;
3643*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3644esac
3645build=$ac_cv_build
3646ac_save_IFS=$IFS; IFS='-'
3647set x $ac_cv_build
3648shift
3649build_cpu=$1
3650build_vendor=$2
3651shift; shift
3652# Remember, the first character of IFS is used to create $*,
3653# except with old shells:
3654build_os=$*
3655IFS=$ac_save_IFS
3656case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3657
3658
3659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3660$as_echo_n "checking host system type... " >&6; }
3661if test "${ac_cv_host+set}" = set; then :
3662 $as_echo_n "(cached) " >&6
3663else
3664 if test "x$host_alias" = x; then
3665 ac_cv_host=$ac_cv_build
3666else
3667 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3668 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3669fi
3670
3671fi
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3673$as_echo "$ac_cv_host" >&6; }
3674case $ac_cv_host in
3675*-*-*) ;;
3676*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3677esac
3678host=$ac_cv_host
3679ac_save_IFS=$IFS; IFS='-'
3680set x $ac_cv_host
3681shift
3682host_cpu=$1
3683host_vendor=$2
3684shift; shift
3685# Remember, the first character of IFS is used to create $*,
3686# except with old shells:
3687host_os=$*
3688IFS=$ac_save_IFS
3689case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3690
3691
60ca704f 3692
bec39cab
AC
3693ac_ext=c
3694ac_cpp='$CPP $CPPFLAGS'
3695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3697ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3699$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3700# On Suns, sometimes $CPP names a directory.
3701if test -n "$CPP" && test -d "$CPP"; then
3702 CPP=
8bb2c122 3703fi
bec39cab 3704if test -z "$CPP"; then
81ecdfbb
RW
3705 if test "${ac_cv_prog_CPP+set}" = set; then :
3706 $as_echo_n "(cached) " >&6
bec39cab
AC
3707else
3708 # Double quotes because CPP needs to be expanded
3709 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3710 do
3711 ac_preproc_ok=false
3712for ac_c_preproc_warn_flag in '' yes
3713do
3714 # Use a header file that comes with gcc, so configuring glibc
3715 # with a fresh cross-compiler works.
3716 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3717 # <limits.h> exists even on freestanding compilers.
3718 # On the NeXT, cc -E runs the code through the compiler's parser,
3719 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3721/* end confdefs.h. */
3722#ifdef __STDC__
3723# include <limits.h>
3724#else
3725# include <assert.h>
3726#endif
3727 Syntax error
3728_ACEOF
81ecdfbb 3729if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3730
81ecdfbb 3731else
bec39cab
AC
3732 # Broken: fails on valid input.
3733continue
3734fi
3735rm -f conftest.err conftest.$ac_ext
3736
81ecdfbb 3737 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3738 # can be detected and how.
81ecdfbb 3739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3740/* end confdefs.h. */
3741#include <ac_nonexistent.h>
3742_ACEOF
81ecdfbb 3743if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3744 # Broken: success on invalid input.
3745continue
8bb2c122 3746else
bec39cab
AC
3747 # Passes both tests.
3748ac_preproc_ok=:
3749break
8bb2c122 3750fi
bec39cab 3751rm -f conftest.err conftest.$ac_ext
8bb2c122 3752
bec39cab
AC
3753done
3754# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3755rm -f conftest.err conftest.$ac_ext
81ecdfbb 3756if $ac_preproc_ok; then :
bec39cab
AC
3757 break
3758fi
8bb2c122 3759
bec39cab
AC
3760 done
3761 ac_cv_prog_CPP=$CPP
ddc9cd0f 3762
c906108c 3763fi
bec39cab
AC
3764 CPP=$ac_cv_prog_CPP
3765else
3766 ac_cv_prog_CPP=$CPP
c906108c 3767fi
81ecdfbb
RW
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3769$as_echo "$CPP" >&6; }
bec39cab
AC
3770ac_preproc_ok=false
3771for ac_c_preproc_warn_flag in '' yes
3772do
3773 # Use a header file that comes with gcc, so configuring glibc
3774 # with a fresh cross-compiler works.
3775 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3776 # <limits.h> exists even on freestanding compilers.
3777 # On the NeXT, cc -E runs the code through the compiler's parser,
3778 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3780/* end confdefs.h. */
3781#ifdef __STDC__
3782# include <limits.h>
3783#else
3784# include <assert.h>
3785#endif
3786 Syntax error
3787_ACEOF
81ecdfbb 3788if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3789
81ecdfbb 3790else
bec39cab
AC
3791 # Broken: fails on valid input.
3792continue
3793fi
3794rm -f conftest.err conftest.$ac_ext
3795
81ecdfbb 3796 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3797 # can be detected and how.
81ecdfbb 3798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3799/* end confdefs.h. */
3800#include <ac_nonexistent.h>
3801_ACEOF
81ecdfbb 3802if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3803 # Broken: success on invalid input.
3804continue
c906108c 3805else
bec39cab
AC
3806 # Passes both tests.
3807ac_preproc_ok=:
3808break
c906108c 3809fi
bec39cab 3810rm -f conftest.err conftest.$ac_ext
c906108c 3811
bec39cab
AC
3812done
3813# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3814rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3815if $ac_preproc_ok; then :
3816
c906108c 3817else
81ecdfbb
RW
3818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3820as_fn_error "C preprocessor \"$CPP\" fails sanity check
3821See \`config.log' for more details." "$LINENO" 5; }
c906108c 3822fi
c906108c 3823
bec39cab
AC
3824ac_ext=c
3825ac_cpp='$CPP $CPPFLAGS'
3826ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3827ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3828ac_compiler_gnu=$ac_cv_c_compiler_gnu
3829
3830
81ecdfbb
RW
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3832$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3833if test "${ac_cv_path_GREP+set}" = set; then :
3834 $as_echo_n "(cached) " >&6
4e8d927d 3835else
81ecdfbb
RW
3836 if test -z "$GREP"; then
3837 ac_path_GREP_found=false
3838 # Loop through the user's path and test for each of PROGNAME-LIST
3839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3841do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
3844 for ac_prog in grep ggrep; do
3845 for ac_exec_ext in '' $ac_executable_extensions; do
3846 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3847 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3848# Check for GNU ac_path_GREP and select it if it is found.
3849 # Check for GNU $ac_path_GREP
3850case `"$ac_path_GREP" --version 2>&1` in
3851*GNU*)
3852 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3853*)
3854 ac_count=0
3855 $as_echo_n 0123456789 >"conftest.in"
3856 while :
3857 do
3858 cat "conftest.in" "conftest.in" >"conftest.tmp"
3859 mv "conftest.tmp" "conftest.in"
3860 cp "conftest.in" "conftest.nl"
3861 $as_echo 'GREP' >> "conftest.nl"
3862 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3863 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3864 as_fn_arith $ac_count + 1 && ac_count=$as_val
3865 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3866 # Best one so far, save it but keep looking for a better one
3867 ac_cv_path_GREP="$ac_path_GREP"
3868 ac_path_GREP_max=$ac_count
bec39cab 3869 fi
81ecdfbb
RW
3870 # 10*(2^10) chars as input seems more than enough
3871 test $ac_count -gt 10 && break
3872 done
3873 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3874esac
bec39cab 3875
81ecdfbb
RW
3876 $ac_path_GREP_found && break 3
3877 done
3878 done
3879 done
3880IFS=$as_save_IFS
3881 if test -z "$ac_cv_path_GREP"; then
3882 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3883 fi
c906108c 3884else
81ecdfbb 3885 ac_cv_path_GREP=$GREP
c906108c 3886fi
c906108c 3887
81ecdfbb
RW
3888fi
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3890$as_echo "$ac_cv_path_GREP" >&6; }
3891 GREP="$ac_cv_path_GREP"
c906108c 3892
c906108c 3893
81ecdfbb
RW
3894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3895$as_echo_n "checking for egrep... " >&6; }
3896if test "${ac_cv_path_EGREP+set}" = set; then :
3897 $as_echo_n "(cached) " >&6
783e057b 3898else
81ecdfbb
RW
3899 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3900 then ac_cv_path_EGREP="$GREP -E"
3901 else
3902 if test -z "$EGREP"; then
3903 ac_path_EGREP_found=false
3904 # Loop through the user's path and test for each of PROGNAME-LIST
3905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3907do
3908 IFS=$as_save_IFS
3909 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3910 for ac_prog in egrep; do
3911 for ac_exec_ext in '' $ac_executable_extensions; do
3912 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3913 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3914# Check for GNU ac_path_EGREP and select it if it is found.
3915 # Check for GNU $ac_path_EGREP
3916case `"$ac_path_EGREP" --version 2>&1` in
3917*GNU*)
3918 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3919*)
3920 ac_count=0
3921 $as_echo_n 0123456789 >"conftest.in"
3922 while :
3923 do
3924 cat "conftest.in" "conftest.in" >"conftest.tmp"
3925 mv "conftest.tmp" "conftest.in"
3926 cp "conftest.in" "conftest.nl"
3927 $as_echo 'EGREP' >> "conftest.nl"
3928 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3929 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3930 as_fn_arith $ac_count + 1 && ac_count=$as_val
3931 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3932 # Best one so far, save it but keep looking for a better one
3933 ac_cv_path_EGREP="$ac_path_EGREP"
3934 ac_path_EGREP_max=$ac_count
3935 fi
3936 # 10*(2^10) chars as input seems more than enough
3937 test $ac_count -gt 10 && break
3938 done
3939 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3940esac
bec39cab 3941
81ecdfbb
RW
3942 $ac_path_EGREP_found && break 3
3943 done
3944 done
3945 done
3946IFS=$as_save_IFS
3947 if test -z "$ac_cv_path_EGREP"; then
3948 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3949 fi
783e057b 3950else
81ecdfbb 3951 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3952fi
3953
81ecdfbb 3954 fi
783e057b 3955fi
81ecdfbb
RW
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3957$as_echo "$ac_cv_path_EGREP" >&6; }
3958 EGREP="$ac_cv_path_EGREP"
3959
783e057b 3960
81ecdfbb
RW
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3962$as_echo_n "checking for ANSI C header files... " >&6; }
3963if test "${ac_cv_header_stdc+set}" = set; then :
3964 $as_echo_n "(cached) " >&6
783e057b 3965else
81ecdfbb 3966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3967/* end confdefs.h. */
783e057b 3968#include <stdlib.h>
bec39cab 3969#include <stdarg.h>
783e057b
DJ
3970#include <string.h>
3971#include <float.h>
c906108c 3972
bec39cab
AC
3973int
3974main ()
3975{
c906108c 3976
bec39cab
AC
3977 ;
3978 return 0;
3979}
3980_ACEOF
81ecdfbb 3981if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3982 ac_cv_header_stdc=yes
c906108c 3983else
81ecdfbb 3984 ac_cv_header_stdc=no
c906108c 3985fi
81ecdfbb 3986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3987
783e057b
DJ
3988if test $ac_cv_header_stdc = yes; then
3989 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3991/* end confdefs.h. */
3992#include <string.h>
c906108c 3993
783e057b
DJ
3994_ACEOF
3995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3996 $EGREP "memchr" >/dev/null 2>&1; then :
3997
c906108c 3998else
783e057b 3999 ac_cv_header_stdc=no
c906108c 4000fi
783e057b 4001rm -f conftest*
c906108c
SS
4002
4003fi
4004
783e057b
DJ
4005if test $ac_cv_header_stdc = yes; then
4006 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4008/* end confdefs.h. */
4009#include <stdlib.h>
bec39cab 4010
783e057b
DJ
4011_ACEOF
4012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4013 $EGREP "free" >/dev/null 2>&1; then :
4014
bec39cab 4015else
783e057b 4016 ac_cv_header_stdc=no
bec39cab 4017fi
783e057b 4018rm -f conftest*
bec39cab
AC
4019
4020fi
bec39cab 4021
783e057b
DJ
4022if test $ac_cv_header_stdc = yes; then
4023 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4024 if test "$cross_compiling" = yes; then :
783e057b 4025 :
bec39cab 4026else
81ecdfbb 4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4028/* end confdefs.h. */
4029#include <ctype.h>
81ecdfbb 4030#include <stdlib.h>
783e057b
DJ
4031#if ((' ' & 0x0FF) == 0x020)
4032# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4033# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4034#else
4035# define ISLOWER(c) \
4036 (('a' <= (c) && (c) <= 'i') \
4037 || ('j' <= (c) && (c) <= 'r') \
4038 || ('s' <= (c) && (c) <= 'z'))
4039# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4040#endif
4041
4042#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4043int
4044main ()
4045{
4046 int i;
4047 for (i = 0; i < 256; i++)
4048 if (XOR (islower (i), ISLOWER (i))
4049 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4050 return 2;
4051 return 0;
783e057b
DJ
4052}
4053_ACEOF
81ecdfbb 4054if ac_fn_c_try_run "$LINENO"; then :
783e057b 4055
81ecdfbb
RW
4056else
4057 ac_cv_header_stdc=no
783e057b 4058fi
81ecdfbb
RW
4059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4060 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4061fi
81ecdfbb 4062
783e057b
DJ
4063fi
4064fi
81ecdfbb
RW
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4066$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4067if test $ac_cv_header_stdc = yes; then
4068
81ecdfbb 4069$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4070
4071fi
4072
4073# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4074for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4075 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4076do :
4077 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4078ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4079"
4080eval as_val=\$$as_ac_Header
4081 if test "x$as_val" = x""yes; then :
783e057b 4082 cat >>confdefs.h <<_ACEOF
81ecdfbb 4083#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4084_ACEOF
4085
4086fi
4087
4088done
4089
4090
4091
f434ba03
PA
4092
4093
81ecdfbb
RW
4094 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4095if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4096 MINIX=yes
4097else
4098 MINIX=
4099fi
4100
4101
4102 if test "$MINIX" = yes; then
4103
81ecdfbb 4104$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4105
4106
81ecdfbb 4107$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4108
4109
81ecdfbb 4110$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4111
4112 fi
4113
f434ba03
PA
4114 case "$host_os" in
4115 hpux*)
4116
4117$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4118
4119 ;;
4120 esac
4121
783e057b 4122
81ecdfbb
RW
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4124$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4125if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4126 $as_echo_n "(cached) " >&6
783e057b 4127else
81ecdfbb 4128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4129/* end confdefs.h. */
4130
f434ba03
PA
4131# define __EXTENSIONS__ 1
4132 $ac_includes_default
783e057b
DJ
4133int
4134main ()
4135{
4136
4137 ;
4138 return 0;
4139}
4140_ACEOF
81ecdfbb 4141if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4142 ac_cv_safe_to_define___extensions__=yes
4143else
81ecdfbb 4144 ac_cv_safe_to_define___extensions__=no
783e057b 4145fi
81ecdfbb 4146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4147fi
81ecdfbb
RW
4148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4149$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4150 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4151 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4152
81ecdfbb 4153 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4154
81ecdfbb 4155 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4156
81ecdfbb 4157 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4158
81ecdfbb 4159 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4160
4161
81ecdfbb
RW
4162if test -n "$ac_tool_prefix"; then
4163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4166$as_echo_n "checking for $ac_word... " >&6; }
4167if test "${ac_cv_prog_RANLIB+set}" = set; then :
4168 $as_echo_n "(cached) " >&6
4169else
4170 if test -n "$RANLIB"; then
4171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4180 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4182 break 2
4183 fi
4184done
4185 done
4186IFS=$as_save_IFS
783e057b 4187
81ecdfbb
RW
4188fi
4189fi
4190RANLIB=$ac_cv_prog_RANLIB
4191if test -n "$RANLIB"; then
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4193$as_echo "$RANLIB" >&6; }
4194else
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4196$as_echo "no" >&6; }
4197fi
783e057b
DJ
4198
4199
81ecdfbb
RW
4200fi
4201if test -z "$ac_cv_prog_RANLIB"; then
4202 ac_ct_RANLIB=$RANLIB
4203 # Extract the first word of "ranlib", so it can be a program name with args.
4204set dummy ranlib; ac_word=$2
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4206$as_echo_n "checking for $ac_word... " >&6; }
4207if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4208 $as_echo_n "(cached) " >&6
783e057b 4209else
81ecdfbb
RW
4210 if test -n "$ac_ct_RANLIB"; then
4211 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4212else
4213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_exec_ext in '' $ac_executable_extensions; do
4219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4220 ac_cv_prog_ac_ct_RANLIB="ranlib"
4221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4222 break 2
4223 fi
4224done
4225 done
4226IFS=$as_save_IFS
4227
4228fi
4229fi
4230ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4231if test -n "$ac_ct_RANLIB"; then
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4233$as_echo "$ac_ct_RANLIB" >&6; }
4234else
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236$as_echo "no" >&6; }
4237fi
4238
4239 if test "x$ac_ct_RANLIB" = x; then
4240 RANLIB=":"
4241 else
4242 case $cross_compiling:$ac_tool_warned in
4243yes:)
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4246ac_tool_warned=yes ;;
4247esac
4248 RANLIB=$ac_ct_RANLIB
4249 fi
4250else
4251 RANLIB="$ac_cv_prog_RANLIB"
4252fi
4253
4254
4255
4256
4257
4258
3388710e
JM
4259
4260
3388710e 4261
f434ba03
PA
4262 # Code from module arg-nonnull:
4263 # Code from module c++defs:
4264 # Code from module extensions:
3388710e 4265
f434ba03
PA
4266 # Code from module include_next:
4267 # Code from module memchr:
4268 # Code from module memmem:
4269 # Code from module memmem-simple:
4270 # Code from module multiarch:
4271 # Code from module stddef:
4272 # Code from module stdint:
4273 # Code from module string:
4274 # Code from module warn-on-use:
4275 # Code from module wchar:
3388710e
JM
4276
4277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4278$as_echo_n "checking target system type... " >&6; }
4279if test "${ac_cv_target+set}" = set; then :
4280 $as_echo_n "(cached) " >&6
4281else
4282 if test "x$target_alias" = x; then
4283 ac_cv_target=$ac_cv_host
4284else
4285 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4286 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4287fi
4288
4289fi
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4291$as_echo "$ac_cv_target" >&6; }
4292case $ac_cv_target in
4293*-*-*) ;;
4294*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4295esac
4296target=$ac_cv_target
4297ac_save_IFS=$IFS; IFS='-'
4298set x $ac_cv_target
4299shift
4300target_cpu=$1
4301target_vendor=$2
4302shift; shift
4303# Remember, the first character of IFS is used to create $*,
4304# except with old shells:
4305target_os=$*
4306IFS=$ac_save_IFS
4307case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4308
4309
4310# The aliases save the names the user supplied, while $host etc.
4311# will get canonicalized.
4312test -n "$target_alias" &&
4313 test "$program_prefix$program_suffix$program_transform_name" = \
4314 NONENONEs,x,x, &&
4315 program_prefix=${target_alias}-
4316
4317# The tests for host and target for $enable_largefile require
4318# canonical names.
4319
4320
81ecdfbb 4321
da2f07f1
JK
4322# As the $enable_largefile decision depends on --enable-plugins we must set it
4323# even in directories otherwise not depending on the $plugins option.
4324
4325
4326# Check whether --enable-plugins was given.
4327if test "${enable_plugins+set}" = set; then :
4328 enableval=$enable_plugins; case "${enableval}" in
4329 yes | "") plugins=yes ;;
4330 no) plugins=no ;;
4331 *) plugins=yes ;;
4332 esac
4333else
4334 plugins=no
4335fi
4336
4337
4338
4339case "${host}" in
4340 sparc-*-solaris*|i[3-7]86-*-solaris*)
4341 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4342 # are mutually exclusive; and without procfs support, the bfd/ elf module
4343 # cannot provide certain routines such as elfcore_write_prpsinfo
4344 # or elfcore_write_prstatus. So unless the user explicitly requested
4345 # large-file support through the --enable-largefile switch, disable
4346 # large-file support in favor of procfs support.
4347 test "${target}" = "${host}" -a "x$plugins" = xno \
4348 && : ${enable_largefile="no"}
4349 ;;
4350esac
4351
4352# Check whether --enable-largefile was given.
4353if test "${enable_largefile+set}" = set; then :
4354 enableval=$enable_largefile;
4355fi
4356
4357if test "$enable_largefile" != no; then
4358
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4360$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4361if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4362 $as_echo_n "(cached) " >&6
4363else
4364 ac_cv_sys_largefile_CC=no
4365 if test "$GCC" != yes; then
4366 ac_save_CC=$CC
4367 while :; do
4368 # IRIX 6.2 and later do not support large files by default,
4369 # so use the C compiler's -n32 option if that helps.
4370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371/* end confdefs.h. */
4372#include <sys/types.h>
4373 /* Check that off_t can represent 2**63 - 1 correctly.
4374 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4375 since some C++ compilers masquerading as C compilers
4376 incorrectly reject 9223372036854775807. */
4377#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4378 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4379 && LARGE_OFF_T % 2147483647 == 1)
4380 ? 1 : -1];
4381int
4382main ()
4383{
4384
4385 ;
4386 return 0;
4387}
4388_ACEOF
4389 if ac_fn_c_try_compile "$LINENO"; then :
4390 break
4391fi
4392rm -f core conftest.err conftest.$ac_objext
4393 CC="$CC -n32"
4394 if ac_fn_c_try_compile "$LINENO"; then :
4395 ac_cv_sys_largefile_CC=' -n32'; break
4396fi
4397rm -f core conftest.err conftest.$ac_objext
4398 break
4399 done
4400 CC=$ac_save_CC
4401 rm -f conftest.$ac_ext
4402 fi
4403fi
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4405$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4406 if test "$ac_cv_sys_largefile_CC" != no; then
4407 CC=$CC$ac_cv_sys_largefile_CC
4408 fi
4409
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4411$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4412if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4413 $as_echo_n "(cached) " >&6
4414else
4415 while :; do
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#include <sys/types.h>
4419 /* Check that off_t can represent 2**63 - 1 correctly.
4420 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4421 since some C++ compilers masquerading as C compilers
4422 incorrectly reject 9223372036854775807. */
4423#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4424 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4425 && LARGE_OFF_T % 2147483647 == 1)
4426 ? 1 : -1];
4427int
4428main ()
4429{
4430
4431 ;
4432 return 0;
4433}
4434_ACEOF
4435if ac_fn_c_try_compile "$LINENO"; then :
4436 ac_cv_sys_file_offset_bits=no; break
4437fi
4438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440/* end confdefs.h. */
4441#define _FILE_OFFSET_BITS 64
4442#include <sys/types.h>
4443 /* Check that off_t can represent 2**63 - 1 correctly.
4444 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4445 since some C++ compilers masquerading as C compilers
4446 incorrectly reject 9223372036854775807. */
4447#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4448 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4449 && LARGE_OFF_T % 2147483647 == 1)
4450 ? 1 : -1];
4451int
4452main ()
4453{
4454
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459if ac_fn_c_try_compile "$LINENO"; then :
4460 ac_cv_sys_file_offset_bits=64; break
4461fi
4462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463 ac_cv_sys_file_offset_bits=unknown
4464 break
4465done
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4468$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4469case $ac_cv_sys_file_offset_bits in #(
4470 no | unknown) ;;
4471 *)
4472cat >>confdefs.h <<_ACEOF
4473#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4474_ACEOF
4475;;
4476esac
4477rm -rf conftest*
4478 if test $ac_cv_sys_file_offset_bits = unknown; then
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4480$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4481if test "${ac_cv_sys_large_files+set}" = set; then :
4482 $as_echo_n "(cached) " >&6
4483else
4484 while :; do
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <sys/types.h>
4488 /* Check that off_t can represent 2**63 - 1 correctly.
4489 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4490 since some C++ compilers masquerading as C compilers
4491 incorrectly reject 9223372036854775807. */
4492#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4493 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4494 && LARGE_OFF_T % 2147483647 == 1)
4495 ? 1 : -1];
4496int
4497main ()
4498{
4499
4500 ;
4501 return 0;
4502}
4503_ACEOF
4504if ac_fn_c_try_compile "$LINENO"; then :
4505 ac_cv_sys_large_files=no; break
4506fi
4507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4509/* end confdefs.h. */
4510#define _LARGE_FILES 1
4511#include <sys/types.h>
4512 /* Check that off_t can represent 2**63 - 1 correctly.
4513 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4514 since some C++ compilers masquerading as C compilers
4515 incorrectly reject 9223372036854775807. */
4516#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4517 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4518 && LARGE_OFF_T % 2147483647 == 1)
4519 ? 1 : -1];
4520int
4521main ()
4522{
4523
4524 ;
4525 return 0;
4526}
4527_ACEOF
4528if ac_fn_c_try_compile "$LINENO"; then :
4529 ac_cv_sys_large_files=1; break
4530fi
4531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4532 ac_cv_sys_large_files=unknown
4533 break
4534done
4535fi
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4537$as_echo "$ac_cv_sys_large_files" >&6; }
4538case $ac_cv_sys_large_files in #(
4539 no | unknown) ;;
4540 *)
4541cat >>confdefs.h <<_ACEOF
4542#define _LARGE_FILES $ac_cv_sys_large_files
4543_ACEOF
4544;;
4545esac
4546rm -rf conftest*
4547 fi
4548fi
4549
4550
4551
81ecdfbb
RW
4552
4553
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4555$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4556if test "${am_cv_prog_cc_stdc+set}" = set; then :
4557 $as_echo_n "(cached) " >&6
4558else
4559 am_cv_prog_cc_stdc=no
4560ac_save_CC="$CC"
4561# Don't try gcc -ansi; that turns off useful extensions and
4562# breaks some systems' header files.
4563# AIX -qlanglvl=ansi
4564# Ultrix and OSF/1 -std1
4565# HP-UX 10.20 and later -Ae
4566# HP-UX older versions -Aa -D_HPUX_SOURCE
4567# SVR4 -Xc -D__EXTENSIONS__
4568for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4569do
783e057b 4570 CC="$ac_save_CC $ac_arg"
81ecdfbb 4571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4572/* end confdefs.h. */
4573#include <stdarg.h>
4574#include <stdio.h>
4575#include <sys/types.h>
4576#include <sys/stat.h>
4577/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4578struct buf { int x; };
4579FILE * (*rcsopen) (struct buf *, struct stat *, int);
4580static char *e (p, i)
4581 char **p;
4582 int i;
4583{
4584 return p[i];
4585}
4586static char *f (char * (*g) (char **, int), char **p, ...)
4587{
4588 char *s;
4589 va_list v;
4590 va_start (v,p);
4591 s = g (p, va_arg (v,int));
4592 va_end (v);
4593 return s;
4594}
4595int test (int i, double x);
4596struct s1 {int (*f) (int a);};
4597struct s2 {int (*f) (double a);};
4598int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4599int argc;
4600char **argv;
4601
4602int
4603main ()
4604{
4605
4606return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4607
4608 ;
4609 return 0;
4610}
4611_ACEOF
81ecdfbb 4612if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4613 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4614fi
81ecdfbb 4615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4616done
4617CC="$ac_save_CC"
4618
4619fi
4620
4621if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4623$as_echo "none needed" >&6; }
783e057b 4624else
81ecdfbb
RW
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4626$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4627fi
4628case "x$am_cv_prog_cc_stdc" in
4629 x|xno) ;;
4630 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4631esac
4632
4633
4634ac_aux_dir=
81ecdfbb
RW
4635for ac_dir in .. "$srcdir"/..; do
4636 for ac_t in install-sh install.sh shtool; do
4637 if test -f "$ac_dir/$ac_t"; then
4638 ac_aux_dir=$ac_dir
4639 ac_install_sh="$ac_aux_dir/$ac_t -c"
4640 break 2
4641 fi
4642 done
783e057b
DJ
4643done
4644if test -z "$ac_aux_dir"; then
81ecdfbb 4645 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4646fi
81ecdfbb
RW
4647
4648# These three variables are undocumented and unsupported,
4649# and are intended to be withdrawn in a future Autoconf release.
4650# They can cause serious problems if a builder's source tree is in a directory
4651# whose full name contains unusual characters.
4652ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4653ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4654ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4655
783e057b 4656
783e057b 4657
81ecdfbb 4658
a417dc56
RW
4659# Dependency checking.
4660rm -rf .tst 2>/dev/null
4661mkdir .tst 2>/dev/null
4662if test -d .tst; then
4663 am__leading_dot=.
4664else
4665 am__leading_dot=_
4666fi
4667rmdir .tst 2>/dev/null
4668
4669DEPDIR="${am__leading_dot}deps"
4670
81ecdfbb 4671ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4672
4673
4674depcc="$CC" am_compiler_list=
4675
4676am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4678$as_echo_n "checking dependency style of $depcc... " >&6; }
4679if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4680 $as_echo_n "(cached) " >&6
a417dc56
RW
4681else
4682 if test -f "$am_depcomp"; then
4683 # We make a subdir and do the tests there. Otherwise we can end up
4684 # making bogus files that we don't know about and never remove. For
4685 # instance it was reported that on HP-UX the gcc test will end up
4686 # making a dummy file named `D' -- because `-MD' means `put the output
4687 # in D'.
4688 mkdir conftest.dir
4689 # Copy depcomp to subdir because otherwise we won't find it if we're
4690 # using a relative directory.
4691 cp "$am_depcomp" conftest.dir
4692 cd conftest.dir
4693 # We will build objects and dependencies in a subdirectory because
4694 # it helps to detect inapplicable dependency modes. For instance
4695 # both Tru64's cc and ICC support -MD to output dependencies as a
4696 # side effect of compilation, but ICC will put the dependencies in
4697 # the current directory while Tru64 will put them in the object
4698 # directory.
4699 mkdir sub
4700
4701 am_cv_CC_dependencies_compiler_type=none
4702 if test "$am_compiler_list" = ""; then
4703 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4704 fi
4705 for depmode in $am_compiler_list; do
4706 if test $depmode = none; then break; fi
4707
81ecdfbb 4708 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4709 # Setup a source with many dependencies, because some compilers
4710 # like to wrap large dependency lists on column 80 (with \), and
4711 # we should not choose a depcomp mode which is confused by this.
4712 #
4713 # We need to recreate these files for each test, as the compiler may
4714 # overwrite some of them when testing with obscure command lines.
4715 # This happens at least with the AIX C compiler.
4716 : > sub/conftest.c
4717 for i in 1 2 3 4 5 6; do
4718 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4719 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4720 # Solaris 8's {/usr,}/bin/sh.
4721 touch sub/conftst$i.h
4722 done
4723 echo "include sub/conftest.Po" > confmf
4724
4725 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4726 # mode. It turns out that the SunPro C++ compiler does not properly
4727 # handle `-M -o', and we need to detect this.
4728 depcmd="depmode=$depmode \
4729 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4730 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4731 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4732 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4733 if env $depcmd > conftest.err 2>&1 &&
4734 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4735 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4736 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4737 # icc doesn't choke on unknown options, it will just issue warnings
4738 # or remarks (even with -Werror). So we grep stderr for any message
4739 # that says an option was ignored or not supported.
4740 # When given -MP, icc 7.0 and 7.1 complain thusly:
4741 # icc: Command line warning: ignoring option '-M'; no argument required
4742 # The diagnosis changed in icc 8.0:
4743 # icc: Command line remark: option '-MP' not supported
4744 if (grep 'ignoring option' conftest.err ||
4745 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4746 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4747 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4748 break
4749 fi
4750 fi
81ecdfbb 4751 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4752 sed -e 's/^/| /' < conftest.err >&5
4753 done
4754
4755 cd ..
4756 rm -rf conftest.dir
4757else
4758 am_cv_CC_dependencies_compiler_type=none
4759fi
4760
4761fi
81ecdfbb
RW
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4763$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4764if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4765then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4766else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4767
4768fi
4769
4770
4771# Check for the 'make' the user wants to use.
4772for ac_prog in make
4773do
4774 # Extract the first word of "$ac_prog", so it can be a program name with args.
4775set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if test "${ac_cv_prog_MAKE+set}" = set; then :
4779 $as_echo_n "(cached) " >&6
a417dc56
RW
4780else
4781 if test -n "$MAKE"; then
4782 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4789 for ac_exec_ext in '' $ac_executable_extensions; do
4790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4791 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4793 break 2
4794 fi
4795done
81ecdfbb
RW
4796 done
4797IFS=$as_save_IFS
a417dc56
RW
4798
4799fi
4800fi
4801MAKE=$ac_cv_prog_MAKE
4802if test -n "$MAKE"; then
81ecdfbb
RW
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4804$as_echo "$MAKE" >&6; }
a417dc56 4805else
81ecdfbb
RW
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
a417dc56
RW
4808fi
4809
81ecdfbb 4810
a417dc56
RW
4811 test -n "$MAKE" && break
4812done
4813
4814MAKE_IS_GNU=
4815case "`$MAKE --version 2>&1 | sed 1q`" in
4816 *GNU*)
4817 MAKE_IS_GNU=yes
4818 ;;
4819esac
81ecdfbb 4820 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4821 GMAKE_TRUE=
4822 GMAKE_FALSE='#'
4823else
4824 GMAKE_TRUE='#'
4825 GMAKE_FALSE=
4826fi
4827
81ecdfbb
RW
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4829$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4830set x ${MAKE-make}
4831ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4832if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4833 $as_echo_n "(cached) " >&6
a417dc56
RW
4834else
4835 cat >conftest.make <<\_ACEOF
81ecdfbb 4836SHELL = /bin/sh
a417dc56 4837all:
81ecdfbb 4838 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4839_ACEOF
4840# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4841case `${MAKE-make} -f conftest.make 2>/dev/null` in
4842 *@@@%%%=?*=@@@%%%*)
4843 eval ac_cv_prog_make_${ac_make}_set=yes;;
4844 *)
4845 eval ac_cv_prog_make_${ac_make}_set=no;;
4846esac
a417dc56
RW
4847rm -f conftest.make
4848fi
81ecdfbb
RW
4849if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4851$as_echo "yes" >&6; }
a417dc56
RW
4852 SET_MAKE=
4853else
81ecdfbb
RW
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
a417dc56
RW
4856 SET_MAKE="MAKE=${MAKE-make}"
4857fi
4858
4859
783e057b
DJ
4860
4861CONFIG_OBS=
4862CONFIG_DEPS=
4863CONFIG_SRCS=
4864ENABLE_CFLAGS=
4865
4866CONFIG_ALL=
4867CONFIG_CLEAN=
4868CONFIG_INSTALL=
4869CONFIG_UNINSTALL=
4870
4871# If we haven't got the data from the intl directory,
4872# assume NLS is disabled.
4873USE_NLS=no
4874LIBINTL=
4875LIBINTL_DEP=
4876INCINTL=
4877XGETTEXT=
4878GMSGFMT=
4879POSUB=
4880
4881if test -f ../intl/config.intl; then
4882 . ../intl/config.intl
4883fi
81ecdfbb
RW
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4885$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4886if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4888$as_echo "no" >&6; }
783e057b 4889else
81ecdfbb
RW
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4891$as_echo "yes" >&6; }
783e057b 4892
81ecdfbb 4893$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4894
4895
81ecdfbb
RW
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4897$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4898 # Look for .po and .gmo files in the source directory.
4899 CATALOGS=
4900 XLINGUAS=
4901 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4902 # If there aren't any .gmo files the shell will give us the
4903 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4904 # weeded out.
4905 case "$cat" in *\**)
4906 continue;;
4907 esac
4908 # The quadruple backslash is collapsed to a double backslash
4909 # by the backticks, then collapsed again by the double quotes,
4910 # leaving us with one backslash in the sed expression (right
4911 # before the dot that mustn't act as a wildcard).
4912 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4913 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4914 # The user is allowed to set LINGUAS to a list of languages to
4915 # install catalogs for. If it's empty that means "all of them."
4916 if test "x$LINGUAS" = x; then
4917 CATALOGS="$CATALOGS $cat"
4918 XLINGUAS="$XLINGUAS $lang"
4919 else
4920 case "$LINGUAS" in *$lang*)
4921 CATALOGS="$CATALOGS $cat"
4922 XLINGUAS="$XLINGUAS $lang"
4923 ;;
4924 esac
4925 fi
4926 done
4927 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4929$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4930
4931
4932 DATADIRNAME=share
4933
4934 INSTOBJEXT=.mo
4935
4936 GENCAT=gencat
4937
4938 CATOBJEXT=.gmo
4939
4940fi
4941
4942localedir='${datadir}/locale'
4943
4944
4945if test x"$USE_NLS" = xyes; then
4946 CONFIG_ALL="$CONFIG_ALL all-po"
4947 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4948 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4949 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4950fi
4951
4952
f434ba03
PA
4953
4954
4955
4956 LIBC_FATAL_STDERR_=1
4957 export LIBC_FATAL_STDERR_
4958
4959
4960
4961
4962
4963 for ac_header in $gl_header_list
4964do :
4965 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4966ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4967eval as_val=\$$as_ac_Header
4968 if test "x$as_val" = x""yes; then :
4969 cat >>confdefs.h <<_ACEOF
4970#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4971_ACEOF
4972
4973fi
4974
4975done
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985 for ac_func in $gl_func_list
4986do :
4987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4988ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4989eval as_val=\$$as_ac_var
4990 if test "x$as_val" = x""yes; then :
4991 cat >>confdefs.h <<_ACEOF
4992#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
4993_ACEOF
4994
4995fi
4996done
4997
4998
4999
5000
5001
5002
5003 GNULIB_MEMCHR=0;
5004 GNULIB_MEMMEM=0;
5005 GNULIB_MEMPCPY=0;
5006 GNULIB_MEMRCHR=0;
5007 GNULIB_RAWMEMCHR=0;
5008 GNULIB_STPCPY=0;
5009 GNULIB_STPNCPY=0;
5010 GNULIB_STRCHRNUL=0;
5011 GNULIB_STRDUP=0;
5012 GNULIB_STRNCAT=0;
5013 GNULIB_STRNDUP=0;
5014 GNULIB_STRNLEN=0;
5015 GNULIB_STRPBRK=0;
5016 GNULIB_STRSEP=0;
5017 GNULIB_STRSTR=0;
5018 GNULIB_STRCASESTR=0;
5019 GNULIB_STRTOK_R=0;
5020 GNULIB_MBSLEN=0;
5021 GNULIB_MBSNLEN=0;
5022 GNULIB_MBSCHR=0;
5023 GNULIB_MBSRCHR=0;
5024 GNULIB_MBSSTR=0;
5025 GNULIB_MBSCASECMP=0;
5026 GNULIB_MBSNCASECMP=0;
5027 GNULIB_MBSPCASECMP=0;
5028 GNULIB_MBSCASESTR=0;
5029 GNULIB_MBSCSPN=0;
5030 GNULIB_MBSPBRK=0;
5031 GNULIB_MBSSPN=0;
5032 GNULIB_MBSSEP=0;
5033 GNULIB_MBSTOK_R=0;
5034 GNULIB_STRERROR=0;
5035 GNULIB_STRSIGNAL=0;
5036 GNULIB_STRVERSCMP=0;
5037 HAVE_MBSLEN=0;
5038 HAVE_MEMCHR=1;
5039 HAVE_DECL_MEMMEM=1;
5040 HAVE_MEMPCPY=1;
5041 HAVE_DECL_MEMRCHR=1;
5042 HAVE_RAWMEMCHR=1;
5043 HAVE_STPCPY=1;
5044 HAVE_STPNCPY=1;
5045 HAVE_STRCHRNUL=1;
5046 HAVE_DECL_STRDUP=1;
5047 HAVE_DECL_STRNDUP=1;
5048 HAVE_DECL_STRNLEN=1;
5049 HAVE_STRPBRK=1;
5050 HAVE_STRSEP=1;
5051 HAVE_STRCASESTR=1;
5052 HAVE_DECL_STRTOK_R=1;
5053 HAVE_DECL_STRSIGNAL=1;
5054 HAVE_STRVERSCMP=1;
5055 REPLACE_MEMCHR=0;
783e057b 5056 REPLACE_MEMMEM=0;
f434ba03
PA
5057 REPLACE_STPNCPY=0;
5058 REPLACE_STRDUP=0;
783e057b 5059 REPLACE_STRSTR=0;
f434ba03
PA
5060 REPLACE_STRCASESTR=0;
5061 REPLACE_STRERROR=0;
5062 REPLACE_STRNCAT=0;
5063 REPLACE_STRNDUP=0;
5064 REPLACE_STRNLEN=0;
5065 REPLACE_STRSIGNAL=0;
5066 REPLACE_STRTOK_R=0;
5067 UNDEFINE_STRTOK_R=0;
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5082 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5083 # irrelevant for anonymous mappings.
5084 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5085if test "x$ac_cv_func_mmap" = x""yes; then :
5086 gl_have_mmap=yes
5087else
5088 gl_have_mmap=no
5089fi
5090
5091
5092 # Try to allow MAP_ANONYMOUS.
5093 gl_have_mmap_anonymous=no
5094 if test $gl_have_mmap = yes; then
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5096$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5098/* end confdefs.h. */
5099
5100#include <sys/mman.h>
5101#ifdef MAP_ANONYMOUS
5102 I cant identify this map.
5103#endif
5104
5105_ACEOF
5106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5107 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5108 gl_have_mmap_anonymous=yes
5109fi
5110rm -f conftest*
5111
5112 if test $gl_have_mmap_anonymous != yes; then
5113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5114/* end confdefs.h. */
5115
5116#include <sys/mman.h>
5117#ifdef MAP_ANON
5118 I cant identify this map.
5119#endif
5120
5121_ACEOF
5122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5123 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5124
5125$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5126
5127 gl_have_mmap_anonymous=yes
5128fi
5129rm -f conftest*
5130
5131 fi
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5133$as_echo "$gl_have_mmap_anonymous" >&6; }
5134 if test $gl_have_mmap_anonymous = yes; then
5135
5136$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5137
5138 fi
5139 fi
5140
5141
5142 :
5143
5144
5145
5146
5147
5148
5149 :
5150
5151
5152
5153
5154
5155
5156
5157
5158 :
5159
5160
5161
5162
5163
5164 if test $ac_cv_func_memchr = yes; then
5165 # Detect platform-specific bugs in some versions of glibc:
5166 # memchr should not dereference anything with length 0
5167 # http://bugzilla.redhat.com/499689
5168 # memchr should not dereference overestimated length after a match
5169 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5170 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5171 # Assume that memchr works on platforms that lack mprotect.
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5173$as_echo_n "checking whether memchr works... " >&6; }
5174if test "${gl_cv_func_memchr_works+set}" = set; then :
5175 $as_echo_n "(cached) " >&6
5176else
5177 if test "$cross_compiling" = yes; then :
5178 gl_cv_func_memchr_works="guessing no"
5179else
5180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5181/* end confdefs.h. */
5182
5183#include <string.h>
5184#if HAVE_SYS_MMAN_H
5185# include <fcntl.h>
5186# include <unistd.h>
5187# include <sys/types.h>
5188# include <sys/mman.h>
5189# ifndef MAP_FILE
5190# define MAP_FILE 0
5191# endif
5192#endif
5193
5194int
5195main ()
5196{
5197
5198 char *fence = NULL;
5199#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5200# if HAVE_MAP_ANONYMOUS
5201 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5202 const int fd = -1;
5203# else /* !HAVE_MAP_ANONYMOUS */
5204 const int flags = MAP_FILE | MAP_PRIVATE;
5205 int fd = open ("/dev/zero", O_RDONLY, 0666);
5206 if (fd >= 0)
5207# endif
5208 {
5209 int pagesize = getpagesize ();
5210 char *two_pages =
5211 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5212 flags, fd, 0);
5213 if (two_pages != (char *)(-1)
5214 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5215 fence = two_pages + pagesize;
5216 }
5217#endif
5218 if (fence)
5219 {
5220 if (memchr (fence, 0, 0))
5221 return 1;
5222 strcpy (fence - 9, "12345678");
5223 if (memchr (fence - 9, 0, 79) != fence - 1)
5224 return 2;
5225 }
5226 return 0;
5227
5228 ;
5229 return 0;
5230}
5231_ACEOF
5232if ac_fn_c_try_run "$LINENO"; then :
5233 gl_cv_func_memchr_works=yes
5234else
5235 gl_cv_func_memchr_works=no
5236fi
5237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5238 conftest.$ac_objext conftest.beam conftest.$ac_ext
5239fi
5240
5241fi
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5243$as_echo "$gl_cv_func_memchr_works" >&6; }
5244 if test "$gl_cv_func_memchr_works" != yes; then
5245 REPLACE_MEMCHR=1
5246 fi
5247 else
5248 HAVE_MEMCHR=0
5249 fi
5250 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5251
5252
5253
5254
5255
5256
5257
5258
5259 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5260
5261
5262 for ac_header in bp-sym.h
5263do :
5264 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5265if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5266 cat >>confdefs.h <<_ACEOF
5267#define HAVE_BP_SYM_H 1
5268_ACEOF
5269
5270fi
5271
5272done
5273
5274
5275 fi
783e057b
DJ
5276
5277
81ecdfbb
RW
5278 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5279if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5280 ac_have_decl=1
783e057b 5281else
81ecdfbb 5282 ac_have_decl=0
783e057b 5283fi
783e057b
DJ
5284
5285cat >>confdefs.h <<_ACEOF
81ecdfbb 5286#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5287_ACEOF
5288
5289
783e057b
DJ
5290
5291
5292
5293
5294
5295
5296
5297
783e057b 5298
783e057b 5299
783e057b 5300
f434ba03 5301
81ecdfbb
RW
5302 for ac_func in memmem
5303do :
5304 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5305if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5306 cat >>confdefs.h <<_ACEOF
81ecdfbb 5307#define HAVE_MEMMEM 1
783e057b
DJ
5308_ACEOF
5309
5310else
5311
5312 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5313
5314fi
5315done
5316
5317
5318
5319 :
5320
5321
5322
5323
5324
5325 if test $ac_cv_have_decl_memmem = no; then
5326 HAVE_DECL_MEMMEM=0
5327 fi
5328 :
5329
5330
f434ba03
PA
5331 gl_cv_c_multiarch=no
5332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333/* end confdefs.h. */
5334#ifndef __APPLE_CC__
5335 not a universal capable compiler
5336 #endif
5337 typedef int dummy;
5338
5339_ACEOF
5340if ac_fn_c_try_compile "$LINENO"; then :
5341
5342 arch=
5343 prev=
5344 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5345 if test -n "$prev"; then
5346 case $word in
5347 i?86 | x86_64 | ppc | ppc64)
5348 if test -z "$arch" || test "$arch" = "$word"; then
5349 arch="$word"
5350 else
5351 gl_cv_c_multiarch=yes
5352 fi
5353 ;;
5354 esac
5355 prev=
5356 else
5357 if test "x$word" = "x-arch"; then
5358 prev=arch
5359 fi
5360 fi
5361 done
5362
5363fi
5364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5365 if test $gl_cv_c_multiarch = yes; then
5366
5367$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5368
5369 APPLE_UNIVERSAL_BUILD=1
5370 else
5371 APPLE_UNIVERSAL_BUILD=0
5372 fi
5373
5374
5375
5376 REPLACE_NULL=0;
5377 HAVE_WCHAR_T=1;
5378 STDDEF_H='';
5379
5380
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5382$as_echo_n "checking for wchar_t... " >&6; }
5383if test "${gt_cv_c_wchar_t+set}" = set; then :
5384 $as_echo_n "(cached) " >&6
5385else
5386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5387/* end confdefs.h. */
5388#include <stddef.h>
5389 wchar_t foo = (wchar_t)'\0';
5390int
5391main ()
5392{
5393
5394 ;
5395 return 0;
5396}
5397_ACEOF
5398if ac_fn_c_try_compile "$LINENO"; then :
5399 gt_cv_c_wchar_t=yes
5400else
5401 gt_cv_c_wchar_t=no
5402fi
5403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5404fi
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5406$as_echo "$gt_cv_c_wchar_t" >&6; }
5407 if test $gt_cv_c_wchar_t = yes; then
5408
5409$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5410
5411 fi
5412
5413
5414
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5416$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5417if test "${gl_cv_have_include_next+set}" = set; then :
5418 $as_echo_n "(cached) " >&6
5419else
5420 rm -rf conftestd1a conftestd1b conftestd2
5421 mkdir conftestd1a conftestd1b conftestd2
5422 cat <<EOF > conftestd1a/conftest.h
5423#define DEFINED_IN_CONFTESTD1
5424#include_next <conftest.h>
5425#ifdef DEFINED_IN_CONFTESTD2
5426int foo;
5427#else
5428#error "include_next doesn't work"
5429#endif
5430EOF
5431 cat <<EOF > conftestd1b/conftest.h
5432#define DEFINED_IN_CONFTESTD1
5433#include <stdio.h>
5434#include_next <conftest.h>
5435#ifdef DEFINED_IN_CONFTESTD2
5436int foo;
5437#else
5438#error "include_next doesn't work"
5439#endif
5440EOF
5441 cat <<EOF > conftestd2/conftest.h
5442#ifndef DEFINED_IN_CONFTESTD1
5443#error "include_next test doesn't work"
5444#endif
5445#define DEFINED_IN_CONFTESTD2
5446EOF
5447 gl_save_CPPFLAGS="$CPPFLAGS"
5448 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5450/* end confdefs.h. */
5451#include <conftest.h>
5452_ACEOF
5453if ac_fn_c_try_compile "$LINENO"; then :
5454 gl_cv_have_include_next=yes
5455else
5456 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5458/* end confdefs.h. */
5459#include <conftest.h>
5460_ACEOF
5461if ac_fn_c_try_compile "$LINENO"; then :
5462 gl_cv_have_include_next=buggy
5463else
5464 gl_cv_have_include_next=no
5465fi
5466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467
5468fi
5469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5470 CPPFLAGS="$gl_save_CPPFLAGS"
5471 rm -rf conftestd1a conftestd1b conftestd2
5472
5473fi
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5475$as_echo "$gl_cv_have_include_next" >&6; }
5476 PRAGMA_SYSTEM_HEADER=
5477 if test $gl_cv_have_include_next = yes; then
5478 INCLUDE_NEXT=include_next
5479 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5480 if test -n "$GCC"; then
5481 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5482 fi
5483 else
5484 if test $gl_cv_have_include_next = buggy; then
5485 INCLUDE_NEXT=include
5486 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5487 else
5488 INCLUDE_NEXT=include
5489 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5490 fi
5491 fi
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
81ecdfbb
RW
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5503$as_echo_n "checking for long long int... " >&6; }
5504if test "${ac_cv_type_long_long_int+set}" = set; then :
5505 $as_echo_n "(cached) " >&6
783e057b 5506else
81ecdfbb 5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5508/* end confdefs.h. */
81ecdfbb
RW
5509
5510 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5511 implementations with broken preprocessors. Perhaps this can
5512 be revisited in 2012. In the meantime, code should not expect
5513 #if to work with literals wider than 32 bits. */
783e057b
DJ
5514 /* Test literals. */
5515 long long int ll = 9223372036854775807ll;
5516 long long int nll = -9223372036854775807LL;
5517 unsigned long long int ull = 18446744073709551615ULL;
5518 /* Test constant expressions. */
5519 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5520 ? 1 : -1)];
783e057b 5521 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5522 ? 1 : -1)];
783e057b
DJ
5523 int i = 63;
5524int
5525main ()
5526{
5527/* Test availability of runtime routines for shift and division. */
5528 long long int llmax = 9223372036854775807ll;
5529 unsigned long long int ullmax = 18446744073709551615ull;
5530 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5531 | (llmax / ll) | (llmax % ll)
5532 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5533 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5534 ;
5535 return 0;
5536}
5537
5538_ACEOF
81ecdfbb 5539if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5540 if test "$cross_compiling" = yes; then :
783e057b
DJ
5541 ac_cv_type_long_long_int=yes
5542else
81ecdfbb 5543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5544/* end confdefs.h. */
5545#include <limits.h>
f434ba03
PA
5546 #ifndef LLONG_MAX
5547 # define HALF \
5548 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5549 # define LLONG_MAX (HALF - 1 + HALF)
5550 #endif
783e057b
DJ
5551int
5552main ()
5553{
5554long long int n = 1;
f434ba03
PA
5555 int i;
5556 for (i = 0; ; i++)
5557 {
5558 long long int m = n << i;
5559 if (m >> i != n)
5560 return 1;
5561 if (LLONG_MAX / 2 < m)
5562 break;
5563 }
5564 return 0;
783e057b
DJ
5565 ;
5566 return 0;
5567}
5568_ACEOF
81ecdfbb 5569if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5570 ac_cv_type_long_long_int=yes
5571else
81ecdfbb 5572 ac_cv_type_long_long_int=no
783e057b 5573fi
81ecdfbb
RW
5574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5575 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5576fi
783e057b 5577
81ecdfbb
RW
5578else
5579 ac_cv_type_long_long_int=no
783e057b 5580fi
81ecdfbb
RW
5581rm -f core conftest.err conftest.$ac_objext \
5582 conftest$ac_exeext conftest.$ac_ext
783e057b 5583fi
81ecdfbb
RW
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5585$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5586 if test $ac_cv_type_long_long_int = yes; then
5587
81ecdfbb 5588$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5589
5590 fi
5591
5592
81ecdfbb
RW
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5594$as_echo_n "checking for unsigned long long int... " >&6; }
5595if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5596 $as_echo_n "(cached) " >&6
783e057b 5597else
81ecdfbb 5598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5599/* end confdefs.h. */
81ecdfbb
RW
5600
5601 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5602 implementations with broken preprocessors. Perhaps this can
5603 be revisited in 2012. In the meantime, code should not expect
5604 #if to work with literals wider than 32 bits. */
783e057b
DJ
5605 /* Test literals. */
5606 long long int ll = 9223372036854775807ll;
5607 long long int nll = -9223372036854775807LL;
5608 unsigned long long int ull = 18446744073709551615ULL;
5609 /* Test constant expressions. */
5610 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5611 ? 1 : -1)];
783e057b 5612 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5613 ? 1 : -1)];
783e057b
DJ
5614 int i = 63;
5615int
5616main ()
5617{
5618/* Test availability of runtime routines for shift and division. */
5619 long long int llmax = 9223372036854775807ll;
5620 unsigned long long int ullmax = 18446744073709551615ull;
5621 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5622 | (llmax / ll) | (llmax % ll)
5623 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5624 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5625 ;
5626 return 0;
5627}
5628
5629_ACEOF
81ecdfbb 5630if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5631 ac_cv_type_unsigned_long_long_int=yes
5632else
81ecdfbb 5633 ac_cv_type_unsigned_long_long_int=no
783e057b 5634fi
81ecdfbb
RW
5635rm -f core conftest.err conftest.$ac_objext \
5636 conftest$ac_exeext conftest.$ac_ext
783e057b 5637fi
81ecdfbb
RW
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5639$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5640 if test $ac_cv_type_unsigned_long_long_int = yes; then
5641
81ecdfbb 5642$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5643
5644 fi
5645
5646
5647
783e057b
DJ
5648
5649
5650
5651
5652
5653
5654
5655
81ecdfbb
RW
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5657$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5658if test "${ac_cv_c_restrict+set}" = set; then :
5659 $as_echo_n "(cached) " >&6
783e057b
DJ
5660else
5661 ac_cv_c_restrict=no
5662 # The order here caters to the fact that C++ does not require restrict.
5663 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5665/* end confdefs.h. */
5666typedef int * int_ptr;
5667 int foo (int_ptr $ac_kw ip) {
5668 return ip[0];
5669 }
5670int
5671main ()
5672{
5673int s[1];
5674 int * $ac_kw t = s;
5675 t[0] = 0;
5676 return foo(t)
5677 ;
5678 return 0;
5679}
5680_ACEOF
81ecdfbb 5681if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5682 ac_cv_c_restrict=$ac_kw
783e057b 5683fi
81ecdfbb 5684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5685 test "$ac_cv_c_restrict" != no && break
5686 done
5687
5688fi
81ecdfbb
RW
5689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5690$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5691
5692 case $ac_cv_c_restrict in
5693 restrict) ;;
81ecdfbb 5694 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5695 ;;
5696 *) cat >>confdefs.h <<_ACEOF
5697#define restrict $ac_cv_c_restrict
5698_ACEOF
5699 ;;
5700 esac
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
f434ba03 5713
783e057b
DJ
5714 :
5715
5716
5717
5718
5719
5720
5721
f434ba03
PA
5722 if test $gl_cv_have_include_next = yes; then
5723 gl_cv_next_string_h='<'string.h'>'
5724 else
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5726$as_echo_n "checking absolute name of <string.h>... " >&6; }
5727if test "${gl_cv_next_string_h+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
5729else
5730
5731 if test $ac_cv_header_string_h = yes; then
5732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5733/* end confdefs.h. */
5734#include <string.h>
5735
5736_ACEOF
5737 case "$host_os" in
5738 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5739 *) gl_absname_cpp="$ac_cpp" ;;
5740 esac
5741 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5742 sed -n '\#/string.h#{
5743 s#.*"\(.*/string.h\)".*#\1#
5744 s#^/[^/]#//&#
5745 p
5746 q
5747 }'`'"'
5748 else
5749 gl_cv_next_string_h='<'string.h'>'
5750 fi
5751
5752fi
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5754$as_echo "$gl_cv_next_string_h" >&6; }
5755 fi
5756 NEXT_STRING_H=$gl_cv_next_string_h
5757
5758 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5759 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5760 gl_next_as_first_directive='<'string.h'>'
5761 else
5762 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5763 gl_next_as_first_directive=$gl_cv_next_string_h
5764 fi
5765 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5766
5767
5768
5769
5770
5771 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5772 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5774$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5775if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5776 $as_echo_n "(cached) " >&6
5777else
5778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5779/* end confdefs.h. */
5780#include <string.h>
5781
5782int
5783main ()
5784{
5785#undef $gl_func
5786 (void) $gl_func;
5787 ;
5788 return 0;
5789}
5790_ACEOF
5791if ac_fn_c_try_compile "$LINENO"; then :
5792 eval "$as_gl_Symbol=yes"
5793else
5794 eval "$as_gl_Symbol=no"
5795fi
5796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5797fi
5798eval ac_res=\$$as_gl_Symbol
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5800$as_echo "$ac_res" >&6; }
5801 eval as_val=\$$as_gl_Symbol
5802 if test "x$as_val" = x""yes; then :
5803 cat >>confdefs.h <<_ACEOF
5804#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5805_ACEOF
5806
5807 eval ac_cv_have_decl_$gl_func=yes
5808fi
5809 done
5810
5811
5812
5813 GNULIB_BTOWC=0;
5814 GNULIB_WCTOB=0;
5815 GNULIB_MBSINIT=0;
5816 GNULIB_MBRTOWC=0;
5817 GNULIB_MBRLEN=0;
5818 GNULIB_MBSRTOWCS=0;
5819 GNULIB_MBSNRTOWCS=0;
5820 GNULIB_WCRTOMB=0;
5821 GNULIB_WCSRTOMBS=0;
5822 GNULIB_WCSNRTOMBS=0;
5823 GNULIB_WCWIDTH=0;
5824 HAVE_BTOWC=1;
5825 HAVE_MBSINIT=1;
5826 HAVE_MBRTOWC=1;
5827 HAVE_MBRLEN=1;
5828 HAVE_MBSRTOWCS=1;
5829 HAVE_MBSNRTOWCS=1;
5830 HAVE_WCRTOMB=1;
5831 HAVE_WCSRTOMBS=1;
5832 HAVE_WCSNRTOMBS=1;
5833 HAVE_DECL_WCTOB=1;
5834 HAVE_DECL_WCWIDTH=1;
5835 REPLACE_MBSTATE_T=0;
5836 REPLACE_BTOWC=0;
5837 REPLACE_WCTOB=0;
5838 REPLACE_MBSINIT=0;
5839 REPLACE_MBRTOWC=0;
5840 REPLACE_MBRLEN=0;
5841 REPLACE_MBSRTOWCS=0;
5842 REPLACE_MBSNRTOWCS=0;
5843 REPLACE_WCRTOMB=0;
5844 REPLACE_WCSRTOMBS=0;
5845 REPLACE_WCSNRTOMBS=0;
5846 REPLACE_WCWIDTH=0;
5847
5848
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5850$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5851if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5852 $as_echo_n "(cached) " >&6
783e057b 5853else
f434ba03
PA
5854 gl_cv_header_wchar_h_correct_inline=yes
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856/* end confdefs.h. */
783e057b 5857
f434ba03
PA
5858 #define wcstod renamed_wcstod
5859#include <wchar.h>
5860extern int zero (void);
5861int main () { return zero(); }
5862
5863_ACEOF
5864 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5865 (eval $ac_compile) 2>&5
5866 ac_status=$?
5867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5868 test $ac_status = 0; }; then
5869 mv conftest.$ac_objext conftest1.$ac_objext
5870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5871/* end confdefs.h. */
f434ba03
PA
5872
5873 #define wcstod renamed_wcstod
5874#include <wchar.h>
5875int zero (void) { return 0; }
783e057b
DJ
5876
5877_ACEOF
f434ba03
PA
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 conftest2.$ac_objext
5884 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5885 :
5886 else
5887 gl_cv_header_wchar_h_correct_inline=no
5888 fi
5889 fi
5890 fi
5891 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5892
5893fi
f434ba03
PA
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5895$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5896 if test $gl_cv_header_wchar_h_correct_inline = no; then
5897 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5898This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5899C99 mode. You have four options:
5900 - Add the flag -fgnu89-inline to CC and reconfigure, or
5901 - Fix your include files, using parts of
5902 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5903 - Use a gcc version older than 4.3, or
5904 - Don't use the flags -std=c99 or -std=gnu99.
5905Configuration aborted." "$LINENO" 5
5906 fi
783e057b
DJ
5907
5908
f434ba03
PA
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5910$as_echo_n "checking for wint_t... " >&6; }
5911if test "${gt_cv_c_wint_t+set}" = set; then :
5912 $as_echo_n "(cached) " >&6
5913else
5914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5915/* end confdefs.h. */
783e057b 5916
f434ba03
PA
5917/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5918 <wchar.h>.
5919 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5920 before <wchar.h>. */
5921#include <stddef.h>
5922#include <stdio.h>
5923#include <time.h>
5924#include <wchar.h>
5925 wint_t foo = (wchar_t)'\0';
5926int
5927main ()
5928{
783e057b 5929
f434ba03
PA
5930 ;
5931 return 0;
5932}
5933_ACEOF
5934if ac_fn_c_try_compile "$LINENO"; then :
5935 gt_cv_c_wint_t=yes
5936else
5937 gt_cv_c_wint_t=no
5938fi
5939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5940fi
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5942$as_echo "$gt_cv_c_wint_t" >&6; }
5943 if test $gt_cv_c_wint_t = yes; then
783e057b 5944
f434ba03 5945$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5946
f434ba03 5947 fi
783e057b
DJ
5948
5949
81ecdfbb 5950 if false; then
783e057b
DJ
5951 GL_COND_LIBTOOL_TRUE=
5952 GL_COND_LIBTOOL_FALSE='#'
5953else
5954 GL_COND_LIBTOOL_TRUE='#'
5955 GL_COND_LIBTOOL_FALSE=
5956fi
5957
5958 gl_cond_libtool=false
5959 gl_libdeps=
5960 gl_ltlibdeps=
f434ba03 5961 gl_m4_base='gnulib/m4'
783e057b
DJ
5962
5963
5964
783e057b
DJ
5965
5966
5967
5968
5969
5970
f434ba03
PA
5971 gl_source_base='gnulib'
5972 # Code from module arg-nonnull:
5973 # Code from module c++defs:
5974 # Code from module extensions:
5975 # Code from module include_next:
5976 # Code from module memchr:
783e057b 5977
783e057b 5978
783e057b 5979
783e057b 5980
f434ba03 5981 GNULIB_MEMCHR=1
783e057b 5982
783e057b 5983
783e057b 5984
f434ba03 5985$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 5986
783e057b
DJ
5987
5988
f434ba03 5989 # Code from module memmem:
783e057b
DJ
5990
5991
f434ba03
PA
5992 if test $ac_cv_have_decl_memmem = yes; then
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
5994$as_echo_n "checking whether memmem works in linear time... " >&6; }
5995if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 5996 $as_echo_n "(cached) " >&6
783e057b 5997else
81ecdfbb 5998 if test "$cross_compiling" = yes; then :
f434ba03 5999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6000/* end confdefs.h. */
783e057b 6001
f434ba03
PA
6002#include <features.h>
6003#ifdef __GNU_LIBRARY__
6004 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6005 Lucky user
6006 #endif
6007#endif
6008#ifdef __CYGWIN__
6009 #include <cygwin/version.h>
6010 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6011 Lucky user
6012 #endif
6013#endif
783e057b 6014
783e057b 6015_ACEOF
f434ba03
PA
6016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6017 $EGREP "Lucky user" >/dev/null 2>&1; then :
6018 gl_cv_func_memmem_works=yes
783e057b 6019else
f434ba03 6020 gl_cv_func_memmem_works="guessing no"
783e057b 6021fi
f434ba03 6022rm -f conftest*
783e057b
DJ
6023
6024
783e057b 6025else
81ecdfbb 6026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6027/* end confdefs.h. */
6028
f434ba03 6029#include <signal.h> /* for signal */
783e057b
DJ
6030#include <string.h> /* for memmem */
6031#include <stdlib.h> /* for malloc */
6032#include <unistd.h> /* for alarm */
6033
6034int
6035main ()
6036{
6037size_t m = 1000000;
6038 char *haystack = (char *) malloc (2 * m + 1);
6039 char *needle = (char *) malloc (m + 1);
6040 void *result = 0;
6041 /* Failure to compile this test due to missing alarm is okay,
6042 since all such platforms (mingw) also lack memmem. */
f434ba03 6043 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6044 alarm (5);
6045 /* Check for quadratic performance. */
6046 if (haystack && needle)
6047 {
f434ba03
PA
6048 memset (haystack, 'A', 2 * m);
6049 haystack[2 * m] = 'B';
6050 memset (needle, 'A', m);
6051 needle[m] = 'B';
6052 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6053 }
6054 /* Check for empty needle behavior. */
6055 return !result || !memmem ("a", 1, 0, 0);
6056 ;
6057 return 0;
6058}
6059_ACEOF
81ecdfbb 6060if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6061 gl_cv_func_memmem_works=yes
6062else
81ecdfbb 6063 gl_cv_func_memmem_works=no
783e057b 6064fi
81ecdfbb
RW
6065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6066 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6067fi
81ecdfbb 6068
f434ba03 6069
783e057b 6070fi
81ecdfbb
RW
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6072$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6073 if test "$gl_cv_func_memmem_works" != yes; then
6074 REPLACE_MEMMEM=1
6075
6076
6077
6078
6079
6080
6081
f434ba03 6082
783e057b
DJ
6083 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6084
6085 fi
6086 fi
6087
f434ba03
PA
6088 # Code from module memmem-simple:
6089
783e057b
DJ
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
81ecdfbb
RW
6101 for ac_func in memmem
6102do :
6103 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6104if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6105 cat >>confdefs.h <<_ACEOF
81ecdfbb 6106#define HAVE_MEMMEM 1
783e057b
DJ
6107_ACEOF
6108
6109else
6110
6111 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6112
6113fi
6114done
6115
6116
6117
6118 :
6119
6120
6121
6122
6123
6124 if test $ac_cv_have_decl_memmem = no; then
6125 HAVE_DECL_MEMMEM=0
6126 fi
6127 :
6128
6129
6130
f434ba03 6131
783e057b
DJ
6132 GNULIB_MEMMEM=1
6133
6134
6135
f434ba03
PA
6136$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6137
6138
6139
6140 # Code from module multiarch:
6141
6142 # Code from module stddef:
6143
6144
6145
6146 if test $gt_cv_c_wchar_t = no; then
6147 HAVE_WCHAR_T=0
6148 STDDEF_H=stddef.h
6149 fi
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6151$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6152if test "${gl_cv_decl_null_works+set}" = set; then :
6153 $as_echo_n "(cached) " >&6
6154else
6155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6156/* end confdefs.h. */
6157#include <stddef.h>
6158 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6159
6160int
6161main ()
6162{
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168if ac_fn_c_try_compile "$LINENO"; then :
6169 gl_cv_decl_null_works=yes
6170else
6171 gl_cv_decl_null_works=no
6172fi
6173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6174fi
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6176$as_echo "$gl_cv_decl_null_works" >&6; }
6177 if test $gl_cv_decl_null_works = no; then
6178 REPLACE_NULL=1
6179 STDDEF_H=stddef.h
6180 fi
6181 if test -n "$STDDEF_H"; then
6182
6183
6184
6185
6186 :
6187
6188
6189
6190
6191
6192
6193
6194 if test $gl_cv_have_include_next = yes; then
6195 gl_cv_next_stddef_h='<'stddef.h'>'
6196 else
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6198$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6199if test "${gl_cv_next_stddef_h+set}" = set; then :
6200 $as_echo_n "(cached) " >&6
6201else
6202
6203 if test $ac_cv_header_stddef_h = yes; then
6204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6205/* end confdefs.h. */
6206#include <stddef.h>
6207
6208_ACEOF
6209 case "$host_os" in
6210 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6211 *) gl_absname_cpp="$ac_cpp" ;;
6212 esac
6213 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6214 sed -n '\#/stddef.h#{
6215 s#.*"\(.*/stddef.h\)".*#\1#
6216 s#^/[^/]#//&#
6217 p
6218 q
6219 }'`'"'
6220 else
6221 gl_cv_next_stddef_h='<'stddef.h'>'
6222 fi
6223
6224fi
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6226$as_echo "$gl_cv_next_stddef_h" >&6; }
6227 fi
6228 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6229
6230 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6231 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6232 gl_next_as_first_directive='<'stddef.h'>'
6233 else
6234 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6235 gl_next_as_first_directive=$gl_cv_next_stddef_h
6236 fi
6237 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6238
6239
6240
6241 fi
6242
6243 # Code from module stdint:
6244
6245
783e057b
DJ
6246
6247 if test $ac_cv_type_long_long_int = yes; then
6248 HAVE_LONG_LONG_INT=1
6249 else
6250 HAVE_LONG_LONG_INT=0
6251 fi
6252
6253
6254 if test $ac_cv_type_unsigned_long_long_int = yes; then
6255 HAVE_UNSIGNED_LONG_LONG_INT=1
6256 else
6257 HAVE_UNSIGNED_LONG_LONG_INT=0
6258 fi
6259
6260
6261 if test $ac_cv_header_inttypes_h = yes; then
6262 HAVE_INTTYPES_H=1
6263 else
6264 HAVE_INTTYPES_H=0
6265 fi
6266
6267
6268 if test $ac_cv_header_sys_types_h = yes; then
6269 HAVE_SYS_TYPES_H=1
6270 else
6271 HAVE_SYS_TYPES_H=0
6272 fi
6273
6274
6275
6276
6277
f434ba03 6278
783e057b
DJ
6279 :
6280
6281
6282
6283
6284
6285
6286
6287 if test $gl_cv_have_include_next = yes; then
6288 gl_cv_next_stdint_h='<'stdint.h'>'
6289 else
81ecdfbb
RW
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6291$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6292if test "${gl_cv_next_stdint_h+set}" = set; then :
6293 $as_echo_n "(cached) " >&6
783e057b
DJ
6294else
6295
f434ba03
PA
6296 if test $ac_cv_header_stdint_h = yes; then
6297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6298/* end confdefs.h. */
6299#include <stdint.h>
6300
6301_ACEOF
f434ba03
PA
6302 case "$host_os" in
6303 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6304 *) gl_absname_cpp="$ac_cpp" ;;
6305 esac
6306 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6307 sed -n '\#/stdint.h#{
6308 s#.*"\(.*/stdint.h\)".*#\1#
6309 s#^/[^/]#//&#
6310 p
6311 q
6312 }'`'"'
6313 else
6314 gl_cv_next_stdint_h='<'stdint.h'>'
6315 fi
783e057b
DJ
6316
6317fi
81ecdfbb
RW
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6319$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6320 fi
6321 NEXT_STDINT_H=$gl_cv_next_stdint_h
6322
f434ba03
PA
6323 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6324 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6325 gl_next_as_first_directive='<'stdint.h'>'
6326 else
6327 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6328 gl_next_as_first_directive=$gl_cv_next_stdint_h
6329 fi
6330 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6331
783e057b
DJ
6332
6333
6334 if test $ac_cv_header_stdint_h = yes; then
6335 HAVE_STDINT_H=1
6336 else
6337 HAVE_STDINT_H=0
6338 fi
6339
6340
6341 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6343$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6344if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6345 $as_echo_n "(cached) " >&6
783e057b
DJ
6346else
6347 gl_cv_header_working_stdint_h=no
81ecdfbb 6348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6349/* end confdefs.h. */
6350
81ecdfbb 6351
783e057b
DJ
6352#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6353#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6354#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6355#include <stdint.h>
6356/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6357#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6358#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6359#endif
6360
6361
6362 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6363 included before <wchar.h>. */
6364 #include <stddef.h>
6365 #include <signal.h>
6366 #if HAVE_WCHAR_H
6367 # include <stdio.h>
6368 # include <time.h>
6369 # include <wchar.h>
6370 #endif
6371
6372
6373#ifdef INT8_MAX
6374int8_t a1 = INT8_MAX;
6375int8_t a1min = INT8_MIN;
6376#endif
6377#ifdef INT16_MAX
6378int16_t a2 = INT16_MAX;
6379int16_t a2min = INT16_MIN;
6380#endif
6381#ifdef INT32_MAX
6382int32_t a3 = INT32_MAX;
6383int32_t a3min = INT32_MIN;
6384#endif
6385#ifdef INT64_MAX
6386int64_t a4 = INT64_MAX;
6387int64_t a4min = INT64_MIN;
6388#endif
6389#ifdef UINT8_MAX
6390uint8_t b1 = UINT8_MAX;
6391#else
6392typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6393#endif
6394#ifdef UINT16_MAX
6395uint16_t b2 = UINT16_MAX;
6396#endif
6397#ifdef UINT32_MAX
6398uint32_t b3 = UINT32_MAX;
6399#endif
6400#ifdef UINT64_MAX
6401uint64_t b4 = UINT64_MAX;
6402#endif
6403int_least8_t c1 = INT8_C (0x7f);
6404int_least8_t c1max = INT_LEAST8_MAX;
6405int_least8_t c1min = INT_LEAST8_MIN;
6406int_least16_t c2 = INT16_C (0x7fff);
6407int_least16_t c2max = INT_LEAST16_MAX;
6408int_least16_t c2min = INT_LEAST16_MIN;
6409int_least32_t c3 = INT32_C (0x7fffffff);
6410int_least32_t c3max = INT_LEAST32_MAX;
6411int_least32_t c3min = INT_LEAST32_MIN;
6412int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6413int_least64_t c4max = INT_LEAST64_MAX;
6414int_least64_t c4min = INT_LEAST64_MIN;
6415uint_least8_t d1 = UINT8_C (0xff);
6416uint_least8_t d1max = UINT_LEAST8_MAX;
6417uint_least16_t d2 = UINT16_C (0xffff);
6418uint_least16_t d2max = UINT_LEAST16_MAX;
6419uint_least32_t d3 = UINT32_C (0xffffffff);
6420uint_least32_t d3max = UINT_LEAST32_MAX;
6421uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6422uint_least64_t d4max = UINT_LEAST64_MAX;
6423int_fast8_t e1 = INT_FAST8_MAX;
6424int_fast8_t e1min = INT_FAST8_MIN;
6425int_fast16_t e2 = INT_FAST16_MAX;
6426int_fast16_t e2min = INT_FAST16_MIN;
6427int_fast32_t e3 = INT_FAST32_MAX;
6428int_fast32_t e3min = INT_FAST32_MIN;
6429int_fast64_t e4 = INT_FAST64_MAX;
6430int_fast64_t e4min = INT_FAST64_MIN;
6431uint_fast8_t f1 = UINT_FAST8_MAX;
6432uint_fast16_t f2 = UINT_FAST16_MAX;
6433uint_fast32_t f3 = UINT_FAST32_MAX;
6434uint_fast64_t f4 = UINT_FAST64_MAX;
6435#ifdef INTPTR_MAX
6436intptr_t g = INTPTR_MAX;
6437intptr_t gmin = INTPTR_MIN;
6438#endif
6439#ifdef UINTPTR_MAX
6440uintptr_t h = UINTPTR_MAX;
6441#endif
6442intmax_t i = INTMAX_MAX;
6443uintmax_t j = UINTMAX_MAX;
6444
6445#include <limits.h> /* for CHAR_BIT */
6446#define TYPE_MINIMUM(t) \
6447 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6448#define TYPE_MAXIMUM(t) \
6449 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6450struct s {
6451 int check_PTRDIFF:
6452 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6453 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6454 ? 1 : -1;
6455 /* Detect bug in FreeBSD 6.0 / ia64. */
6456 int check_SIG_ATOMIC:
6457 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6458 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6459 ? 1 : -1;
6460 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6461 int check_WCHAR:
6462 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6463 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6464 ? 1 : -1;
6465 /* Detect bug in mingw. */
6466 int check_WINT:
6467 WINT_MIN == TYPE_MINIMUM (wint_t)
6468 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6469 ? 1 : -1;
6470
f434ba03
PA
6471 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6472 int check_UINT8_C:
6473 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6474 int check_UINT16_C:
6475 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6476
6477 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6478#ifdef UINT8_MAX
6479 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6480#endif
6481#ifdef UINT16_MAX
6482 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6483#endif
6484#ifdef UINT32_MAX
6485 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6486#endif
6487#ifdef UINT64_MAX
6488 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6489#endif
6490 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6491 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6492 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6493 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6494 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6495 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6496 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6497 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6498 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6499 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6500 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6501};
6502
6503int
6504main ()
6505{
6506
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511if ac_fn_c_try_compile "$LINENO"; then :
6512 if test "$cross_compiling" = yes; then :
6513 gl_cv_header_working_stdint_h=yes
6514
6515else
6516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517/* end confdefs.h. */
6518
6519
6520#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6521#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6522#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6523#include <stdint.h>
6524
783e057b 6525
f434ba03
PA
6526 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6527 included before <wchar.h>. */
6528 #include <stddef.h>
6529 #include <signal.h>
6530 #if HAVE_WCHAR_H
6531 # include <stdio.h>
6532 # include <time.h>
6533 # include <wchar.h>
6534 #endif
6535
6536
6537#include <stdio.h>
6538#include <string.h>
6539#define MVAL(macro) MVAL1(macro)
6540#define MVAL1(expression) #expression
6541static const char *macro_values[] =
6542 {
6543#ifdef INT8_MAX
6544 MVAL (INT8_MAX),
6545#endif
6546#ifdef INT16_MAX
6547 MVAL (INT16_MAX),
6548#endif
6549#ifdef INT32_MAX
6550 MVAL (INT32_MAX),
6551#endif
6552#ifdef INT64_MAX
6553 MVAL (INT64_MAX),
6554#endif
783e057b 6555#ifdef UINT8_MAX
f434ba03 6556 MVAL (UINT8_MAX),
783e057b
DJ
6557#endif
6558#ifdef UINT16_MAX
f434ba03 6559 MVAL (UINT16_MAX),
783e057b
DJ
6560#endif
6561#ifdef UINT32_MAX
f434ba03 6562 MVAL (UINT32_MAX),
783e057b
DJ
6563#endif
6564#ifdef UINT64_MAX
f434ba03 6565 MVAL (UINT64_MAX),
783e057b 6566#endif
f434ba03
PA
6567 NULL
6568 };
783e057b
DJ
6569
6570int
6571main ()
6572{
6573
f434ba03
PA
6574 const char **mv;
6575 for (mv = macro_values; *mv != NULL; mv++)
6576 {
6577 const char *value = *mv;
6578 /* Test whether it looks like a cast expression. */
6579 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6580 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6581 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6582 || strncmp (value, "((int)"/*)*/, 6) == 0
6583 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6584 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6585 return 1;
6586 }
6587 return 0;
6588
783e057b
DJ
6589 ;
6590 return 0;
6591}
6592_ACEOF
f434ba03 6593if ac_fn_c_try_run "$LINENO"; then :
783e057b 6594 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6595fi
6596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6597 conftest.$ac_objext conftest.beam conftest.$ac_ext
6598fi
6599
6600
783e057b 6601fi
81ecdfbb 6602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6603
783e057b 6604fi
81ecdfbb
RW
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6606$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6607 fi
6608 if test "$gl_cv_header_working_stdint_h" = yes; then
6609 STDINT_H=
6610 else
81ecdfbb
RW
6611 for ac_header in sys/inttypes.h sys/bitypes.h
6612do :
6613 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6614ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6615eval as_val=\$$as_ac_Header
6616 if test "x$as_val" = x""yes; then :
783e057b 6617 cat >>confdefs.h <<_ACEOF
81ecdfbb 6618#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6619_ACEOF
6620
6621fi
6622
6623done
6624
6625 if test $ac_cv_header_sys_inttypes_h = yes; then
6626 HAVE_SYS_INTTYPES_H=1
6627 else
6628 HAVE_SYS_INTTYPES_H=0
6629 fi
6630
6631 if test $ac_cv_header_sys_bitypes_h = yes; then
6632 HAVE_SYS_BITYPES_H=1
6633 else
6634 HAVE_SYS_BITYPES_H=0
6635 fi
6636
6637
6638
6639 :
6640
6641
6642
6643
6644
6645
6646
6647
f434ba03
PA
6648 if test $APPLE_UNIVERSAL_BUILD = 0; then
6649
6650
6651 for gltype in ptrdiff_t size_t ; do
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6653$as_echo_n "checking for bit size of $gltype... " >&6; }
6654if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6655 $as_echo_n "(cached) " >&6
6656else
6657 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6658 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6659 included before <wchar.h>. */
6660 #include <stddef.h>
6661 #include <signal.h>
6662 #if HAVE_WCHAR_H
6663 # include <stdio.h>
6664 # include <time.h>
6665 # include <wchar.h>
6666 #endif
6667
6668#include <limits.h>"; then :
6669
6670else
6671 result=unknown
6672fi
6673
6674 eval gl_cv_bitsizeof_${gltype}=\$result
6675
6676fi
6677eval ac_res=\$gl_cv_bitsizeof_${gltype}
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6679$as_echo "$ac_res" >&6; }
6680 eval result=\$gl_cv_bitsizeof_${gltype}
6681 if test $result = unknown; then
6682 result=0
6683 fi
6684 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6685 cat >>confdefs.h <<_ACEOF
6686#define BITSIZEOF_${GLTYPE} $result
6687_ACEOF
6688
6689 eval BITSIZEOF_${GLTYPE}=\$result
6690 done
6691
6692
6693 fi
6694
783e057b 6695
f434ba03 6696 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6698$as_echo_n "checking for bit size of $gltype... " >&6; }
6699if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6700 $as_echo_n "(cached) " >&6
6701else
6702 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6703 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6704 included before <wchar.h>. */
6705 #include <stddef.h>
6706 #include <signal.h>
6707 #if HAVE_WCHAR_H
6708 # include <stdio.h>
6709 # include <time.h>
6710 # include <wchar.h>
6711 #endif
6712
6713#include <limits.h>"; then :
6714
6715else
6716 result=unknown
6717fi
6718
6719 eval gl_cv_bitsizeof_${gltype}=\$result
6720
6721fi
6722eval ac_res=\$gl_cv_bitsizeof_${gltype}
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6724$as_echo "$ac_res" >&6; }
6725 eval result=\$gl_cv_bitsizeof_${gltype}
6726 if test $result = unknown; then
6727 result=0
6728 fi
6729 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6730 cat >>confdefs.h <<_ACEOF
6731#define BITSIZEOF_${GLTYPE} $result
6732_ACEOF
783e057b 6733
81ecdfbb
RW
6734 eval BITSIZEOF_${GLTYPE}=\$result
6735 done
783e057b
DJ
6736
6737
6738
6739
81ecdfbb
RW
6740 for gltype in sig_atomic_t wchar_t wint_t ; do
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6742$as_echo_n "checking whether $gltype is signed... " >&6; }
6743if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6744 $as_echo_n "(cached) " >&6
783e057b 6745else
81ecdfbb 6746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6747/* end confdefs.h. */
6748
6749 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6750 included before <wchar.h>. */
6751 #include <stddef.h>
6752 #include <signal.h>
6753 #if HAVE_WCHAR_H
6754 # include <stdio.h>
6755 # include <time.h>
6756 # include <wchar.h>
6757 #endif
6758
6759 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6760int
6761main ()
6762{
6763
6764 ;
6765 return 0;
6766}
6767_ACEOF
81ecdfbb 6768if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6769 result=yes
6770else
81ecdfbb 6771 result=no
20e95c23 6772fi
81ecdfbb 6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6774 eval gl_cv_type_${gltype}_signed=\$result
6775
6776fi
81ecdfbb
RW
6777eval ac_res=\$gl_cv_type_${gltype}_signed
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6779$as_echo "$ac_res" >&6; }
783e057b
DJ
6780 eval result=\$gl_cv_type_${gltype}_signed
6781 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6782 if test "$result" = yes; then
6783 cat >>confdefs.h <<_ACEOF
6784#define HAVE_SIGNED_${GLTYPE} 1
6785_ACEOF
6786
6787 eval HAVE_SIGNED_${GLTYPE}=1
6788 else
6789 eval HAVE_SIGNED_${GLTYPE}=0
6790 fi
6791 done
6792
6793
6794 gl_cv_type_ptrdiff_t_signed=yes
6795 gl_cv_type_size_t_signed=no
f434ba03 6796 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6797
6798
f434ba03 6799 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6801$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6802if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6803 $as_echo_n "(cached) " >&6
c906108c 6804else
783e057b
DJ
6805 eval gl_cv_type_${gltype}_suffix=no
6806 eval result=\$gl_cv_type_${gltype}_signed
6807 if test "$result" = yes; then
6808 glsufu=
6809 else
6810 glsufu=u
6811 fi
6812 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6813 case $glsuf in
6814 '') gltype1='int';;
f434ba03
PA
6815 l) gltype1='long int';;
6816 ll) gltype1='long long int';;
6817 i64) gltype1='__int64';;
6818 u) gltype1='unsigned int';;
6819 ul) gltype1='unsigned long int';;
6820 ull) gltype1='unsigned long long int';;
783e057b
DJ
6821 ui64)gltype1='unsigned __int64';;
6822 esac
81ecdfbb 6823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6824/* end confdefs.h. */
6825
6826 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6827 included before <wchar.h>. */
6828 #include <stddef.h>
6829 #include <signal.h>
6830 #if HAVE_WCHAR_H
6831 # include <stdio.h>
6832 # include <time.h>
6833 # include <wchar.h>
6834 #endif
6835
6836 extern $gltype foo;
6837 extern $gltype1 foo;
6838int
6839main ()
6840{
6841
6842 ;
6843 return 0;
6844}
6845_ACEOF
81ecdfbb 6846if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6847 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6848fi
81ecdfbb 6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6850 eval result=\$gl_cv_type_${gltype}_suffix
6851 test "$result" != no && break
6852 done
6853fi
81ecdfbb
RW
6854eval ac_res=\$gl_cv_type_${gltype}_suffix
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6856$as_echo "$ac_res" >&6; }
783e057b
DJ
6857 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6858 eval result=\$gl_cv_type_${gltype}_suffix
6859 test "$result" = no && result=
6860 eval ${GLTYPE}_SUFFIX=\$result
6861 cat >>confdefs.h <<_ACEOF
6862#define ${GLTYPE}_SUFFIX $result
6863_ACEOF
6864
6865 done
6866
6867
783e057b
DJ
6868 fi
6869
6870
f434ba03
PA
6871 for gltype in sig_atomic_t wchar_t wint_t ; do
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6873$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6874if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6875 $as_echo_n "(cached) " >&6
783e057b 6876else
f434ba03
PA
6877 eval gl_cv_type_${gltype}_suffix=no
6878 eval result=\$gl_cv_type_${gltype}_signed
6879 if test "$result" = yes; then
6880 glsufu=
6881 else
6882 glsufu=u
6883 fi
6884 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6885 case $glsuf in
6886 '') gltype1='int';;
6887 l) gltype1='long int';;
6888 ll) gltype1='long long int';;
6889 i64) gltype1='__int64';;
6890 u) gltype1='unsigned int';;
6891 ul) gltype1='unsigned long int';;
6892 ull) gltype1='unsigned long long int';;
6893 ui64)gltype1='unsigned __int64';;
6894 esac
6895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6896/* end confdefs.h. */
f434ba03
PA
6897
6898 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6899 included before <wchar.h>. */
6900 #include <stddef.h>
6901 #include <signal.h>
6902 #if HAVE_WCHAR_H
6903 # include <stdio.h>
6904 # include <time.h>
6905 # include <wchar.h>
6906 #endif
6907
6908 extern $gltype foo;
6909 extern $gltype1 foo;
6910int
6911main ()
6912{
6913
6914 ;
6915 return 0;
6916}
783e057b 6917_ACEOF
81ecdfbb 6918if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6919 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6920fi
81ecdfbb 6921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6922 eval result=\$gl_cv_type_${gltype}_suffix
6923 test "$result" != no && break
6924 done
783e057b 6925fi
f434ba03
PA
6926eval ac_res=\$gl_cv_type_${gltype}_suffix
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6928$as_echo "$ac_res" >&6; }
6929 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6930 eval result=\$gl_cv_type_${gltype}_suffix
6931 test "$result" = no && result=
6932 eval ${GLTYPE}_SUFFIX=\$result
6933 cat >>confdefs.h <<_ACEOF
6934#define ${GLTYPE}_SUFFIX $result
6935_ACEOF
6936
6937 done
6938
6939
6940
6941 STDINT_H=stdint.h
783e057b
DJ
6942 fi
6943
6944
f434ba03
PA
6945 # Code from module string:
6946
6947
6948
6949 # Code from module warn-on-use:
6950 # Code from module wchar:
6951
6952
6953
6954
783e057b
DJ
6955 :
6956
6957
6958
6959
6960
783e057b
DJ
6961
6962
6963
6964
6965 :
6966
6967
6968
6969
6970
6971
6972
6973 if test $gl_cv_have_include_next = yes; then
6974 gl_cv_next_wchar_h='<'wchar.h'>'
6975 else
81ecdfbb
RW
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6977$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6978if test "${gl_cv_next_wchar_h+set}" = set; then :
6979 $as_echo_n "(cached) " >&6
783e057b
DJ
6980else
6981
f434ba03
PA
6982 if test $ac_cv_header_wchar_h = yes; then
6983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6984/* end confdefs.h. */
6985#include <wchar.h>
6986
6987_ACEOF
f434ba03
PA
6988 case "$host_os" in
6989 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6990 *) gl_absname_cpp="$ac_cpp" ;;
6991 esac
6992 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6993 sed -n '\#/wchar.h#{
6994 s#.*"\(.*/wchar.h\)".*#\1#
6995 s#^/[^/]#//&#
6996 p
6997 q
6998 }'`'"'
6999 else
7000 gl_cv_next_wchar_h='<'wchar.h'>'
7001 fi
783e057b
DJ
7002
7003fi
81ecdfbb
RW
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7005$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7006 fi
7007 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7008
f434ba03
PA
7009 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7010 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7011 gl_next_as_first_directive='<'wchar.h'>'
7012 else
7013 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7014 gl_next_as_first_directive=$gl_cv_next_wchar_h
7015 fi
7016 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7017
7018
7019
7020 if test $ac_cv_header_wchar_h = yes; then
7021 HAVE_WCHAR_H=1
7022 else
7023 HAVE_WCHAR_H=0
7024 fi
7025
7026
7027
7028 if test $gt_cv_c_wint_t = yes; then
7029 HAVE_WINT_T=1
7030 else
7031 HAVE_WINT_T=0
7032 fi
7033
7034
7035
7036 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7037 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7039$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7040if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7041 $as_echo_n "(cached) " >&6
7042else
7043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7044/* end confdefs.h. */
7045
7046/* Some systems require additional headers. */
7047#ifndef __GLIBC__
7048# include <stddef.h>
7049# include <stdio.h>
7050# include <time.h>
7051#endif
7052#include <wchar.h>
7053
7054int
7055main ()
7056{
7057#undef $gl_func
7058 (void) $gl_func;
7059 ;
7060 return 0;
7061}
7062_ACEOF
7063if ac_fn_c_try_compile "$LINENO"; then :
7064 eval "$as_gl_Symbol=yes"
7065else
7066 eval "$as_gl_Symbol=no"
7067fi
7068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7069fi
7070eval ac_res=\$$as_gl_Symbol
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7072$as_echo "$ac_res" >&6; }
7073 eval as_val=\$$as_gl_Symbol
7074 if test "x$as_val" = x""yes; then :
7075 cat >>confdefs.h <<_ACEOF
7076#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7077_ACEOF
7078
7079 eval ac_cv_have_decl_$gl_func=yes
7080fi
7081 done
7082
7083
7084 # Code from module dummy:
7085 # End of code from modules
7086
7087
c906108c 7088
c906108c 7089
c906108c 7090
c906108c 7091
c906108c 7092
c906108c 7093
c906108c 7094
783e057b
DJ
7095 gltests_libdeps=
7096 gltests_ltlibdeps=
20e95c23 7097
20e95c23 7098
20e95c23 7099
f434ba03
PA
7100
7101
7102
7103
7104
7105
783e057b 7106 gl_source_base='tests'
f434ba03
PA
7107 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
7108
7109 gl_module_indicator_condition=$gltests_WITNESS
7110
7111
7112
7113
7114
c906108c 7115
bec39cab 7116
bec39cab 7117
783e057b
DJ
7118
7119 LIBGNU_LIBDEPS="$gl_libdeps"
7120
7121 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7122
7123
e28b3332 7124
d5af19ba
DJ
7125# For Makefile dependencies.
7126GNULIB_STDINT_H=
7127if test x"$STDINT_H" != x; then
7128 GNULIB_STDINT_H=gnulib/$STDINT_H
7129fi
7130
7131
bec39cab
AC
7132PACKAGE=gdb
7133
7134cat >>confdefs.h <<_ACEOF
7135#define PACKAGE "$PACKAGE"
7136_ACEOF
7137
7138
7139
e28b3332
DJ
7140# GDB does not use automake, but gnulib does. This line lets us
7141# generate its Makefile.in.
81ecdfbb
RW
7142am__api_version='1.11'
7143
e28b3332
DJ
7144# Find a good install program. We prefer a C program (faster),
7145# so one script is as good as another. But avoid the broken or
7146# incompatible versions:
7147# SysV /etc/install, /usr/sbin/install
7148# SunOS /usr/etc/install
7149# IRIX /sbin/install
7150# AIX /bin/install
7151# AmigaOS /C/install, which installs bootblocks on floppy discs
7152# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7153# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7154# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7155# OS/2's system install, which has a completely different semantic
7156# ./install, which can be erroneously created by make from ./install.sh.
85541719 7157# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7159$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7160if test -z "$INSTALL"; then
81ecdfbb
RW
7161if test "${ac_cv_path_install+set}" = set; then :
7162 $as_echo_n "(cached) " >&6
e28b3332
DJ
7163else
7164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7165for as_dir in $PATH
7166do
7167 IFS=$as_save_IFS
7168 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7169 # Account for people who put trailing slashes in PATH elements.
7170case $as_dir/ in #((
7171 ./ | .// | /[cC]/* | \
e28b3332 7172 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7173 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7174 /usr/ucb/* ) ;;
7175 *)
7176 # OSF1 and SCO ODT 3.0 have their own names for install.
7177 # Don't use installbsd from OSF since it installs stuff as root
7178 # by default.
7179 for ac_prog in ginstall scoinst install; do
7180 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7181 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7182 if test $ac_prog = install &&
7183 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7184 # AIX install. It has an incompatible calling convention.
7185 :
7186 elif test $ac_prog = install &&
7187 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7188 # program-specific install script used by HP pwplus--don't use.
7189 :
7190 else
85541719
DE
7191 rm -rf conftest.one conftest.two conftest.dir
7192 echo one > conftest.one
7193 echo two > conftest.two
7194 mkdir conftest.dir
7195 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7196 test -s conftest.one && test -s conftest.two &&
7197 test -s conftest.dir/conftest.one &&
7198 test -s conftest.dir/conftest.two
7199 then
7200 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7201 break 3
7202 fi
e28b3332
DJ
7203 fi
7204 fi
7205 done
7206 done
7207 ;;
7208esac
81ecdfbb
RW
7209
7210 done
7211IFS=$as_save_IFS
e28b3332 7212
85541719 7213rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7214
7215fi
7216 if test "${ac_cv_path_install+set}" = set; then
7217 INSTALL=$ac_cv_path_install
7218 else
85541719
DE
7219 # As a last resort, use the slow shell script. Don't cache a
7220 # value for INSTALL within a source directory, because that will
e28b3332 7221 # break other packages using the cache if that directory is
85541719 7222 # removed, or if the value is a relative name.
e28b3332
DJ
7223 INSTALL=$ac_install_sh
7224 fi
7225fi
81ecdfbb
RW
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7227$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7228
7229# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7230# It thinks the first close brace ends the variable substitution.
7231test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7232
7233test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7234
7235test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7236
81ecdfbb
RW
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7238$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7239# Just in case
7240sleep 1
7241echo timestamp > conftest.file
81ecdfbb
RW
7242# Reject unsafe characters in $srcdir or the absolute working directory
7243# name. Accept space and tab only in the latter.
7244am_lf='
7245'
7246case `pwd` in
7247 *[\\\"\#\$\&\'\`$am_lf]*)
7248 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7249esac
7250case $srcdir in
7251 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7252 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7253esac
7254
e28b3332
DJ
7255# Do `set' in a subshell so we don't clobber the current shell's
7256# arguments. Must try -L first in case configure is actually a
7257# symlink; some systems play weird games with the mod time of symlinks
7258# (eg FreeBSD returns the mod time of the symlink's containing
7259# directory).
7260if (
81ecdfbb 7261 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7262 if test "$*" = "X"; then
7263 # -L didn't work.
81ecdfbb 7264 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7265 fi
7266 rm -f conftest.file
7267 if test "$*" != "X $srcdir/configure conftest.file" \
7268 && test "$*" != "X conftest.file $srcdir/configure"; then
7269
7270 # If neither matched, then we have a broken ls. This can happen
7271 # if, for instance, CONFIG_SHELL is bash and it inherits a
7272 # broken ls alias from the environment. This has actually
7273 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7274 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7275alias in your environment" "$LINENO" 5
e28b3332
DJ
7276 fi
7277
7278 test "$2" = conftest.file
7279 )
7280then
7281 # Ok.
7282 :
7283else
81ecdfbb
RW
7284 as_fn_error "newly created file is older than distributed files!
7285Check your system clock" "$LINENO" 5
e28b3332 7286fi
81ecdfbb
RW
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7288$as_echo "yes" >&6; }
e28b3332 7289test "$program_prefix" != NONE &&
81ecdfbb 7290 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7291# Use a double $ so make ignores it.
7292test "$program_suffix" != NONE &&
81ecdfbb
RW
7293 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7294# Double any \ or $.
e28b3332 7295# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7296ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7297program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7298
7299# expand $ac_aux_dir to an absolute path
7300am_aux_dir=`cd $ac_aux_dir && pwd`
7301
81ecdfbb
RW
7302if test x"${MISSING+set}" != xset; then
7303 case $am_aux_dir in
7304 *\ * | *\ *)
7305 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7306 *)
7307 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7308 esac
7309fi
e28b3332
DJ
7310# Use eval to expand $SHELL
7311if eval "$MISSING --run true"; then
7312 am_missing_run="$MISSING --run "
7313else
7314 am_missing_run=
81ecdfbb
RW
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7316$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7317fi
7318
7319if test x"${install_sh}" != xset; then
7320 case $am_aux_dir in
7321 *\ * | *\ *)
7322 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7323 *)
7324 install_sh="\${SHELL} $am_aux_dir/install-sh"
7325 esac
7326fi
7327
7328# Installed binaries are usually stripped using `strip' when the user
7329# run `make install-strip'. However `strip' might not be the right
7330# tool to use in cross-compilation environments, therefore Automake
7331# will honor the `STRIP' environment variable to overrule this program.
7332if test "$cross_compiling" != no; then
7333 if test -n "$ac_tool_prefix"; then
7334 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7335set dummy ${ac_tool_prefix}strip; ac_word=$2
7336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337$as_echo_n "checking for $ac_word... " >&6; }
7338if test "${ac_cv_prog_STRIP+set}" = set; then :
7339 $as_echo_n "(cached) " >&6
7340else
7341 if test -n "$STRIP"; then
7342 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7343else
7344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7345for as_dir in $PATH
7346do
7347 IFS=$as_save_IFS
7348 test -z "$as_dir" && as_dir=.
7349 for ac_exec_ext in '' $ac_executable_extensions; do
7350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7351 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7353 break 2
7354 fi
7355done
7356 done
7357IFS=$as_save_IFS
7358
7359fi
7360fi
7361STRIP=$ac_cv_prog_STRIP
7362if test -n "$STRIP"; then
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7364$as_echo "$STRIP" >&6; }
7365else
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367$as_echo "no" >&6; }
7368fi
7369
7370
7371fi
7372if test -z "$ac_cv_prog_STRIP"; then
7373 ac_ct_STRIP=$STRIP
7374 # Extract the first word of "strip", so it can be a program name with args.
7375set dummy strip; ac_word=$2
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7377$as_echo_n "checking for $ac_word... " >&6; }
7378if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7379 $as_echo_n "(cached) " >&6
7380else
7381 if test -n "$ac_ct_STRIP"; then
7382 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7383else
7384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7385for as_dir in $PATH
7386do
7387 IFS=$as_save_IFS
7388 test -z "$as_dir" && as_dir=.
7389 for ac_exec_ext in '' $ac_executable_extensions; do
7390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7391 ac_cv_prog_ac_ct_STRIP="strip"
7392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393 break 2
7394 fi
7395done
7396 done
7397IFS=$as_save_IFS
7398
7399fi
7400fi
7401ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7402if test -n "$ac_ct_STRIP"; then
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7404$as_echo "$ac_ct_STRIP" >&6; }
7405else
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
7408fi
7409
7410 if test "x$ac_ct_STRIP" = x; then
7411 STRIP=":"
7412 else
7413 case $cross_compiling:$ac_tool_warned in
7414yes:)
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7417ac_tool_warned=yes ;;
7418esac
7419 STRIP=$ac_ct_STRIP
7420 fi
7421else
7422 STRIP="$ac_cv_prog_STRIP"
7423fi
7424
7425fi
7426INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7427
7428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7429$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7430if test -z "$MKDIR_P"; then
7431 if test "${ac_cv_path_mkdir+set}" = set; then :
7432 $as_echo_n "(cached) " >&6
7433else
7434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7436do
7437 IFS=$as_save_IFS
7438 test -z "$as_dir" && as_dir=.
7439 for ac_prog in mkdir gmkdir; do
7440 for ac_exec_ext in '' $ac_executable_extensions; do
7441 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7442 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7443 'mkdir (GNU coreutils) '* | \
7444 'mkdir (coreutils) '* | \
7445 'mkdir (fileutils) '4.1*)
7446 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7447 break 3;;
7448 esac
7449 done
7450 done
e28b3332 7451 done
81ecdfbb
RW
7452IFS=$as_save_IFS
7453
7454fi
7455
7456 if test "${ac_cv_path_mkdir+set}" = set; then
7457 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7458 else
81ecdfbb
RW
7459 # As a last resort, use the slow shell script. Don't cache a
7460 # value for MKDIR_P within a source directory, because that will
7461 # break other packages using the cache if that directory is
7462 # removed, or if the value is a relative name.
7463 test -d ./--version && rmdir ./--version
7464 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7465 fi
7466fi
81ecdfbb
RW
7467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7468$as_echo "$MKDIR_P" >&6; }
7469
f434ba03 7470
81ecdfbb
RW
7471mkdir_p="$MKDIR_P"
7472case $mkdir_p in
7473 [\\/$]* | ?:[\\/]*) ;;
7474 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7475esac
e28b3332
DJ
7476
7477for ac_prog in gawk mawk nawk awk
7478do
7479 # Extract the first word of "$ac_prog", so it can be a program name with args.
7480set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7482$as_echo_n "checking for $ac_word... " >&6; }
7483if test "${ac_cv_prog_AWK+set}" = set; then :
7484 $as_echo_n "(cached) " >&6
e28b3332
DJ
7485else
7486 if test -n "$AWK"; then
7487 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7488else
7489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7490for as_dir in $PATH
7491do
7492 IFS=$as_save_IFS
7493 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7494 for ac_exec_ext in '' $ac_executable_extensions; do
7495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7496 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7498 break 2
7499 fi
7500done
81ecdfbb
RW
7501 done
7502IFS=$as_save_IFS
e28b3332
DJ
7503
7504fi
7505fi
7506AWK=$ac_cv_prog_AWK
7507if test -n "$AWK"; then
81ecdfbb
RW
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7509$as_echo "$AWK" >&6; }
e28b3332 7510else
81ecdfbb
RW
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
e28b3332
DJ
7513fi
7514
81ecdfbb 7515
e28b3332
DJ
7516 test -n "$AWK" && break
7517done
7518
81ecdfbb 7519ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7520
7521
7522am_make=${MAKE-make}
7523cat > confinc << 'END'
7524am__doit:
81ecdfbb 7525 @echo this is the am__doit target
e28b3332
DJ
7526.PHONY: am__doit
7527END
7528# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7530$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7531am__include="#"
7532am__quote=
7533_am_result=none
7534# First try GNU make style include.
7535echo "include confinc" > confmf
81ecdfbb
RW
7536# Ignore all kinds of additional output from `make'.
7537case `$am_make -s -f confmf 2> /dev/null` in #(
7538*the\ am__doit\ target*)
7539 am__include=include
7540 am__quote=
7541 _am_result=GNU
7542 ;;
7543esac
e28b3332
DJ
7544# Now try BSD make style include.
7545if test "$am__include" = "#"; then
7546 echo '.include "confinc"' > confmf
81ecdfbb
RW
7547 case `$am_make -s -f confmf 2> /dev/null` in #(
7548 *the\ am__doit\ target*)
7549 am__include=.include
7550 am__quote="\""
7551 _am_result=BSD
7552 ;;
7553 esac
e28b3332
DJ
7554fi
7555
7556
81ecdfbb
RW
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7558$as_echo "$_am_result" >&6; }
e28b3332
DJ
7559rm -f confinc confmf
7560
81ecdfbb
RW
7561# Check whether --enable-dependency-tracking was given.
7562if test "${enable_dependency_tracking+set}" = set; then :
7563 enableval=$enable_dependency_tracking;
7564fi
e28b3332 7565
e28b3332
DJ
7566if test "x$enable_dependency_tracking" != xno; then
7567 am_depcomp="$ac_aux_dir/depcomp"
7568 AMDEPBACKSLASH='\'
7569fi
81ecdfbb 7570 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7571 AMDEP_TRUE=
7572 AMDEP_FALSE='#'
7573else
7574 AMDEP_TRUE='#'
7575 AMDEP_FALSE=
7576fi
7577
7578
81ecdfbb
RW
7579if test "`cd $srcdir && pwd`" != "`pwd`"; then
7580 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7581 # is not polluted with repeated "-I."
7582 am__isrc=' -I$(srcdir)'
7583 # test to see if srcdir already configured
7584 if test -f $srcdir/config.status; then
7585 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7586 fi
e28b3332
DJ
7587fi
7588
7589# test whether we have cygpath
7590if test -z "$CYGPATH_W"; then
7591 if (cygpath --version) >/dev/null 2>/dev/null; then
7592 CYGPATH_W='cygpath -w'
7593 else
7594 CYGPATH_W=echo
7595 fi
7596fi
7597
7598
7599# Define the identity of the package.
7600 PACKAGE=gdb
7601 VERSION=UNUSED-VERSION
7602
7603
7604# Some tools Automake needs.
7605
7606ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7607
7608
7609AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7610
7611
7612AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7613
7614
7615AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7616
7617
7618MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7619
e28b3332
DJ
7620# We need awk for the "check" target. The system "awk" is bad on
7621# some platforms.
7622# Always define AMTAR for backward compatibility.
7623
7624AMTAR=${AMTAR-"${am_missing_run}tar"}
7625
7626am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7627
7628
7629
7630
7631depcc="$CC" am_compiler_list=
7632
81ecdfbb
RW
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7634$as_echo_n "checking dependency style of $depcc... " >&6; }
7635if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7636 $as_echo_n "(cached) " >&6
e28b3332
DJ
7637else
7638 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7639 # We make a subdir and do the tests there. Otherwise we can end up
7640 # making bogus files that we don't know about and never remove. For
7641 # instance it was reported that on HP-UX the gcc test will end up
7642 # making a dummy file named `D' -- because `-MD' means `put the output
7643 # in D'.
7644 mkdir conftest.dir
7645 # Copy depcomp to subdir because otherwise we won't find it if we're
7646 # using a relative directory.
7647 cp "$am_depcomp" conftest.dir
7648 cd conftest.dir
7649 # We will build objects and dependencies in a subdirectory because
7650 # it helps to detect inapplicable dependency modes. For instance
7651 # both Tru64's cc and ICC support -MD to output dependencies as a
7652 # side effect of compilation, but ICC will put the dependencies in
7653 # the current directory while Tru64 will put them in the object
7654 # directory.
7655 mkdir sub
7656
7657 am_cv_CC_dependencies_compiler_type=none
7658 if test "$am_compiler_list" = ""; then
7659 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7660 fi
81ecdfbb
RW
7661 am__universal=false
7662 case " $depcc " in #(
7663 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7664 esac
7665
e28b3332
DJ
7666 for depmode in $am_compiler_list; do
7667 # Setup a source with many dependencies, because some compilers
7668 # like to wrap large dependency lists on column 80 (with \), and
7669 # we should not choose a depcomp mode which is confused by this.
7670 #
7671 # We need to recreate these files for each test, as the compiler may
7672 # overwrite some of them when testing with obscure command lines.
7673 # This happens at least with the AIX C compiler.
7674 : > sub/conftest.c
7675 for i in 1 2 3 4 5 6; do
7676 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7677 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7678 # Solaris 8's {/usr,}/bin/sh.
7679 touch sub/conftst$i.h
7680 done
7681 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7682
81ecdfbb
RW
7683 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7684 # mode. It turns out that the SunPro C++ compiler does not properly
7685 # handle `-M -o', and we need to detect this. Also, some Intel
7686 # versions had trouble with output in subdirs
7687 am__obj=sub/conftest.${OBJEXT-o}
7688 am__minus_obj="-o $am__obj"
e28b3332 7689 case $depmode in
81ecdfbb
RW
7690 gcc)
7691 # This depmode causes a compiler race in universal mode.
7692 test "$am__universal" = false || continue
7693 ;;
e28b3332
DJ
7694 nosideeffect)
7695 # after this tag, mechanisms are not by side-effect, so they'll
7696 # only be used when explicitly requested
7697 if test "x$enable_dependency_tracking" = xyes; then
7698 continue
7699 else
7700 break
7701 fi
7702 ;;
81ecdfbb
RW
7703 msvisualcpp | msvcmsys)
7704 # This compiler won't grok `-c -o', but also, the minuso test has
7705 # not run yet. These depmodes are late enough in the game, and
7706 # so weak that their functioning should not be impacted.
7707 am__obj=conftest.${OBJEXT-o}
7708 am__minus_obj=
7709 ;;
e28b3332
DJ
7710 none) break ;;
7711 esac
e28b3332 7712 if depmode=$depmode \
81ecdfbb 7713 source=sub/conftest.c object=$am__obj \
e28b3332 7714 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7715 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7716 >/dev/null 2>conftest.err &&
81ecdfbb 7717 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7718 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7719 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7720 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7721 # icc doesn't choke on unknown options, it will just issue warnings
7722 # or remarks (even with -Werror). So we grep stderr for any message
7723 # that says an option was ignored or not supported.
7724 # When given -MP, icc 7.0 and 7.1 complain thusly:
7725 # icc: Command line warning: ignoring option '-M'; no argument required
7726 # The diagnosis changed in icc 8.0:
7727 # icc: Command line remark: option '-MP' not supported
7728 if (grep 'ignoring option' conftest.err ||
7729 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7730 am_cv_CC_dependencies_compiler_type=$depmode
7731 break
7732 fi
7733 fi
7734 done
7735
7736 cd ..
7737 rm -rf conftest.dir
7738else
7739 am_cv_CC_dependencies_compiler_type=none
7740fi
7741
7742fi
81ecdfbb
RW
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7744$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7745CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7746
81ecdfbb 7747 if
e28b3332
DJ
7748 test "x$enable_dependency_tracking" != xno \
7749 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7750 am__fastdepCC_TRUE=
7751 am__fastdepCC_FALSE='#'
7752else
7753 am__fastdepCC_TRUE='#'
7754 am__fastdepCC_FALSE=
7755fi
7756
7757
7758
7759
bec39cab
AC
7760
7761
81ecdfbb
RW
7762# Check whether --with-separate-debug-dir was given.
7763if test "${with_separate_debug_dir+set}" = set; then :
7764 withval=$with_separate_debug_dir;
b14b1491
TT
7765 DEBUGDIR=$withval
7766else
7767 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7768fi
7769
20e95c23 7770
783e057b
DJ
7771 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7772 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7773 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7774 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7775
783e057b
DJ
7776cat >>confdefs.h <<_ACEOF
7777#define DEBUGDIR "$ac_define_dir"
20e95c23 7778_ACEOF
20e95c23 7779
20e95c23 7780
20e95c23 7781
0c4a4063 7782
b14b1491
TT
7783 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7784 if test "x$prefix" = xNONE; then
7785 test_prefix=/usr/local
7786 else
7787 test_prefix=$prefix
7788 fi
783e057b 7789 else
b14b1491 7790 test_prefix=$exec_prefix
783e057b 7791 fi
b14b1491
TT
7792 value=0
7793 case ${ac_define_dir} in
7794 "${test_prefix}"|"${test_prefix}/"*|\
7795 '${exec_prefix}'|'${exec_prefix}/'*)
7796 value=1
7797 ;;
7798 esac
7799
7800cat >>confdefs.h <<_ACEOF
7801#define DEBUGDIR_RELOCATABLE $value
7802_ACEOF
7803
7804
7805
0c4a4063 7806
b14b1491
TT
7807# GDB's datadir relocation
7808
7809
7810
81ecdfbb
RW
7811# Check whether --with-gdb-datadir was given.
7812if test "${with_gdb_datadir+set}" = set; then :
7813 withval=$with_gdb_datadir;
b14b1491 7814 GDB_DATADIR=$withval
20e95c23 7815else
b14b1491 7816 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7817fi
7818
20e95c23 7819
b14b1491
TT
7820 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7821 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7822 ac_define_dir=`eval echo $GDB_DATADIR`
7823 ac_define_dir=`eval echo $ac_define_dir`
7824
7825cat >>confdefs.h <<_ACEOF
7826#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7827_ACEOF
7828
b14b1491
TT
7829
7830
0c4a4063 7831
b14b1491
TT
7832 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7833 if test "x$prefix" = xNONE; then
7834 test_prefix=/usr/local
7835 else
7836 test_prefix=$prefix
7837 fi
7838 else
7839 test_prefix=$exec_prefix
7840 fi
7841 value=0
7842 case ${ac_define_dir} in
7843 "${test_prefix}"|"${test_prefix}/"*|\
7844 '${exec_prefix}'|'${exec_prefix}/'*)
7845 value=1
7846 ;;
7847 esac
7848
7849cat >>confdefs.h <<_ACEOF
7850#define GDB_DATADIR_RELOCATABLE $value
7851_ACEOF
7852
7853
783e057b 7854
20e95c23 7855
0c4a4063 7856
81ecdfbb
RW
7857# Check whether --with-relocated-sources was given.
7858if test "${with_relocated_sources+set}" = set; then :
7859 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7860
7861 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7862 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7863 ac_define_dir=`eval echo $reloc_srcdir`
7864 ac_define_dir=`eval echo $ac_define_dir`
7865
7866cat >>confdefs.h <<_ACEOF
7867#define RELOC_SRCDIR "$ac_define_dir"
7868_ACEOF
7869
7870
7871
81ecdfbb
RW
7872fi
7873
29b0e8a2
JM
7874
7875
20e95c23 7876
783e057b 7877subdirs="$subdirs doc testsuite"
20e95c23
DJ
7878
7879
783e057b 7880# Check whether to support alternative target configurations
81ecdfbb
RW
7881# Check whether --enable-targets was given.
7882if test "${enable_targets+set}" = set; then :
7883 enableval=$enable_targets; case "${enableval}" in
7884 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7885 ;;
7886 no) enable_targets= ;;
7887 *) enable_targets=$enableval ;;
7888esac
81ecdfbb
RW
7889fi
7890
20e95c23 7891
783e057b 7892# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7893# Check whether --enable-64-bit-bfd was given.
7894if test "${enable_64_bit_bfd+set}" = set; then :
7895 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7896 yes) want64=true ;;
7897 no) want64=false ;;
81ecdfbb 7898 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7899esac
7900else
7901 want64=false
81ecdfbb
RW
7902fi
7903
783e057b
DJ
7904# Provide defaults for some variables set by the per-host and per-target
7905# configuration.
7906gdb_host_obs=posix-hdep.o
20e95c23 7907
783e057b
DJ
7908if test "${target}" = "${host}"; then
7909 gdb_native=yes
7910else
7911 gdb_native=no
7912fi
20e95c23 7913
783e057b 7914. $srcdir/configure.host
20e95c23 7915
783e057b 7916# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7917
783e057b
DJ
7918TARGET_OBS=
7919all_targets=
20e95c23 7920
783e057b 7921for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7922do
783e057b
DJ
7923 if test "$targ_alias" = "all"; then
7924 all_targets=true
7925 else
7926 # Canonicalize the secondary target names.
7927 result=`$ac_config_sub $targ_alias 2>/dev/null`
7928 if test -n "$result"; then
7929 targ=$result
7930 else
7931 targ=$targ_alias
7932 fi
20e95c23 7933
783e057b 7934 . ${srcdir}/configure.tgt
20e95c23 7935
bf307134
JB
7936 if test -z "${gdb_target_obs}"; then :
7937 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
7938fi
7939
783e057b
DJ
7940 # Target-specific object files
7941 for i in ${gdb_target_obs}; do
7942 case " $TARGET_OBS " in
7943 *" ${i} "*) ;;
7944 *)
7945 TARGET_OBS="$TARGET_OBS ${i}"
7946 ;;
7947 esac
7948 done
20e95c23 7949
783e057b
DJ
7950 # Check whether this target needs 64-bit CORE_ADDR
7951 if test x${want64} = xfalse; then
7952 . ${srcdir}/../bfd/config.bfd
7953 fi
7954 fi
20e95c23
DJ
7955done
7956
783e057b
DJ
7957if test x${all_targets} = xtrue; then
7958
7959 # We want all 64-bit targets if we either:
7960 # - run on a 64-bit host or
7961 # - already require 64-bit support for some other target or
7962 # - the --enable-64-bit-bfd option was supplied
7963 # Otherwise we only support all 32-bit targets.
7964 #
7965 # NOTE: This test must be in sync with the corresponding
7966 # tests in BFD!
20e95c23 7967
783e057b 7968 if test x${want64} = xfalse; then
81ecdfbb
RW
7969 # The cast to long int works around a bug in the HP C Compiler
7970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7972# This bug is HP SR number 8606223364.
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7974$as_echo_n "checking size of long... " >&6; }
7975if test "${ac_cv_sizeof_long+set}" = set; then :
7976 $as_echo_n "(cached) " >&6
c0993dbe 7977else
81ecdfbb 7978 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 7979
81ecdfbb
RW
7980else
7981 if test "$ac_cv_type_long" = yes; then
7982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7984{ as_fn_set_status 77
7985as_fn_error "cannot compute sizeof (long)
7986See \`config.log' for more details." "$LINENO" 5; }; }
7987 else
7988 ac_cv_sizeof_long=0
7989 fi
c0993dbe 7990fi
81ecdfbb 7991
c0993dbe 7992fi
81ecdfbb
RW
7993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7994$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 7995
c0993dbe 7996
c0993dbe 7997
c0993dbe
UW
7998cat >>confdefs.h <<_ACEOF
7999#define SIZEOF_LONG $ac_cv_sizeof_long
8000_ACEOF
8001
8002
8003 if test "x${ac_cv_sizeof_long}" = "x8"; then
8004 want64=true
8005 fi
8006 fi
8007 if test x${want64} = xtrue; then
8008 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8009 else
8010 TARGET_OBS='$(ALL_TARGET_OBS)'
8011 fi
8012fi
8013
8014
8015
8016# For other settings, only the main target counts.
8017gdb_sim=
8018gdb_osabi=
8019build_gdbserver=
8020targ=$target; . ${srcdir}/configure.tgt
8021
8022# Fetch the default architecture and default target vector from BFD.
8023targ=$target; . $srcdir/../bfd/config.bfd
8024
8025# We only want the first architecture, so strip off the others if
8026# there is more than one.
8027targ_archs=`echo $targ_archs | sed 's/ .*//'`
8028
8029if test "x$targ_archs" != x; then
8030
8031cat >>confdefs.h <<_ACEOF
8032#define DEFAULT_BFD_ARCH $targ_archs
8033_ACEOF
8034
8035fi
8036if test "x$targ_defvec" != x; then
8037
8038cat >>confdefs.h <<_ACEOF
8039#define DEFAULT_BFD_VEC $targ_defvec
8040_ACEOF
8041
8042fi
8043
c0993dbe
UW
8044# The CLI cannot be disabled yet, but may be in the future.
8045
8046# Enable CLI.
81ecdfbb
RW
8047# Check whether --enable-gdbcli was given.
8048if test "${enable_gdbcli+set}" = set; then :
8049 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8050 yes)
8051 ;;
8052 no)
81ecdfbb 8053 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8054 *)
81ecdfbb 8055 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8056 esac
8057else
8058 enable_gdbcli=yes
81ecdfbb
RW
8059fi
8060
c0993dbe
UW
8061if test x"$enable_gdbcli" = xyes; then
8062 if test -d $srcdir/cli; then
8063 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8064 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8065 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8066 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8067 fi
8068fi
8069
8070# Enable MI.
81ecdfbb
RW
8071# Check whether --enable-gdbmi was given.
8072if test "${enable_gdbmi+set}" = set; then :
8073 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8074 yes | no)
8075 ;;
8076 *)
81ecdfbb 8077 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8078 esac
8079else
8080 enable_gdbmi=yes
81ecdfbb
RW
8081fi
8082
c0993dbe
UW
8083if test x"$enable_gdbmi" = xyes; then
8084 if test -d $srcdir/mi; then
8085 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8086 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8087 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8088 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8089 fi
8090fi
8091
8092# Enable TUI.
81ecdfbb
RW
8093# Check whether --enable-tui was given.
8094if test "${enable_tui+set}" = set; then :
8095 enableval=$enable_tui; case $enableval in
3ca64bd3 8096 yes | no | auto)
c0993dbe
UW
8097 ;;
8098 *)
81ecdfbb 8099 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8100 esac
8101else
3ca64bd3 8102 enable_tui=auto
81ecdfbb
RW
8103fi
8104
c0993dbe
UW
8105
8106# Enable gdbtk.
81ecdfbb
RW
8107# Check whether --enable-gdbtk was given.
8108if test "${enable_gdbtk+set}" = set; then :
8109 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8110 yes | no)
8111 ;;
8112 *)
81ecdfbb 8113 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8114 esac
8115else
5062cc19 8116 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8117 enable_gdbtk=yes
8118 else
8119 enable_gdbtk=no
8120 fi
81ecdfbb
RW
8121fi
8122
c0993dbe
UW
8123# We unconditionally disable gdbtk tests on selected platforms.
8124case $host_os in
8125 go32* | windows*)
81ecdfbb
RW
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8127$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8128 enable_gdbtk=no ;;
8129esac
8130
8131# Libunwind support.
bec39cab 8132
81ecdfbb
RW
8133# Check whether --with-libunwind was given.
8134if test "${with_libunwind+set}" = set; then :
8135 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8136 yes) enable_libunwind=yes ;;
8137 no) enable_libunwind=no ;;
81ecdfbb 8138 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8139esac
bec39cab 8140else
bec39cab 8141
81ecdfbb
RW
8142 for ac_header in libunwind.h libunwind-ia64.h
8143do :
8144 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8145ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8146eval as_val=\$$as_ac_Header
8147 if test "x$as_val" = x""yes; then :
bec39cab 8148 cat >>confdefs.h <<_ACEOF
81ecdfbb 8149#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8150_ACEOF
8151
8152fi
8153
8154done
8155
a9322a30
TT
8156 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8157 enable_libunwind=yes;
8158 fi
8159
bec39cab 8160fi
bec39cab 8161
bec39cab 8162
81ecdfbb
RW
8163if test x"$enable_libunwind" = xyes; then
8164 for ac_header in libunwind.h libunwind-ia64.h
8165do :
8166 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8167ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8168eval as_val=\$$as_ac_Header
8169 if test "x$as_val" = x""yes; then :
bec39cab 8170 cat >>confdefs.h <<_ACEOF
81ecdfbb 8171#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8172_ACEOF
8173
8174fi
8175
8176done
8177
bec39cab 8178
81ecdfbb 8179$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8180
8181 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8182 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8183 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8184fi
8185
cb01cfba
JB
8186opt_curses=no
8187
81ecdfbb
RW
8188# Check whether --with-curses was given.
8189if test "${with_curses+set}" = set; then :
8190 withval=$with_curses; opt_curses=$withval
8191fi
8192
cb01cfba 8193
76a39ba7 8194prefer_curses=no
cb01cfba 8195if test "$opt_curses" = "yes"; then
76a39ba7 8196 prefer_curses=yes
cb01cfba
JB
8197fi
8198
a9322a30 8199# Profiling support.
81ecdfbb
RW
8200# Check whether --enable-profiling was given.
8201if test "${enable_profiling+set}" = set; then :
8202 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8203 yes | no)
8204 ;;
8205 *)
81ecdfbb 8206 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8207 esac
8208else
8209 enable_profiling=no
81ecdfbb 8210fi
bec39cab 8211
a9322a30
TT
8212
8213for ac_func in monstartup _mcleanup
81ecdfbb
RW
8214do :
8215 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8216ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8217eval as_val=\$$as_ac_var
8218 if test "x$as_val" = x""yes; then :
8219 cat >>confdefs.h <<_ACEOF
8220#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8221_ACEOF
a9322a30 8222
81ecdfbb
RW
8223fi
8224done
a9322a30 8225
81ecdfbb
RW
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8227$as_echo_n "checking for _etext... " >&6; }
8228if test "${ac_cv_var__etext+set}" = set; then :
8229 $as_echo_n "(cached) " >&6
8230else
8231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8232/* end confdefs.h. */
8233#include <stdlib.h>
8234extern char _etext;
a9322a30
TT
8235
8236int
8237main ()
8238{
8239free (&_etext);
8240 ;
8241 return 0;
8242}
bec39cab 8243_ACEOF
81ecdfbb 8244if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8245 ac_cv_var__etext=yes
bec39cab 8246else
81ecdfbb 8247 ac_cv_var__etext=no
bec39cab 8248fi
81ecdfbb
RW
8249rm -f core conftest.err conftest.$ac_objext \
8250 conftest$ac_exeext conftest.$ac_ext
bec39cab 8251fi
81ecdfbb
RW
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8253$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8254if test $ac_cv_var__etext = yes; then
60ca704f 8255
81ecdfbb 8256$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8257
bec39cab 8258fi
81ecdfbb
RW
8259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8260$as_echo_n "checking for etext... " >&6; }
8261if test "${ac_cv_var_etext+set}" = set; then :
8262 $as_echo_n "(cached) " >&6
bec39cab 8263else
81ecdfbb 8264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8265/* end confdefs.h. */
a9322a30
TT
8266#include <stdlib.h>
8267extern char etext;
bec39cab
AC
8268
8269int
8270main ()
8271{
a9322a30 8272free (&etext);
bec39cab
AC
8273 ;
8274 return 0;
8275}
8276_ACEOF
81ecdfbb 8277if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8278 ac_cv_var_etext=yes
bec39cab 8279else
81ecdfbb 8280 ac_cv_var_etext=no
bec39cab 8281fi
81ecdfbb
RW
8282rm -f core conftest.err conftest.$ac_objext \
8283 conftest$ac_exeext conftest.$ac_ext
bec39cab 8284fi
81ecdfbb
RW
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8286$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8287if test $ac_cv_var_etext = yes; then
8288
81ecdfbb 8289$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8290
8291fi
a9322a30
TT
8292if test "$enable_profiling" = yes ; then
8293 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8294 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8295 fi
8296 PROFILE_CFLAGS=-pg
8297 OLD_CFLAGS="$CFLAGS"
8298 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8299
81ecdfbb
RW
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8301$as_echo_n "checking whether $CC supports -pg... " >&6; }
8302if test "${ac_cv_cc_supports_pg+set}" = set; then :
8303 $as_echo_n "(cached) " >&6
bec39cab 8304else
81ecdfbb 8305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8306/* end confdefs.h. */
bec39cab
AC
8307
8308int
8309main ()
8310{
a9322a30 8311int x;
bec39cab
AC
8312 ;
8313 return 0;
8314}
8315_ACEOF
81ecdfbb 8316if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8317 ac_cv_cc_supports_pg=yes
bec39cab 8318else
81ecdfbb 8319 ac_cv_cc_supports_pg=no
bec39cab 8320fi
81ecdfbb 8321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8322fi
81ecdfbb
RW
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8324$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8325
a9322a30 8326 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8327 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8328 fi
bec39cab 8329
a9322a30 8330 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8331fi
8332
c16158bc
JM
8333
8334
81ecdfbb
RW
8335# Check whether --with-pkgversion was given.
8336if test "${with_pkgversion+set}" = set; then :
8337 withval=$with_pkgversion; case "$withval" in
8338 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8339 no) PKGVERSION= ;;
8340 *) PKGVERSION="($withval) " ;;
8341 esac
8342else
8343 PKGVERSION="(GDB) "
8344
81ecdfbb 8345fi
c16158bc
JM
8346
8347
8348
8349
81ecdfbb
RW
8350
8351# Check whether --with-bugurl was given.
8352if test "${with_bugurl+set}" = set; then :
8353 withval=$with_bugurl; case "$withval" in
8354 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8355 no) BUGURL=
8356 ;;
8357 *) BUGURL="$withval"
8358 ;;
8359 esac
8360else
8361 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8362
81ecdfbb
RW
8363fi
8364
c16158bc
JM
8365 case ${BUGURL} in
8366 "")
8367 REPORT_BUGS_TO=
8368 REPORT_BUGS_TEXI=
8369 ;;
8370 *)
8371 REPORT_BUGS_TO="<$BUGURL>"
8372 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8373 ;;
8374 esac;
8375
8376
8377
8378
8379cat >>confdefs.h <<_ACEOF
8380#define PKGVERSION "$PKGVERSION"
8381_ACEOF
8382
8383
8384cat >>confdefs.h <<_ACEOF
8385#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8386_ACEOF
8387
8388
bec39cab
AC
8389# --------------------- #
8390# Checks for programs. #
8391# --------------------- #
8392
8393for ac_prog in gawk mawk nawk awk
8394do
8395 # Extract the first word of "$ac_prog", so it can be a program name with args.
8396set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8398$as_echo_n "checking for $ac_word... " >&6; }
8399if test "${ac_cv_prog_AWK+set}" = set; then :
8400 $as_echo_n "(cached) " >&6
bec39cab
AC
8401else
8402 if test -n "$AWK"; then
8403 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8404else
8405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8406for as_dir in $PATH
8407do
8408 IFS=$as_save_IFS
8409 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8410 for ac_exec_ext in '' $ac_executable_extensions; do
8411 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8412 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8414 break 2
8415 fi
8416done
81ecdfbb
RW
8417 done
8418IFS=$as_save_IFS
bec39cab
AC
8419
8420fi
8421fi
8422AWK=$ac_cv_prog_AWK
8423if test -n "$AWK"; then
81ecdfbb
RW
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8425$as_echo "$AWK" >&6; }
bec39cab 8426else
81ecdfbb
RW
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8428$as_echo "no" >&6; }
bec39cab
AC
8429fi
8430
bec39cab 8431
81ecdfbb 8432 test -n "$AWK" && break
bec39cab
AC
8433done
8434
bec39cab 8435
81ecdfbb
RW
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8437$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8438LN_S=$as_ln_s
8439if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8441$as_echo "yes" >&6; }
bec39cab 8442else
81ecdfbb
RW
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8444$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8445fi
8446
8447if test -n "$ac_tool_prefix"; then
8448 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8449set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8451$as_echo_n "checking for $ac_word... " >&6; }
8452if test "${ac_cv_prog_RANLIB+set}" = set; then :
8453 $as_echo_n "(cached) " >&6
bec39cab
AC
8454else
8455 if test -n "$RANLIB"; then
8456 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8457else
8458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8459for as_dir in $PATH
8460do
8461 IFS=$as_save_IFS
8462 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8463 for ac_exec_ext in '' $ac_executable_extensions; do
8464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8465 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8467 break 2
8468 fi
8469done
81ecdfbb
RW
8470 done
8471IFS=$as_save_IFS
bec39cab
AC
8472
8473fi
8474fi
8475RANLIB=$ac_cv_prog_RANLIB
8476if test -n "$RANLIB"; then
81ecdfbb
RW
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8478$as_echo "$RANLIB" >&6; }
bec39cab 8479else
81ecdfbb
RW
8480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8481$as_echo "no" >&6; }
bec39cab
AC
8482fi
8483
81ecdfbb 8484
bec39cab
AC
8485fi
8486if test -z "$ac_cv_prog_RANLIB"; then
8487 ac_ct_RANLIB=$RANLIB
8488 # Extract the first word of "ranlib", so it can be a program name with args.
8489set dummy ranlib; ac_word=$2
81ecdfbb
RW
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8491$as_echo_n "checking for $ac_word... " >&6; }
8492if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8493 $as_echo_n "(cached) " >&6
bec39cab
AC
8494else
8495 if test -n "$ac_ct_RANLIB"; then
8496 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8497else
8498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501 IFS=$as_save_IFS
8502 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8503 for ac_exec_ext in '' $ac_executable_extensions; do
8504 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8505 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8507 break 2
8508 fi
8509done
81ecdfbb
RW
8510 done
8511IFS=$as_save_IFS
bec39cab 8512
bec39cab
AC
8513fi
8514fi
8515ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8516if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8518$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8519else
81ecdfbb
RW
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521$as_echo "no" >&6; }
bec39cab
AC
8522fi
8523
81ecdfbb
RW
8524 if test "x$ac_ct_RANLIB" = x; then
8525 RANLIB=":"
8526 else
8527 case $cross_compiling:$ac_tool_warned in
8528yes:)
8529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8531ac_tool_warned=yes ;;
8532esac
8533 RANLIB=$ac_ct_RANLIB
8534 fi
bec39cab
AC
8535else
8536 RANLIB="$ac_cv_prog_RANLIB"
8537fi
8538
8539for ac_prog in 'bison -y' byacc
8540do
8541 # Extract the first word of "$ac_prog", so it can be a program name with args.
8542set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if test "${ac_cv_prog_YACC+set}" = set; then :
8546 $as_echo_n "(cached) " >&6
bec39cab
AC
8547else
8548 if test -n "$YACC"; then
8549 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8550else
8551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554 IFS=$as_save_IFS
8555 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8556 for ac_exec_ext in '' $ac_executable_extensions; do
8557 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8558 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8560 break 2
8561 fi
8562done
81ecdfbb
RW
8563 done
8564IFS=$as_save_IFS
bec39cab
AC
8565
8566fi
8567fi
8568YACC=$ac_cv_prog_YACC
8569if test -n "$YACC"; then
81ecdfbb
RW
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8571$as_echo "$YACC" >&6; }
bec39cab 8572else
81ecdfbb
RW
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
bec39cab
AC
8575fi
8576
81ecdfbb 8577
bec39cab
AC
8578 test -n "$YACC" && break
8579done
8580test -n "$YACC" || YACC="yacc"
8581
8582
8583if test -n "$ac_tool_prefix"; then
8584 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8585set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587$as_echo_n "checking for $ac_word... " >&6; }
8588if test "${ac_cv_prog_AR+set}" = set; then :
8589 $as_echo_n "(cached) " >&6
bec39cab
AC
8590else
8591 if test -n "$AR"; then
8592 ac_cv_prog_AR="$AR" # Let the user override the test.
8593else
8594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595for as_dir in $PATH
8596do
8597 IFS=$as_save_IFS
8598 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8599 for ac_exec_ext in '' $ac_executable_extensions; do
8600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8601 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8603 break 2
8604 fi
8605done
81ecdfbb
RW
8606 done
8607IFS=$as_save_IFS
bec39cab
AC
8608
8609fi
8610fi
8611AR=$ac_cv_prog_AR
8612if test -n "$AR"; then
81ecdfbb
RW
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8614$as_echo "$AR" >&6; }
bec39cab 8615else
81ecdfbb
RW
8616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617$as_echo "no" >&6; }
bec39cab
AC
8618fi
8619
81ecdfbb 8620
bec39cab
AC
8621fi
8622if test -z "$ac_cv_prog_AR"; then
8623 ac_ct_AR=$AR
8624 # Extract the first word of "ar", so it can be a program name with args.
8625set dummy ar; ac_word=$2
81ecdfbb
RW
8626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8627$as_echo_n "checking for $ac_word... " >&6; }
8628if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8629 $as_echo_n "(cached) " >&6
bec39cab
AC
8630else
8631 if test -n "$ac_ct_AR"; then
8632 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8633else
8634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635for as_dir in $PATH
8636do
8637 IFS=$as_save_IFS
8638 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8639 for ac_exec_ext in '' $ac_executable_extensions; do
8640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8641 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8643 break 2
8644 fi
8645done
81ecdfbb
RW
8646 done
8647IFS=$as_save_IFS
bec39cab
AC
8648
8649fi
8650fi
8651ac_ct_AR=$ac_cv_prog_ac_ct_AR
8652if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8654$as_echo "$ac_ct_AR" >&6; }
bec39cab 8655else
81ecdfbb
RW
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
bec39cab
AC
8658fi
8659
81ecdfbb
RW
8660 if test "x$ac_ct_AR" = x; then
8661 AR=""
8662 else
8663 case $cross_compiling:$ac_tool_warned in
8664yes:)
8665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8667ac_tool_warned=yes ;;
8668esac
8669 AR=$ac_ct_AR
8670 fi
bec39cab
AC
8671else
8672 AR="$ac_cv_prog_AR"
8673fi
8674
8675if test -n "$ac_tool_prefix"; then
8676 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8677set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679$as_echo_n "checking for $ac_word... " >&6; }
8680if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8681 $as_echo_n "(cached) " >&6
bec39cab
AC
8682else
8683 if test -n "$DLLTOOL"; then
8684 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8685else
8686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689 IFS=$as_save_IFS
8690 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8691 for ac_exec_ext in '' $ac_executable_extensions; do
8692 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8693 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8695 break 2
8696 fi
8697done
81ecdfbb
RW
8698 done
8699IFS=$as_save_IFS
bec39cab
AC
8700
8701fi
8702fi
8703DLLTOOL=$ac_cv_prog_DLLTOOL
8704if test -n "$DLLTOOL"; then
81ecdfbb
RW
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8706$as_echo "$DLLTOOL" >&6; }
bec39cab 8707else
81ecdfbb
RW
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
bec39cab
AC
8710fi
8711
81ecdfbb 8712
bec39cab
AC
8713fi
8714if test -z "$ac_cv_prog_DLLTOOL"; then
8715 ac_ct_DLLTOOL=$DLLTOOL
8716 # Extract the first word of "dlltool", so it can be a program name with args.
8717set dummy dlltool; ac_word=$2
81ecdfbb
RW
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719$as_echo_n "checking for $ac_word... " >&6; }
8720if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8721 $as_echo_n "(cached) " >&6
bec39cab
AC
8722else
8723 if test -n "$ac_ct_DLLTOOL"; then
8724 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8725else
8726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727for as_dir in $PATH
8728do
8729 IFS=$as_save_IFS
8730 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8731 for ac_exec_ext in '' $ac_executable_extensions; do
8732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8733 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8735 break 2
8736 fi
8737done
81ecdfbb
RW
8738 done
8739IFS=$as_save_IFS
bec39cab
AC
8740
8741fi
8742fi
8743ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8744if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8746$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8747else
81ecdfbb
RW
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749$as_echo "no" >&6; }
bec39cab
AC
8750fi
8751
81ecdfbb
RW
8752 if test "x$ac_ct_DLLTOOL" = x; then
8753 DLLTOOL=""
8754 else
8755 case $cross_compiling:$ac_tool_warned in
8756yes:)
8757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8759ac_tool_warned=yes ;;
8760esac
8761 DLLTOOL=$ac_ct_DLLTOOL
8762 fi
bec39cab
AC
8763else
8764 DLLTOOL="$ac_cv_prog_DLLTOOL"
8765fi
8766
8767if test -n "$ac_tool_prefix"; then
8768 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8769set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8771$as_echo_n "checking for $ac_word... " >&6; }
8772if test "${ac_cv_prog_WINDRES+set}" = set; then :
8773 $as_echo_n "(cached) " >&6
bec39cab
AC
8774else
8775 if test -n "$WINDRES"; then
8776 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8777else
8778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8779for as_dir in $PATH
8780do
8781 IFS=$as_save_IFS
8782 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8783 for ac_exec_ext in '' $ac_executable_extensions; do
8784 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8785 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8787 break 2
8788 fi
8789done
81ecdfbb
RW
8790 done
8791IFS=$as_save_IFS
bec39cab
AC
8792
8793fi
8794fi
8795WINDRES=$ac_cv_prog_WINDRES
8796if test -n "$WINDRES"; then
81ecdfbb
RW
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8798$as_echo "$WINDRES" >&6; }
bec39cab 8799else
81ecdfbb
RW
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8801$as_echo "no" >&6; }
bec39cab
AC
8802fi
8803
81ecdfbb 8804
bec39cab
AC
8805fi
8806if test -z "$ac_cv_prog_WINDRES"; then
8807 ac_ct_WINDRES=$WINDRES
8808 # Extract the first word of "windres", so it can be a program name with args.
8809set dummy windres; ac_word=$2
81ecdfbb
RW
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8813 $as_echo_n "(cached) " >&6
bec39cab
AC
8814else
8815 if test -n "$ac_ct_WINDRES"; then
8816 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8817else
8818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821 IFS=$as_save_IFS
8822 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8823 for ac_exec_ext in '' $ac_executable_extensions; do
8824 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8825 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8827 break 2
8828 fi
8829done
81ecdfbb
RW
8830 done
8831IFS=$as_save_IFS
bec39cab
AC
8832
8833fi
8834fi
8835ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8836if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8838$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8839else
81ecdfbb
RW
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841$as_echo "no" >&6; }
c906108c 8842fi
bec39cab 8843
81ecdfbb
RW
8844 if test "x$ac_ct_WINDRES" = x; then
8845 WINDRES=""
8846 else
8847 case $cross_compiling:$ac_tool_warned in
8848yes:)
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8851ac_tool_warned=yes ;;
8852esac
8853 WINDRES=$ac_ct_WINDRES
8854 fi
c906108c 8855else
bec39cab 8856 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8857fi
8858
bec39cab
AC
8859
8860# Needed for GNU/Hurd.
8861if test -n "$ac_tool_prefix"; then
8862 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8863set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8865$as_echo_n "checking for $ac_word... " >&6; }
8866if test "${ac_cv_prog_MIG+set}" = set; then :
8867 $as_echo_n "(cached) " >&6
c906108c 8868else
bec39cab
AC
8869 if test -n "$MIG"; then
8870 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8871else
8872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873for as_dir in $PATH
8874do
8875 IFS=$as_save_IFS
8876 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8877 for ac_exec_ext in '' $ac_executable_extensions; do
8878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8879 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8881 break 2
8882 fi
8883done
81ecdfbb
RW
8884 done
8885IFS=$as_save_IFS
bec39cab 8886
c906108c 8887fi
bec39cab
AC
8888fi
8889MIG=$ac_cv_prog_MIG
8890if test -n "$MIG"; then
81ecdfbb
RW
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8892$as_echo "$MIG" >&6; }
c906108c 8893else
81ecdfbb
RW
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895$as_echo "no" >&6; }
c906108c
SS
8896fi
8897
81ecdfbb 8898
bec39cab
AC
8899fi
8900if test -z "$ac_cv_prog_MIG"; then
8901 ac_ct_MIG=$MIG
8902 # Extract the first word of "mig", so it can be a program name with args.
8903set dummy mig; ac_word=$2
81ecdfbb
RW
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8907 $as_echo_n "(cached) " >&6
bec39cab
AC
8908else
8909 if test -n "$ac_ct_MIG"; then
8910 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8911else
8912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8913for as_dir in $PATH
8914do
8915 IFS=$as_save_IFS
8916 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8917 for ac_exec_ext in '' $ac_executable_extensions; do
8918 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8919 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8921 break 2
8922 fi
8923done
81ecdfbb
RW
8924 done
8925IFS=$as_save_IFS
c906108c 8926
bec39cab
AC
8927fi
8928fi
8929ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8930if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8932$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8933else
81ecdfbb
RW
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
bec39cab 8936fi
c906108c 8937
81ecdfbb
RW
8938 if test "x$ac_ct_MIG" = x; then
8939 MIG=""
8940 else
8941 case $cross_compiling:$ac_tool_warned in
8942yes:)
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8945ac_tool_warned=yes ;;
8946esac
8947 MIG=$ac_ct_MIG
8948 fi
bec39cab
AC
8949else
8950 MIG="$ac_cv_prog_MIG"
8951fi
c906108c 8952
c906108c 8953
bec39cab
AC
8954# ---------------------- #
8955# Checks for libraries. #
8956# ---------------------- #
c906108c 8957
bec39cab 8958# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8960$as_echo_n "checking for main in -lm... " >&6; }
8961if test "${ac_cv_lib_m_main+set}" = set; then :
8962 $as_echo_n "(cached) " >&6
bec39cab
AC
8963else
8964 ac_check_lib_save_LIBS=$LIBS
8965LIBS="-lm $LIBS"
81ecdfbb 8966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8967/* end confdefs.h. */
c906108c 8968
c906108c 8969
bec39cab
AC
8970int
8971main ()
8972{
81ecdfbb 8973return main ();
bec39cab
AC
8974 ;
8975 return 0;
8976}
8977_ACEOF
81ecdfbb 8978if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8979 ac_cv_lib_m_main=yes
8980else
81ecdfbb 8981 ac_cv_lib_m_main=no
bec39cab 8982fi
81ecdfbb
RW
8983rm -f core conftest.err conftest.$ac_objext \
8984 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8985LIBS=$ac_check_lib_save_LIBS
8986fi
81ecdfbb
RW
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8988$as_echo "$ac_cv_lib_m_main" >&6; }
8989if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
8990 cat >>confdefs.h <<_ACEOF
8991#define HAVE_LIBM 1
8992_ACEOF
8993
8994 LIBS="-lm $LIBS"
c906108c 8995
c906108c 8996fi
bec39cab
AC
8997
8998
8999# We need to link with -lw to get `wctype' on Solaris before Solaris
9000# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9001# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9002# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9003ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9004if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9005
c906108c 9006else
81ecdfbb
RW
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9008$as_echo_n "checking for wctype in -lw... " >&6; }
9009if test "${ac_cv_lib_w_wctype+set}" = set; then :
9010 $as_echo_n "(cached) " >&6
bec39cab
AC
9011else
9012 ac_check_lib_save_LIBS=$LIBS
9013LIBS="-lw $LIBS"
81ecdfbb 9014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9015/* end confdefs.h. */
c906108c 9016
81ecdfbb
RW
9017/* Override any GCC internal prototype to avoid an error.
9018 Use char because int might match the return type of a GCC
9019 builtin and then its argument prototype would still apply. */
bec39cab
AC
9020#ifdef __cplusplus
9021extern "C"
9022#endif
bec39cab
AC
9023char wctype ();
9024int
9025main ()
9026{
81ecdfbb 9027return wctype ();
bec39cab
AC
9028 ;
9029 return 0;
9030}
9031_ACEOF
81ecdfbb 9032if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9033 ac_cv_lib_w_wctype=yes
9034else
81ecdfbb 9035 ac_cv_lib_w_wctype=no
bec39cab 9036fi
81ecdfbb
RW
9037rm -f core conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9039LIBS=$ac_check_lib_save_LIBS
9040fi
81ecdfbb
RW
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9042$as_echo "$ac_cv_lib_w_wctype" >&6; }
9043if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9044 cat >>confdefs.h <<_ACEOF
9045#define HAVE_LIBW 1
9046_ACEOF
c906108c 9047
bec39cab 9048 LIBS="-lw $LIBS"
c906108c 9049
bec39cab 9050fi
c906108c 9051
bec39cab 9052fi
c906108c 9053
ddc9cd0f 9054
bec39cab 9055# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9057$as_echo_n "checking for library containing gethostbyname... " >&6; }
9058if test "${ac_cv_search_gethostbyname+set}" = set; then :
9059 $as_echo_n "(cached) " >&6
bec39cab
AC
9060else
9061 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9063/* end confdefs.h. */
ddc9cd0f 9064
81ecdfbb
RW
9065/* Override any GCC internal prototype to avoid an error.
9066 Use char because int might match the return type of a GCC
9067 builtin and then its argument prototype would still apply. */
bec39cab
AC
9068#ifdef __cplusplus
9069extern "C"
9070#endif
bec39cab
AC
9071char gethostbyname ();
9072int
9073main ()
9074{
81ecdfbb 9075return gethostbyname ();
bec39cab
AC
9076 ;
9077 return 0;
9078}
9079_ACEOF
81ecdfbb
RW
9080for ac_lib in '' nsl; do
9081 if test -z "$ac_lib"; then
9082 ac_res="none required"
9083 else
9084 ac_res=-l$ac_lib
b4e70030 9085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9086 fi
9087 if ac_fn_c_try_link "$LINENO"; then :
9088 ac_cv_search_gethostbyname=$ac_res
9089fi
9090rm -f core conftest.err conftest.$ac_objext \
9091 conftest$ac_exeext
9092 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9093 break
9094fi
9095done
9096if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9097
bec39cab 9098else
81ecdfbb 9099 ac_cv_search_gethostbyname=no
bec39cab 9100fi
81ecdfbb 9101rm conftest.$ac_ext
bec39cab
AC
9102LIBS=$ac_func_search_save_LIBS
9103fi
81ecdfbb
RW
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9105$as_echo "$ac_cv_search_gethostbyname" >&6; }
9106ac_res=$ac_cv_search_gethostbyname
9107if test "$ac_res" != no; then :
9108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9109
bec39cab 9110fi
96baa820 9111
c906108c 9112
b4e70030 9113# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9115$as_echo_n "checking for library containing socketpair... " >&6; }
9116if test "${ac_cv_search_socketpair+set}" = set; then :
9117 $as_echo_n "(cached) " >&6
b4e70030
JB
9118else
9119 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9121/* end confdefs.h. */
9122
81ecdfbb
RW
9123/* Override any GCC internal prototype to avoid an error.
9124 Use char because int might match the return type of a GCC
9125 builtin and then its argument prototype would still apply. */
b4e70030
JB
9126#ifdef __cplusplus
9127extern "C"
9128#endif
b4e70030
JB
9129char socketpair ();
9130int
9131main ()
9132{
81ecdfbb 9133return socketpair ();
b4e70030
JB
9134 ;
9135 return 0;
9136}
9137_ACEOF
81ecdfbb
RW
9138for ac_lib in '' socket; do
9139 if test -z "$ac_lib"; then
9140 ac_res="none required"
9141 else
9142 ac_res=-l$ac_lib
b4e70030 9143 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9144 fi
9145 if ac_fn_c_try_link "$LINENO"; then :
9146 ac_cv_search_socketpair=$ac_res
9147fi
9148rm -f core conftest.err conftest.$ac_objext \
9149 conftest$ac_exeext
9150 if test "${ac_cv_search_socketpair+set}" = set; then :
9151 break
9152fi
9153done
9154if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9155
b4e70030 9156else
81ecdfbb 9157 ac_cv_search_socketpair=no
b4e70030 9158fi
81ecdfbb 9159rm conftest.$ac_ext
b4e70030
JB
9160LIBS=$ac_func_search_save_LIBS
9161fi
81ecdfbb
RW
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9163$as_echo "$ac_cv_search_socketpair" >&6; }
9164ac_res=$ac_cv_search_socketpair
9165if test "$ac_res" != no; then :
9166 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9167
9168fi
9169
9170
233a11ab 9171# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9172
9173 # See if the user specified whether he wants zlib support or not.
9174
9175# Check whether --with-zlib was given.
9176if test "${with_zlib+set}" = set; then :
9177 withval=$with_zlib;
9178else
9179 with_zlib=auto
9180fi
9181
9182
9183 if test "$with_zlib" != "no"; then
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9185$as_echo_n "checking for library containing zlibVersion... " >&6; }
9186if test "${ac_cv_search_zlibVersion+set}" = set; then :
9187 $as_echo_n "(cached) " >&6
233a11ab
CS
9188else
9189 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9191/* end confdefs.h. */
9192
81ecdfbb
RW
9193/* Override any GCC internal prototype to avoid an error.
9194 Use char because int might match the return type of a GCC
233a11ab 9195 builtin and then its argument prototype would still apply. */
233a11ab
CS
9196#ifdef __cplusplus
9197extern "C"
9198#endif
233a11ab
CS
9199char zlibVersion ();
9200int
9201main ()
9202{
81ecdfbb 9203return zlibVersion ();
233a11ab
CS
9204 ;
9205 return 0;
9206}
9207_ACEOF
81ecdfbb
RW
9208for ac_lib in '' z; do
9209 if test -z "$ac_lib"; then
9210 ac_res="none required"
233a11ab 9211 else
81ecdfbb
RW
9212 ac_res=-l$ac_lib
9213 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9214 fi
81ecdfbb
RW
9215 if ac_fn_c_try_link "$LINENO"; then :
9216 ac_cv_search_zlibVersion=$ac_res
233a11ab 9217fi
81ecdfbb
RW
9218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext
9220 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9221 break
233a11ab 9222fi
81ecdfbb
RW
9223done
9224if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9225
233a11ab 9226else
81ecdfbb 9227 ac_cv_search_zlibVersion=no
233a11ab 9228fi
81ecdfbb
RW
9229rm conftest.$ac_ext
9230LIBS=$ac_func_search_save_LIBS
233a11ab 9231fi
81ecdfbb
RW
9232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9233$as_echo "$ac_cv_search_zlibVersion" >&6; }
9234ac_res=$ac_cv_search_zlibVersion
9235if test "$ac_res" != no; then :
9236 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9237 for ac_header in zlib.h
9238do :
9239 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9240if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9241 cat >>confdefs.h <<_ACEOF
81ecdfbb 9242#define HAVE_ZLIB_H 1
233a11ab
CS
9243_ACEOF
9244
9245fi
9246
9247done
9248
9249fi
9250
b040ad30
JB
9251 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9252 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9253 fi
9254 fi
9255
233a11ab 9256
77f120bf 9257# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9259$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9260if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9261 $as_echo_n "(cached) " >&6
bec39cab
AC
9262else
9263 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9265/* end confdefs.h. */
c906108c 9266
81ecdfbb
RW
9267/* Override any GCC internal prototype to avoid an error.
9268 Use char because int might match the return type of a GCC
9269 builtin and then its argument prototype would still apply. */
bec39cab
AC
9270#ifdef __cplusplus
9271extern "C"
9272#endif
77f120bf 9273char dlgetmodinfo ();
bec39cab
AC
9274int
9275main ()
9276{
81ecdfbb 9277return dlgetmodinfo ();
bec39cab
AC
9278 ;
9279 return 0;
9280}
9281_ACEOF
81ecdfbb
RW
9282for ac_lib in '' dl xpdl; do
9283 if test -z "$ac_lib"; then
9284 ac_res="none required"
9285 else
9286 ac_res=-l$ac_lib
b4e70030 9287 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9288 fi
9289 if ac_fn_c_try_link "$LINENO"; then :
9290 ac_cv_search_dlgetmodinfo=$ac_res
9291fi
9292rm -f core conftest.err conftest.$ac_objext \
9293 conftest$ac_exeext
9294 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9295 break
9296fi
9297done
9298if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9299
4e8d927d 9300else
81ecdfbb 9301 ac_cv_search_dlgetmodinfo=no
1ba607ad 9302fi
81ecdfbb 9303rm conftest.$ac_ext
bec39cab
AC
9304LIBS=$ac_func_search_save_LIBS
9305fi
81ecdfbb
RW
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9307$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9308ac_res=$ac_cv_search_dlgetmodinfo
9309if test "$ac_res" != no; then :
9310 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9311
8bb2c122 9312fi
8bb2c122 9313
8bb2c122 9314
77f120bf 9315
77f120bf 9316
6c7a06a3 9317
81ecdfbb
RW
9318# Check whether --with-libiconv-prefix was given.
9319if test "${with_libiconv_prefix+set}" = set; then :
9320 withval=$with_libiconv_prefix;
6c7a06a3 9321 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9322 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9323 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9324 done
9325
81ecdfbb
RW
9326fi
9327
6c7a06a3 9328
f18c4681 9329 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9330 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9331
81ecdfbb
RW
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9333$as_echo_n "checking for iconv... " >&6; }
9334if test "${am_cv_func_iconv+set}" = set; then :
9335 $as_echo_n "(cached) " >&6
d542061a 9336else
6c7a06a3
TT
9337
9338 am_cv_func_iconv="no, consider installing GNU libiconv"
9339 am_cv_lib_iconv=no
9340 am_cv_use_build_libiconv=no
f0f20949 9341 am_cv_build_libiconv_path=
4edb1e84
JB
9342
9343 # If libiconv is part of the build tree, then try using it over
9344 # any system iconv.
9345 if test -d ../libiconv; then
f18c4681
JB
9346 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9347 am_save_LIBS="$LIBS"
9348 am_save_CPPFLAGS="$CPPFLAGS"
9349 LIBS="$LIBS $lib_dir/libiconv.a"
9350 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9352/* end confdefs.h. */
6c7a06a3
TT
9353#include <stdlib.h>
9354#include <iconv.h>
d542061a
UW
9355int
9356main ()
9357{
6c7a06a3 9358iconv_t cd = iconv_open("","");
f18c4681
JB
9359 iconv(cd,NULL,NULL,NULL,NULL);
9360 iconv_close(cd);
d542061a
UW
9361 ;
9362 return 0;
9363}
9364_ACEOF
81ecdfbb 9365if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9366 am_cv_use_build_libiconv=yes
f0f20949 9367 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9368 am_cv_lib_iconv=yes
9369 am_cv_func_iconv=yes
d542061a 9370fi
81ecdfbb
RW
9371rm -f core conftest.err conftest.$ac_objext \
9372 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9373 LIBS="$am_save_LIBS"
9374 CPPFLAGS="$am_save_CPPFLAGS"
9375 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9376 break
9377 fi
9378 done
4edb1e84 9379 fi
94ae1714 9380
4edb1e84 9381 # Next, try to find iconv in libc.
6c7a06a3 9382 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9384/* end confdefs.h. */
6c7a06a3
TT
9385#include <stdlib.h>
9386#include <iconv.h>
d542061a
UW
9387int
9388main ()
9389{
6c7a06a3
TT
9390iconv_t cd = iconv_open("","");
9391 iconv(cd,NULL,NULL,NULL,NULL);
9392 iconv_close(cd);
d542061a
UW
9393 ;
9394 return 0;
9395}
9396_ACEOF
81ecdfbb 9397if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9398 am_cv_func_iconv=yes
d542061a 9399fi
81ecdfbb
RW
9400rm -f core conftest.err conftest.$ac_objext \
9401 conftest$ac_exeext conftest.$ac_ext
77f120bf 9402 fi
94ae1714 9403
4edb1e84
JB
9404 # If iconv was not in libc, try -liconv. In this case, arrange to
9405 # look in the libiconv prefix, if it was specified by the user.
9406 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9407 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9408 am_save_LIBS="$LIBS"
9409 if test -n "$LIBICONV_INCLUDE"; then
9410 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9411 LIBS="$LIBS $LIBICONV_LIBDIR"
9412 fi
9413 LIBS="$LIBS -liconv"
81ecdfbb 9414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9415/* end confdefs.h. */
6c7a06a3
TT
9416#include <stdlib.h>
9417#include <iconv.h>
bec39cab
AC
9418int
9419main ()
9420{
6c7a06a3
TT
9421iconv_t cd = iconv_open("","");
9422 iconv(cd,NULL,NULL,NULL,NULL);
9423 iconv_close(cd);
bec39cab
AC
9424 ;
9425 return 0;
9426}
9427_ACEOF
81ecdfbb 9428if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9429 am_cv_lib_iconv=yes
6c7a06a3 9430 am_cv_func_iconv=yes
627af7ea 9431fi
81ecdfbb
RW
9432rm -f core conftest.err conftest.$ac_objext \
9433 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9434 LIBS="$am_save_LIBS"
fc3b640d 9435 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9436 fi
9437
9438fi
81ecdfbb
RW
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9440$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9441
9442 # Set the various flags based on the cache variables. We can't rely
9443 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9444 LIBICONV=
9445 if test "$am_cv_lib_iconv" = yes; then
9446 LIBICONV="-liconv"
94ae1714
TT
9447 else
9448 LIBICONV_LIBDIR=
9449 LIBICONV_INCLUDE=
fc3b640d
TT
9450 fi
9451 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9452 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9453 LIBICONV_LIBDIR=""
fc3b640d
TT
9454 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9455 fi
9456 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9457 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9458
6c7a06a3
TT
9459 if test "$am_cv_func_iconv" = yes; then
9460
81ecdfbb 9461$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9462
81ecdfbb
RW
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9464$as_echo_n "checking for iconv declaration... " >&6; }
9465 if test "${am_cv_proto_iconv+set}" = set; then :
9466 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9467else
9468
81ecdfbb 9469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9470/* end confdefs.h. */
9471
6c7a06a3
TT
9472#include <stdlib.h>
9473#include <iconv.h>
9474extern
b4e70030 9475#ifdef __cplusplus
6c7a06a3 9476"C"
b4e70030 9477#endif
6c7a06a3
TT
9478#if defined(__STDC__) || defined(__cplusplus)
9479size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9480#else
9481size_t iconv();
9482#endif
9483
b4e70030
JB
9484int
9485main ()
9486{
6c7a06a3 9487
b4e70030
JB
9488 ;
9489 return 0;
9490}
9491_ACEOF
81ecdfbb 9492if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9493 am_cv_proto_iconv_arg1=""
4e8d927d 9494else
81ecdfbb 9495 am_cv_proto_iconv_arg1="const"
b4e70030 9496fi
81ecdfbb 9497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9498 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);"
9499fi
9500
9501 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9503 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9504$as_echo "${ac_t:-
9505 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9506
9507cat >>confdefs.h <<_ACEOF
9508#define ICONV_CONST $am_cv_proto_iconv_arg1
9509_ACEOF
9510
9511 fi
6c7a06a3
TT
9512
9513
9514# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9515# There is a very specific comment in /usr/include/curses.h explaining that
9516# termcap routines built into libcurses must not be used.
9517#
9518# The symptoms we observed so far is GDB unexpectedly changing
9519# the terminal settings when tgetent is called - this is particularly
9520# visible as the output is missing carriage returns, and so rapidly
9521# becomes very hard to read.
9522#
9523# The readline configure script has already decided that libtermcap
9524# was enough for its purposes, and so decided to build readline using
9525# libtermcap. Since the TUI mode requires curses, building GDB with
9526# TUI enabled results in both libraries to be used at the same time,
9527# which is not allowed. This basically means that GDB with TUI is
9528# broken on alpha-osf.
9529
9530case $host_os in
6bcc772d
RO
9531 osf* )
9532 if test x"$enable_tui" = xyes; then
81ecdfbb 9533 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9534 fi
6bcc772d 9535 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9536 enable_tui=no
9537 fi
9538 ;;
9539esac
9540
cb01cfba 9541# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9542if test x"$enable_tui" != xno; then
cb01cfba
JB
9543 prefer_curses=yes
9544fi
9545
9546curses_found=no
9547if test x"$prefer_curses" = xyes; then
9548 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9549 # curses library because the latter might not provide all the
9550 # functionality we need. However, this leads to problems on systems
9551 # where the linker searches /usr/local/lib, but the compiler doesn't
9552 # search /usr/local/include, if ncurses is installed in /usr/local. A
9553 # default installation of ncurses on alpha*-dec-osf* will lead to such
9554 # a situation.
81ecdfbb
RW
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9556$as_echo_n "checking for library containing waddstr... " >&6; }
9557if test "${ac_cv_search_waddstr+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9559else
9560 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9562/* end confdefs.h. */
9563
81ecdfbb
RW
9564/* Override any GCC internal prototype to avoid an error.
9565 Use char because int might match the return type of a GCC
9566 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9567#ifdef __cplusplus
9568extern "C"
9569#endif
6c7a06a3
TT
9570char waddstr ();
9571int
9572main ()
9573{
81ecdfbb 9574return waddstr ();
6c7a06a3
TT
9575 ;
9576 return 0;
9577}
9578_ACEOF
81ecdfbb
RW
9579for ac_lib in '' ncurses cursesX curses; do
9580 if test -z "$ac_lib"; then
9581 ac_res="none required"
9582 else
9583 ac_res=-l$ac_lib
9584 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9585 fi
9586 if ac_fn_c_try_link "$LINENO"; then :
9587 ac_cv_search_waddstr=$ac_res
9588fi
9589rm -f core conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext
9591 if test "${ac_cv_search_waddstr+set}" = set; then :
9592 break
9593fi
9594done
9595if test "${ac_cv_search_waddstr+set}" = set; then :
9596
6c7a06a3 9597else
81ecdfbb
RW
9598 ac_cv_search_waddstr=no
9599fi
9600rm conftest.$ac_ext
9601LIBS=$ac_func_search_save_LIBS
9602fi
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9604$as_echo "$ac_cv_search_waddstr" >&6; }
9605ac_res=$ac_cv_search_waddstr
9606if test "$ac_res" != no; then :
9607 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9608
9609fi
9610
9611
cb01cfba
JB
9612 if test "$ac_cv_search_waddstr" != no; then
9613 curses_found=yes
9614 fi
9615fi
9616
9617# Check whether we should enable the TUI, but only do so if we really
9618# can.
9619if test x"$enable_tui" != xno; then
9620 if test -d $srcdir/tui; then
9621 if test "$curses_found" != no; then
6c7a06a3
TT
9622 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9623 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9624 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9625 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9626 CONFIG_ALL="${CONFIG_ALL} all-tui"
9627 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9628 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9629 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9630 else
9631 if test x"$enable_tui" = xyes; then
81ecdfbb 9632 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9633 else
81ecdfbb
RW
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9635$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9636 fi
9637 fi
9638 fi
9639fi
9640
9641# Since GDB uses Readline, we need termcap functionality. In many
9642# cases this will be provided by the curses library, but some systems
9643# have a seperate termcap library, or no curses library at all.
9644
9645case $host_os in
9646 cygwin*)
9647 if test -d $srcdir/libtermcap; then
9648 LIBS="../libtermcap/libtermcap.a $LIBS"
9649 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9650 fi ;;
9651 go32* | *djgpp*)
9652 ac_cv_search_tgetent="none required"
9653 ;;
9654 *mingw32*)
9655 ac_cv_search_tgetent="none required"
9656 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9657 ;;
9658esac
9659
9660# These are the libraries checked by Readline.
81ecdfbb
RW
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9662$as_echo_n "checking for library containing tgetent... " >&6; }
9663if test "${ac_cv_search_tgetent+set}" = set; then :
9664 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9665else
9666 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9668/* end confdefs.h. */
9669
81ecdfbb
RW
9670/* Override any GCC internal prototype to avoid an error.
9671 Use char because int might match the return type of a GCC
9672 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9673#ifdef __cplusplus
9674extern "C"
9675#endif
6c7a06a3
TT
9676char tgetent ();
9677int
9678main ()
9679{
81ecdfbb 9680return tgetent ();
6c7a06a3
TT
9681 ;
9682 return 0;
9683}
9684_ACEOF
81ecdfbb
RW
9685for ac_lib in '' termcap tinfo curses ncurses; do
9686 if test -z "$ac_lib"; then
9687 ac_res="none required"
9688 else
9689 ac_res=-l$ac_lib
6c7a06a3 9690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9691 fi
9692 if ac_fn_c_try_link "$LINENO"; then :
9693 ac_cv_search_tgetent=$ac_res
9694fi
9695rm -f core conftest.err conftest.$ac_objext \
9696 conftest$ac_exeext
9697 if test "${ac_cv_search_tgetent+set}" = set; then :
9698 break
9699fi
9700done
9701if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9702
6c7a06a3 9703else
81ecdfbb 9704 ac_cv_search_tgetent=no
6c7a06a3 9705fi
81ecdfbb 9706rm conftest.$ac_ext
6c7a06a3
TT
9707LIBS=$ac_func_search_save_LIBS
9708fi
81ecdfbb
RW
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9710$as_echo "$ac_cv_search_tgetent" >&6; }
9711ac_res=$ac_cv_search_tgetent
9712if test "$ac_res" != no; then :
9713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9714
06825bd1
MK
9715fi
9716
06825bd1 9717
bec39cab 9718if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9719 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9720fi
9721
3841debe 9722
81ecdfbb
RW
9723# Check whether --with-system-readline was given.
9724if test "${with_system_readline+set}" = set; then :
9725 withval=$with_system_readline;
9726fi
6a30b0a5 9727
6a30b0a5
AS
9728
9729if test "$with_system_readline" = yes; then
9730 READLINE=-lreadline
9731 READLINE_DEPS=
9732 READLINE_CFLAGS=
a71e0887
JK
9733
9734 # readline-6.0 started to use the name `_rl_echoing_p'.
9735 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
9736
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
9738$as_echo_n "checking for readline_echoing_p... " >&6; }
9739 save_LIBS=$LIBS
9740 LIBS="$LIBS $READLINE"
9741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9742/* end confdefs.h. */
9743
9744int
9745main ()
9746{
9747extern int readline_echoing_p;
9748 return readline_echoing_p;
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753if ac_fn_c_try_link "$LINENO"; then :
9754 READLINE_ECHOING_P=yes
9755else
9756 READLINE_ECHOING_P=no
9757
9758$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
9759
9760fi
9761rm -f core conftest.err conftest.$ac_objext \
9762 conftest$ac_exeext conftest.$ac_ext
9763 LIBS="$save_LIBS"
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
9765$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
9766else
9767 READLINE='$(READLINE_DIR)/libreadline.a'
9768 READLINE_DEPS='$(READLINE)'
9769 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9770fi
9771
9772
9773
9774
9775
81ecdfbb
RW
9776# Check whether --with-expat was given.
9777if test "${with_expat+set}" = set; then :
9778 withval=$with_expat;
5c39566f
DJ
9779else
9780 with_expat=auto
81ecdfbb
RW
9781fi
9782
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9784$as_echo_n "checking whether to use expat... " >&6; }
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9786$as_echo "$with_expat" >&6; }
5c39566f
DJ
9787
9788if test "${with_expat}" = no; then
81ecdfbb
RW
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9790$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9791 HAVE_LIBEXPAT=no
9792else
9793
3841debe
DJ
9794 if test "X$prefix" = "XNONE"; then
9795 acl_final_prefix="$ac_default_prefix"
9796 else
9797 acl_final_prefix="$prefix"
9798 fi
9799 if test "X$exec_prefix" = "XNONE"; then
9800 acl_final_exec_prefix='${prefix}'
9801 else
9802 acl_final_exec_prefix="$exec_prefix"
9803 fi
9804 acl_save_prefix="$prefix"
9805 prefix="$acl_final_prefix"
9806 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9807 prefix="$acl_save_prefix"
9808
9809
81ecdfbb
RW
9810# Check whether --with-gnu-ld was given.
9811if test "${with_gnu_ld+set}" = set; then :
9812 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9813else
9814 with_gnu_ld=no
81ecdfbb
RW
9815fi
9816
3841debe
DJ
9817# Prepare PATH_SEPARATOR.
9818# The user is always right.
9819if test "${PATH_SEPARATOR+set}" != set; then
9820 echo "#! /bin/sh" >conf$$.sh
9821 echo "exit 0" >>conf$$.sh
9822 chmod +x conf$$.sh
9823 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9824 PATH_SEPARATOR=';'
9825 else
9826 PATH_SEPARATOR=:
9827 fi
9828 rm -f conf$$.sh
9829fi
9830ac_prog=ld
9831if test "$GCC" = yes; then
9832 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9834$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9835 case $host in
9836 *-*-mingw*)
9837 # gcc leaves a trailing carriage return which upsets mingw
9838 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9839 *)
9840 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9841 esac
9842 case $ac_prog in
9843 # Accept absolute paths.
9844 [\\/]* | [A-Za-z]:[\\/]*)
9845 re_direlt='/[^/][^/]*/\.\./'
9846 # Canonicalize the path of ld
9847 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9848 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9849 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9850 done
9851 test -z "$LD" && LD="$ac_prog"
9852 ;;
9853 "")
9854 # If it fails, then pretend we aren't using GCC.
9855 ac_prog=ld
9856 ;;
9857 *)
9858 # If it is relative, then search for the first ld in PATH.
9859 with_gnu_ld=unknown
9860 ;;
9861 esac
9862elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9864$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9865else
81ecdfbb
RW
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9867$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9868fi
81ecdfbb
RW
9869if test "${acl_cv_path_LD+set}" = set; then :
9870 $as_echo_n "(cached) " >&6
3841debe
DJ
9871else
9872 if test -z "$LD"; then
9873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9874 for ac_dir in $PATH; do
9875 test -z "$ac_dir" && ac_dir=.
9876 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9877 acl_cv_path_LD="$ac_dir/$ac_prog"
9878 # Check to see if the program is GNU ld. I'd rather use --version,
9879 # but apparently some GNU ld's only accept -v.
9880 # Break only if it was the GNU/non-GNU ld that we prefer.
9881 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9882 test "$with_gnu_ld" != no && break
9883 else
9884 test "$with_gnu_ld" != yes && break
9885 fi
9886 fi
9887 done
9888 IFS="$ac_save_ifs"
9889else
9890 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9891fi
9892fi
9893
9894LD="$acl_cv_path_LD"
9895if test -n "$LD"; then
81ecdfbb
RW
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9897$as_echo "$LD" >&6; }
3841debe 9898else
81ecdfbb
RW
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
3841debe 9901fi
81ecdfbb
RW
9902test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9904$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9905if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9906 $as_echo_n "(cached) " >&6
3841debe
DJ
9907else
9908 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9909if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9910 acl_cv_prog_gnu_ld=yes
9911else
9912 acl_cv_prog_gnu_ld=no
9913fi
9914fi
81ecdfbb
RW
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9916$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
9917with_gnu_ld=$acl_cv_prog_gnu_ld
9918
9919
9920
81ecdfbb
RW
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9922$as_echo_n "checking for shared library run path origin... " >&6; }
9923if test "${acl_cv_rpath+set}" = set; then :
9924 $as_echo_n "(cached) " >&6
3841debe
DJ
9925else
9926
9927 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9928 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9929 . ./conftest.sh
9930 rm -f ./conftest.sh
9931 acl_cv_rpath=done
9932
9933fi
81ecdfbb
RW
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9935$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
9936 wl="$acl_cv_wl"
9937 libext="$acl_cv_libext"
9938 shlibext="$acl_cv_shlibext"
9939 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9940 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9941 hardcode_direct="$acl_cv_hardcode_direct"
9942 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
9943 # Check whether --enable-rpath was given.
9944if test "${enable_rpath+set}" = set; then :
9945 enableval=$enable_rpath; :
3841debe
DJ
9946else
9947 enable_rpath=yes
81ecdfbb
RW
9948fi
9949
3841debe
DJ
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959 use_additional=yes
9960
9961 acl_save_prefix="$prefix"
9962 prefix="$acl_final_prefix"
9963 acl_save_exec_prefix="$exec_prefix"
9964 exec_prefix="$acl_final_exec_prefix"
9965
9966 eval additional_includedir=\"$includedir\"
9967 eval additional_libdir=\"$libdir\"
9968
9969 exec_prefix="$acl_save_exec_prefix"
9970 prefix="$acl_save_prefix"
9971
9972
81ecdfbb
RW
9973# Check whether --with-libexpat-prefix was given.
9974if test "${with_libexpat_prefix+set}" = set; then :
9975 withval=$with_libexpat_prefix;
3841debe
DJ
9976 if test "X$withval" = "Xno"; then
9977 use_additional=no
9978 else
9979 if test "X$withval" = "X"; then
9980
9981 acl_save_prefix="$prefix"
9982 prefix="$acl_final_prefix"
9983 acl_save_exec_prefix="$exec_prefix"
9984 exec_prefix="$acl_final_exec_prefix"
9985
9986 eval additional_includedir=\"$includedir\"
9987 eval additional_libdir=\"$libdir\"
9988
9989 exec_prefix="$acl_save_exec_prefix"
9990 prefix="$acl_save_prefix"
9991
9992 else
9993 additional_includedir="$withval/include"
9994 additional_libdir="$withval/lib"
9995 fi
9996 fi
9997
81ecdfbb
RW
9998fi
9999
3841debe
DJ
10000 LIBEXPAT=
10001 LTLIBEXPAT=
10002 INCEXPAT=
10003 rpathdirs=
10004 ltrpathdirs=
10005 names_already_handled=
10006 names_next_round='expat '
10007 while test -n "$names_next_round"; do
10008 names_this_round="$names_next_round"
10009 names_next_round=
10010 for name in $names_this_round; do
10011 already_handled=
10012 for n in $names_already_handled; do
10013 if test "$n" = "$name"; then
10014 already_handled=yes
10015 break
10016 fi
10017 done
10018 if test -z "$already_handled"; then
10019 names_already_handled="$names_already_handled $name"
10020 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10021 eval value=\"\$HAVE_LIB$uppername\"
10022 if test -n "$value"; then
10023 if test "$value" = yes; then
10024 eval value=\"\$LIB$uppername\"
10025 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10026 eval value=\"\$LTLIB$uppername\"
10027 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10028 else
10029 :
10030 fi
10031 else
10032 found_dir=
10033 found_la=
10034 found_so=
10035 found_a=
10036 if test $use_additional = yes; then
10037 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10038 found_dir="$additional_libdir"
10039 found_so="$additional_libdir/lib$name.$shlibext"
10040 if test -f "$additional_libdir/lib$name.la"; then
10041 found_la="$additional_libdir/lib$name.la"
10042 fi
10043 else
10044 if test -f "$additional_libdir/lib$name.$libext"; then
10045 found_dir="$additional_libdir"
10046 found_a="$additional_libdir/lib$name.$libext"
10047 if test -f "$additional_libdir/lib$name.la"; then
10048 found_la="$additional_libdir/lib$name.la"
10049 fi
10050 fi
10051 fi
10052 fi
10053 if test "X$found_dir" = "X"; then
10054 for x in $LDFLAGS $LTLIBEXPAT; do
10055
10056 acl_save_prefix="$prefix"
10057 prefix="$acl_final_prefix"
10058 acl_save_exec_prefix="$exec_prefix"
10059 exec_prefix="$acl_final_exec_prefix"
10060 eval x=\"$x\"
10061 exec_prefix="$acl_save_exec_prefix"
10062 prefix="$acl_save_prefix"
10063
10064 case "$x" in
10065 -L*)
10066 dir=`echo "X$x" | sed -e 's/^X-L//'`
10067 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10068 found_dir="$dir"
10069 found_so="$dir/lib$name.$shlibext"
10070 if test -f "$dir/lib$name.la"; then
10071 found_la="$dir/lib$name.la"
10072 fi
10073 else
10074 if test -f "$dir/lib$name.$libext"; then
10075 found_dir="$dir"
10076 found_a="$dir/lib$name.$libext"
10077 if test -f "$dir/lib$name.la"; then
10078 found_la="$dir/lib$name.la"
10079 fi
10080 fi
10081 fi
10082 ;;
10083 esac
10084 if test "X$found_dir" != "X"; then
10085 break
10086 fi
10087 done
10088 fi
10089 if test "X$found_dir" != "X"; then
10090 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10091 if test "X$found_so" != "X"; then
10092 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10093 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10094 else
10095 haveit=
10096 for x in $ltrpathdirs; do
10097 if test "X$x" = "X$found_dir"; then
10098 haveit=yes
10099 break
10100 fi
10101 done
10102 if test -z "$haveit"; then
10103 ltrpathdirs="$ltrpathdirs $found_dir"
10104 fi
10105 if test "$hardcode_direct" = yes; then
10106 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10107 else
10108 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10109 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10110 haveit=
10111 for x in $rpathdirs; do
10112 if test "X$x" = "X$found_dir"; then
10113 haveit=yes
10114 break
10115 fi
10116 done
10117 if test -z "$haveit"; then
10118 rpathdirs="$rpathdirs $found_dir"
10119 fi
10120 else
10121 haveit=
10122 for x in $LDFLAGS $LIBEXPAT; 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 if test "X$x" = "X-L$found_dir"; then
10133 haveit=yes
10134 break
10135 fi
10136 done
10137 if test -z "$haveit"; then
10138 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10139 fi
10140 if test "$hardcode_minus_L" != no; then
10141 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10142 else
10143 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10144 fi
10145 fi
10146 fi
10147 fi
10148 else
10149 if test "X$found_a" != "X"; then
10150 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10151 else
10152 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10153 fi
10154 fi
10155 additional_includedir=
10156 case "$found_dir" in
10157 */lib | */lib/)
10158 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10159 additional_includedir="$basedir/include"
10160 ;;
10161 esac
10162 if test "X$additional_includedir" != "X"; then
10163 if test "X$additional_includedir" != "X/usr/include"; then
10164 haveit=
10165 if test "X$additional_includedir" = "X/usr/local/include"; then
10166 if test -n "$GCC"; then
10167 case $host_os in
10168 linux*) haveit=yes;;
10169 esac
10170 fi
10171 fi
10172 if test -z "$haveit"; then
10173 for x in $CPPFLAGS $INCEXPAT; do
10174
10175 acl_save_prefix="$prefix"
10176 prefix="$acl_final_prefix"
10177 acl_save_exec_prefix="$exec_prefix"
10178 exec_prefix="$acl_final_exec_prefix"
10179 eval x=\"$x\"
10180 exec_prefix="$acl_save_exec_prefix"
10181 prefix="$acl_save_prefix"
10182
10183 if test "X$x" = "X-I$additional_includedir"; then
10184 haveit=yes
10185 break
10186 fi
10187 done
10188 if test -z "$haveit"; then
10189 if test -d "$additional_includedir"; then
10190 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10191 fi
10192 fi
10193 fi
10194 fi
10195 fi
10196 if test -n "$found_la"; then
10197 save_libdir="$libdir"
10198 case "$found_la" in
10199 */* | *\\*) . "$found_la" ;;
10200 *) . "./$found_la" ;;
10201 esac
10202 libdir="$save_libdir"
10203 for dep in $dependency_libs; do
10204 case "$dep" in
10205 -L*)
10206 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10207 if test "X$additional_libdir" != "X/usr/lib"; then
10208 haveit=
10209 if test "X$additional_libdir" = "X/usr/local/lib"; then
10210 if test -n "$GCC"; then
10211 case $host_os in
10212 linux*) haveit=yes;;
10213 esac
10214 fi
10215 fi
10216 if test -z "$haveit"; then
10217 haveit=
10218 for x in $LDFLAGS $LIBEXPAT; do
10219
10220 acl_save_prefix="$prefix"
10221 prefix="$acl_final_prefix"
10222 acl_save_exec_prefix="$exec_prefix"
10223 exec_prefix="$acl_final_exec_prefix"
10224 eval x=\"$x\"
10225 exec_prefix="$acl_save_exec_prefix"
10226 prefix="$acl_save_prefix"
10227
10228 if test "X$x" = "X-L$additional_libdir"; then
10229 haveit=yes
10230 break
10231 fi
10232 done
10233 if test -z "$haveit"; then
10234 if test -d "$additional_libdir"; then
10235 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10236 fi
10237 fi
10238 haveit=
10239 for x in $LDFLAGS $LTLIBEXPAT; do
10240
10241 acl_save_prefix="$prefix"
10242 prefix="$acl_final_prefix"
10243 acl_save_exec_prefix="$exec_prefix"
10244 exec_prefix="$acl_final_exec_prefix"
10245 eval x=\"$x\"
10246 exec_prefix="$acl_save_exec_prefix"
10247 prefix="$acl_save_prefix"
10248
10249 if test "X$x" = "X-L$additional_libdir"; then
10250 haveit=yes
10251 break
10252 fi
10253 done
10254 if test -z "$haveit"; then
10255 if test -d "$additional_libdir"; then
10256 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10257 fi
10258 fi
10259 fi
10260 fi
10261 ;;
10262 -R*)
10263 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10264 if test "$enable_rpath" != no; then
10265 haveit=
10266 for x in $rpathdirs; do
10267 if test "X$x" = "X$dir"; then
10268 haveit=yes
10269 break
10270 fi
10271 done
10272 if test -z "$haveit"; then
10273 rpathdirs="$rpathdirs $dir"
10274 fi
10275 haveit=
10276 for x in $ltrpathdirs; do
10277 if test "X$x" = "X$dir"; then
10278 haveit=yes
10279 break
10280 fi
10281 done
10282 if test -z "$haveit"; then
10283 ltrpathdirs="$ltrpathdirs $dir"
10284 fi
10285 fi
10286 ;;
10287 -l*)
10288 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10289 ;;
10290 *.la)
10291 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10292 ;;
10293 *)
10294 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10295 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10296 ;;
81ecdfbb
RW
10297 esac
10298 done
10299 fi
10300 else
10301 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10302 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10303 fi
10304 fi
10305 fi
10306 done
10307 done
10308 if test "X$rpathdirs" != "X"; then
10309 if test -n "$hardcode_libdir_separator"; then
10310 alldirs=
10311 for found_dir in $rpathdirs; do
10312 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10313 done
10314 acl_save_libdir="$libdir"
10315 libdir="$alldirs"
10316 eval flag=\"$hardcode_libdir_flag_spec\"
10317 libdir="$acl_save_libdir"
10318 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10319 else
10320 for found_dir in $rpathdirs; do
10321 acl_save_libdir="$libdir"
10322 libdir="$found_dir"
10323 eval flag=\"$hardcode_libdir_flag_spec\"
10324 libdir="$acl_save_libdir"
10325 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10326 done
10327 fi
10328 fi
10329 if test "X$ltrpathdirs" != "X"; then
10330 for found_dir in $ltrpathdirs; do
10331 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10332 done
10333 fi
a9322a30
TT
10334
10335
81ecdfbb 10336 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10337
81ecdfbb
RW
10338 for element in $INCEXPAT; do
10339 haveit=
10340 for x in $CPPFLAGS; do
a9322a30 10341
81ecdfbb
RW
10342 acl_save_prefix="$prefix"
10343 prefix="$acl_final_prefix"
10344 acl_save_exec_prefix="$exec_prefix"
10345 exec_prefix="$acl_final_exec_prefix"
10346 eval x=\"$x\"
10347 exec_prefix="$acl_save_exec_prefix"
10348 prefix="$acl_save_prefix"
a8111142 10349
81ecdfbb
RW
10350 if test "X$x" = "X$element"; then
10351 haveit=yes
10352 break
10353 fi
10354 done
10355 if test -z "$haveit"; then
10356 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10357 fi
10358 done
a9322a30
TT
10359
10360
81ecdfbb
RW
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10362$as_echo_n "checking for libexpat... " >&6; }
10363if test "${ac_cv_libexpat+set}" = set; then :
10364 $as_echo_n "(cached) " >&6
bec39cab 10365else
bec39cab 10366
81ecdfbb
RW
10367 ac_save_LIBS="$LIBS"
10368 LIBS="$LIBS $LIBEXPAT"
10369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10370/* end confdefs.h. */
81ecdfbb
RW
10371#include "expat.h"
10372int
10373main ()
10374{
10375XML_Parser p = XML_ParserCreate (0);
10376 ;
10377 return 0;
10378}
bec39cab 10379_ACEOF
81ecdfbb
RW
10380if ac_fn_c_try_link "$LINENO"; then :
10381 ac_cv_libexpat=yes
c906108c 10382else
81ecdfbb 10383 ac_cv_libexpat=no
bec39cab 10384fi
81ecdfbb
RW
10385rm -f core conftest.err conftest.$ac_objext \
10386 conftest$ac_exeext conftest.$ac_ext
10387 LIBS="$ac_save_LIBS"
c906108c 10388
95ca63c4 10389fi
81ecdfbb
RW
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10391$as_echo "$ac_cv_libexpat" >&6; }
10392 if test "$ac_cv_libexpat" = yes; then
10393 HAVE_LIBEXPAT=yes
bec39cab 10394
81ecdfbb 10395$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10396
81ecdfbb
RW
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10398$as_echo_n "checking how to link with libexpat... " >&6; }
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10400$as_echo "$LIBEXPAT" >&6; }
10401 else
10402 HAVE_LIBEXPAT=no
10403 CPPFLAGS="$ac_save_CPPFLAGS"
10404 LIBEXPAT=
10405 LTLIBEXPAT=
10406 fi
95ca63c4
CF
10407
10408
10409
7cb9022a
MK
10410
10411
bec39cab 10412
81ecdfbb
RW
10413 if test "$HAVE_LIBEXPAT" != yes; then
10414 if test "$with_expat" = yes; then
10415 as_fn_error "expat is missing or unusable" "$LINENO" 5
10416 else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10418$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10419 fi
10420 else
10421 save_LIBS=$LIBS
10422 LIBS="$LIBS $LIBEXPAT"
10423 for ac_func in XML_StopParser
10424do :
10425 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10426if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10427 cat >>confdefs.h <<_ACEOF
81ecdfbb 10428#define HAVE_XML_STOPPARSER 1
bec39cab 10429_ACEOF
95ca63c4 10430
bec39cab 10431fi
bec39cab 10432done
95ca63c4 10433
81ecdfbb
RW
10434 LIBS=$save_LIBS
10435 fi
a9322a30
TT
10436fi
10437
a9322a30 10438
a9322a30
TT
10439
10440
ec685c5e 10441
0c4a4063 10442
81ecdfbb
RW
10443# Check whether --with-python was given.
10444if test "${with_python+set}" = set; then :
10445 withval=$with_python;
bec39cab 10446else
81ecdfbb 10447 with_python=auto
bec39cab 10448fi
bec39cab 10449
81ecdfbb
RW
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10451$as_echo_n "checking whether to use python... " >&6; }
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10453$as_echo "$with_python" >&6; }
9a156167 10454
81ecdfbb
RW
10455if test "${with_python}" = no; then
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10457$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10458 have_libpython=no
bec39cab 10459else
81ecdfbb 10460 case "${with_python}" in
81ecdfbb 10461 /*)
ec685c5e
DE
10462 if test -d ${with_python}; then
10463 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10464 python_prog="${with_python}/bin/python"
0c4a4063 10465 python_prefix=
ec685c5e
DE
10466 if test ! -x ${python_prog}; then
10467 # Fall back to gdb 7.0/7.1 behaviour.
10468 python_prog=missing
0c4a4063 10469 python_prefix=${with_python}
ec685c5e
DE
10470 fi
10471 elif test -x ${with_python}; then
10472 # While we can't run python compiled for $host (unless host == build),
10473 # the user could write a script that provides the needed information,
10474 # so we support that.
ec685c5e 10475 python_prog=${with_python}
0c4a4063 10476 python_prefix=
ec685c5e
DE
10477 else
10478 as_fn_error "invalid value for --with-python" "$LINENO" 5
10479 fi
81ecdfbb 10480 ;;
ec685c5e
DE
10481 */*)
10482 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10483 as_fn_error "invalid value for --with-python" "$LINENO" 5
10484 ;;
ec685c5e
DE
10485 *)
10486 # The user has either specified auto, yes, or the name of the python
10487 # program assumed to be in $PATH.
10488 python_prefix=
10489 case "${with_python}" in
10490 yes | auto)
10491 if test ${build} = ${host}; then
10492 # Extract the first word of "python", so it can be a program name with args.
10493set dummy python; ac_word=$2
10494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495$as_echo_n "checking for $ac_word... " >&6; }
10496if test "${ac_cv_path_python_prog_path+set}" = set; then :
10497 $as_echo_n "(cached) " >&6
10498else
10499 case $python_prog_path in
10500 [\\/]* | ?:[\\/]*)
10501 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10502 ;;
10503 *)
10504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505for as_dir in $PATH
10506do
10507 IFS=$as_save_IFS
10508 test -z "$as_dir" && as_dir=.
10509 for ac_exec_ext in '' $ac_executable_extensions; do
10510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10511 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513 break 2
10514 fi
10515done
10516 done
10517IFS=$as_save_IFS
10518
10519 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10520 ;;
10521esac
10522fi
10523python_prog_path=$ac_cv_path_python_prog_path
10524if test -n "$python_prog_path"; then
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10526$as_echo "$python_prog_path" >&6; }
10527else
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533 if test "${python_prog_path}" = missing; then
10534 python_prog=missing
10535 else
10536 python_prog=${python_prog_path}
10537 fi
10538 else
10539 # Not much we can do except assume the cross-compiler will find the
10540 # right files.
10541 python_prog=missing
10542 fi
10543 ;;
10544 *)
10545 # While we can't run python compiled for $host (unless host == build),
10546 # the user could write a script that provides the needed information,
10547 # so we support that.
10548 python_prog="${with_python}"
10549 # Extract the first word of "${python_prog}", so it can be a program name with args.
10550set dummy ${python_prog}; ac_word=$2
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10552$as_echo_n "checking for $ac_word... " >&6; }
10553if test "${ac_cv_path_python_prog_path+set}" = set; then :
10554 $as_echo_n "(cached) " >&6
10555else
10556 case $python_prog_path in
10557 [\\/]* | ?:[\\/]*)
10558 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10559 ;;
10560 *)
10561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10562for as_dir in $PATH
10563do
10564 IFS=$as_save_IFS
10565 test -z "$as_dir" && as_dir=.
10566 for ac_exec_ext in '' $ac_executable_extensions; do
10567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10568 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10570 break 2
10571 fi
10572done
10573 done
10574IFS=$as_save_IFS
10575
10576 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10577 ;;
10578esac
10579fi
10580python_prog_path=$ac_cv_path_python_prog_path
10581if test -n "$python_prog_path"; then
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10583$as_echo "$python_prog_path" >&6; }
10584else
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586$as_echo "no" >&6; }
10587fi
10588
10589
10590 if test "${python_prog_path}" = missing; then
10591 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10592 fi
10593 ;;
10594 esac
81ecdfbb
RW
10595 esac
10596
ec685c5e
DE
10597 if test "${python_prog}" != missing; then
10598 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10599 if test $? != 0; then
10600 as_fn_error "failure running python-config --includes" "$LINENO" 5
10601 fi
10602 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10603 if test $? != 0; then
10604 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10605 fi
0c4a4063
DE
10606 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10607 if test $? != 0; then
10608 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10609 fi
ec685c5e
DE
10610 have_python_config=yes
10611 else
10612 # Fall back to gdb 7.0/7.1 behaviour.
10613 if test -z ${python_prefix}; then
10614 python_includes=
10615 python_libs=
10616 else
10617 python_includes="-I${python_prefix}/include"
10618 python_libs="-L${python_prefix}/lib"
10619 fi
0c4a4063 10620 have_python_config=no
ec685c5e 10621 fi
bec39cab 10622
ec685c5e
DE
10623 # Having "/pythonX.Y" in the include path is awkward.
10624 # All those python headers get bubbled up to the top inviting lots
10625 # of random collisions. GDB originally didn't use python-config to
10626 # find the compilation parameters and includes "pythonX.Y/" in the
10627 # path of the, umm, include file. So strip away this part of the
10628 # output of python-config --includes.
10629 python_includes=`echo "${python_includes} " \
0c4a4063 10630 | sed -e 's,/python[0-9]*[.][0-9]* , ,g'`
bec39cab 10631
ec685c5e
DE
10632 # If we have python-config, only try the configuration it provides.
10633 # Otherwise fallback on the old way of trying different versions of
10634 # python in turn.
81ecdfbb 10635
ec685c5e
DE
10636 have_libpython=no
10637 if test "${have_python_config}" = yes; then
10638 python_version=`echo " ${python_libs} " \
0c4a4063
DE
10639 | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'`
10640 case "${python_version}" in
10641 python*)
ec685c5e
DE
10642
10643 version=${python_version}
10644
10645 new_CPPFLAGS=${python_includes}
10646 new_LIBS=${python_libs}
81ecdfbb
RW
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10648$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10649 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10650 save_LIBS=$LIBS
ec685c5e
DE
10651 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10652 LIBS="$LIBS $new_LIBS"
10653 found_usable_python=no
81ecdfbb 10654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10655/* end confdefs.h. */
81ecdfbb
RW
10656#include "${version}/Python.h"
10657int
10658main ()
10659{
10660Py_Initialize ();
10661 ;
10662 return 0;
10663}
bec39cab 10664_ACEOF
81ecdfbb 10665if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10666 have_libpython=${version}
10667 found_usable_python=yes
bec39cab 10668else
ec685c5e
DE
10669 CPPFLAGS=$save_CPPFLAGS
10670 LIBS=$save_LIBS
9a156167 10671fi
81ecdfbb
RW
10672rm -f core conftest.err conftest.$ac_objext \
10673 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10675$as_echo "${found_usable_python}" >&6; }
9a156167 10676
0c4a4063
DE
10677 ;;
10678 *)
ec685c5e 10679 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10680 ;;
10681 esac
ec685c5e
DE
10682 else
10683 if test "${have_libpython}" = no; then
9a156167 10684
ec685c5e
DE
10685 version=python2.6
10686
10687 new_CPPFLAGS=${python_includes}
10688 new_LIBS="${python_libs} -lpython2.6"
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10690$as_echo_n "checking for ${version}... " >&6; }
10691 save_CPPFLAGS=$CPPFLAGS
10692 save_LIBS=$LIBS
10693 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10694 LIBS="$LIBS $new_LIBS"
10695 found_usable_python=no
10696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10697/* end confdefs.h. */
10698#include "${version}/Python.h"
10699int
10700main ()
10701{
10702Py_Initialize ();
10703 ;
10704 return 0;
10705}
10706_ACEOF
10707if ac_fn_c_try_link "$LINENO"; then :
10708 have_libpython=${version}
10709 found_usable_python=yes
10710else
10711 CPPFLAGS=$save_CPPFLAGS
10712 LIBS=$save_LIBS
10713fi
10714rm -f core conftest.err conftest.$ac_objext \
10715 conftest$ac_exeext conftest.$ac_ext
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10717$as_echo "${found_usable_python}" >&6; }
9a156167 10718
81ecdfbb 10719 fi
ec685c5e 10720 if test ${have_libpython} = no; then
9a156167 10721
81ecdfbb 10722 version=python2.5
9a156167 10723
ec685c5e
DE
10724 new_CPPFLAGS=${python_includes}
10725 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10727$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10728 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10729 save_LIBS=$LIBS
ec685c5e
DE
10730 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10731 LIBS="$LIBS $new_LIBS"
10732 found_usable_python=no
81ecdfbb 10733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10734/* end confdefs.h. */
81ecdfbb
RW
10735#include "${version}/Python.h"
10736int
10737main ()
10738{
10739Py_Initialize ();
10740 ;
10741 return 0;
10742}
436868fb 10743_ACEOF
81ecdfbb 10744if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10745 have_libpython=${version}
10746 found_usable_python=yes
436868fb 10747else
ec685c5e
DE
10748 CPPFLAGS=$save_CPPFLAGS
10749 LIBS=$save_LIBS
436868fb 10750fi
81ecdfbb
RW
10751rm -f core conftest.err conftest.$ac_objext \
10752 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10754$as_echo "${found_usable_python}" >&6; }
a9322a30 10755
81ecdfbb 10756 fi
ec685c5e 10757 if test ${have_libpython} = no; then
a9322a30 10758
81ecdfbb 10759 version=python2.4
a9322a30 10760
ec685c5e
DE
10761 new_CPPFLAGS=${python_includes}
10762 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10764$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10765 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10766 save_LIBS=$LIBS
ec685c5e
DE
10767 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10768 LIBS="$LIBS $new_LIBS"
10769 found_usable_python=no
81ecdfbb 10770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10771/* end confdefs.h. */
81ecdfbb 10772#include "${version}/Python.h"
a9322a30
TT
10773int
10774main ()
10775{
81ecdfbb 10776Py_Initialize ();
a9322a30
TT
10777 ;
10778 return 0;
10779}
436868fb 10780_ACEOF
81ecdfbb 10781if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10782 have_libpython=${version}
10783 found_usable_python=yes
436868fb 10784else
ec685c5e
DE
10785 CPPFLAGS=$save_CPPFLAGS
10786 LIBS=$save_LIBS
436868fb 10787fi
81ecdfbb
RW
10788rm -f core conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10791$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10792
ec685c5e
DE
10793 fi
10794 fi
10795 if test "${have_libpython}" = python2.6; then
10796
10797$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10798
10799 elif test "${have_libpython}" = python2.5; then
10800
10801$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10802
10803 elif test "${have_libpython}" = python2.4; then
81ecdfbb
RW
10804
10805$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10806
81ecdfbb 10807 fi
ec685c5e
DE
10808
10809 if test "${have_libpython}" = no; then
81ecdfbb
RW
10810 case "${with_python}" in
10811 yes)
10812 as_fn_error "python is missing or unusable" "$LINENO" 5
10813 ;;
10814 auto)
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10816$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10817 ;;
10818 *)
10819 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10820 ;;
10821 esac
0c4a4063
DE
10822 else
10823 if test -n "${python_prefix}"; then
10824
10825cat >>confdefs.h <<_ACEOF
10826#define WITH_PYTHON_PATH "${python_prefix}"
10827_ACEOF
10828
10829
10830 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10831 if test "x$prefix" = xNONE; then
10832 test_prefix=/usr/local
10833 else
10834 test_prefix=$prefix
10835 fi
10836 else
10837 test_prefix=$exec_prefix
10838 fi
10839 value=0
10840 case ${python_prefix} in
10841 "${test_prefix}"|"${test_prefix}/"*|\
10842 '${exec_prefix}'|'${exec_prefix}/'*)
10843 value=1
10844 ;;
10845 esac
10846
10847cat >>confdefs.h <<_ACEOF
10848#define PYTHON_PATH_RELOCATABLE $value
10849_ACEOF
10850
10851
10852 fi
81ecdfbb 10853 fi
436868fb 10854fi
436868fb 10855
ec685c5e 10856if test "${have_libpython}" != no; then
436868fb 10857
81ecdfbb 10858$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10859
81ecdfbb
RW
10860 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10861 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10862 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10863 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10864
81ecdfbb
RW
10865 # Flags needed to compile Python code (taken from python-config --cflags).
10866 # We cannot call python-config directly because it will output whatever was
10867 # used when compiling the Python interpreter itself, including flags which
10868 # would make the python-related objects be compiled differently from the
10869 # rest of GDB (e.g., -O2 and -fPIC).
10870 if test "${GCC}" = yes; then
10871 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10872 fi
436868fb 10873
81ecdfbb
RW
10874 if test "x${tentative_python_cflags}" != x; then
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10876$as_echo_n "checking compiler flags for python code... " >&6; }
10877 for flag in ${tentative_python_cflags}; do
10878 # Check that the compiler accepts it
10879 saved_CFLAGS="$CFLAGS"
10880 CFLAGS="$CFLAGS $flag"
10881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10882/* end confdefs.h. */
81ecdfbb 10883
a9322a30
TT
10884int
10885main ()
10886{
a9322a30
TT
10887
10888 ;
10889 return 0;
10890}
bec39cab 10891_ACEOF
81ecdfbb
RW
10892if ac_fn_c_try_compile "$LINENO"; then :
10893 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10894fi
81ecdfbb
RW
10895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896 CFLAGS="$saved_CFLAGS"
10897 done
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10899$as_echo "${PYTHON_CFLAGS}" >&6; }
10900 fi
10901else
10902 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
10903 # included.
10904 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
10905 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
10906 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 10907fi
9a156167 10908
9a156167 10909
81ecdfbb
RW
10910# ------------------------- #
10911# Checks for header files. #
10912# ------------------------- #
c890192f 10913
81ecdfbb
RW
10914ac_header_dirent=no
10915for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10916 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10918$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10919if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
10920 $as_echo_n "(cached) " >&6
bec39cab 10921else
81ecdfbb 10922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10923/* end confdefs.h. */
81ecdfbb
RW
10924#include <sys/types.h>
10925#include <$ac_hdr>
10926
a9322a30
TT
10927int
10928main ()
10929{
81ecdfbb
RW
10930if ((DIR *) 0)
10931return 0;
a9322a30
TT
10932 ;
10933 return 0;
10934}
bec39cab 10935_ACEOF
81ecdfbb
RW
10936if ac_fn_c_try_compile "$LINENO"; then :
10937 eval "$as_ac_Header=yes"
bec39cab 10938else
81ecdfbb 10939 eval "$as_ac_Header=no"
bec39cab 10940fi
81ecdfbb 10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10942fi
81ecdfbb
RW
10943eval ac_res=\$$as_ac_Header
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10945$as_echo "$ac_res" >&6; }
10946eval as_val=\$$as_ac_Header
10947 if test "x$as_val" = x""yes; then :
10948 cat >>confdefs.h <<_ACEOF
10949#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 10950_ACEOF
bec39cab 10951
81ecdfbb
RW
10952ac_header_dirent=$ac_hdr; break
10953fi
bec39cab 10954
81ecdfbb
RW
10955done
10956# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10957if test $ac_header_dirent = dirent.h; then
10958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10959$as_echo_n "checking for library containing opendir... " >&6; }
10960if test "${ac_cv_search_opendir+set}" = set; then :
10961 $as_echo_n "(cached) " >&6
c890192f 10962else
81ecdfbb
RW
10963 ac_func_search_save_LIBS=$LIBS
10964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10965/* end confdefs.h. */
10966
10967/* Override any GCC internal prototype to avoid an error.
10968 Use char because int might match the return type of a GCC
10969 builtin and then its argument prototype would still apply. */
10970#ifdef __cplusplus
10971extern "C"
10972#endif
10973char opendir ();
10974int
10975main ()
10976{
10977return opendir ();
10978 ;
10979 return 0;
10980}
bec39cab 10981_ACEOF
81ecdfbb
RW
10982for ac_lib in '' dir; do
10983 if test -z "$ac_lib"; then
10984 ac_res="none required"
10985 else
10986 ac_res=-l$ac_lib
10987 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10988 fi
10989 if ac_fn_c_try_link "$LINENO"; then :
10990 ac_cv_search_opendir=$ac_res
10991fi
10992rm -f core conftest.err conftest.$ac_objext \
10993 conftest$ac_exeext
10994 if test "${ac_cv_search_opendir+set}" = set; then :
10995 break
10996fi
10997done
10998if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 10999
81ecdfbb
RW
11000else
11001 ac_cv_search_opendir=no
11002fi
11003rm conftest.$ac_ext
11004LIBS=$ac_func_search_save_LIBS
11005fi
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11007$as_echo "$ac_cv_search_opendir" >&6; }
11008ac_res=$ac_cv_search_opendir
11009if test "$ac_res" != no; then :
11010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11011
bec39cab 11012fi
81ecdfbb 11013
bec39cab 11014else
81ecdfbb
RW
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11016$as_echo_n "checking for library containing opendir... " >&6; }
11017if test "${ac_cv_search_opendir+set}" = set; then :
11018 $as_echo_n "(cached) " >&6
11019else
11020 ac_func_search_save_LIBS=$LIBS
11021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11022/* end confdefs.h. */
81ecdfbb
RW
11023
11024/* Override any GCC internal prototype to avoid an error.
11025 Use char because int might match the return type of a GCC
11026 builtin and then its argument prototype would still apply. */
11027#ifdef __cplusplus
11028extern "C"
11029#endif
11030char opendir ();
a9322a30
TT
11031int
11032main ()
11033{
81ecdfbb 11034return opendir ();
a9322a30
TT
11035 ;
11036 return 0;
11037}
bec39cab 11038_ACEOF
81ecdfbb
RW
11039for ac_lib in '' x; do
11040 if test -z "$ac_lib"; then
11041 ac_res="none required"
11042 else
11043 ac_res=-l$ac_lib
11044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11045 fi
11046 if ac_fn_c_try_link "$LINENO"; then :
11047 ac_cv_search_opendir=$ac_res
11048fi
11049rm -f core conftest.err conftest.$ac_objext \
11050 conftest$ac_exeext
11051 if test "${ac_cv_search_opendir+set}" = set; then :
11052 break
11053fi
11054done
11055if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11056
81ecdfbb
RW
11057else
11058 ac_cv_search_opendir=no
bec39cab 11059fi
81ecdfbb
RW
11060rm conftest.$ac_ext
11061LIBS=$ac_func_search_save_LIBS
a9322a30 11062fi
81ecdfbb
RW
11063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11064$as_echo "$ac_cv_search_opendir" >&6; }
11065ac_res=$ac_cv_search_opendir
11066if test "$ac_res" != no; then :
11067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11068
81ecdfbb 11069fi
bec39cab 11070
81ecdfbb 11071fi
bec39cab 11072
81ecdfbb
RW
11073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11074$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11075if test "${ac_cv_header_stat_broken+set}" = set; then :
11076 $as_echo_n "(cached) " >&6
9a156167 11077else
81ecdfbb
RW
11078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11079/* end confdefs.h. */
11080#include <sys/types.h>
11081#include <sys/stat.h>
11082
11083#if defined S_ISBLK && defined S_IFDIR
11084extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11085#endif
11086
11087#if defined S_ISBLK && defined S_IFCHR
11088extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11089#endif
11090
11091#if defined S_ISLNK && defined S_IFREG
11092extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11093#endif
11094
11095#if defined S_ISSOCK && defined S_IFREG
11096extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11097#endif
11098
bec39cab 11099_ACEOF
81ecdfbb
RW
11100if ac_fn_c_try_compile "$LINENO"; then :
11101 ac_cv_header_stat_broken=no
11102else
11103 ac_cv_header_stat_broken=yes
11104fi
11105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11106fi
11107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11108$as_echo "$ac_cv_header_stat_broken" >&6; }
11109if test $ac_cv_header_stat_broken = yes; then
9a156167 11110
81ecdfbb 11111$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11112
bec39cab 11113fi
81ecdfbb
RW
11114
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11116$as_echo_n "checking for ANSI C header files... " >&6; }
11117if test "${ac_cv_header_stdc+set}" = set; then :
11118 $as_echo_n "(cached) " >&6
bec39cab 11119else
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11121/* end confdefs.h. */
81ecdfbb
RW
11122#include <stdlib.h>
11123#include <stdarg.h>
11124#include <string.h>
11125#include <float.h>
11126
a9322a30
TT
11127int
11128main ()
11129{
a9322a30
TT
11130
11131 ;
11132 return 0;
11133}
bec39cab 11134_ACEOF
81ecdfbb
RW
11135if ac_fn_c_try_compile "$LINENO"; then :
11136 ac_cv_header_stdc=yes
bec39cab 11137else
81ecdfbb 11138 ac_cv_header_stdc=no
a9322a30 11139fi
81ecdfbb 11140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11141
81ecdfbb
RW
11142if test $ac_cv_header_stdc = yes; then
11143 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11145/* end confdefs.h. */
11146#include <string.h>
bec39cab 11147
81ecdfbb
RW
11148_ACEOF
11149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11150 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11151
bec39cab 11152else
81ecdfbb
RW
11153 ac_cv_header_stdc=no
11154fi
11155rm -f conftest*
11156
11157fi
11158
11159if test $ac_cv_header_stdc = yes; then
11160 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162/* end confdefs.h. */
11163#include <stdlib.h>
11164
bec39cab 11165_ACEOF
81ecdfbb
RW
11166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11167 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11168
81ecdfbb
RW
11169else
11170 ac_cv_header_stdc=no
11171fi
11172rm -f conftest*
bec39cab 11173
bec39cab 11174fi
81ecdfbb
RW
11175
11176if test $ac_cv_header_stdc = yes; then
11177 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11178 if test "$cross_compiling" = yes; then :
11179 :
bec39cab 11180else
81ecdfbb 11181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11182/* end confdefs.h. */
81ecdfbb
RW
11183#include <ctype.h>
11184#include <stdlib.h>
11185#if ((' ' & 0x0FF) == 0x020)
11186# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11187# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11188#else
11189# define ISLOWER(c) \
11190 (('a' <= (c) && (c) <= 'i') \
11191 || ('j' <= (c) && (c) <= 'r') \
11192 || ('s' <= (c) && (c) <= 'z'))
11193# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11194#endif
11195
11196#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11197int
11198main ()
11199{
81ecdfbb
RW
11200 int i;
11201 for (i = 0; i < 256; i++)
11202 if (XOR (islower (i), ISLOWER (i))
11203 || toupper (i) != TOUPPER (i))
11204 return 2;
a9322a30
TT
11205 return 0;
11206}
bec39cab 11207_ACEOF
81ecdfbb
RW
11208if ac_fn_c_try_run "$LINENO"; then :
11209
bec39cab 11210else
81ecdfbb
RW
11211 ac_cv_header_stdc=no
11212fi
11213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11214 conftest.$ac_objext conftest.beam conftest.$ac_ext
11215fi
bec39cab 11216
bec39cab 11217fi
a9322a30 11218fi
81ecdfbb
RW
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11220$as_echo "$ac_cv_header_stdc" >&6; }
11221if test $ac_cv_header_stdc = yes; then
bec39cab 11222
81ecdfbb 11223$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11224
81ecdfbb 11225fi
bec39cab 11226
81ecdfbb
RW
11227# elf_hp.h is for HP/UX 64-bit shared library support.
11228# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11229# unconditionally, so what's the point in checking these?
11230for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11231 thread_db.h gnu/libc-version.h signal.h stddef.h \
11232 stdlib.h string.h memory.h strings.h sys/fault.h \
11233 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11234 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11235 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11236 sys/types.h sys/wait.h wait.h termios.h termio.h \
11237 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11238do :
11239 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11240ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11241eval as_val=\$$as_ac_Header
11242 if test "x$as_val" = x""yes; then :
bec39cab 11243 cat >>confdefs.h <<_ACEOF
81ecdfbb 11244#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11245_ACEOF
c906108c 11246
bec39cab 11247fi
81ecdfbb
RW
11248
11249done
11250
11251for ac_header in link.h
11252do :
11253 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11254# include <sys/types.h>
11255#endif
11256#if HAVE_NLIST_H
11257# include <nlist.h>
a9322a30
TT
11258#endif
11259
81ecdfbb
RW
11260"
11261if test "x$ac_cv_header_link_h" = x""yes; then :
11262 cat >>confdefs.h <<_ACEOF
11263#define HAVE_LINK_H 1
bec39cab 11264_ACEOF
bec39cab 11265
a9322a30 11266fi
bec39cab 11267
81ecdfbb 11268done
c906108c 11269
81ecdfbb
RW
11270for ac_header in sys/proc.h
11271do :
11272 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11273# include <sys/param.h>
11274#endif
c906108c 11275
81ecdfbb
RW
11276"
11277if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11278 cat >>confdefs.h <<_ACEOF
81ecdfbb 11279#define HAVE_SYS_PROC_H 1
bec39cab 11280_ACEOF
5ee754fc 11281
bec39cab 11282fi
81ecdfbb
RW
11283
11284done
11285
11286for ac_header in sys/user.h
11287do :
11288 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11289# include <sys/param.h>
a9322a30
TT
11290#endif
11291
81ecdfbb
RW
11292"
11293if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11294 cat >>confdefs.h <<_ACEOF
11295#define HAVE_SYS_USER_H 1
bec39cab 11296_ACEOF
bec39cab 11297
a9322a30 11298fi
bec39cab 11299
81ecdfbb 11300done
5ee754fc 11301
5ee754fc 11302
81ecdfbb
RW
11303# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11304# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11305# think that we don't have <curses.h> if we're using GCC.
11306case $host_os in
11307 solaris2.[789])
11308 if test "$GCC" = yes; then
11309
11310$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11311
11312 fi ;;
11313esac
11314for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11315do :
11316 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11317ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11318eval as_val=\$$as_ac_Header
11319 if test "x$as_val" = x""yes; then :
bec39cab 11320 cat >>confdefs.h <<_ACEOF
81ecdfbb 11321#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11322_ACEOF
5ee754fc
MK
11323
11324fi
11325
81ecdfbb 11326done
bec39cab 11327
81ecdfbb
RW
11328for ac_header in term.h
11329do :
11330 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11331# include <curses.h>
11332#endif
bec39cab 11333
81ecdfbb
RW
11334"
11335if test "x$ac_cv_header_term_h" = x""yes; then :
11336 cat >>confdefs.h <<_ACEOF
11337#define HAVE_TERM_H 1
a8111142 11338_ACEOF
a8111142 11339
a8111142 11340fi
a8111142 11341
81ecdfbb 11342done
a8111142
TT
11343
11344
81ecdfbb
RW
11345# ------------------------- #
11346# Checks for declarations. #
11347# ------------------------- #
a9322a30 11348
81ecdfbb
RW
11349ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11350if test "x$ac_cv_have_decl_free" = x""yes; then :
11351 ac_have_decl=1
bec39cab 11352else
81ecdfbb
RW
11353 ac_have_decl=0
11354fi
11355
11356cat >>confdefs.h <<_ACEOF
11357#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11358_ACEOF
81ecdfbb
RW
11359ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11360if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11361 ac_have_decl=1
11362else
11363 ac_have_decl=0
11364fi
11365
11366cat >>confdefs.h <<_ACEOF
11367#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11368_ACEOF
81ecdfbb
RW
11369ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11370if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11371 ac_have_decl=1
bec39cab 11372else
81ecdfbb
RW
11373 ac_have_decl=0
11374fi
bec39cab 11375
81ecdfbb
RW
11376cat >>confdefs.h <<_ACEOF
11377#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11378_ACEOF
81ecdfbb
RW
11379ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11380if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11381 ac_have_decl=1
11382else
11383 ac_have_decl=0
11384fi
11385
11386cat >>confdefs.h <<_ACEOF
11387#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11388_ACEOF
81ecdfbb
RW
11389ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11390if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11391 ac_have_decl=1
bec39cab 11392else
81ecdfbb
RW
11393 ac_have_decl=0
11394fi
5ee754fc 11395
81ecdfbb
RW
11396cat >>confdefs.h <<_ACEOF
11397#define HAVE_DECL_STRSTR $ac_have_decl
11398_ACEOF
11399ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11400if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11401 ac_have_decl=1
11402else
11403 ac_have_decl=0
5ee754fc 11404fi
81ecdfbb
RW
11405
11406cat >>confdefs.h <<_ACEOF
11407#define HAVE_DECL_GETOPT $ac_have_decl
11408_ACEOF
11409ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11410if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11411 ac_have_decl=1
11412else
11413 ac_have_decl=0
5ee754fc 11414fi
81ecdfbb
RW
11415
11416cat >>confdefs.h <<_ACEOF
11417#define HAVE_DECL_SNPRINTF $ac_have_decl
11418_ACEOF
11419ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11420if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11421 ac_have_decl=1
11422else
11423 ac_have_decl=0
5ee754fc
MK
11424fi
11425
a9322a30 11426cat >>confdefs.h <<_ACEOF
81ecdfbb 11427#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11428_ACEOF
5ee754fc 11429
5ee754fc 11430
81ecdfbb
RW
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11432$as_echo_n "checking for LC_MESSAGES... " >&6; }
11433if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11434 $as_echo_n "(cached) " >&6
bec39cab 11435else
81ecdfbb 11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11437/* end confdefs.h. */
81ecdfbb 11438#include <locale.h>
a9322a30
TT
11439int
11440main ()
11441{
81ecdfbb 11442return LC_MESSAGES
a9322a30
TT
11443 ;
11444 return 0;
11445}
bec39cab 11446_ACEOF
81ecdfbb
RW
11447if ac_fn_c_try_link "$LINENO"; then :
11448 am_cv_val_LC_MESSAGES=yes
bec39cab 11449else
81ecdfbb
RW
11450 am_cv_val_LC_MESSAGES=no
11451fi
11452rm -f core conftest.err conftest.$ac_objext \
11453 conftest$ac_exeext conftest.$ac_ext
11454fi
11455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11456$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11457 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11458
81ecdfbb
RW
11459$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11460
11461 fi
11462
11463
11464# ----------------------- #
11465# Checks for structures. #
11466# ----------------------- #
11467
11468ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11469if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11470
11471cat >>confdefs.h <<_ACEOF
11472#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11473_ACEOF
7eb368b3 11474
81ecdfbb 11475
7eb368b3 11476fi
81ecdfbb
RW
11477ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11478if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11479
a9322a30
TT
11480cat >>confdefs.h <<_ACEOF
11481#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11482_ACEOF
11483
a9322a30 11484
7eb368b3
NR
11485fi
11486
7eb368b3 11487
a9322a30
TT
11488# ------------------ #
11489# Checks for types. #
11490# ------------------ #
7eb368b3 11491
81ecdfbb
RW
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11493$as_echo_n "checking return type of signal handlers... " >&6; }
11494if test "${ac_cv_type_signal+set}" = set; then :
11495 $as_echo_n "(cached) " >&6
bec39cab 11496else
81ecdfbb 11497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11498/* end confdefs.h. */
a9322a30
TT
11499#include <sys/types.h>
11500#include <signal.h>
7cb9022a 11501
a9322a30
TT
11502int
11503main ()
11504{
81ecdfbb 11505return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11506 ;
11507 return 0;
11508}
bec39cab 11509_ACEOF
81ecdfbb
RW
11510if ac_fn_c_try_compile "$LINENO"; then :
11511 ac_cv_type_signal=int
bec39cab 11512else
81ecdfbb 11513 ac_cv_type_signal=void
bec39cab 11514fi
81ecdfbb 11515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11516fi
81ecdfbb
RW
11517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11518$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11519
a9322a30
TT
11520cat >>confdefs.h <<_ACEOF
11521#define RETSIGTYPE $ac_cv_type_signal
11522_ACEOF
5ee754fc 11523
bec39cab 11524
81ecdfbb 11525ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11526#include <sys/socket.h>
11527
81ecdfbb
RW
11528"
11529if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11530
a9322a30
TT
11531cat >>confdefs.h <<_ACEOF
11532#define HAVE_SOCKLEN_T 1
11533_ACEOF
11534
11535
11536fi
11537
11538
11539# ------------------------------------- #
11540# Checks for compiler characteristics. #
11541# ------------------------------------- #
11542
81ecdfbb
RW
11543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11544$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11545if test "${ac_cv_c_const+set}" = set; then :
11546 $as_echo_n "(cached) " >&6
a9322a30 11547else
81ecdfbb 11548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11549/* end confdefs.h. */
a9322a30
TT
11550
11551int
11552main ()
11553{
11554/* FIXME: Include the comments suggested by Paul. */
11555#ifndef __cplusplus
11556 /* Ultrix mips cc rejects this. */
11557 typedef int charset[2];
81ecdfbb 11558 const charset cs;
a9322a30 11559 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11560 char const *const *pcpcc;
11561 char **ppc;
a9322a30
TT
11562 /* NEC SVR4.0.2 mips cc rejects this. */
11563 struct point {int x, y;};
11564 static struct point const zero = {0,0};
11565 /* AIX XL C 1.02.0.0 rejects this.
11566 It does not let you subtract one const X* pointer from another in
11567 an arm of an if-expression whose if-part is not a constant
11568 expression */
11569 const char *g = "string";
81ecdfbb 11570 pcpcc = &g + (g ? g-g : 0);
a9322a30 11571 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11572 ++pcpcc;
11573 ppc = (char**) pcpcc;
11574 pcpcc = (char const *const *) ppc;
a9322a30
TT
11575 { /* SCO 3.2v4 cc rejects this. */
11576 char *t;
11577 char const *s = 0 ? (char *) 0 : (char const *) 0;
11578
11579 *t++ = 0;
81ecdfbb 11580 if (s) return 0;
a9322a30
TT
11581 }
11582 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11583 int x[] = {25, 17};
11584 const int *foo = &x[0];
11585 ++foo;
11586 }
11587 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11588 typedef const int *iptr;
11589 iptr p = 0;
11590 ++p;
11591 }
11592 { /* AIX XL C 1.02.0.0 rejects this saying
11593 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11594 struct s { int j; const int *ap[3]; };
11595 struct s *b; b->j = 5;
11596 }
11597 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11598 const int foo = 10;
81ecdfbb 11599 if (!foo) return 0;
a9322a30 11600 }
81ecdfbb 11601 return !cs[0] && !zero.x;
a9322a30
TT
11602#endif
11603
11604 ;
11605 return 0;
11606}
bec39cab 11607_ACEOF
81ecdfbb 11608if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11609 ac_cv_c_const=yes
5ee754fc 11610else
81ecdfbb 11611 ac_cv_c_const=no
5ee754fc 11612fi
81ecdfbb 11613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11614fi
81ecdfbb
RW
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11616$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11617if test $ac_cv_c_const = no; then
bec39cab 11618
81ecdfbb 11619$as_echo "#define const /**/" >>confdefs.h
bec39cab 11620
5ee754fc 11621fi
bec39cab 11622
81ecdfbb
RW
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11624$as_echo_n "checking for inline... " >&6; }
11625if test "${ac_cv_c_inline+set}" = set; then :
11626 $as_echo_n "(cached) " >&6
bec39cab 11627else
a9322a30
TT
11628 ac_cv_c_inline=no
11629for ac_kw in inline __inline__ __inline; do
81ecdfbb 11630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11631/* end confdefs.h. */
a9322a30
TT
11632#ifndef __cplusplus
11633typedef int foo_t;
11634static $ac_kw foo_t static_foo () {return 0; }
11635$ac_kw foo_t foo () {return 0; }
11636#endif
11637
bec39cab 11638_ACEOF
81ecdfbb
RW
11639if ac_fn_c_try_compile "$LINENO"; then :
11640 ac_cv_c_inline=$ac_kw
bec39cab 11641fi
81ecdfbb
RW
11642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11643 test "$ac_cv_c_inline" != no && break
a9322a30 11644done
bec39cab 11645
5ee754fc 11646fi
81ecdfbb
RW
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11648$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11649
a9322a30
TT
11650case $ac_cv_c_inline in
11651 inline | yes) ;;
11652 *)
11653 case $ac_cv_c_inline in
11654 no) ac_val=;;
11655 *) ac_val=$ac_cv_c_inline;;
11656 esac
11657 cat >>confdefs.h <<_ACEOF
11658#ifndef __cplusplus
11659#define inline $ac_val
11660#endif
11661_ACEOF
bec39cab
AC
11662 ;;
11663esac
bec39cab 11664
81ecdfbb
RW
11665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11666$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11667if test "${ac_cv_c_bigendian+set}" = set; then :
11668 $as_echo_n "(cached) " >&6
bec39cab 11669else
81ecdfbb
RW
11670 ac_cv_c_bigendian=unknown
11671 # See if we're dealing with a universal compiler.
11672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673/* end confdefs.h. */
11674#ifndef __APPLE_CC__
11675 not a universal capable compiler
11676 #endif
11677 typedef int dummy;
11678
11679_ACEOF
11680if ac_fn_c_try_compile "$LINENO"; then :
11681
11682 # Check for potential -arch flags. It is not universal unless
11683 # there are at least two -arch flags with different values.
11684 ac_arch=
11685 ac_prev=
11686 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11687 if test -n "$ac_prev"; then
11688 case $ac_word in
11689 i?86 | x86_64 | ppc | ppc64)
11690 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11691 ac_arch=$ac_word
11692 else
11693 ac_cv_c_bigendian=universal
11694 break
11695 fi
11696 ;;
11697 esac
11698 ac_prev=
11699 elif test "x$ac_word" = "x-arch"; then
11700 ac_prev=arch
11701 fi
11702 done
11703fi
11704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11705 if test $ac_cv_c_bigendian = unknown; then
11706 # See if sys/param.h defines the BYTE_ORDER macro.
11707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11708/* end confdefs.h. */
a9322a30 11709#include <sys/types.h>
81ecdfbb 11710 #include <sys/param.h>
a9322a30
TT
11711
11712int
11713main ()
11714{
81ecdfbb
RW
11715#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11716 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11717 && LITTLE_ENDIAN)
11718 bogus endian macros
11719 #endif
a9322a30
TT
11720
11721 ;
11722 return 0;
11723}
bec39cab 11724_ACEOF
81ecdfbb 11725if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11726 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11728/* end confdefs.h. */
a9322a30 11729#include <sys/types.h>
81ecdfbb 11730 #include <sys/param.h>
a9322a30
TT
11731
11732int
11733main ()
11734{
11735#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11736 not big endian
11737 #endif
a9322a30
TT
11738
11739 ;
11740 return 0;
11741}
bec39cab 11742_ACEOF
81ecdfbb 11743if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11744 ac_cv_c_bigendian=yes
5ee754fc 11745else
81ecdfbb 11746 ac_cv_c_bigendian=no
5ee754fc 11747fi
81ecdfbb
RW
11748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11749fi
11750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11751 fi
11752 if test $ac_cv_c_bigendian = unknown; then
11753 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11755/* end confdefs.h. */
11756#include <limits.h>
bec39cab 11757
81ecdfbb
RW
11758int
11759main ()
11760{
11761#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11762 bogus endian macros
11763 #endif
11764
11765 ;
11766 return 0;
11767}
7eb368b3 11768_ACEOF
81ecdfbb
RW
11769if ac_fn_c_try_compile "$LINENO"; then :
11770 # It does; now see whether it defined to _BIG_ENDIAN or not.
11771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11772/* end confdefs.h. */
81ecdfbb
RW
11773#include <limits.h>
11774
7eb368b3
NR
11775int
11776main ()
11777{
81ecdfbb
RW
11778#ifndef _BIG_ENDIAN
11779 not big endian
11780 #endif
11781
7eb368b3
NR
11782 ;
11783 return 0;
11784}
11785_ACEOF
81ecdfbb 11786if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11787 ac_cv_c_bigendian=yes
81ecdfbb
RW
11788else
11789 ac_cv_c_bigendian=no
a9322a30 11790fi
81ecdfbb 11791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11792fi
81ecdfbb
RW
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794 fi
11795 if test $ac_cv_c_bigendian = unknown; then
11796 # Compile a test program.
11797 if test "$cross_compiling" = yes; then :
11798 # Try to guess by grepping values from an object file.
11799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11800/* end confdefs.h. */
11801short int ascii_mm[] =
11802 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11803 short int ascii_ii[] =
11804 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11805 int use_ascii (int i) {
11806 return ascii_mm[i] + ascii_ii[i];
11807 }
11808 short int ebcdic_ii[] =
11809 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11810 short int ebcdic_mm[] =
11811 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11812 int use_ebcdic (int i) {
11813 return ebcdic_mm[i] + ebcdic_ii[i];
11814 }
11815 extern int foo;
7eb368b3 11816
81ecdfbb
RW
11817int
11818main ()
11819{
11820return use_ascii (foo) == use_ebcdic (foo);
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825if ac_fn_c_try_compile "$LINENO"; then :
11826 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11827 ac_cv_c_bigendian=yes
11828 fi
11829 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11830 if test "$ac_cv_c_bigendian" = unknown; then
11831 ac_cv_c_bigendian=no
11832 else
11833 # finding both strings is unlikely to happen, but who knows?
11834 ac_cv_c_bigendian=unknown
11835 fi
11836 fi
7eb368b3 11837fi
81ecdfbb 11838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11839else
81ecdfbb 11840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11841/* end confdefs.h. */
81ecdfbb 11842$ac_includes_default
d3ea6809
MM
11843int
11844main ()
11845{
81ecdfbb
RW
11846
11847 /* Are we little or big endian? From Harbison&Steele. */
11848 union
11849 {
11850 long int l;
11851 char c[sizeof (long int)];
11852 } u;
11853 u.l = 1;
11854 return u.c[sizeof (long int) - 1] == 1;
11855
11856 ;
11857 return 0;
d3ea6809
MM
11858}
11859_ACEOF
81ecdfbb 11860if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11861 ac_cv_c_bigendian=no
d3ea6809 11862else
81ecdfbb 11863 ac_cv_c_bigendian=yes
d3ea6809 11864fi
81ecdfbb
RW
11865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11866 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11867fi
a9322a30 11868
81ecdfbb
RW
11869 fi
11870fi
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11872$as_echo "$ac_cv_c_bigendian" >&6; }
11873 case $ac_cv_c_bigendian in #(
11874 yes)
11875 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11876;; #(
11877 no)
11878 ;; #(
11879 universal)
11880
11881$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11882
11883 ;; #(
11884 *)
11885 as_fn_error "unknown endianness
11886 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11887 esac
d3ea6809
MM
11888
11889
a9322a30
TT
11890# ------------------------------ #
11891# Checks for library functions. #
11892# ------------------------------ #
d3ea6809 11893
a9322a30
TT
11894# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11895# for constant arguments. Useless!
81ecdfbb
RW
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11897$as_echo_n "checking for working alloca.h... " >&6; }
11898if test "${ac_cv_working_alloca_h+set}" = set; then :
11899 $as_echo_n "(cached) " >&6
d3ea6809 11900else
81ecdfbb 11901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 11902/* end confdefs.h. */
a9322a30 11903#include <alloca.h>
bec39cab
AC
11904int
11905main ()
11906{
a9322a30 11907char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 11908 if (p) return 0;
bec39cab
AC
11909 ;
11910 return 0;
11911}
11912_ACEOF
81ecdfbb 11913if ac_fn_c_try_link "$LINENO"; then :
a9322a30 11914 ac_cv_working_alloca_h=yes
bec39cab 11915else
81ecdfbb 11916 ac_cv_working_alloca_h=no
bec39cab 11917fi
81ecdfbb
RW
11918rm -f core conftest.err conftest.$ac_objext \
11919 conftest$ac_exeext conftest.$ac_ext
bec39cab 11920fi
81ecdfbb
RW
11921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11922$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
11923if test $ac_cv_working_alloca_h = yes; then
11924
81ecdfbb 11925$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 11926
c906108c 11927fi
bec39cab 11928
81ecdfbb
RW
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11930$as_echo_n "checking for alloca... " >&6; }
11931if test "${ac_cv_func_alloca_works+set}" = set; then :
11932 $as_echo_n "(cached) " >&6
bec39cab 11933else
81ecdfbb 11934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11935/* end confdefs.h. */
a9322a30
TT
11936#ifdef __GNUC__
11937# define alloca __builtin_alloca
b4e70030 11938#else
a9322a30
TT
11939# ifdef _MSC_VER
11940# include <malloc.h>
11941# define alloca _alloca
11942# else
81ecdfbb 11943# ifdef HAVE_ALLOCA_H
a9322a30
TT
11944# include <alloca.h>
11945# else
11946# ifdef _AIX
11947 #pragma alloca
11948# else
11949# ifndef alloca /* predefined by HP cc +Olibcalls */
11950char *alloca ();
11951# endif
11952# endif
11953# endif
11954# endif
c906108c 11955#endif
97bf5e38 11956
bec39cab
AC
11957int
11958main ()
11959{
a9322a30 11960char *p = (char *) alloca (1);
81ecdfbb 11961 if (p) return 0;
bec39cab
AC
11962 ;
11963 return 0;
11964}
11965_ACEOF
81ecdfbb 11966if ac_fn_c_try_link "$LINENO"; then :
a9322a30 11967 ac_cv_func_alloca_works=yes
bec39cab 11968else
81ecdfbb 11969 ac_cv_func_alloca_works=no
bec39cab 11970fi
81ecdfbb
RW
11971rm -f core conftest.err conftest.$ac_objext \
11972 conftest$ac_exeext conftest.$ac_ext
bec39cab 11973fi
81ecdfbb
RW
11974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11975$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
11976
11977if test $ac_cv_func_alloca_works = yes; then
11978
81ecdfbb 11979$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 11980
a9322a30
TT
11981else
11982 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11983# that cause trouble. Some versions do not even contain alloca or
11984# contain a buggy version. If you still want to use their alloca,
11985# use ar to extract alloca.o from them instead of compiling alloca.c.
11986
81ecdfbb 11987ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 11988
81ecdfbb 11989$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 11990
bec39cab 11991
81ecdfbb
RW
11992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11993$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11994if test "${ac_cv_os_cray+set}" = set; then :
11995 $as_echo_n "(cached) " >&6
a9322a30 11996else
81ecdfbb 11997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 11998/* end confdefs.h. */
81ecdfbb 11999#if defined CRAY && ! defined CRAY2
a9322a30
TT
12000webecray
12001#else
12002wenotbecray
12003#endif
12004
12005_ACEOF
12006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12007 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12008 ac_cv_os_cray=yes
12009else
81ecdfbb 12010 ac_cv_os_cray=no
bec39cab 12011fi
81ecdfbb
RW
12012rm -f conftest*
12013
bec39cab 12014fi
81ecdfbb
RW
12015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12016$as_echo "$ac_cv_os_cray" >&6; }
12017if test $ac_cv_os_cray = yes; then
12018 for ac_func in _getb67 GETB67 getb67; do
12019 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12020ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12021eval as_val=\$$as_ac_var
12022 if test "x$as_val" = x""yes; then :
a9322a30
TT
12023
12024cat >>confdefs.h <<_ACEOF
12025#define CRAY_STACKSEG_END $ac_func
bec39cab 12026_ACEOF
c906108c 12027
a9322a30 12028 break
c906108c
SS
12029fi
12030
a9322a30
TT
12031 done
12032fi
bec39cab 12033
81ecdfbb
RW
12034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12035$as_echo_n "checking stack direction for C alloca... " >&6; }
12036if test "${ac_cv_c_stack_direction+set}" = set; then :
12037 $as_echo_n "(cached) " >&6
a9322a30 12038else
81ecdfbb 12039 if test "$cross_compiling" = yes; then :
a9322a30 12040 ac_cv_c_stack_direction=0
bec39cab 12041else
81ecdfbb 12042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12043/* end confdefs.h. */
81ecdfbb 12044$ac_includes_default
a9322a30
TT
12045int
12046find_stack_direction ()
b4e70030 12047{
a9322a30
TT
12048 static char *addr = 0;
12049 auto char dummy;
12050 if (addr == 0)
12051 {
12052 addr = &dummy;
12053 return find_stack_direction ();
12054 }
12055 else
12056 return (&dummy > addr) ? 1 : -1;
b4e70030 12057}
b757528f 12058
bec39cab
AC
12059int
12060main ()
12061{
81ecdfbb 12062 return find_stack_direction () < 0;
bec39cab
AC
12063}
12064_ACEOF
81ecdfbb 12065if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12066 ac_cv_c_stack_direction=1
12067else
81ecdfbb 12068 ac_cv_c_stack_direction=-1
a9322a30 12069fi
81ecdfbb
RW
12070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12071 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12072fi
a9322a30 12073
81ecdfbb
RW
12074fi
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12076$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12077cat >>confdefs.h <<_ACEOF
12078#define STACK_DIRECTION $ac_cv_c_stack_direction
12079_ACEOF
12080
12081
12082fi
12083
a9322a30 12084for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12085do :
12086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12087ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12088eval as_val=\$$as_ac_Header
12089 if test "x$as_val" = x""yes; then :
bec39cab 12090 cat >>confdefs.h <<_ACEOF
81ecdfbb 12091#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12092_ACEOF
b757528f 12093
b757528f 12094fi
bec39cab 12095
a9322a30 12096done
a3828db0 12097
a9322a30 12098for ac_func in getpagesize
81ecdfbb
RW
12099do :
12100 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12101if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12102 cat >>confdefs.h <<_ACEOF
81ecdfbb 12103#define HAVE_GETPAGESIZE 1
bec39cab 12104_ACEOF
bcb3dc3d 12105
bcb3dc3d
MK
12106fi
12107done
12108
81ecdfbb
RW
12109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12110$as_echo_n "checking for working mmap... " >&6; }
12111if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12112 $as_echo_n "(cached) " >&6
a9322a30 12113else
81ecdfbb 12114 if test "$cross_compiling" = yes; then :
a9322a30 12115 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12116else
81ecdfbb 12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12118/* end confdefs.h. */
a9322a30
TT
12119$ac_includes_default
12120/* malloc might have been renamed as rpl_malloc. */
12121#undef malloc
bec39cab 12122
a9322a30
TT
12123/* Thanks to Mike Haertel and Jim Avera for this test.
12124 Here is a matrix of mmap possibilities:
12125 mmap private not fixed
12126 mmap private fixed at somewhere currently unmapped
12127 mmap private fixed at somewhere already mapped
12128 mmap shared not fixed
12129 mmap shared fixed at somewhere currently unmapped
12130 mmap shared fixed at somewhere already mapped
12131 For private mappings, we should verify that changes cannot be read()
12132 back from the file, nor mmap's back from the file at a different
12133 address. (There have been systems where private was not correctly
12134 implemented like the infamous i386 svr4.0, and systems where the
12135 VM page cache was not coherent with the file system buffer cache
12136 like early versions of FreeBSD and possibly contemporary NetBSD.)
12137 For shared mappings, we should conversely verify that changes get
12138 propagated back to all the places they're supposed to be.
bec39cab 12139
a9322a30
TT
12140 Grep wants private fixed already mapped.
12141 The main things grep needs to know about mmap are:
12142 * does it exist and is it safe to write into the mmap'd area
12143 * how to use it (BSD variants) */
8b9cf735 12144
a9322a30
TT
12145#include <fcntl.h>
12146#include <sys/mman.h>
8b9cf735 12147
81ecdfbb 12148#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12149char *malloc ();
a3828db0
MK
12150#endif
12151
a9322a30 12152/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12153#ifndef HAVE_GETPAGESIZE
a9322a30 12154/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12155# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12156# define HAVE_SYS_PARAM_H 1
12157# endif
12158
12159# ifdef _SC_PAGESIZE
12160# define getpagesize() sysconf(_SC_PAGESIZE)
12161# else /* no _SC_PAGESIZE */
81ecdfbb 12162# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12163# include <sys/param.h>
12164# ifdef EXEC_PAGESIZE
12165# define getpagesize() EXEC_PAGESIZE
12166# else /* no EXEC_PAGESIZE */
12167# ifdef NBPG
12168# define getpagesize() NBPG * CLSIZE
12169# ifndef CLSIZE
12170# define CLSIZE 1
12171# endif /* no CLSIZE */
12172# else /* no NBPG */
12173# ifdef NBPC
12174# define getpagesize() NBPC
12175# else /* no NBPC */
12176# ifdef PAGESIZE
12177# define getpagesize() PAGESIZE
12178# endif /* PAGESIZE */
12179# endif /* no NBPC */
12180# endif /* no NBPG */
12181# endif /* no EXEC_PAGESIZE */
12182# else /* no HAVE_SYS_PARAM_H */
12183# define getpagesize() 8192 /* punt totally */
12184# endif /* no HAVE_SYS_PARAM_H */
12185# endif /* no _SC_PAGESIZE */
12186
12187#endif /* no HAVE_GETPAGESIZE */
12188
bec39cab
AC
12189int
12190main ()
12191{
a9322a30
TT
12192 char *data, *data2, *data3;
12193 int i, pagesize;
12194 int fd;
12195
12196 pagesize = getpagesize ();
12197
12198 /* First, make a file with some known garbage in it. */
12199 data = (char *) malloc (pagesize);
12200 if (!data)
81ecdfbb 12201 return 1;
a9322a30
TT
12202 for (i = 0; i < pagesize; ++i)
12203 *(data + i) = rand ();
12204 umask (0);
12205 fd = creat ("conftest.mmap", 0600);
12206 if (fd < 0)
81ecdfbb 12207 return 1;
a9322a30 12208 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12209 return 1;
a9322a30
TT
12210 close (fd);
12211
12212 /* Next, try to mmap the file at a fixed address which already has
12213 something else allocated at it. If we can, also make sure that
12214 we see the same garbage. */
12215 fd = open ("conftest.mmap", O_RDWR);
12216 if (fd < 0)
81ecdfbb 12217 return 1;
a9322a30
TT
12218 data2 = (char *) malloc (2 * pagesize);
12219 if (!data2)
81ecdfbb
RW
12220 return 1;
12221 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12222 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12223 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12224 return 1;
a9322a30
TT
12225 for (i = 0; i < pagesize; ++i)
12226 if (*(data + i) != *(data2 + i))
81ecdfbb 12227 return 1;
a9322a30
TT
12228
12229 /* Finally, make sure that changes to the mapped area do not
12230 percolate back to the file as seen by read(). (This is a bug on
12231 some variants of i386 svr4.0.) */
12232 for (i = 0; i < pagesize; ++i)
12233 *(data2 + i) = *(data2 + i) + 1;
12234 data3 = (char *) malloc (pagesize);
12235 if (!data3)
81ecdfbb 12236 return 1;
a9322a30 12237 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12238 return 1;
a9322a30
TT
12239 for (i = 0; i < pagesize; ++i)
12240 if (*(data + i) != *(data3 + i))
81ecdfbb 12241 return 1;
a9322a30 12242 close (fd);
81ecdfbb 12243 return 0;
bec39cab
AC
12244}
12245_ACEOF
81ecdfbb 12246if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12247 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12248else
81ecdfbb 12249 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12250fi
81ecdfbb
RW
12251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12252 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12253fi
81ecdfbb 12254
a9322a30 12255fi
81ecdfbb
RW
12256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12257$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12258if test $ac_cv_func_mmap_fixed_mapped = yes; then
12259
81ecdfbb 12260$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12261
086ec9eb 12262fi
a9322a30 12263rm -f conftest.mmap
a3828db0 12264
81ecdfbb
RW
12265ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12266if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12267
a9322a30
TT
12268else
12269
12270cat >>confdefs.h <<_ACEOF
12271#define pid_t int
bec39cab 12272_ACEOF
086ec9eb
MK
12273
12274fi
12275
81ecdfbb
RW
12276for ac_header in vfork.h
12277do :
12278 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12279if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12280 cat >>confdefs.h <<_ACEOF
81ecdfbb 12281#define HAVE_VFORK_H 1
bec39cab 12282_ACEOF
c906108c
SS
12283
12284fi
a9322a30 12285
a3828db0 12286done
c906108c 12287
a9322a30 12288for ac_func in fork vfork
81ecdfbb
RW
12289do :
12290 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12291ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12292eval as_val=\$$as_ac_var
12293 if test "x$as_val" = x""yes; then :
a3828db0 12294 cat >>confdefs.h <<_ACEOF
81ecdfbb 12295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12296_ACEOF
b83266a0 12297
97bf5e38 12298fi
a3828db0 12299done
b83266a0 12300
a9322a30 12301if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12303$as_echo_n "checking for working fork... " >&6; }
12304if test "${ac_cv_func_fork_works+set}" = set; then :
12305 $as_echo_n "(cached) " >&6
a9322a30 12306else
81ecdfbb 12307 if test "$cross_compiling" = yes; then :
a9322a30
TT
12308 ac_cv_func_fork_works=cross
12309else
81ecdfbb
RW
12310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12311/* end confdefs.h. */
12312$ac_includes_default
12313int
12314main ()
12315{
12316
12317 /* By Ruediger Kuhlmann. */
12318 return fork () < 0;
12319
12320 ;
12321 return 0;
12322}
a9322a30 12323_ACEOF
81ecdfbb 12324if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12325 ac_cv_func_fork_works=yes
12326else
81ecdfbb 12327 ac_cv_func_fork_works=no
a9322a30 12328fi
81ecdfbb
RW
12329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12330 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12331fi
81ecdfbb 12332
a9322a30 12333fi
81ecdfbb
RW
12334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12335$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12336
12337else
12338 ac_cv_func_fork_works=$ac_cv_func_fork
12339fi
12340if test "x$ac_cv_func_fork_works" = xcross; then
12341 case $host in
12342 *-*-amigaos* | *-*-msdosdjgpp*)
12343 # Override, as these systems have only a dummy fork() stub
12344 ac_cv_func_fork_works=no
12345 ;;
12346 *)
12347 ac_cv_func_fork_works=yes
12348 ;;
12349 esac
81ecdfbb
RW
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12351$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12352fi
12353ac_cv_func_vfork_works=$ac_cv_func_vfork
12354if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12356$as_echo_n "checking for working vfork... " >&6; }
12357if test "${ac_cv_func_vfork_works+set}" = set; then :
12358 $as_echo_n "(cached) " >&6
a9322a30 12359else
81ecdfbb 12360 if test "$cross_compiling" = yes; then :
a9322a30
TT
12361 ac_cv_func_vfork_works=cross
12362else
81ecdfbb 12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12364/* end confdefs.h. */
12365/* Thanks to Paul Eggert for this test. */
81ecdfbb 12366$ac_includes_default
a9322a30 12367#include <sys/wait.h>
81ecdfbb 12368#ifdef HAVE_VFORK_H
a9322a30
TT
12369# include <vfork.h>
12370#endif
12371/* On some sparc systems, changes by the child to local and incoming
12372 argument registers are propagated back to the parent. The compiler
12373 is told about this with #include <vfork.h>, but some compilers
12374 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12375 static variable whose address is put into a register that is
12376 clobbered by the vfork. */
12377static void
12378#ifdef __cplusplus
12379sparc_address_test (int arg)
12380# else
12381sparc_address_test (arg) int arg;
12382#endif
12383{
12384 static pid_t child;
12385 if (!child) {
12386 child = vfork ();
12387 if (child < 0) {
12388 perror ("vfork");
12389 _exit(2);
12390 }
12391 if (!child) {
12392 arg = getpid();
12393 write(-1, "", 0);
12394 _exit (arg);
12395 }
12396 }
12397}
12398
12399int
12400main ()
12401{
12402 pid_t parent = getpid ();
12403 pid_t child;
12404
12405 sparc_address_test (0);
12406
12407 child = vfork ();
12408
12409 if (child == 0) {
12410 /* Here is another test for sparc vfork register problems. This
12411 test uses lots of local variables, at least as many local
12412 variables as main has allocated so far including compiler
12413 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12414 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12415 reuse the register of parent for one of the local variables,
12416 since it will think that parent can't possibly be used any more
12417 in this routine. Assigning to the local variable will thus
12418 munge parent in the parent process. */
12419 pid_t
12420 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12421 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12422 /* Convince the compiler that p..p7 are live; otherwise, it might
12423 use the same hardware register for all 8 local variables. */
12424 if (p != p1 || p != p2 || p != p3 || p != p4
12425 || p != p5 || p != p6 || p != p7)
12426 _exit(1);
12427
12428 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12429 from child file descriptors. If the child closes a descriptor
12430 before it execs or exits, this munges the parent's descriptor
12431 as well. Test for this by closing stdout in the child. */
12432 _exit(close(fileno(stdout)) != 0);
12433 } else {
12434 int status;
12435 struct stat st;
12436
12437 while (wait(&status) != child)
12438 ;
81ecdfbb 12439 return (
a9322a30
TT
12440 /* Was there some problem with vforking? */
12441 child < 0
12442
12443 /* Did the child fail? (This shouldn't happen.) */
12444 || status
12445
12446 /* Did the vfork/compiler bug occur? */
12447 || parent != getpid()
12448
12449 /* Did the file descriptor bug occur? */
12450 || fstat(fileno(stdout), &st) != 0
12451 );
12452 }
12453}
12454_ACEOF
81ecdfbb 12455if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12456 ac_cv_func_vfork_works=yes
12457else
81ecdfbb 12458 ac_cv_func_vfork_works=no
a9322a30 12459fi
81ecdfbb
RW
12460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12461 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12462fi
81ecdfbb 12463
a9322a30 12464fi
81ecdfbb
RW
12465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12466$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12467
12468fi;
12469if test "x$ac_cv_func_fork_works" = xcross; then
12470 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12472$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12473fi
12474
12475if test "x$ac_cv_func_vfork_works" = xyes; then
12476
81ecdfbb 12477$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12478
12479else
12480
81ecdfbb 12481$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12482
12483fi
12484if test "x$ac_cv_func_fork_works" = xyes; then
12485
81ecdfbb 12486$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12487
12488fi
12489
a9322a30 12490for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 12491 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 12492 sigaction sigprocmask sigsetmask socketpair syscall \
7991dee7 12493 ttrace wborder setlocale iconvlist libiconvlist btowc \
be391dca 12494 setrlimit getrlimit posix_madvise
81ecdfbb
RW
12495do :
12496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12497ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12498eval as_val=\$$as_ac_var
12499 if test "x$as_val" = x""yes; then :
6c7a06a3 12500 cat >>confdefs.h <<_ACEOF
81ecdfbb 12501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12502_ACEOF
12503
12504fi
12505done
12506
12507
81ecdfbb
RW
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12509$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12510if test "${am_cv_langinfo_codeset+set}" = set; then :
12511 $as_echo_n "(cached) " >&6
6c7a06a3 12512else
81ecdfbb 12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12514/* end confdefs.h. */
12515#include <langinfo.h>
12516int
12517main ()
12518{
12519char* cs = nl_langinfo(CODESET);
bec39cab
AC
12520 ;
12521 return 0;
12522}
12523_ACEOF
81ecdfbb 12524if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12525 am_cv_langinfo_codeset=yes
a4db0f07 12526else
81ecdfbb 12527 am_cv_langinfo_codeset=no
a4db0f07 12528fi
81ecdfbb
RW
12529rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12531
a4db0f07 12532fi
81ecdfbb
RW
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12534$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12535 if test $am_cv_langinfo_codeset = yes; then
12536
81ecdfbb 12537$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12538
6c7a06a3 12539 fi
c906108c 12540
06825bd1 12541
a3828db0
MK
12542# Check the return and argument types of ptrace. No canned test for
12543# this, so roll our own.
12544gdb_ptrace_headers='
12545#if HAVE_SYS_TYPES_H
12546# include <sys/types.h>
12547#endif
12548#if HAVE_SYS_PTRACE_H
12549# include <sys/ptrace.h>
12550#endif
12551#if HAVE_UNISTD_H
12552# include <unistd.h>
12553#endif
12554'
12555# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12556ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12557"
12558if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12559 ac_have_decl=1
06825bd1 12560else
81ecdfbb 12561 ac_have_decl=0
06825bd1 12562fi
06825bd1 12563
a3828db0 12564cat >>confdefs.h <<_ACEOF
81ecdfbb 12565#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12566_ACEOF
81ecdfbb 12567if test $ac_have_decl = 1; then :
bec39cab 12568
a3828db0 12569else
a3828db0
MK
12570
12571 : ${gdb_cv_func_ptrace_ret='int'}
12572 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12573
06825bd1
MK
12574fi
12575
064ef605
DJ
12576# Check return type. Varargs (used on GNU/Linux) conflict with the
12577# empty argument list, so check for that explicitly.
81ecdfbb
RW
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12579$as_echo_n "checking return type of ptrace... " >&6; }
12580if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12581 $as_echo_n "(cached) " >&6
bec39cab 12582else
81ecdfbb 12583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12584/* end confdefs.h. */
a3828db0 12585$gdb_ptrace_headers
bec39cab
AC
12586int
12587main ()
12588{
064ef605
DJ
12589extern long ptrace (enum __ptrace_request, ...);
12590 ;
12591 return 0;
12592}
12593_ACEOF
81ecdfbb 12594if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12595 gdb_cv_func_ptrace_ret='long'
12596else
81ecdfbb 12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12598/* end confdefs.h. */
12599$gdb_ptrace_headers
12600int
12601main ()
12602{
a3828db0 12603extern int ptrace ();
bec39cab
AC
12604 ;
12605 return 0;
12606}
12607_ACEOF
81ecdfbb 12608if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12609 gdb_cv_func_ptrace_ret='int'
70f9f479 12610else
81ecdfbb 12611 gdb_cv_func_ptrace_ret='long'
70f9f479 12612fi
81ecdfbb 12613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12614fi
81ecdfbb 12615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12616fi
81ecdfbb
RW
12617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12618$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12619
a3828db0
MK
12620cat >>confdefs.h <<_ACEOF
12621#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12622_ACEOF
70f9f479 12623
a3828db0 12624# Check argument types.
81ecdfbb
RW
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12626$as_echo_n "checking types of arguments for ptrace... " >&6; }
12627if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12628 $as_echo_n "(cached) " >&6
bec39cab 12629else
a3828db0 12630
81ecdfbb 12631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12632/* end confdefs.h. */
12633$gdb_ptrace_headers
12634int
12635main ()
12636{
12637extern long ptrace (enum __ptrace_request, ...);
12638 ;
12639 return 0;
12640}
12641_ACEOF
81ecdfbb 12642if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12643 gdb_cv_func_ptrace_args='int,int,long,long'
12644else
064ef605 12645
a3828db0
MK
12646for gdb_arg1 in 'int' 'long'; do
12647 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12648 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12649 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12651/* end confdefs.h. */
a3828db0 12652$gdb_ptrace_headers
bec39cab
AC
12653int
12654main ()
12655{
a3828db0
MK
12656
12657extern $gdb_cv_func_ptrace_ret
12658 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12659
bec39cab
AC
12660 ;
12661 return 0;
12662}
12663_ACEOF
81ecdfbb 12664if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12665 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12666 break 4;
5c7f2947 12667fi
81ecdfbb 12668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12669 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12671/* end confdefs.h. */
a3828db0 12672$gdb_ptrace_headers
bec39cab
AC
12673int
12674main ()
12675{
a3828db0
MK
12676
12677extern $gdb_cv_func_ptrace_ret
12678 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12679
bec39cab
AC
12680 ;
12681 return 0;
12682}
12683_ACEOF
81ecdfbb 12684if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12685
12686gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12687 break 5;
78434e59 12688fi
81ecdfbb 12689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12690 done
12691 done
12692 done
12693 done
12694done
12695# Provide a safe default value.
12696: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12697
064ef605 12698fi
81ecdfbb 12699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12700fi
81ecdfbb
RW
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12702$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12703ac_save_IFS=$IFS; IFS=','
12704set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12705IFS=$ac_save_IFS
12706shift
bec39cab 12707
a3828db0
MK
12708cat >>confdefs.h <<_ACEOF
12709#define PTRACE_TYPE_ARG3 $3
12710_ACEOF
12711
12712if test -n "$5"; then
12713
12714cat >>confdefs.h <<_ACEOF
12715#define PTRACE_TYPE_ARG5 $5
bec39cab 12716_ACEOF
78434e59
MK
12717
12718fi
12719
a3828db0 12720if test "$cross_compiling" = no; then
81ecdfbb
RW
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12722$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12723if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12724 $as_echo_n "(cached) " >&6
a3828db0 12725else
81ecdfbb
RW
12726 if test "$cross_compiling" = yes; then :
12727 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12728else
81ecdfbb 12729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12730/* end confdefs.h. */
81ecdfbb 12731$ac_includes_default
bec39cab
AC
12732int
12733main ()
12734{
a3828db0
MK
12735/* If this system has a BSD-style setpgrp which takes arguments,
12736 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12737 exit successfully. */
81ecdfbb 12738 return setpgrp (1,1) != -1;
bec39cab
AC
12739 ;
12740 return 0;
12741}
12742_ACEOF
81ecdfbb 12743if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12744 ac_cv_func_setpgrp_void=no
c906108c 12745else
81ecdfbb 12746 ac_cv_func_setpgrp_void=yes
c906108c 12747fi
81ecdfbb
RW
12748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12749 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12750fi
81ecdfbb 12751
a3828db0 12752fi
81ecdfbb
RW
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12754$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12755if test $ac_cv_func_setpgrp_void = yes; then
12756
81ecdfbb 12757$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12758
12759fi
a3828db0
MK
12760
12761else
81ecdfbb
RW
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12763$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12764if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12765 $as_echo_n "(cached) " >&6
97bf5e38 12766else
81ecdfbb 12767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12768/* end confdefs.h. */
a3828db0
MK
12769
12770#include <unistd.h>
12771
bec39cab
AC
12772int
12773main ()
12774{
a3828db0
MK
12775
12776 if (setpgrp(1,1) == -1)
12777 exit (0);
12778 else
12779 exit (1);
12780
bec39cab
AC
12781 ;
12782 return 0;
12783}
12784_ACEOF
81ecdfbb 12785if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12786 ac_cv_func_setpgrp_void=no
c906108c 12787else
81ecdfbb 12788 ac_cv_func_setpgrp_void=yes
c906108c 12789fi
81ecdfbb 12790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12791fi
81ecdfbb
RW
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12793$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12794if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12795 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12796
a3828db0 12797fi
c906108c
SS
12798fi
12799
a3828db0
MK
12800# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
12801# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
12802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12803$as_echo_n "checking for sigsetjmp... " >&6; }
12804if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12805 $as_echo_n "(cached) " >&6
bec39cab 12806else
81ecdfbb 12807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12808/* end confdefs.h. */
a3828db0
MK
12809
12810#include <setjmp.h>
12811
bec39cab
AC
12812int
12813main ()
12814{
a3828db0 12815sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
12816 ;
12817 return 0;
12818}
12819_ACEOF
81ecdfbb 12820if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12821 gdb_cv_func_sigsetjmp=yes
c906108c 12822else
81ecdfbb 12823 gdb_cv_func_sigsetjmp=no
c906108c 12824fi
81ecdfbb 12825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12826fi
81ecdfbb
RW
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12828$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 12829if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 12830
81ecdfbb 12831$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 12832
97bf5e38 12833fi
c906108c 12834
a3828db0
MK
12835# Assume we'll default to using the included libiberty regex.
12836gdb_use_included_regex=yes
12837
12838# However, if the system regex is GNU regex, then default to *not*
12839# using the included regex.
81ecdfbb
RW
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12841$as_echo_n "checking for GNU regex... " >&6; }
12842if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12843 $as_echo_n "(cached) " >&6
bec39cab 12844else
81ecdfbb 12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12846/* end confdefs.h. */
a3828db0 12847#include <gnu-versions.h>
bec39cab
AC
12848int
12849main ()
12850{
81ecdfbb
RW
12851#define REGEX_INTERFACE_VERSION 1
12852#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12853# error "Version mismatch"
12854#endif
5c45e068
MK
12855 ;
12856 return 0;
12857}
12858_ACEOF
81ecdfbb
RW
12859if ac_fn_c_try_compile "$LINENO"; then :
12860 gdb_cv_have_gnu_regex=yes
5c45e068 12861else
81ecdfbb
RW
12862 gdb_cv_have_gnu_regex=no
12863fi
12864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12865fi
12866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12867$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12868if test $gdb_cv_have_gnu_regex = yes; then
12869 gdb_use_included_regex=no
5c45e068 12870fi
81ecdfbb
RW
12871
12872
12873# Check whether --with-included-regex was given.
12874if test "${with_included_regex+set}" = set; then :
12875 withval=$with_included_regex; gdb_with_regex=$withval
12876else
12877 gdb_with_regex=$gdb_use_included_regex
c906108c 12878fi
81ecdfbb
RW
12879
12880if test "$gdb_with_regex" = yes; then
12881
12882$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12883
c906108c 12884fi
81ecdfbb
RW
12885
12886# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12887ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12888#include <sys/proc.h>
12889
12890"
12891if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12892
5c45e068 12893cat >>confdefs.h <<_ACEOF
a3828db0 12894#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12895_ACEOF
c906108c 12896
5c45e068 12897
97bf5e38 12898fi
c906108c 12899
5c45e068 12900
a3828db0 12901# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12903$as_echo_n "checking for struct lwp... " >&6; }
12904if test "${gdb_cv_struct_lwp+set}" = set; then :
12905 $as_echo_n "(cached) " >&6
bec39cab 12906else
81ecdfbb 12907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12908/* end confdefs.h. */
a3828db0
MK
12909#include <sys/param.h>
12910#include <sys/lwp.h>
bec39cab
AC
12911int
12912main ()
12913{
a3828db0 12914struct lwp l;
bec39cab
AC
12915 ;
12916 return 0;
12917}
12918_ACEOF
81ecdfbb 12919if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12920 gdb_cv_struct_lwp=yes
c906108c 12921else
81ecdfbb 12922 gdb_cv_struct_lwp=no
c906108c 12923fi
81ecdfbb 12924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12925fi
81ecdfbb
RW
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12927$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12928if test $gdb_cv_struct_lwp = yes; then
c906108c 12929
81ecdfbb 12930$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12931
97bf5e38 12932fi
c906108c 12933
a3828db0 12934# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12936$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12937if test "${gdb_cv_struct_reg+set}" = set; then :
12938 $as_echo_n "(cached) " >&6
bec39cab 12939else
81ecdfbb 12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12941/* end confdefs.h. */
a3828db0
MK
12942#include <sys/types.h>
12943#include <machine/reg.h>
bec39cab
AC
12944int
12945main ()
12946{
a3828db0 12947struct reg r;
bec39cab
AC
12948 ;
12949 return 0;
12950}
12951_ACEOF
81ecdfbb 12952if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12953 gdb_cv_struct_reg=yes
27ca5dad 12954else
81ecdfbb 12955 gdb_cv_struct_reg=no
27ca5dad 12956fi
81ecdfbb 12957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12958fi
81ecdfbb
RW
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12960$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12961if test $gdb_cv_struct_reg = yes; then
bec39cab 12962
81ecdfbb 12963$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12964
12965fi
97bf5e38 12966
a3828db0
MK
12967# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12968# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
12969ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
12970"
12971if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12972
12973cat >>confdefs.h <<_ACEOF
a3828db0 12974#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12975_ACEOF
3862412b 12976
5c45e068 12977
97bf5e38 12978fi
81ecdfbb
RW
12979ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
12980"
12981if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12982
12983cat >>confdefs.h <<_ACEOF
a3828db0 12984#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12985_ACEOF
3862412b 12986
5c45e068 12987
97bf5e38 12988fi
3862412b 12989
5c45e068 12990
a3828db0 12991# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12993$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12994if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
451928c5 12996else
81ecdfbb 12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12998/* end confdefs.h. */
a3828db0 12999#include <sys/ptrace.h>
bec39cab
AC
13000int
13001main ()
13002{
a3828db0 13003PTRACE_GETREGS;
bec39cab
AC
13004 ;
13005 return 0;
13006}
13007_ACEOF
81ecdfbb 13008if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13009 gdb_cv_have_ptrace_getregs=yes
451928c5 13010else
81ecdfbb 13011 gdb_cv_have_ptrace_getregs=no
451928c5 13012fi
81ecdfbb 13013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13014fi
13015
81ecdfbb
RW
13016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13017$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13018if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13019
81ecdfbb 13020$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13021
97bf5e38 13022fi
451928c5 13023
a3828db0 13024# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13026$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13027if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13028 $as_echo_n "(cached) " >&6
451928c5 13029else
81ecdfbb 13030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13031/* end confdefs.h. */
a3828db0 13032#include <sys/ptrace.h>
bec39cab
AC
13033int
13034main ()
13035{
a3828db0 13036PTRACE_GETFPXREGS;
bec39cab
AC
13037 ;
13038 return 0;
13039}
13040_ACEOF
81ecdfbb 13041if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13042 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13043else
81ecdfbb 13044 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13045fi
81ecdfbb 13046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13047fi
13048
81ecdfbb
RW
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13050$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13051if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13052
81ecdfbb 13053$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13054
97bf5e38 13055fi
451928c5 13056
a3828db0 13057# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13059$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13060if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13061 $as_echo_n "(cached) " >&6
3862412b 13062else
81ecdfbb 13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13064/* end confdefs.h. */
a3828db0
MK
13065#include <sys/types.h>
13066#include <sys/ptrace.h>
bec39cab
AC
13067int
13068main ()
13069{
a3828db0 13070PT_GETDBREGS;
bec39cab
AC
13071 ;
13072 return 0;
13073}
13074_ACEOF
81ecdfbb 13075if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13076 gdb_cv_have_pt_getdbregs=yes
3862412b 13077else
81ecdfbb 13078 gdb_cv_have_pt_getdbregs=no
3862412b 13079fi
81ecdfbb 13080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13081fi
13082
81ecdfbb
RW
13083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13084$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13085if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13086
81ecdfbb 13087$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13088
97bf5e38 13089fi
3862412b 13090
a3828db0 13091# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13093$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13094if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13095 $as_echo_n "(cached) " >&6
3862412b 13096else
81ecdfbb 13097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13098/* end confdefs.h. */
a3828db0
MK
13099#include <sys/types.h>
13100#include <sys/ptrace.h>
bec39cab
AC
13101int
13102main ()
13103{
a3828db0 13104PT_GETXMMREGS;
bec39cab
AC
13105 ;
13106 return 0;
13107}
13108_ACEOF
81ecdfbb 13109if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13110 gdb_cv_have_pt_getxmmregs=yes
3862412b 13111else
81ecdfbb 13112 gdb_cv_have_pt_getxmmregs=no
3862412b 13113fi
81ecdfbb 13114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13115fi
13116
81ecdfbb
RW
13117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13118$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13119if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13120
81ecdfbb 13121$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13122
97bf5e38 13123fi
3862412b 13124
eb368090 13125# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13126
13127if test "${target}" = "${host}"; then
13128 case "${host}" in
97bf5e38 13129 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13130
81ecdfbb 13131$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13132
13133 ;;
c162e8c9 13134 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13135
81ecdfbb 13136$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13137
13138 ;;
13139 mips-sgi-irix5*)
13140 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13141
81ecdfbb 13142$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13143
13144 ;;
13145 esac
13146fi
13147
13148if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13150$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13151 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13152 $as_echo_n "(cached) " >&6
bec39cab 13153else
81ecdfbb 13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13155/* end confdefs.h. */
596c9d4b
KB
13156
13157#define _SYSCALL32
d30c5336
JK
13158/* Needed for new procfs interface on sparc-solaris. */
13159#define _STRUCTURED_PROC 1
596c9d4b 13160#include <sys/procfs.h>
bec39cab
AC
13161int
13162main ()
13163{
97bf5e38 13164pstatus_t avar
bec39cab
AC
13165 ;
13166 return 0;
13167}
13168_ACEOF
81ecdfbb 13169if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13170 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13171else
81ecdfbb 13172 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13173
596c9d4b 13174fi
81ecdfbb 13175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13176fi
13177
97bf5e38 13178 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13179
81ecdfbb 13180$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13181
13182 fi
81ecdfbb
RW
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13184$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13185
81ecdfbb
RW
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13187$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13188 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13189 $as_echo_n "(cached) " >&6
596c9d4b 13190else
81ecdfbb 13191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13192/* end confdefs.h. */
596c9d4b
KB
13193
13194#define _SYSCALL32
d30c5336
JK
13195/* Needed for new procfs interface on sparc-solaris. */
13196#define _STRUCTURED_PROC 1
596c9d4b 13197#include <sys/procfs.h>
bec39cab
AC
13198int
13199main ()
13200{
97bf5e38 13201prrun_t avar
bec39cab
AC
13202 ;
13203 return 0;
13204}
13205_ACEOF
81ecdfbb 13206if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13207 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13208else
81ecdfbb 13209 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13210
596c9d4b 13211fi
81ecdfbb 13212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13213fi
13214
97bf5e38 13215 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13216
81ecdfbb 13217$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13218
13219 fi
81ecdfbb
RW
13220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13221$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13222
81ecdfbb
RW
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13224$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13225 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13226 $as_echo_n "(cached) " >&6
596c9d4b 13227else
81ecdfbb 13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13229/* end confdefs.h. */
596c9d4b
KB
13230
13231#define _SYSCALL32
d30c5336
JK
13232/* Needed for new procfs interface on sparc-solaris. */
13233#define _STRUCTURED_PROC 1
596c9d4b 13234#include <sys/procfs.h>
bec39cab
AC
13235int
13236main ()
13237{
97bf5e38 13238gregset_t avar
bec39cab
AC
13239 ;
13240 return 0;
13241}
13242_ACEOF
81ecdfbb 13243if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13244 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13245else
81ecdfbb 13246 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13247
596c9d4b 13248fi
81ecdfbb 13249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13250fi
13251
97bf5e38 13252 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13253
81ecdfbb 13254$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13255
13256 fi
81ecdfbb
RW
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13258$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13259
81ecdfbb
RW
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13261$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13262 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13263 $as_echo_n "(cached) " >&6
d84dd0c5 13264else
81ecdfbb 13265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13266/* end confdefs.h. */
97bf5e38
MK
13267
13268#define _SYSCALL32
d30c5336
JK
13269/* Needed for new procfs interface on sparc-solaris. */
13270#define _STRUCTURED_PROC 1
d84dd0c5 13271#include <sys/procfs.h>
bec39cab
AC
13272int
13273main ()
13274{
97bf5e38 13275fpregset_t avar
bec39cab
AC
13276 ;
13277 return 0;
13278}
13279_ACEOF
81ecdfbb 13280if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13281 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13282else
81ecdfbb 13283 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13284
d84dd0c5 13285fi
81ecdfbb 13286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13287fi
13288
97bf5e38 13289 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13290
81ecdfbb 13291$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13292
97bf5e38 13293 fi
81ecdfbb
RW
13294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13295$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13296
81ecdfbb
RW
13297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13298$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13299 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13300 $as_echo_n "(cached) " >&6
c906108c 13301else
81ecdfbb 13302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13303/* end confdefs.h. */
c906108c 13304
97bf5e38 13305#define _SYSCALL32
d30c5336
JK
13306/* Needed for new procfs interface on sparc-solaris. */
13307#define _STRUCTURED_PROC 1
97bf5e38 13308#include <sys/procfs.h>
bec39cab
AC
13309int
13310main ()
13311{
97bf5e38 13312prgregset_t avar
bec39cab
AC
13313 ;
13314 return 0;
13315}
13316_ACEOF
81ecdfbb 13317if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13318 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13319else
81ecdfbb 13320 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13321
c906108c 13322fi
81ecdfbb 13323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13324fi
13325
97bf5e38 13326 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13327
81ecdfbb 13328$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13329
97bf5e38 13330 fi
81ecdfbb
RW
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13332$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13333
81ecdfbb
RW
13334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13335$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13336 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13337 $as_echo_n "(cached) " >&6
d45fe813 13338else
81ecdfbb 13339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13340/* end confdefs.h. */
97bf5e38
MK
13341
13342#define _SYSCALL32
d30c5336
JK
13343/* Needed for new procfs interface on sparc-solaris. */
13344#define _STRUCTURED_PROC 1
97bf5e38 13345#include <sys/procfs.h>
bec39cab
AC
13346int
13347main ()
13348{
97bf5e38 13349prfpregset_t avar
bec39cab
AC
13350 ;
13351 return 0;
13352}
13353_ACEOF
81ecdfbb 13354if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13355 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13356else
81ecdfbb 13357 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13358
d45fe813 13359fi
81ecdfbb 13360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13361fi
13362
97bf5e38 13363 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13364
81ecdfbb 13365$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13366
97bf5e38 13367 fi
81ecdfbb
RW
13368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13369$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13370
81ecdfbb
RW
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13372$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13373 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13374 $as_echo_n "(cached) " >&6
d45fe813 13375else
81ecdfbb 13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13377/* end confdefs.h. */
97bf5e38
MK
13378
13379#define _SYSCALL32
d30c5336
JK
13380/* Needed for new procfs interface on sparc-solaris. */
13381#define _STRUCTURED_PROC 1
97bf5e38 13382#include <sys/procfs.h>
bec39cab
AC
13383int
13384main ()
13385{
97bf5e38 13386prgregset32_t avar
bec39cab
AC
13387 ;
13388 return 0;
13389}
13390_ACEOF
81ecdfbb 13391if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13392 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13393else
81ecdfbb 13394 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13395
d45fe813 13396fi
81ecdfbb 13397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13398fi
13399
97bf5e38 13400 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13401
81ecdfbb 13402$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13403
97bf5e38 13404 fi
81ecdfbb
RW
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13406$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13407
81ecdfbb
RW
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13409$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13410 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13411 $as_echo_n "(cached) " >&6
d45fe813 13412else
81ecdfbb 13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13414/* end confdefs.h. */
97bf5e38
MK
13415
13416#define _SYSCALL32
d30c5336
JK
13417/* Needed for new procfs interface on sparc-solaris. */
13418#define _STRUCTURED_PROC 1
97bf5e38 13419#include <sys/procfs.h>
bec39cab
AC
13420int
13421main ()
13422{
97bf5e38 13423prfpregset32_t avar
bec39cab
AC
13424 ;
13425 return 0;
13426}
13427_ACEOF
81ecdfbb 13428if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13429 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13430else
81ecdfbb 13431 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13432
d45fe813 13433fi
81ecdfbb 13434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13435fi
13436
97bf5e38 13437 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13438
81ecdfbb 13439$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13440
97bf5e38 13441 fi
81ecdfbb
RW
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13443$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13444
81ecdfbb
RW
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13446$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13447 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13448 $as_echo_n "(cached) " >&6
d45fe813 13449else
81ecdfbb 13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13451/* end confdefs.h. */
97bf5e38 13452
d45fe813 13453#define _SYSCALL32
d30c5336
JK
13454/* Needed for new procfs interface on sparc-solaris. */
13455#define _STRUCTURED_PROC 1
97bf5e38 13456#include <sys/procfs.h>
bec39cab
AC
13457int
13458main ()
13459{
97bf5e38 13460lwpid_t avar
bec39cab
AC
13461 ;
13462 return 0;
13463}
13464_ACEOF
81ecdfbb 13465if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13466 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13467else
81ecdfbb 13468 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13469
d45fe813 13470fi
81ecdfbb 13471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13472fi
13473
97bf5e38 13474 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13475
81ecdfbb 13476$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13477
97bf5e38 13478 fi
81ecdfbb
RW
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13480$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13481
81ecdfbb
RW
13482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13483$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13484 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13485 $as_echo_n "(cached) " >&6
c906108c 13486else
81ecdfbb 13487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13488/* end confdefs.h. */
c906108c 13489
97bf5e38 13490#define _SYSCALL32
d30c5336
JK
13491/* Needed for new procfs interface on sparc-solaris. */
13492#define _STRUCTURED_PROC 1
97bf5e38 13493#include <sys/procfs.h>
bec39cab
AC
13494int
13495main ()
13496{
97bf5e38 13497psaddr_t avar
bec39cab
AC
13498 ;
13499 return 0;
13500}
13501_ACEOF
81ecdfbb 13502if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13503 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13504else
81ecdfbb 13505 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13506
c906108c 13507fi
81ecdfbb 13508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13509fi
13510
97bf5e38 13511 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13512
81ecdfbb 13513$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13514
97bf5e38 13515 fi
81ecdfbb
RW
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13517$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13518
81ecdfbb
RW
13519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13520$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13521 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13522 $as_echo_n "(cached) " >&6
c906108c 13523else
81ecdfbb 13524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13525/* end confdefs.h. */
c906108c 13526
97bf5e38 13527#define _SYSCALL32
d30c5336
JK
13528/* Needed for new procfs interface on sparc-solaris. */
13529#define _STRUCTURED_PROC 1
97bf5e38 13530#include <sys/procfs.h>
bec39cab
AC
13531int
13532main ()
13533{
97bf5e38 13534prsysent_t avar
bec39cab
AC
13535 ;
13536 return 0;
13537}
13538_ACEOF
81ecdfbb 13539if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13540 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13541else
81ecdfbb 13542 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13543
c906108c 13544fi
81ecdfbb 13545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13546fi
13547
97bf5e38 13548 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13549
81ecdfbb 13550$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13551
97bf5e38 13552 fi
81ecdfbb
RW
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13554$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13555
81ecdfbb
RW
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13557$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13558 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13559 $as_echo_n "(cached) " >&6
c906108c 13560else
81ecdfbb 13561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13562/* end confdefs.h. */
c906108c 13563
97bf5e38 13564#define _SYSCALL32
d30c5336
JK
13565/* Needed for new procfs interface on sparc-solaris. */
13566#define _STRUCTURED_PROC 1
97bf5e38 13567#include <sys/procfs.h>
bec39cab
AC
13568int
13569main ()
13570{
97bf5e38 13571pr_sigset_t avar
bec39cab
AC
13572 ;
13573 return 0;
13574}
13575_ACEOF
81ecdfbb 13576if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13577 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13578else
81ecdfbb 13579 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13580
c906108c 13581fi
81ecdfbb 13582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13583fi
13584
97bf5e38 13585 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13586
81ecdfbb 13587$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13588
97bf5e38 13589 fi
81ecdfbb
RW
13590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13591$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13592
81ecdfbb
RW
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13594$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13595 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13596 $as_echo_n "(cached) " >&6
c906108c 13597else
81ecdfbb 13598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13599/* end confdefs.h. */
c906108c 13600
97bf5e38 13601#define _SYSCALL32
d30c5336
JK
13602/* Needed for new procfs interface on sparc-solaris. */
13603#define _STRUCTURED_PROC 1
97bf5e38 13604#include <sys/procfs.h>
bec39cab
AC
13605int
13606main ()
13607{
97bf5e38 13608pr_sigaction64_t avar
bec39cab
AC
13609 ;
13610 return 0;
13611}
13612_ACEOF
81ecdfbb 13613if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13614 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13615else
81ecdfbb 13616 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13617
c906108c 13618fi
81ecdfbb 13619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13620fi
13621
97bf5e38 13622 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13623
81ecdfbb 13624$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13625
97bf5e38 13626 fi
81ecdfbb
RW
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13628$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13629
81ecdfbb
RW
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13631$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13632 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13633 $as_echo_n "(cached) " >&6
97bf5e38 13634else
81ecdfbb 13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13636/* end confdefs.h. */
97bf5e38
MK
13637
13638#define _SYSCALL32
d30c5336
JK
13639/* Needed for new procfs interface on sparc-solaris. */
13640#define _STRUCTURED_PROC 1
97bf5e38 13641#include <sys/procfs.h>
bec39cab
AC
13642int
13643main ()
13644{
97bf5e38 13645pr_siginfo64_t avar
bec39cab
AC
13646 ;
13647 return 0;
13648}
13649_ACEOF
81ecdfbb 13650if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13651 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13652else
81ecdfbb 13653 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13654
97bf5e38 13655fi
81ecdfbb 13656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13657fi
c906108c 13658
97bf5e38 13659 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13660
81ecdfbb 13661$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13662
97bf5e38 13663 fi
81ecdfbb
RW
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13665$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13666
13667
97bf5e38
MK
13668
13669
13670
97bf5e38 13671 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13673$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13674 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13675 $as_echo_n "(cached) " >&6
c906108c 13676else
81ecdfbb 13677 if test "$cross_compiling" = yes; then :
97bf5e38 13678 gdb_cv_prfpregset_t_broken=yes
c906108c 13679else
81ecdfbb 13680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13681/* end confdefs.h. */
97bf5e38
MK
13682#include <sys/procfs.h>
13683 int main ()
13684 {
13685 if (sizeof (prfpregset_t) == sizeof (void *))
13686 return 1;
13687 return 0;
13688 }
bec39cab 13689_ACEOF
81ecdfbb 13690if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13691 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13692else
13693 gdb_cv_prfpregset_t_broken=yes
c906108c 13694fi
81ecdfbb
RW
13695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13696 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13697fi
81ecdfbb 13698
c906108c
SS
13699fi
13700
81ecdfbb
RW
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13702$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13703 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13704
81ecdfbb 13705$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13706
97bf5e38
MK
13707 fi
13708 fi
c906108c 13709
bec39cab 13710
81ecdfbb
RW
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13712$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13713 if test "${gdb_cv_have_procfs_piocset+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. */
97bf5e38
MK
13718#include <unistd.h>
13719#include <sys/types.h>
13720#include <sys/procfs.h>
13721
bec39cab
AC
13722int
13723main ()
13724{
97bf5e38
MK
13725
13726 int dummy;;
13727 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13728
13729 ;
13730 return 0;
13731}
13732_ACEOF
81ecdfbb 13733if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13734 gdb_cv_have_procfs_piocset=yes
c906108c 13735else
81ecdfbb 13736 gdb_cv_have_procfs_piocset=no
c906108c 13737fi
81ecdfbb 13738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13739fi
97bf5e38 13740
81ecdfbb
RW
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13742$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13743 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13744
81ecdfbb 13745$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13746
13747 fi
c906108c 13748fi
c906108c 13749
97bf5e38 13750if test ${host} = ${target} ; then
bec39cab 13751
81ecdfbb
RW
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13753$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13754 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13755 $as_echo_n "(cached) " >&6
bec39cab 13756else
81ecdfbb 13757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13758/* end confdefs.h. */
97bf5e38 13759#include <link.h>
bec39cab
AC
13760int
13761main ()
13762{
97bf5e38 13763struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13764 ;
13765 return 0;
13766}
13767_ACEOF
81ecdfbb 13768if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13769 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13770else
81ecdfbb 13771 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13772fi
81ecdfbb 13773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13774fi
13775
81ecdfbb
RW
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13777$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13778 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13779
81ecdfbb 13780$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13781
13782 fi
13783
bec39cab 13784
81ecdfbb
RW
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13786$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13787 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13788 $as_echo_n "(cached) " >&6
c906108c 13789else
81ecdfbb 13790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13791/* end confdefs.h. */
97bf5e38
MK
13792#include <sys/types.h>
13793#include <link.h>
bec39cab
AC
13794int
13795main ()
13796{
97bf5e38 13797struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13798 ;
13799 return 0;
13800}
13801_ACEOF
81ecdfbb 13802if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13803 gdb_cv_have_struct_link_map_with_lm_members=yes
13804else
81ecdfbb 13805 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 13806fi
81ecdfbb 13807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13808fi
c906108c 13809
81ecdfbb
RW
13810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
13811$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 13812 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 13813
81ecdfbb 13814$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13815
13816 fi
13817
bec39cab 13818
81ecdfbb
RW
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
13820$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
13821 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
13822 $as_echo_n "(cached) " >&6
c906108c 13823else
81ecdfbb 13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13825/* end confdefs.h. */
97bf5e38
MK
13826#include <sys/types.h>
13827#ifdef HAVE_NLIST_H
13828#include <nlist.h>
13829#endif
13830#include <link.h>
bec39cab
AC
13831int
13832main ()
13833{
97bf5e38 13834struct so_map lm; (void) lm.som_addr;
bec39cab
AC
13835 ;
13836 return 0;
13837}
13838_ACEOF
81ecdfbb 13839if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13840 gdb_cv_have_struct_so_map_with_som_members=yes
13841else
81ecdfbb 13842 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 13843fi
81ecdfbb 13844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13845fi
c906108c 13846
81ecdfbb
RW
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
13848$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 13849 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 13850
81ecdfbb 13851$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 13852
97bf5e38 13853 fi
c906108c 13854
bec39cab 13855
81ecdfbb
RW
13856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
13857$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
13858 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
13859 $as_echo_n "(cached) " >&6
97bf5e38 13860else
81ecdfbb 13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13862/* end confdefs.h. */
97bf5e38
MK
13863#define _SYSCALL32
13864#include <sys/link.h>
bec39cab
AC
13865int
13866main ()
13867{
97bf5e38 13868struct link_map32 l;
bec39cab
AC
13869 ;
13870 return 0;
13871}
13872_ACEOF
81ecdfbb 13873if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13874 gdb_cv_have_struct_link_map32=yes
13875else
81ecdfbb 13876 gdb_cv_have_struct_link_map32=no
97bf5e38 13877fi
81ecdfbb 13878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13879fi
c906108c 13880
81ecdfbb
RW
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
13882$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 13883 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 13884
81ecdfbb 13885$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 13886
60ca704f 13887
81ecdfbb 13888$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 13889
97bf5e38
MK
13890 fi
13891fi
c906108c 13892
bc8bcb4b 13893# Check if the compiler supports the `long long' type.
c906108c 13894
81ecdfbb
RW
13895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13896$as_echo_n "checking for long long support in compiler... " >&6; }
13897if test "${gdb_cv_c_long_long+set}" = set; then :
13898 $as_echo_n "(cached) " >&6
97bf5e38 13899else
81ecdfbb 13900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13901/* end confdefs.h. */
bc8bcb4b 13902extern long long foo;
bec39cab
AC
13903int
13904main ()
13905{
bc8bcb4b 13906switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13907 ;
13908 return 0;
13909}
13910_ACEOF
81ecdfbb 13911if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13912 gdb_cv_c_long_long=yes
13913else
81ecdfbb 13914 gdb_cv_c_long_long=no
97bf5e38 13915fi
81ecdfbb 13916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13917fi
81ecdfbb
RW
13918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13919$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 13920if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 13921
81ecdfbb 13922$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13923
13924fi
13925
bc8bcb4b 13926# Check if the compiler and runtime support printing long longs.
97bf5e38 13927
81ecdfbb
RW
13928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13929$as_echo_n "checking for long long support in printf... " >&6; }
13930if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13931 $as_echo_n "(cached) " >&6
97bf5e38 13932else
81ecdfbb 13933 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13934 gdb_cv_printf_has_long_long=no
13935else
81ecdfbb 13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13937/* end confdefs.h. */
bc8bcb4b
MK
13938$ac_includes_default
13939int
13940main ()
13941{
13942char buf[32];
97bf5e38
MK
13943 long long l = 0;
13944 l = (l << 16) + 0x0123;
13945 l = (l << 16) + 0x4567;
13946 l = (l << 16) + 0x89ab;
13947 l = (l << 16) + 0xcdef;
13948 sprintf (buf, "0x%016llx", l);
13949 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13950 ;
13951 return 0;
c906108c 13952}
bec39cab 13953_ACEOF
81ecdfbb 13954if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13955 gdb_cv_printf_has_long_long=yes
13956else
81ecdfbb 13957 gdb_cv_printf_has_long_long=no
97bf5e38 13958fi
81ecdfbb
RW
13959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13961fi
81ecdfbb 13962
97bf5e38 13963fi
81ecdfbb
RW
13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13965$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13966if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13967
81ecdfbb 13968$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13969
13970fi
97bf5e38 13971
1a619819
LM
13972# Check if the compiler and runtime support printing decfloats.
13973
81ecdfbb
RW
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13975$as_echo_n "checking for decfloat support in printf... " >&6; }
13976if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13977 $as_echo_n "(cached) " >&6
1a619819 13978else
81ecdfbb 13979 if test "$cross_compiling" = yes; then :
1a619819
LM
13980 gdb_cv_printf_has_decfloat=no
13981else
81ecdfbb 13982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13983/* end confdefs.h. */
13984$ac_includes_default
13985int
13986main ()
13987{
13988char buf[64];
13989 _Decimal32 d32 = 1.2345df;
13990 _Decimal64 d64 = 1.2345dd;
13991 _Decimal128 d128 = 1.2345dl;
13992 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13993 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13994 ;
13995 return 0;
13996}
13997_ACEOF
81ecdfbb 13998if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13999 gdb_cv_printf_has_decfloat=yes
14000else
81ecdfbb 14001 gdb_cv_printf_has_decfloat=no
1a619819 14002fi
81ecdfbb
RW
14003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14004 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14005fi
81ecdfbb 14006
1a619819 14007fi
81ecdfbb
RW
14008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14009$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14010if test $gdb_cv_printf_has_decfloat = yes; then
14011
81ecdfbb 14012$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14013
14014fi
14015
bc8bcb4b
MK
14016# Check if the compiler supports the `long double' type. We can't use
14017# AC_C_LONG_DOUBLE because that one does additional checks on the
14018# constants defined in <float.h> that fail on some systems,
14019# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14020
81ecdfbb
RW
14021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14022$as_echo_n "checking for long double support in compiler... " >&6; }
14023if test "${gdb_cv_c_long_double+set}" = set; then :
14024 $as_echo_n "(cached) " >&6
97bf5e38 14025else
81ecdfbb 14026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14027/* end confdefs.h. */
97bf5e38 14028long double foo;
bec39cab 14029_ACEOF
81ecdfbb 14030if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14031 gdb_cv_c_long_double=yes
97bf5e38 14032else
81ecdfbb 14033 gdb_cv_c_long_double=no
97bf5e38 14034fi
81ecdfbb 14035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14036fi
81ecdfbb
RW
14037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14038$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14039if test $gdb_cv_c_long_double = yes; then
c906108c 14040
81ecdfbb 14041$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14042
14043fi
14044
bc8bcb4b 14045# Check if the compiler and runtime support printing long doubles.
97bf5e38 14046
81ecdfbb
RW
14047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14048$as_echo_n "checking for long double support in printf... " >&6; }
14049if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14050 $as_echo_n "(cached) " >&6
97bf5e38 14051else
81ecdfbb 14052 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14053 gdb_cv_printf_has_long_double=no
14054else
81ecdfbb 14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14056/* end confdefs.h. */
bc8bcb4b
MK
14057$ac_includes_default
14058int
14059main ()
14060{
14061char buf[16];
97bf5e38
MK
14062 long double f = 3.141592653;
14063 sprintf (buf, "%Lg", f);
14064 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14065 ;
14066 return 0;
97bf5e38 14067}
bec39cab 14068_ACEOF
81ecdfbb 14069if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14070 gdb_cv_printf_has_long_double=yes
c906108c 14071else
81ecdfbb 14072 gdb_cv_printf_has_long_double=no
c906108c 14073fi
81ecdfbb
RW
14074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14075 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14076fi
81ecdfbb 14077
c906108c 14078fi
81ecdfbb
RW
14079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14080$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14081if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14082
81ecdfbb 14083$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14084
14085fi
97bf5e38 14086
bc8bcb4b 14087# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14088
81ecdfbb
RW
14089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14090$as_echo_n "checking for long double support in scanf... " >&6; }
14091if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14092 $as_echo_n "(cached) " >&6
97bf5e38 14093else
81ecdfbb 14094 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14095 gdb_cv_scanf_has_long_double=no
14096else
81ecdfbb 14097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14098/* end confdefs.h. */
bc8bcb4b
MK
14099#include <stdio.h>
14100int
14101main ()
14102{
14103char *buf = "3.141592653";
97bf5e38
MK
14104 long double f = 0;
14105 sscanf (buf, "%Lg", &f);
14106 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14107 ;
14108 return 0;
97bf5e38 14109}
bec39cab 14110_ACEOF
81ecdfbb 14111if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14112 gdb_cv_scanf_has_long_double=yes
14113else
81ecdfbb 14114 gdb_cv_scanf_has_long_double=no
97bf5e38 14115fi
81ecdfbb
RW
14116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14118fi
81ecdfbb 14119
c906108c 14120fi
81ecdfbb
RW
14121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14122$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14123if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14124
81ecdfbb 14125$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14126
14127fi
c906108c 14128
438013df
AO
14129case ${host_os} in
14130aix*)
81ecdfbb
RW
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14132$as_echo_n "checking for -bbigtoc option... " >&6; }
14133if test "${gdb_cv_bigtoc+set}" = set; then :
14134 $as_echo_n "(cached) " >&6
438013df 14135else
bec39cab 14136
438013df
AO
14137 SAVE_LDFLAGS=$LDFLAGS
14138
14139 case $GCC in
14140 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14141 *) gdb_cv_bigtoc=-bbigtoc ;;
14142 esac
14143
14144 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14146/* end confdefs.h. */
438013df 14147
bec39cab
AC
14148int
14149main ()
14150{
438013df 14151int i;
bec39cab
AC
14152 ;
14153 return 0;
14154}
14155_ACEOF
81ecdfbb 14156if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14157
81ecdfbb
RW
14158else
14159 gdb_cv_bigtoc=
438013df 14160fi
81ecdfbb
RW
14161rm -f core conftest.err conftest.$ac_objext \
14162 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14163 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14164
bec39cab 14165fi
81ecdfbb
RW
14166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14167$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14168 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14169 ;;
14170esac
14171
c906108c
SS
14172
14173
14174if test ${build} = ${host} -a ${host} = ${target} ; then
f6528abd
JK
14175 if test "$GCC" = "yes" ; then
14176 # The dynamically loaded libthread_db needs access to symbols in the gdb
14177 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14178 # may not be supported there.
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14180$as_echo_n "checking for the dynamic export flag... " >&6; }
14181 old_LDFLAGS="$LDFLAGS"
14182 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14183 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14184 LDFLAGS="$LDFLAGS $RDYNAMIC"
14185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14186/* end confdefs.h. */
14187
14188int
14189main ()
14190{
14191
14192 ;
14193 return 0;
14194}
14195_ACEOF
14196if ac_fn_c_try_link "$LINENO"; then :
14197 found="-Wl,--dynamic-list"
14198 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14199else
14200 RDYNAMIC="-rdynamic"
14201 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
14202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14203/* end confdefs.h. */
14204
14205int
14206main ()
14207{
14208
14209 ;
14210 return 0;
14211}
14212_ACEOF
14213if ac_fn_c_try_link "$LINENO"; then :
14214 found="-rdynamic"
14215else
14216 found="no"
14217 # Error on its usage by .mh file.
14218 RDYNAMIC="no-rdynamic-available"
14219fi
14220rm -f core conftest.err conftest.$ac_objext \
14221 conftest$ac_exeext conftest.$ac_ext
14222fi
14223rm -f core conftest.err conftest.$ac_objext \
14224 conftest$ac_exeext conftest.$ac_ext
14225
14226 LDFLAGS="$old_LDFLAGS"
14227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14228$as_echo "$found" >&6; }
14229 fi
14230
c906108c
SS
14231 case ${host_os} in
14232 hpux*)
81ecdfbb
RW
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
14234$as_echo_n "checking for HPUX/OSF thread support... " >&6; }
c906108c
SS
14235 if test -f /usr/include/dce/cma_config.h ; then
14236 if test "$GCC" = "yes" ; then
81ecdfbb
RW
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14238$as_echo "yes" >&6; }
60ca704f 14239
81ecdfbb 14240$as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h
c906108c 14241
3483b318 14242 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
14243 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
14244 else
81ecdfbb
RW
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5
14246$as_echo "no (suppressed because you are not using GCC)" >&6; }
c906108c
SS
14247 fi
14248 else
81ecdfbb
RW
14249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
c906108c
SS
14251 fi
14252 ;;
14253 solaris*)
d92419e5
JB
14254 # See if thread_db library is around for Solaris thread debugging.
14255 # Note that we must explicitly test for version 1 of the library
14256 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14257 # the same API.
81ecdfbb
RW
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14259$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14260 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14262$as_echo "yes" >&6; }
60ca704f 14263
81ecdfbb 14264$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14265
3483b318 14266 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14267 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14269$as_echo_n "checking for dlopen in -ldl... " >&6; }
14270if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14271 $as_echo_n "(cached) " >&6
c906108c 14272else
bec39cab 14273 ac_check_lib_save_LIBS=$LIBS
c906108c 14274LIBS="-ldl $LIBS"
81ecdfbb 14275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14276/* end confdefs.h. */
14277
81ecdfbb
RW
14278/* Override any GCC internal prototype to avoid an error.
14279 Use char because int might match the return type of a GCC
14280 builtin and then its argument prototype would still apply. */
bec39cab
AC
14281#ifdef __cplusplus
14282extern "C"
14283#endif
bec39cab
AC
14284char dlopen ();
14285int
14286main ()
14287{
81ecdfbb 14288return dlopen ();
bec39cab
AC
14289 ;
14290 return 0;
14291}
14292_ACEOF
81ecdfbb 14293if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14294 ac_cv_lib_dl_dlopen=yes
14295else
81ecdfbb 14296 ac_cv_lib_dl_dlopen=no
bec39cab 14297fi
81ecdfbb
RW
14298rm -f core conftest.err conftest.$ac_objext \
14299 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14300LIBS=$ac_check_lib_save_LIBS
14301fi
81ecdfbb
RW
14302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14303$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14304if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14305 cat >>confdefs.h <<_ACEOF
14306#define HAVE_LIBDL 1
14307_ACEOF
c906108c
SS
14308
14309 LIBS="-ldl $LIBS"
14310
c906108c
SS
14311fi
14312
f6528abd 14313 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14314 # Sun randomly tweaked the prototypes in <proc_service.h>
14315 # at one point.
81ecdfbb
RW
14316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14317$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14318 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14319 $as_echo_n "(cached) " >&6
c906108c 14320else
bec39cab 14321
81ecdfbb 14322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14323/* end confdefs.h. */
c906108c
SS
14324
14325 #include <proc_service.h>
14326 ps_err_e ps_pdwrite
14327 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14328
bec39cab
AC
14329int
14330main ()
14331{
14332
14333 ;
14334 return 0;
14335}
14336_ACEOF
81ecdfbb 14337if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14338 gdb_cv_proc_service_is_old=no
14339else
81ecdfbb 14340 gdb_cv_proc_service_is_old=yes
c906108c 14341fi
81ecdfbb 14342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14343
c906108c
SS
14344fi
14345
81ecdfbb
RW
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14347$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14348 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14349
81ecdfbb 14350$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14351
14352 fi
14353 else
81ecdfbb
RW
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355$as_echo "no" >&6; }
c906108c
SS
14356 fi
14357 ;;
d92419e5 14358 aix*)
81ecdfbb
RW
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14360$as_echo_n "checking for AiX thread debugging library... " >&6; }
14361 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14362 $as_echo_n "(cached) " >&6
bec39cab 14363else
81ecdfbb 14364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14365/* end confdefs.h. */
d92419e5 14366#include <sys/pthdebug.h>
bec39cab
AC
14367int
14368main ()
14369{
d92419e5
JB
14370#ifndef PTHDB_VERSION_3
14371 #error
14372 #endif
bec39cab
AC
14373 ;
14374 return 0;
14375}
14376_ACEOF
81ecdfbb 14377if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14378 gdb_cv_have_aix_thread_debug=yes
14379else
81ecdfbb 14380 gdb_cv_have_aix_thread_debug=no
d92419e5 14381fi
81ecdfbb 14382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14383fi
14384
81ecdfbb
RW
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14386$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14387 if test $gdb_cv_have_aix_thread_debug = yes; then
14388 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14389 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
14390 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
14391 fi
14392 ;;
c906108c 14393 esac
bec39cab 14394
c906108c
SS
14395fi
14396
3f47be5c 14397if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14399$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14400if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14401 $as_echo_n "(cached) " >&6
bec39cab 14402else
81ecdfbb 14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14404/* end confdefs.h. */
3f47be5c 14405#include <thread_db.h>
bec39cab
AC
14406int
14407main ()
14408{
3f47be5c 14409int i = TD_NOTALLOC;
bec39cab
AC
14410 ;
14411 return 0;
14412}
14413_ACEOF
81ecdfbb 14414if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14415 gdb_cv_thread_db_h_has_td_notalloc=yes
14416else
81ecdfbb 14417 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14418
3f47be5c 14419fi
81ecdfbb 14420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14421
bec39cab 14422fi
81ecdfbb
RW
14423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14424$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14426$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14427if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14428 $as_echo_n "(cached) " >&6
59f80f10 14429else
81ecdfbb 14430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14431/* end confdefs.h. */
14432#include <thread_db.h>
14433int
14434main ()
14435{
14436int i = TD_VERSION;
14437 ;
14438 return 0;
14439}
14440_ACEOF
81ecdfbb 14441if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14442 gdb_cv_thread_db_h_has_td_version=yes
14443else
81ecdfbb 14444 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14445
14446fi
81ecdfbb 14447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14448
14449fi
81ecdfbb
RW
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14451$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14453$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14454if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14455 $as_echo_n "(cached) " >&6
59f80f10 14456else
81ecdfbb 14457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14458/* end confdefs.h. */
14459#include <thread_db.h>
14460int
14461main ()
14462{
14463int i = TD_NOTLS;
14464 ;
14465 return 0;
14466}
14467_ACEOF
81ecdfbb 14468if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14469 gdb_cv_thread_db_h_has_td_notls=yes
14470else
81ecdfbb 14471 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14472
14473fi
81ecdfbb 14474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14475
14476fi
81ecdfbb
RW
14477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14478$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14479fi
14480if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14481
81ecdfbb 14482$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14483
59f80f10
DJ
14484fi
14485if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14486
81ecdfbb 14487$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14488
14489fi
14490if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14491
81ecdfbb 14492$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14493
3f47be5c
EZ
14494fi
14495
b757528f 14496if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14498$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14499if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14500 $as_echo_n "(cached) " >&6
bec39cab 14501else
81ecdfbb 14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14503/* end confdefs.h. */
b757528f 14504#include <sys/syscall.h>
bec39cab
AC
14505int
14506main ()
14507{
b757528f 14508int i = __NR_tkill;
bec39cab
AC
14509 ;
14510 return 0;
14511}
14512_ACEOF
81ecdfbb 14513if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14514 gdb_cv_sys_syscall_h_has_tkill=yes
14515else
81ecdfbb 14516 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14517
b757528f 14518fi
81ecdfbb 14519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14520
bec39cab 14521fi
81ecdfbb
RW
14522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14523$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14524fi
14525if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14526
81ecdfbb 14527$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14528
14529fi
14530
81ecdfbb
RW
14531ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14532"
14533if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14534 ac_have_decl=1
10568435 14535else
81ecdfbb 14536 ac_have_decl=0
10568435 14537fi
10568435
JK
14538
14539cat >>confdefs.h <<_ACEOF
81ecdfbb 14540#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14541_ACEOF
14542
14543
81ecdfbb
RW
14544if test "$cross_compiling" = yes; then :
14545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14546/* end confdefs.h. */
14547#include <sys/personality.h>
14548int
14549main ()
14550{
14551
14552# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14553# define ADDR_NO_RANDOMIZE 0x0040000
14554# endif
14555 /* Test the flag could be set and stays set. */
14556 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14557 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14558 return 1
14559 ;
14560 return 0;
14561}
14562_ACEOF
81ecdfbb 14563if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14564 have_personality=true
14565else
81ecdfbb 14566 have_personality=false
10568435 14567fi
81ecdfbb
RW
14568rm -f core conftest.err conftest.$ac_objext \
14569 conftest$ac_exeext conftest.$ac_ext
10568435 14570else
81ecdfbb 14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14572/* end confdefs.h. */
14573#include <sys/personality.h>
14574int
14575main ()
14576{
14577
14578# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14579# define ADDR_NO_RANDOMIZE 0x0040000
14580# endif
14581 /* Test the flag could be set and stays set. */
14582 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14583 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14584 return 1
14585 ;
14586 return 0;
14587}
14588_ACEOF
81ecdfbb 14589if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14590 have_personality=true
14591else
81ecdfbb 14592 have_personality=false
10568435 14593fi
81ecdfbb
RW
14594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14595 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14596fi
81ecdfbb 14597
10568435
JK
14598if $have_personality
14599then
14600
81ecdfbb 14601$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14602
14603fi
14604
fb40c209 14605
b14b1491 14606target_sysroot_reloc=0
bec39cab 14607
81ecdfbb
RW
14608# Check whether --with-sysroot was given.
14609if test "${with_sysroot+set}" = set; then :
14610 withval=$with_sysroot;
030292b7 14611 case ${with_sysroot} in
715d1656 14612 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14613 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14614 esac
14615
14616 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14617
07abfebf
RS
14618 if test "x$prefix" = xNONE; then
14619 test_prefix=/usr/local
14620 else
14621 test_prefix=$prefix
14622 fi
aa28a74e 14623 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14624 test_exec_prefix=$test_prefix
030292b7 14625 else
07abfebf 14626 test_exec_prefix=$exec_prefix
030292b7
DJ
14627 fi
14628 case ${TARGET_SYSTEM_ROOT} in
715d1656 14629 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14630 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14631 '${prefix}'|'${prefix}/'*|\
715d1656 14632 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14633 target_sysroot_reloc=1
030292b7
DJ
14634 ;;
14635 esac
14636
14637else
bec39cab 14638
030292b7
DJ
14639 TARGET_SYSTEM_ROOT=
14640 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14641
81ecdfbb 14642fi
b14b1491 14643
81ecdfbb 14644TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14645
14646
14647
16e7150e 14648
16e7150e 14649
81ecdfbb
RW
14650# Check whether --with-system-gdbinit was given.
14651if test "${with_system_gdbinit+set}" = set; then :
14652 withval=$with_system_gdbinit;
b14b1491
TT
14653 SYSTEM_GDBINIT=$withval
14654else
14655 SYSTEM_GDBINIT=
81ecdfbb
RW
14656fi
14657
16e7150e
JG
14658
14659 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14660 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14661 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14662 ac_define_dir=`eval echo $ac_define_dir`
14663
14664cat >>confdefs.h <<_ACEOF
14665#define SYSTEM_GDBINIT "$ac_define_dir"
14666_ACEOF
14667
14668
14669
0c4a4063 14670
b14b1491
TT
14671 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14672 if test "x$prefix" = xNONE; then
14673 test_prefix=/usr/local
14674 else
14675 test_prefix=$prefix
14676 fi
14677 else
14678 test_prefix=$exec_prefix
14679 fi
14680 value=0
14681 case ${ac_define_dir} in
14682 "${test_prefix}"|"${test_prefix}/"*|\
14683 '${exec_prefix}'|'${exec_prefix}/'*)
14684 value=1
14685 ;;
14686 esac
16e7150e 14687
b14b1491
TT
14688cat >>confdefs.h <<_ACEOF
14689#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14690_ACEOF
14691
b14b1491 14692
16e7150e 14693
0c4a4063 14694
81ecdfbb
RW
14695# Check whether --enable-werror was given.
14696if test "${enable_werror+set}" = set; then :
14697 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14698 yes | y) ERROR_ON_WARNING="yes" ;;
14699 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14700 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14701 esac
81ecdfbb
RW
14702fi
14703
094a342e
MK
14704
14705# Enable -Werror by default when using gcc
14706if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14707 ERROR_ON_WARNING=yes
14708fi
14709
14710WERROR_CFLAGS=""
14711if test "${ERROR_ON_WARNING}" = yes ; then
14712 WERROR_CFLAGS="-Werror"
14713fi
14714
aa79a185
DJ
14715# The entries after -Wno-pointer-sign are disabled warnings which may
14716# be enabled in the future, which can not currently be used to build
14717# GDB.
14718# NOTE: If you change this list, remember to update
3b851bce 14719# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14720build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14721-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14722-Wno-unused -Wunused-value -Wunused-function \
14723-Wno-switch -Wno-char-subscripts"
a3b362c4 14724
3526781e
DJ
14725# Enable -Wno-format by default when using gcc on mingw since many
14726# GCC versions complain about %I64.
14727case "${host}" in
14728 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14729esac
14730
81ecdfbb
RW
14731# Check whether --enable-build-warnings was given.
14732if test "${enable_build_warnings+set}" = set; then :
14733 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14734 yes) ;;
14735 no) build_warnings="-w";;
14736 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14737 build_warnings="${build_warnings} ${t}";;
14738 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14739 build_warnings="${t} ${build_warnings}";;
14740 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14741esac
d4f3574e 14742if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14743 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14744fi
81ecdfbb
RW
14745fi
14746# Check whether --enable-gdb-build-warnings was given.
14747if test "${enable_gdb_build_warnings+set}" = set; then :
14748 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14749 yes) ;;
14750 no) build_warnings="-w";;
14751 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14752 build_warnings="${build_warnings} ${t}";;
14753 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14754 build_warnings="${t} ${build_warnings}";;
14755 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14756esac
14757if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14758 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14759fi
81ecdfbb
RW
14760fi
14761WARN_CFLAGS=""
c906108c
SS
14762if test "x${build_warnings}" != x -a "x$GCC" = xyes
14763then
81ecdfbb
RW
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14765$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14766 # Separate out the -Werror flag as some files just cannot be
14767 # compiled with it enabled.
14768 for w in ${build_warnings}; do
14769 case $w in
14770 -Werr*) WERROR_CFLAGS=-Werror ;;
14771 *) # Check that GCC accepts it
4536bbc6
AC
14772 saved_CFLAGS="$CFLAGS"
14773 CFLAGS="$CFLAGS $w"
81ecdfbb 14774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14775/* end confdefs.h. */
4536bbc6 14776
bec39cab
AC
14777int
14778main ()
14779{
4536bbc6 14780
bec39cab
AC
14781 ;
14782 return 0;
14783}
14784_ACEOF
81ecdfbb 14785if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14786 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14787fi
81ecdfbb 14788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14789 CFLAGS="$saved_CFLAGS"
746a987d
AC
14790 esac
14791 done
81ecdfbb
RW
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14793$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14794fi
14795
14796
104c1213 14797
7a292a7a 14798# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14800$as_echo_n "checking for cygwin... " >&6; }
14801if test "${gdb_cv_os_cygwin+set}" = set; then :
14802 $as_echo_n "(cached) " >&6
bec39cab 14803else
81ecdfbb 14804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14805/* end confdefs.h. */
7a292a7a
SS
14806
14807#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14808lose
14809#endif
bec39cab 14810_ACEOF
7a292a7a 14811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 14812 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
14813 gdb_cv_os_cygwin=yes
14814else
7a292a7a
SS
14815 gdb_cv_os_cygwin=no
14816fi
14817rm -f conftest*
14818
14819fi
81ecdfbb
RW
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14821$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14822
aff38e61 14823
3eb25fda 14824SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14825case ${host} in
95cbc983
AC
14826 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14827 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14828 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14829esac
14830
14831
cd0fc7c3
SS
14832# libreadline needs libuser32.a in a cygwin environment
14833WIN32LIBS=
14834if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14835 WIN32LIBS="-luser32"
14836 case "${target}" in
14837 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14838 ;;
14839 esac
cd0fc7c3 14840fi
c906108c 14841
b4505029
MM
14842# The ser-tcp.c module requires sockets.
14843case ${host} in
14844 *mingw32*)
14845
81ecdfbb 14846$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14847
14848 WIN32LIBS="$WIN32LIBS -lws2_32"
14849 ;;
14850esac
14851
7a292a7a 14852
31d99776
DJ
14853# Add ELF support to GDB, but only if BFD includes ELF support.
14854OLD_CFLAGS=$CFLAGS
14855OLD_LDFLAGS=$LDFLAGS
14856OLD_LIBS=$LIBS
cab58a69 14857CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 14858LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 14859intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 14860LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
14861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
14862$as_echo_n "checking for ELF support in BFD... " >&6; }
14863if test "${gdb_cv_var_elf+set}" = set; then :
14864 $as_echo_n "(cached) " >&6
31d99776 14865else
81ecdfbb 14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14867/* end confdefs.h. */
14868#include <stdlib.h>
14869#include "bfd.h"
14870#include "elf-bfd.h"
14871
14872int
14873main ()
14874{
14875bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
14876 ;
14877 return 0;
14878}
14879_ACEOF
81ecdfbb 14880if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14881 gdb_cv_var_elf=yes
14882else
81ecdfbb 14883 gdb_cv_var_elf=no
31d99776 14884fi
81ecdfbb
RW
14885rm -f core conftest.err conftest.$ac_objext \
14886 conftest$ac_exeext conftest.$ac_ext
31d99776 14887fi
81ecdfbb
RW
14888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14889$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
14890if test $gdb_cv_var_elf = yes; then
14891 CONFIG_OBS="$CONFIG_OBS elfread.o"
14892
81ecdfbb 14893$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776
DJ
14894
14895fi
14896CFLAGS=$OLD_CFLAGS
14897LDFLAGS=$OLD_LDFLAGS
14898LIBS=$OLD_LIBS
14899
121ce6e5
DJ
14900# Add any host-specific objects to GDB.
14901CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14902
3fc11d3e
JM
14903LIBGUI="../libgui/src/libgui.a"
14904GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14905
14906
7a292a7a 14907
3fc11d3e
JM
14908WIN32LDAPP=
14909
14910
14911
d91670b9 14912case "${host}" in
686a5eed 14913*-*-cygwin* | *-*-mingw* )
d91670b9
CV
14914 configdir="win"
14915 ;;
14916*)
14917 configdir="unix"
14918 ;;
14919esac
3fc11d3e
JM
14920
14921GDBTKLIBS=
14922if test "${enable_gdbtk}" = "yes"; then
14923
d1c3b63a
KS
14924 # Gdbtk must have an absolute path to srcdir in order to run
14925 # properly when not installed.
14926 here=`pwd`
14927 cd ${srcdir}
14928 GDBTK_SRC_DIR=`pwd`
14929 cd $here
14930
bec39cab 14931
5062cc19
KS
14932 #
14933 # Ok, lets find the tcl configuration
14934 # First, look for one uninstalled.
14935 # the alternative search directory is invoked by --with-tcl
14936 #
3fc11d3e 14937
5062cc19
KS
14938 if test x"${no_tcl}" = x ; then
14939 # we reset no_tcl in case something fails here
14940 no_tcl=true
bec39cab 14941
81ecdfbb
RW
14942# Check whether --with-tcl was given.
14943if test "${with_tcl+set}" = set; then :
14944 withval=$with_tcl; with_tclconfig=${withval}
14945fi
14946
14947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14948$as_echo_n "checking for Tcl configuration... " >&6; }
14949 if test "${ac_cv_c_tclconfig+set}" = set; then :
14950 $as_echo_n "(cached) " >&6
3fc11d3e 14951else
bec39cab 14952
3fc11d3e 14953
5062cc19
KS
14954 # First check to see if --with-tcl was specified.
14955 case "${host}" in
14956 *-*-cygwin*) platDir="win" ;;
14957 *) platDir="unix" ;;
14958 esac
14959 if test x"${with_tclconfig}" != x ; then
14960 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14961 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14962 else
81ecdfbb 14963 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
14964 fi
14965 fi
14966
14967 # then check for a private Tcl installation
14968 if test x"${ac_cv_c_tclconfig}" = x ; then
14969 for i in \
14970 ../tcl \
14971 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14972 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14973 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14974 ../../tcl \
14975 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14976 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14977 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14978 ../../../tcl \
14979 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14980 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14981 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14982 if test -f "$i/$platDir/tclConfig.sh" ; then
14983 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14984 break
14985 fi
14986 done
14987 fi
14988
14989 # on Darwin, check in Framework installation locations
14990 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14991 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14992 `ls -d /Library/Frameworks 2>/dev/null` \
14993 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14994 `ls -d /System/Library/Frameworks 2>/dev/null` \
14995 ; do
14996 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14997 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14998 break
14999 fi
15000 done
15001 fi
15002
15003 # check in a few common install locations
15004 if test x"${ac_cv_c_tclconfig}" = x ; then
15005 for i in `ls -d ${libdir} 2>/dev/null` \
15006 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15007 `ls -d ${prefix}/lib 2>/dev/null` \
15008 `ls -d /usr/local/lib 2>/dev/null` \
15009 `ls -d /usr/contrib/lib 2>/dev/null` \
15010 `ls -d /usr/lib 2>/dev/null` \
15011 ; do
15012 if test -f "$i/tclConfig.sh" ; then
15013 ac_cv_c_tclconfig=`(cd $i; pwd)`
15014 break
15015 fi
15016 done
15017 fi
3fc11d3e 15018
5062cc19
KS
15019 # check in a few other private locations
15020 if test x"${ac_cv_c_tclconfig}" = x ; then
15021 for i in \
15022 ${srcdir}/../tcl \
15023 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15024 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15025 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15026 if test -f "$i/$platDir/tclConfig.sh" ; then
15027 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15028 break
15029 fi
15030 done
15031 fi
bec39cab 15032
3fc11d3e
JM
15033fi
15034
5062cc19
KS
15035
15036 if test x"${ac_cv_c_tclconfig}" = x ; then
15037 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15039$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15040 else
15041 no_tcl=
15042 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15044$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15045 fi
15046 fi
3fc11d3e 15047
bec39cab 15048
85541719
DE
15049 # If $no_tk is nonempty, then we can't do Tk, and there is no
15050 # point to doing Tcl.
bec39cab 15051
5062cc19
KS
15052 #
15053 # Ok, lets find the tk configuration
15054 # First, look for one uninstalled.
15055 # the alternative search directory is invoked by --with-tk
15056 #
3fc11d3e 15057
5062cc19
KS
15058 if test x"${no_tk}" = x ; then
15059 # we reset no_tk in case something fails here
15060 no_tk=true
bec39cab 15061
81ecdfbb
RW
15062# Check whether --with-tk was given.
15063if test "${with_tk+set}" = set; then :
15064 withval=$with_tk; with_tkconfig=${withval}
15065fi
15066
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15068$as_echo_n "checking for Tk configuration... " >&6; }
15069 if test "${ac_cv_c_tkconfig+set}" = set; then :
15070 $as_echo_n "(cached) " >&6
bec39cab 15071else
3fc11d3e
JM
15072
15073
5062cc19
KS
15074 # First check to see if --with-tkconfig was specified.
15075 if test x"${with_tkconfig}" != x ; then
15076 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15077 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15078 else
81ecdfbb 15079 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15080 fi
15081 fi
3fc11d3e 15082
5062cc19
KS
15083 # then check for a private Tk library
15084 case "${host}" in
15085 *-*-cygwin*) platDir="win" ;;
15086 *) platDir="unix" ;;
15087 esac
15088 if test x"${ac_cv_c_tkconfig}" = x ; then
15089 for i in \
15090 ../tk \
15091 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15092 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15093 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15094 ../../tk \
15095 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15096 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15097 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15098 ../../../tk \
15099 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15100 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15101 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15102 if test -f "$i/$platDir/tkConfig.sh" ; then
15103 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15104 break
15105 fi
15106 done
15107 fi
15108
15109 # on Darwin, check in Framework installation locations
15110 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15111 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15112 `ls -d /Library/Frameworks 2>/dev/null` \
15113 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15114 `ls -d /System/Library/Frameworks 2>/dev/null` \
15115 ; do
15116 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15117 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15118 break
15119 fi
15120 done
15121 fi
15122
15123 # check in a few common install locations
15124 if test x"${ac_cv_c_tkconfig}" = x ; then
15125 for i in `ls -d ${libdir} 2>/dev/null` \
15126 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15127 `ls -d ${prefix}/lib 2>/dev/null` \
15128 `ls -d /usr/local/lib 2>/dev/null` \
15129 `ls -d /usr/contrib/lib 2>/dev/null` \
15130 `ls -d /usr/lib 2>/dev/null` \
15131 ; do
15132 if test -f "$i/tkConfig.sh" ; then
15133 ac_cv_c_tkconfig=`(cd $i; pwd)`
15134 break
15135 fi
15136 done
15137 fi
15138 # check in a few other private locations
15139 if test x"${ac_cv_c_tkconfig}" = x ; then
15140 for i in \
15141 ${srcdir}/../tk \
15142 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15143 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15144 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15145 if test -f "$i/$platDir/tkConfig.sh" ; then
15146 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15147 break
15148 fi
15149 done
15150 fi
3fc11d3e 15151
3fc11d3e
JM
15152fi
15153
15154
5062cc19
KS
15155 if test x"${ac_cv_c_tkconfig}" = x ; then
15156 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15158$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15159 else
15160 no_tk=
15161 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15163$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15164 fi
3fc11d3e 15165 fi
dd2504ab 15166
dd2504ab 15167
85541719
DE
15168 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15169
81ecdfbb
RW
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15171$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15172
15173 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15175$as_echo "loading" >&6; }
85541719
DE
15176 . ${TCL_BIN_DIR}/tclConfig.sh
15177 else
81ecdfbb
RW
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15179$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15180 fi
15181
15182 # eval is required to do the TCL_DBGX substitution
15183 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15184 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15185
15186 # If the TCL_BIN_DIR is the build directory (not the install directory),
15187 # then set the common variable name to the value of the build variables.
15188 # For example, the variable TCL_LIB_SPEC will be set to the value
15189 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15190 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15191 # installed and uninstalled version of Tcl.
15192 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15193 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15194 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15195 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15196 elif test "`uname -s`" = "Darwin"; then
15197 # If Tcl was built as a framework, attempt to use the libraries
15198 # from the framework at the given location so that linking works
15199 # against Tcl.framework installed in an arbitary location.
15200 case ${TCL_DEFS} in
15201 *TCL_FRAMEWORK*)
15202 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15203 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15204 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15205 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15206 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15207 break
15208 fi
15209 done
15210 fi
15211 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15212 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15213 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15214 fi
15215 ;;
15216 esac
15217 fi
15218
15219 # eval is required to do the TCL_DBGX substitution
15220 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15221 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15222 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15223 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239 # Check for in-tree tcl
15240 here=`pwd`
15241 cd ${srcdir}/..
15242 topdir=`pwd`
15243 cd ${here}
15244
15245 intree="no"
15246 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15247 intree="yes"
15248 fi
15249
15250 # Find Tcl private headers
15251 if test x"${intree}" = xno; then
15252
81ecdfbb
RW
15253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15254$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15255 private_dir=""
15256 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15257 if test -f ${dir}/tclInt.h ; then
15258 private_dir=${dir}
15259 fi
15260
15261 if test x"${private_dir}" = x; then
81ecdfbb 15262 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15263 else
15264 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15266$as_echo "${private_dir}" >&6; }
85541719
DE
15267 fi
15268
15269 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15270 TCL_LIBRARY="${TCL_LIB_SPEC}"
15271 TCL_DEPS=""
15272 else
15273 # If building tcl in the same src tree, private headers
15274 # are not needed, but we need to be sure to use the right
15275 # headers library
15276 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15277 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15278 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15279 fi
15280
15281
15282
15283
15284
81ecdfbb
RW
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15286$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15287
5062cc19 15288 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15290$as_echo "loading" >&6; }
5062cc19 15291 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15292 else
81ecdfbb
RW
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15294$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15295 fi
bec39cab 15296
5062cc19
KS
15297 # eval is required to do the TK_DBGX substitution
15298 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15299 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15300
15301 # If the TK_BIN_DIR is the build directory (not the install directory),
15302 # then set the common variable name to the value of the build variables.
15303 # For example, the variable TK_LIB_SPEC will be set to the value
15304 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15305 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15306 # installed and uninstalled version of Tcl.
85541719 15307 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15308 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15309 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15310 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15311 elif test "`uname -s`" = "Darwin"; then
15312 # If Tk was built as a framework, attempt to use the libraries
15313 # from the framework at the given location so that linking works
15314 # against Tk.framework installed in an arbitary location.
15315 case ${TK_DEFS} in
15316 *TK_FRAMEWORK*)
85541719 15317 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15318 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15319 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15320 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15321 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15322 break
15323 fi
15324 done
15325 fi
85541719 15326 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15327 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15328 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15329 fi
15330 ;;
15331 esac
3fc11d3e
JM
15332 fi
15333
5062cc19
KS
15334 # eval is required to do the TK_DBGX substitution
15335 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15336 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15337 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15338 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15339
3fc11d3e
JM
15340
15341
bec39cab
AC
15342
15343
15344
15345
15346
15347
15348
3fc11d3e 15349
3fc11d3e 15350
bec39cab 15351
bec39cab 15352
85541719
DE
15353 # Check for in-tree Tk
15354 intree="no"
15355 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15356 intree="yes"
15357 fi
3fc11d3e 15358
85541719
DE
15359 # Find Tk private headers
15360 if test x"${intree}" = xno; then
3fc11d3e 15361
81ecdfbb
RW
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15363$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15364 private_dir=""
15365 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15366 if test -f ${dir}/tkInt.h; then
15367 private_dir=${dir}
3fc11d3e 15368 fi
bec39cab 15369
5062cc19 15370 if test x"${private_dir}" = x; then
81ecdfbb 15371 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15372 else
5062cc19 15373 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15375$as_echo "${private_dir}" >&6; }
3fc11d3e 15376 fi
3fc11d3e 15377
85541719
DE
15378 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15379 TK_LIBRARY=${TK_LIB_SPEC}
15380 TK_DEPS=""
15381 else
15382 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15383 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15384 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15385 fi
3fc11d3e
JM
15386
15387
3fc11d3e
JM
15388
15389
3fc11d3e 15390
85541719 15391 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15392
85541719
DE
15393 # Include some libraries that Tcl and Tk want.
15394 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15395 # Yes, the ordering seems wrong here. But it isn't.
15396 # TK_LIBS is the list of libraries that need to be linked
15397 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15398 # were in LIBS then any link tests after this point would
15399 # try to include things like `$(LIBGUI)', which wouldn't work.
15400 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15401
85541719
DE
15402 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15403 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15404 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15405 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15406 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15407 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15408 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15409
85541719
DE
15410 if test x$gdb_cv_os_cygwin = xyes; then
15411 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15412 WIN32LDAPP="-Wl,--subsystem,console"
15413 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15414 fi
ffc6a242 15415
81ecdfbb 15416 subdirs="$subdirs gdbtk"
3ace7edb 15417
85541719 15418 fi
3fc11d3e
JM
15419fi
15420
15421
15422
15423
15424
15425
15426
15427
81ecdfbb
RW
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15429$as_echo_n "checking for X... " >&6; }
bec39cab 15430
c906108c 15431
81ecdfbb
RW
15432# Check whether --with-x was given.
15433if test "${with_x+set}" = set; then :
15434 withval=$with_x;
15435fi
c906108c
SS
15436
15437# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15438if test "x$with_x" = xno; then
15439 # The user explicitly disabled X.
15440 have_x=disabled
15441else
81ecdfbb
RW
15442 case $x_includes,$x_libraries in #(
15443 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15444 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15445 $as_echo_n "(cached) " >&6
c906108c
SS
15446else
15447 # One or both of the vars are not set, and there is no cached value.
bec39cab 15448ac_x_includes=no ac_x_libraries=no
81ecdfbb 15449rm -f -r conftest.dir
bec39cab
AC
15450if mkdir conftest.dir; then
15451 cd conftest.dir
bec39cab 15452 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15453incroot:
15454 @echo incroot='${INCROOT}'
15455usrlibdir:
15456 @echo usrlibdir='${USRLIBDIR}'
15457libdir:
15458 @echo libdir='${LIBDIR}'
15459_ACEOF
15460 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15461 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15462 for ac_var in incroot usrlibdir libdir; do
15463 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15464 done
c906108c 15465 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15466 for ac_extension in a so sl dylib la dll; do
15467 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15468 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15469 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15470 fi
15471 done
15472 # Screen out bogus values from the imake configuration. They are
15473 # bogus both because they are the default anyway, and because
15474 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15475 case $ac_im_incroot in
81ecdfbb 15476 /usr/include) ac_x_includes= ;;
bec39cab 15477 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15478 esac
bec39cab 15479 case $ac_im_usrlibdir in
81ecdfbb 15480 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15481 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15482 esac
15483 fi
15484 cd ..
81ecdfbb 15485 rm -f -r conftest.dir
c906108c
SS
15486fi
15487
bec39cab
AC
15488# Standard set of common directories for X headers.
15489# Check X11 before X11Rn because it is often a symlink to the current release.
15490ac_x_header_dirs='
15491/usr/X11/include
81ecdfbb 15492/usr/X11R7/include
bec39cab
AC
15493/usr/X11R6/include
15494/usr/X11R5/include
15495/usr/X11R4/include
15496
15497/usr/include/X11
81ecdfbb 15498/usr/include/X11R7
bec39cab
AC
15499/usr/include/X11R6
15500/usr/include/X11R5
15501/usr/include/X11R4
15502
15503/usr/local/X11/include
81ecdfbb 15504/usr/local/X11R7/include
bec39cab
AC
15505/usr/local/X11R6/include
15506/usr/local/X11R5/include
15507/usr/local/X11R4/include
15508
15509/usr/local/include/X11
81ecdfbb 15510/usr/local/include/X11R7
bec39cab
AC
15511/usr/local/include/X11R6
15512/usr/local/include/X11R5
15513/usr/local/include/X11R4
15514
15515/usr/X386/include
15516/usr/x386/include
15517/usr/XFree86/include/X11
15518
15519/usr/include
15520/usr/local/include
15521/usr/unsupported/include
15522/usr/athena/include
15523/usr/local/x11r5/include
15524/usr/lpp/Xamples/include
15525
15526/usr/openwin/include
15527/usr/openwin/share/include'
15528
15529if test "$ac_x_includes" = no; then
81ecdfbb 15530 # Guess where to find include files, by looking for Xlib.h.
c906108c 15531 # First, try using that file with no special directory specified.
81ecdfbb 15532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15533/* end confdefs.h. */
81ecdfbb 15534#include <X11/Xlib.h>
bec39cab 15535_ACEOF
81ecdfbb 15536if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15537 # We can compile using X headers with no special include directory.
15538ac_x_includes=
15539else
bec39cab 15540 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15541 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15542 ac_x_includes=$ac_dir
15543 break
15544 fi
15545done
c906108c 15546fi
bec39cab
AC
15547rm -f conftest.err conftest.$ac_ext
15548fi # $ac_x_includes = no
c906108c 15549
bec39cab 15550if test "$ac_x_libraries" = no; then
c906108c 15551 # Check for the libraries.
c906108c
SS
15552 # See if we find them without any special options.
15553 # Don't add to $LIBS permanently.
bec39cab 15554 ac_save_LIBS=$LIBS
81ecdfbb
RW
15555 LIBS="-lX11 $LIBS"
15556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15557/* end confdefs.h. */
81ecdfbb 15558#include <X11/Xlib.h>
bec39cab
AC
15559int
15560main ()
15561{
81ecdfbb 15562XrmInitialize ()
bec39cab
AC
15563 ;
15564 return 0;
15565}
15566_ACEOF
81ecdfbb 15567if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15568 LIBS=$ac_save_LIBS
c906108c
SS
15569# We can link X programs with no special library path.
15570ac_x_libraries=
15571else
81ecdfbb
RW
15572 LIBS=$ac_save_LIBS
15573for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15574do
bec39cab 15575 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15576 for ac_extension in a so sl dylib la dll; do
15577 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15578 ac_x_libraries=$ac_dir
15579 break 2
15580 fi
15581 done
15582done
15583fi
81ecdfbb
RW
15584rm -f core conftest.err conftest.$ac_objext \
15585 conftest$ac_exeext conftest.$ac_ext
bec39cab 15586fi # $ac_x_libraries = no
c906108c 15587
81ecdfbb
RW
15588case $ac_x_includes,$ac_x_libraries in #(
15589 no,* | *,no | *\'*)
15590 # Didn't find X, or a directory has "'" in its name.
15591 ac_cv_have_x="have_x=no";; #(
15592 *)
15593 # Record where we found X for the cache.
15594 ac_cv_have_x="have_x=yes\
15595 ac_x_includes='$ac_x_includes'\
15596 ac_x_libraries='$ac_x_libraries'"
15597esac
c906108c 15598fi
81ecdfbb
RW
15599;; #(
15600 *) have_x=yes;;
15601 esac
c906108c
SS
15602 eval "$ac_cv_have_x"
15603fi # $with_x != no
15604
15605if test "$have_x" != yes; then
81ecdfbb
RW
15606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15607$as_echo "$have_x" >&6; }
c906108c
SS
15608 no_x=yes
15609else
15610 # If each of the values was on the command line, it overrides each guess.
15611 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15612 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15613 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15614 ac_cv_have_x="have_x=yes\
15615 ac_x_includes='$x_includes'\
15616 ac_x_libraries='$x_libraries'"
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15618$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15619fi
15620
15621
bec39cab 15622# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15623# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15624# This code just checks for a few cases where we'd like to ignore those
15625# definitions, even when they're present in the '.mt' file. These cases
15626# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15627# not part of the source tree.
7a292a7a 15628#
81ecdfbb
RW
15629# Check whether --enable-sim was given.
15630if test "${enable_sim+set}" = set; then :
15631 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15632 echo "enableval = ${enableval}";
15633 case "${enableval}" in
15634 yes) ignore_sim=false ;;
15635 no) ignore_sim=true ;;
15636 *) ignore_sim=false ;;
15637 esac
15638else
15639 ignore_sim=false
81ecdfbb
RW
15640fi
15641
7a292a7a
SS
15642
15643if test ! -d "${srcdir}/../sim"; then
15644 ignore_sim=true
15645fi
15646
9b624dbe
UW
15647SIM=
15648SIM_OBS=
15649if test "${ignore_sim}" = "false"; then
15650 if test x"${gdb_sim}" != x ; then
15651 SIM="${gdb_sim}"
15652 SIM_OBS="remote-sim.o"
60ca704f 15653
81ecdfbb 15654$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15655
9b624dbe 15656 fi
7a292a7a
SS
15657fi
15658
15659
15660
c906108c
SS
15661
15662
15663
15664
15665
15666
dfcd3bfb 15667
e56ac5c3
AC
15668
15669
b3a90332
AC
15670
15671
c35f4ffc 15672# List of host floatformats.
bec39cab
AC
15673
15674cat >>confdefs.h <<_ACEOF
c35f4ffc 15675#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15676_ACEOF
c35f4ffc 15677
bec39cab
AC
15678
15679cat >>confdefs.h <<_ACEOF
c35f4ffc 15680#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15681_ACEOF
15682
c35f4ffc 15683
bec39cab 15684cat >>confdefs.h <<_ACEOF
c35f4ffc 15685#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15686_ACEOF
c35f4ffc
AC
15687
15688
c906108c
SS
15689# target_subdir is used by the testsuite to find the target libraries.
15690target_subdir=
15691if test "${host}" != "${target}"; then
15692 target_subdir="${target_alias}/"
15693fi
15694
15695
15696frags=
771b4502 15697if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15698 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15699 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15700 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15701 fi
15702 frags="$frags $host_makefile_frag"
15703else
15704 host_makefile_frag=/dev/null
c906108c 15705fi
c906108c 15706
c906108c
SS
15707
15708
15709
771b4502 15710if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15711# We pick this up from the host configuration file (.mh) because we
15712# do not have a native configuration Makefile fragment.
c906108c
SS
15713nativefile=`sed -n '
15714s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15715' ${host_makefile_frag}`
c906108c
SS
15716fi
15717
15718
b00a8037 15719if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15720
15721cat >>confdefs.h <<_ACEOF
b00a8037 15722#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15723_ACEOF
b00a8037
DJ
15724
15725fi
15726
8dcde887 15727# Enable multi-ice-gdb-server.
81ecdfbb
RW
15728# Check whether --enable-multi-ice was given.
15729if test "${enable_multi_ice+set}" = set; then :
15730 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15731 yes | no)
15732 ;;
81ecdfbb 15733 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15734 esac
81ecdfbb 15735fi
b4e70030 15736
81ecdfbb
RW
15737if test "x$enable_multi_ice" = xyes; then
15738 subdirs="$subdirs multi-ice"
3ace7edb 15739
a85f51e7
DJ
15740fi
15741
a13e2c95
UW
15742# We only build gdbserver automatically in a native configuration.
15743if test "$gdb_native" = "yes"; then
81ecdfbb
RW
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15745$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15746 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15748$as_echo "yes" >&6; }
15749 subdirs="$subdirs gdbserver"
3ace7edb 15750
8dcde887 15751 else
81ecdfbb
RW
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15753$as_echo "no" >&6; }
8dcde887
MK
15754 fi
15755fi
15756
db985757 15757# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15758# to an empty version.
c906108c
SS
15759
15760files=
15761links=
5a2402b8 15762
c906108c
SS
15763rm -f nm.h
15764if test "${nativefile}" != ""; then
0f475e27
AC
15765 case "${nativefile}" in
15766 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15767 * ) GDB_NM_FILE="${nativefile}"
15768 esac
5a2402b8
AC
15769 files="${files} ${GDB_NM_FILE}"
15770 links="${links} nm.h"
60ca704f
SE
15771
15772cat >>confdefs.h <<_ACEOF
b78960be 15773#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15774_ACEOF
5a2402b8 15775
c906108c 15776fi
5a2402b8
AC
15777
15778
bec39cab
AC
15779ac_sources="$files"
15780ac_dests="$links"
15781while test -n "$ac_sources"; do
15782 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15783 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15784 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15785done
81ecdfbb 15786ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15787
15788
c906108c
SS
15789
15790
c906108c 15791
81ecdfbb 15792$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15793
bec39cab 15794
81ecdfbb
RW
15795ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
15796
15797ac_config_commands="$ac_config_commands default"
89a34d1b 15798
bec39cab
AC
15799cat >confcache <<\_ACEOF
15800# This file is a shell script that caches the results of configure
15801# tests run on this system so they can be shared between configure
15802# scripts and configure runs, see configure's option --config-cache.
15803# It is not useful on other systems. If it contains results you don't
15804# want to keep, you may remove or edit it.
15805#
15806# config.status only pays attention to the cache file if you give it
15807# the --recheck option to rerun configure.
15808#
15809# `ac_cv_env_foo' variables (set or unset) will be overridden when
15810# loading this file, other *unset* `ac_cv_foo' will be assigned the
15811# following values.
15812
15813_ACEOF
15814
15815# The following way of writing the cache mishandles newlines in values,
15816# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15817# So, we kill variables containing newlines.
bec39cab
AC
15818# Ultrix sh set writes to stderr and can't be redirected directly,
15819# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15820(
15821 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15822 eval ac_val=\$$ac_var
15823 case $ac_val in #(
15824 *${as_nl}*)
15825 case $ac_var in #(
15826 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15827$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15828 esac
15829 case $ac_var in #(
15830 _ | IFS | as_nl) ;; #(
15831 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15832 *) { eval $ac_var=; unset $ac_var;} ;;
15833 esac ;;
15834 esac
15835 done
15836
bec39cab 15837 (set) 2>&1 |
81ecdfbb
RW
15838 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15839 *${as_nl}ac_space=\ *)
15840 # `set' does not quote correctly, so add quotes: double-quote
15841 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15842 sed -n \
15843 "s/'/'\\\\''/g;
15844 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15845 ;; #(
bec39cab
AC
15846 *)
15847 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15848 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15849 ;;
81ecdfbb
RW
15850 esac |
15851 sort
15852) |
bec39cab 15853 sed '
81ecdfbb 15854 /^ac_cv_env_/b end
bec39cab 15855 t clear
81ecdfbb 15856 :clear
bec39cab
AC
15857 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15858 t end
81ecdfbb
RW
15859 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15860 :end' >>confcache
15861if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15862 if test -w "$cache_file"; then
15863 test "x$cache_file" != "x/dev/null" &&
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15865$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15866 cat confcache >$cache_file
15867 else
81ecdfbb
RW
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15869$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15870 fi
15871fi
15872rm -f confcache
15873
15874test "x$prefix" = xNONE && prefix=$ac_default_prefix
15875# Let make expand exec_prefix.
15876test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15877
bec39cab
AC
15878DEFS=-DHAVE_CONFIG_H
15879
15880ac_libobjs=
15881ac_ltlibobjs=
15882for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15883 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15884 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15885 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15886 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15887 # will be set to the directory where LIBOBJS objects are built.
15888 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15889 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15890done
15891LIBOBJS=$ac_libobjs
15892
15893LTLIBOBJS=$ac_ltlibobjs
15894
15895
85981d60 15896if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15897 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15898Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15899fi
a417dc56 15900if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15901 as_fn_error "conditional \"GMAKE\" was never defined.
15902Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15903fi
783e057b 15904if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
15905 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
15906Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
15907fi
15908
15909 gl_libobjs=
15910 gl_ltlibobjs=
15911 if test -n "$gl_LIBOBJS"; then
15912 # Remove the extension.
15913 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 15914 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
15915 gl_libobjs="$gl_libobjs $i.$ac_objext"
15916 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
15917 done
15918 fi
15919 gl_LIBOBJS=$gl_libobjs
15920
15921 gl_LTLIBOBJS=$gl_ltlibobjs
15922
15923
15924
15925 gltests_libobjs=
15926 gltests_ltlibobjs=
15927 if test -n "$gltests_LIBOBJS"; then
15928 # Remove the extension.
15929 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 15930 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
15931 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
15932 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
15933 done
15934 fi
15935 gltests_LIBOBJS=$gltests_libobjs
15936
15937 gltests_LTLIBOBJS=$gltests_ltlibobjs
15938
15939
e28b3332 15940if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
15941 as_fn_error "conditional \"AMDEP\" was never defined.
15942Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
15943fi
15944if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
15945 as_fn_error "conditional \"am__fastdepCC\" was never defined.
15946Usually this means the macro was only invoked conditionally." "$LINENO" 5
15947fi
15948 if test -n "$EXEEXT"; then
15949 am__EXEEXT_TRUE=
15950 am__EXEEXT_FALSE='#'
15951else
15952 am__EXEEXT_TRUE='#'
15953 am__EXEEXT_FALSE=
e28b3332 15954fi
bec39cab 15955
81ecdfbb
RW
15956
15957
bec39cab 15958: ${CONFIG_STATUS=./config.status}
81ecdfbb 15959ac_write_fail=0
bec39cab
AC
15960ac_clean_files_save=$ac_clean_files
15961ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15962{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15963$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15964as_write_fail=0
15965cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15966#! $SHELL
15967# Generated by $as_me.
15968# Run this file to recreate the current configuration.
15969# Compiler output produced by configure, useful for debugging
15970# configure, is in config.log if it exists.
15971
15972debug=false
15973ac_cs_recheck=false
15974ac_cs_silent=false
bec39cab 15975
81ecdfbb
RW
15976SHELL=\${CONFIG_SHELL-$SHELL}
15977export SHELL
15978_ASEOF
15979cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15980## -------------------- ##
15981## M4sh Initialization. ##
15982## -------------------- ##
15983
15984# Be more Bourne compatible
15985DUALCASE=1; export DUALCASE # for MKS sh
15986if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15987 emulate sh
15988 NULLCMD=:
81ecdfbb 15989 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15990 # is contrary to our usage. Disable this feature.
15991 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15992 setopt NO_GLOB_SUBST
15993else
15994 case `(set -o) 2>/dev/null` in #(
15995 *posix*) :
15996 set -o posix ;; #(
15997 *) :
15998 ;;
15999esac
bec39cab 16000fi
bec39cab 16001
81ecdfbb
RW
16002
16003as_nl='
16004'
16005export as_nl
16006# Printing a long string crashes Solaris 7 /usr/bin/printf.
16007as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16008as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16009as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16010# Prefer a ksh shell builtin over an external printf program on Solaris,
16011# but without wasting forks for bash or zsh.
16012if test -z "$BASH_VERSION$ZSH_VERSION" \
16013 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16014 as_echo='print -r --'
16015 as_echo_n='print -rn --'
16016elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16017 as_echo='printf %s\n'
16018 as_echo_n='printf %s'
16019else
16020 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16021 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16022 as_echo_n='/usr/ucb/echo -n'
16023 else
16024 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16025 as_echo_n_body='eval
16026 arg=$1;
16027 case $arg in #(
16028 *"$as_nl"*)
16029 expr "X$arg" : "X\\(.*\\)$as_nl";
16030 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16031 esac;
16032 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16033 '
16034 export as_echo_n_body
16035 as_echo_n='sh -c $as_echo_n_body as_echo'
16036 fi
16037 export as_echo_body
16038 as_echo='sh -c $as_echo_body as_echo'
16039fi
16040
16041# The user is always right.
16042if test "${PATH_SEPARATOR+set}" != set; then
16043 PATH_SEPARATOR=:
16044 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16045 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16046 PATH_SEPARATOR=';'
16047 }
bec39cab
AC
16048fi
16049
16050
81ecdfbb
RW
16051# IFS
16052# We need space, tab and new line, in precisely that order. Quoting is
16053# there to prevent editors from complaining about space-tab.
16054# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16055# splitting by setting IFS to empty value.)
16056IFS=" "" $as_nl"
16057
16058# Find who we are. Look in the path if we contain no directory separator.
16059case $0 in #((
16060 *[\\/]* ) as_myself=$0 ;;
16061 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16062for as_dir in $PATH
16063do
16064 IFS=$as_save_IFS
16065 test -z "$as_dir" && as_dir=.
16066 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16067 done
16068IFS=$as_save_IFS
16069
16070 ;;
16071esac
16072# We did not find ourselves, most probably we were run as `sh COMMAND'
16073# in which case we are not to be found in the path.
16074if test "x$as_myself" = x; then
16075 as_myself=$0
16076fi
16077if test ! -f "$as_myself"; then
16078 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16079 exit 1
16080fi
16081
16082# Unset variables that we do not need and which cause bugs (e.g. in
16083# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16084# suppresses any "Segmentation fault" message there. '((' could
16085# trigger a bug in pdksh 5.2.14.
16086for as_var in BASH_ENV ENV MAIL MAILPATH
16087do eval test x\${$as_var+set} = xset \
16088 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16089done
bec39cab
AC
16090PS1='$ '
16091PS2='> '
16092PS4='+ '
16093
16094# NLS nuisances.
81ecdfbb
RW
16095LC_ALL=C
16096export LC_ALL
16097LANGUAGE=C
16098export LANGUAGE
16099
16100# CDPATH.
16101(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16102
16103
16104# as_fn_error ERROR [LINENO LOG_FD]
16105# ---------------------------------
16106# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16107# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16108# script with status $?, using 1 if that was 0.
16109as_fn_error ()
16110{
16111 as_status=$?; test $as_status -eq 0 && as_status=1
16112 if test "$3"; then
16113 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16114 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16115 fi
16116 $as_echo "$as_me: error: $1" >&2
16117 as_fn_exit $as_status
16118} # as_fn_error
16119
16120
16121# as_fn_set_status STATUS
16122# -----------------------
16123# Set $? to STATUS, without forking.
16124as_fn_set_status ()
16125{
16126 return $1
16127} # as_fn_set_status
16128
16129# as_fn_exit STATUS
16130# -----------------
16131# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16132as_fn_exit ()
16133{
16134 set +e
16135 as_fn_set_status $1
16136 exit $1
16137} # as_fn_exit
16138
16139# as_fn_unset VAR
16140# ---------------
16141# Portably unset VAR.
16142as_fn_unset ()
16143{
16144 { eval $1=; unset $1;}
16145}
16146as_unset=as_fn_unset
16147# as_fn_append VAR VALUE
16148# ----------------------
16149# Append the text in VALUE to the end of the definition contained in VAR. Take
16150# advantage of any shell optimizations that allow amortized linear growth over
16151# repeated appends, instead of the typical quadratic growth present in naive
16152# implementations.
16153if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16154 eval 'as_fn_append ()
16155 {
16156 eval $1+=\$2
16157 }'
16158else
16159 as_fn_append ()
16160 {
16161 eval $1=\$$1\$2
16162 }
16163fi # as_fn_append
16164
16165# as_fn_arith ARG...
16166# ------------------
16167# Perform arithmetic evaluation on the ARGs, and store the result in the
16168# global $as_val. Take advantage of shells that can avoid forks. The arguments
16169# must be portable across $(()) and expr.
16170if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16171 eval 'as_fn_arith ()
16172 {
16173 as_val=$(( $* ))
16174 }'
16175else
16176 as_fn_arith ()
16177 {
16178 as_val=`expr "$@" || test $? -eq 1`
16179 }
16180fi # as_fn_arith
bec39cab 16181
81ecdfbb
RW
16182
16183if expr a : '\(a\)' >/dev/null 2>&1 &&
16184 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16185 as_expr=expr
16186else
16187 as_expr=false
16188fi
16189
81ecdfbb 16190if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16191 as_basename=basename
16192else
16193 as_basename=false
16194fi
16195
81ecdfbb
RW
16196if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16197 as_dirname=dirname
16198else
16199 as_dirname=false
16200fi
bec39cab 16201
81ecdfbb 16202as_me=`$as_basename -- "$0" ||
bec39cab
AC
16203$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16204 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16205 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16206$as_echo X/"$0" |
16207 sed '/^.*\/\([^/][^/]*\)\/*$/{
16208 s//\1/
16209 q
16210 }
16211 /^X\/\(\/\/\)$/{
16212 s//\1/
16213 q
16214 }
16215 /^X\/\(\/\).*/{
16216 s//\1/
16217 q
16218 }
16219 s/.*/./; q'`
b4e70030 16220
b4e70030
JB
16221# Avoid depending upon Character Ranges.
16222as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16223as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16224as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16225as_cr_digits='0123456789'
16226as_cr_alnum=$as_cr_Letters$as_cr_digits
16227
81ecdfbb
RW
16228ECHO_C= ECHO_N= ECHO_T=
16229case `echo -n x` in #(((((
16230-n*)
16231 case `echo 'xy\c'` in
16232 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16233 xy) ECHO_C='\c';;
16234 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16235 ECHO_T=' ';;
16236 esac;;
16237*)
16238 ECHO_N='-n';;
bec39cab
AC
16239esac
16240
81ecdfbb
RW
16241rm -f conf$$ conf$$.exe conf$$.file
16242if test -d conf$$.dir; then
16243 rm -f conf$$.dir/conf$$.file
bec39cab 16244else
81ecdfbb
RW
16245 rm -f conf$$.dir
16246 mkdir conf$$.dir 2>/dev/null
bec39cab 16247fi
81ecdfbb
RW
16248if (echo >conf$$.file) 2>/dev/null; then
16249 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16250 as_ln_s='ln -s'
81ecdfbb
RW
16251 # ... but there are two gotchas:
16252 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16253 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16254 # In both cases, we have to default to `cp -p'.
16255 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16256 as_ln_s='cp -p'
16257 elif ln conf$$.file conf$$ 2>/dev/null; then
16258 as_ln_s=ln
16259 else
16260 as_ln_s='cp -p'
b4e70030 16261 fi
bec39cab
AC
16262else
16263 as_ln_s='cp -p'
16264fi
81ecdfbb
RW
16265rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16266rmdir conf$$.dir 2>/dev/null
16267
16268
16269# as_fn_mkdir_p
16270# -------------
16271# Create "$as_dir" as a directory, including parents if necessary.
16272as_fn_mkdir_p ()
16273{
16274
16275 case $as_dir in #(
16276 -*) as_dir=./$as_dir;;
16277 esac
16278 test -d "$as_dir" || eval $as_mkdir_p || {
16279 as_dirs=
16280 while :; do
16281 case $as_dir in #(
16282 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16283 *) as_qdir=$as_dir;;
16284 esac
16285 as_dirs="'$as_qdir' $as_dirs"
16286 as_dir=`$as_dirname -- "$as_dir" ||
16287$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16288 X"$as_dir" : 'X\(//\)[^/]' \| \
16289 X"$as_dir" : 'X\(//\)$' \| \
16290 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16291$as_echo X"$as_dir" |
16292 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16293 s//\1/
16294 q
16295 }
16296 /^X\(\/\/\)[^/].*/{
16297 s//\1/
16298 q
16299 }
16300 /^X\(\/\/\)$/{
16301 s//\1/
16302 q
16303 }
16304 /^X\(\/\).*/{
16305 s//\1/
16306 q
16307 }
16308 s/.*/./; q'`
16309 test -d "$as_dir" && break
16310 done
16311 test -z "$as_dirs" || eval "mkdir $as_dirs"
16312 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16313
bec39cab 16314
81ecdfbb 16315} # as_fn_mkdir_p
bec39cab 16316if mkdir -p . 2>/dev/null; then
81ecdfbb 16317 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16318else
16319 test -d ./-p && rmdir ./-p
16320 as_mkdir_p=false
16321fi
16322
81ecdfbb
RW
16323if test -x / >/dev/null 2>&1; then
16324 as_test_x='test -x'
16325else
16326 if ls -dL / >/dev/null 2>&1; then
16327 as_ls_L_option=L
16328 else
16329 as_ls_L_option=
16330 fi
16331 as_test_x='
16332 eval sh -c '\''
16333 if test -d "$1"; then
16334 test -d "$1/.";
16335 else
16336 case $1 in #(
16337 -*)set "./$1";;
16338 esac;
16339 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16340 ???[sx]*):;;*)false;;esac;fi
16341 '\'' sh
16342 '
16343fi
16344as_executable_p=$as_test_x
bec39cab
AC
16345
16346# Sed expression to map a string onto a valid CPP name.
16347as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16348
16349# Sed expression to map a string onto a valid variable name.
16350as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16351
16352
bec39cab 16353exec 6>&1
81ecdfbb
RW
16354## ----------------------------------- ##
16355## Main body of $CONFIG_STATUS script. ##
16356## ----------------------------------- ##
16357_ASEOF
16358test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16359
16360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16361# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16362# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16363# values after options handling.
16364ac_log="
bec39cab 16365This file was extended by $as_me, which was
81ecdfbb 16366generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16367
16368 CONFIG_FILES = $CONFIG_FILES
16369 CONFIG_HEADERS = $CONFIG_HEADERS
16370 CONFIG_LINKS = $CONFIG_LINKS
16371 CONFIG_COMMANDS = $CONFIG_COMMANDS
16372 $ $0 $@
16373
81ecdfbb
RW
16374on `(hostname || uname -n) 2>/dev/null | sed 1q`
16375"
16376
bec39cab
AC
16377_ACEOF
16378
81ecdfbb
RW
16379case $ac_config_files in *"
16380"*) set x $ac_config_files; shift; ac_config_files=$*;;
16381esac
234b45d4 16382
81ecdfbb
RW
16383case $ac_config_headers in *"
16384"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16385esac
b4e70030 16386
b4e70030 16387
81ecdfbb
RW
16388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16389# Files that config.status was made for.
16390config_files="$ac_config_files"
16391config_headers="$ac_config_headers"
16392config_links="$ac_config_links"
16393config_commands="$ac_config_commands"
234b45d4 16394
81ecdfbb 16395_ACEOF
b4e70030 16396
81ecdfbb 16397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16398ac_cs_usage="\
81ecdfbb
RW
16399\`$as_me' instantiates files and other configuration actions
16400from templates according to the current configuration. Unless the files
16401and actions are specified as TAGs, all are instantiated by default.
234b45d4 16402
81ecdfbb 16403Usage: $0 [OPTION]... [TAG]...
234b45d4 16404
bec39cab 16405 -h, --help print this help, then exit
81ecdfbb
RW
16406 -V, --version print version number and configuration settings, then exit
16407 -q, --quiet, --silent
16408 do not print progress messages
bec39cab
AC
16409 -d, --debug don't remove temporary files
16410 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16411 --file=FILE[:TEMPLATE]
16412 instantiate the configuration file FILE
16413 --header=FILE[:TEMPLATE]
16414 instantiate the configuration header FILE
234b45d4 16415
bec39cab
AC
16416Configuration files:
16417$config_files
234b45d4 16418
bec39cab
AC
16419Configuration headers:
16420$config_headers
234b45d4 16421
bec39cab
AC
16422Configuration links:
16423$config_links
234b45d4 16424
bec39cab
AC
16425Configuration commands:
16426$config_commands
16427
81ecdfbb 16428Report bugs to the package provider."
b4e70030 16429
81ecdfbb
RW
16430_ACEOF
16431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16432ac_cs_version="\\
16433config.status
81ecdfbb
RW
16434configured by $0, generated by GNU Autoconf 2.64,
16435 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16436
81ecdfbb 16437Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16438This config.status script is free software; the Free Software Foundation
16439gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16440
16441ac_pwd='$ac_pwd'
16442srcdir='$srcdir'
16443INSTALL='$INSTALL'
16444MKDIR_P='$MKDIR_P'
16445AWK='$AWK'
16446test -n "\$AWK" || AWK=awk
bec39cab
AC
16447_ACEOF
16448
81ecdfbb
RW
16449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16450# The default lists apply if the user does not specify any file.
bec39cab
AC
16451ac_need_defaults=:
16452while test $# != 0
16453do
16454 case $1 in
16455 --*=*)
81ecdfbb
RW
16456 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16457 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16458 ac_shift=:
c906108c 16459 ;;
81ecdfbb 16460 *)
bec39cab
AC
16461 ac_option=$1
16462 ac_optarg=$2
16463 ac_shift=shift
c906108c 16464 ;;
bec39cab 16465 esac
c906108c 16466
bec39cab
AC
16467 case $ac_option in
16468 # Handling of the options.
bec39cab
AC
16469 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16470 ac_cs_recheck=: ;;
81ecdfbb
RW
16471 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16472 $as_echo "$ac_cs_version"; exit ;;
16473 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16474 debug=: ;;
16475 --file | --fil | --fi | --f )
16476 $ac_shift
81ecdfbb
RW
16477 case $ac_optarg in
16478 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16479 esac
16480 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16481 ac_need_defaults=false;;
16482 --header | --heade | --head | --hea )
16483 $ac_shift
81ecdfbb
RW
16484 case $ac_optarg in
16485 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16486 esac
16487 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16488 ac_need_defaults=false;;
81ecdfbb
RW
16489 --he | --h)
16490 # Conflict between --help and --header
16491 as_fn_error "ambiguous option: \`$1'
16492Try \`$0 --help' for more information.";;
16493 --help | --hel | -h )
16494 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16495 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16496 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16497 ac_cs_silent=: ;;
c906108c 16498
bec39cab 16499 # This is an error.
81ecdfbb
RW
16500 -*) as_fn_error "unrecognized option: \`$1'
16501Try \`$0 --help' for more information." ;;
c906108c 16502
81ecdfbb
RW
16503 *) as_fn_append ac_config_targets " $1"
16504 ac_need_defaults=false ;;
c906108c 16505
bec39cab
AC
16506 esac
16507 shift
16508done
c906108c 16509
bec39cab 16510ac_configure_extra_args=
c906108c 16511
bec39cab
AC
16512if $ac_cs_silent; then
16513 exec 6>/dev/null
16514 ac_configure_extra_args="$ac_configure_extra_args --silent"
16515fi
c906108c 16516
bec39cab 16517_ACEOF
81ecdfbb 16518cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16519if \$ac_cs_recheck; then
81ecdfbb
RW
16520 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16521 shift
16522 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16523 CONFIG_SHELL='$SHELL'
16524 export CONFIG_SHELL
16525 exec "\$@"
bec39cab
AC
16526fi
16527
16528_ACEOF
81ecdfbb
RW
16529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16530exec 5>>config.log
16531{
16532 echo
16533 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16534## Running $as_me. ##
16535_ASBOX
16536 $as_echo "$ac_log"
16537} >&5
bec39cab 16538
81ecdfbb
RW
16539_ACEOF
16540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16541#
81ecdfbb 16542# INIT-COMMANDS
c906108c 16543#
a417dc56 16544ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16545AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16546
bec39cab
AC
16547_ACEOF
16548
81ecdfbb 16549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16550
81ecdfbb 16551# Handling of arguments.
bec39cab 16552for ac_config_target in $ac_config_targets
c906108c 16553do
81ecdfbb
RW
16554 case $ac_config_target in
16555 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16556 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16557 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16558 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16559 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16560 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
16561 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
16562 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16563
16564 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16565 esac
16566done
16567
81ecdfbb 16568
bec39cab
AC
16569# If the user did not use the arguments to specify the items to instantiate,
16570# then the envvar interface is used. Set only those that are not.
16571# We use the long form for the default assignment because of an extremely
16572# bizarre bug on SunOS 4.1.3.
16573if $ac_need_defaults; then
16574 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16575 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16576 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16577 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16578fi
16579
b4e70030 16580# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16581# simply because there is no reason against having it here, and in addition,
b4e70030 16582# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16583# Hook for its removal unless debugging.
16584# Note that there is a small window in which the directory will not be cleaned:
16585# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16586$debug ||
16587{
81ecdfbb
RW
16588 tmp=
16589 trap 'exit_status=$?
16590 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16591' 0
16592 trap 'as_fn_exit 1' 1 2 13 15
16593}
16594# Create a (secure) tmp directory for tmp files.
16595
16596{
16597 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16598 test -n "$tmp" && test -d "$tmp"
16599} ||
16600{
16601 tmp=./conf$$-$RANDOM
16602 (umask 077 && mkdir "$tmp")
16603} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16604
16605# Set up the scripts for CONFIG_FILES section.
16606# No need to generate them if there are no CONFIG_FILES.
16607# This happens for instance with `./config.status config.h'.
16608if test -n "$CONFIG_FILES"; then
16609
16610if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16611 ac_cs_awk_getline=:
16612 ac_cs_awk_pipe_init=
16613 ac_cs_awk_read_file='
16614 while ((getline aline < (F[key])) > 0)
16615 print(aline)
16616 close(F[key])'
16617 ac_cs_awk_pipe_fini=
16618else
16619 ac_cs_awk_getline=false
16620 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16621 ac_cs_awk_read_file='
16622 print "|#_!!_#|"
16623 print "cat " F[key] " &&"
16624 '$ac_cs_awk_pipe_init
16625 # The final `:' finishes the AND list.
16626 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16627fi
16628ac_cr=`echo X | tr X '\015'`
16629# On cygwin, bash can eat \r inside `` if the user requested igncr.
16630# But we know of no other shell where ac_cr would be empty at this
16631# point, so we can use a bashism as a fallback.
16632if test "x$ac_cr" = x; then
16633 eval ac_cr=\$\'\\r\'
16634fi
16635ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16636if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16637 ac_cs_awk_cr='\r'
16638else
16639 ac_cs_awk_cr=$ac_cr
16640fi
16641
16642echo 'BEGIN {' >"$tmp/subs1.awk" &&
16643_ACEOF
16644
16645# Create commands to substitute file output variables.
16646{
16647 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16648 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16649 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16650 echo "_ACAWK" &&
16651 echo "_ACEOF"
16652} >conf$$files.sh &&
16653. ./conf$$files.sh ||
16654 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16655rm -f conf$$files.sh
16656
16657{
16658 echo "cat >conf$$subs.awk <<_ACEOF" &&
16659 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16660 echo "_ACEOF"
16661} >conf$$subs.sh ||
16662 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16663ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16664ac_delim='%!_!# '
16665for ac_last_try in false false false false false :; do
16666 . ./conf$$subs.sh ||
16667 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16668
16669 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16670 if test $ac_delim_n = $ac_delim_num; then
16671 break
16672 elif $ac_last_try; then
16673 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16674 else
16675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16676 fi
16677done
16678rm -f conf$$subs.sh
16679
16680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16681cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16682_ACEOF
16683sed -n '
16684h
16685s/^/S["/; s/!.*/"]=/
16686p
16687g
16688s/^[^!]*!//
16689:repl
16690t repl
16691s/'"$ac_delim"'$//
16692t delim
16693:nl
16694h
16695s/\(.\{148\}\).*/\1/
16696t more1
16697s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16698p
16699n
16700b repl
16701:more1
16702s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16703p
16704g
16705s/.\{148\}//
16706t nl
16707:delim
16708h
16709s/\(.\{148\}\).*/\1/
16710t more2
16711s/["\\]/\\&/g; s/^/"/; s/$/"/
16712p
16713b
16714:more2
16715s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16716p
16717g
16718s/.\{148\}//
16719t delim
16720' <conf$$subs.awk | sed '
16721/^[^""]/{
16722 N
16723 s/\n//
16724}
16725' >>$CONFIG_STATUS || ac_write_fail=1
16726rm -f conf$$subs.awk
16727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16728_ACAWK
16729cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16730 for (key in S) S_is_set[key] = 1
16731 FS = "\a"
16732 \$ac_cs_awk_pipe_init
16733}
16734{
16735 line = $ 0
16736 nfields = split(line, field, "@")
16737 substed = 0
16738 len = length(field[1])
16739 for (i = 2; i < nfields; i++) {
16740 key = field[i]
16741 keylen = length(key)
16742 if (S_is_set[key]) {
16743 value = S[key]
16744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16745 len += length(value) + length(field[++i])
16746 substed = 1
16747 } else
16748 len += 1 + keylen
16749 }
16750 if (nfields == 3 && !substed) {
16751 key = field[2]
16752 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16753 \$ac_cs_awk_read_file
16754 next
16755 }
16756 }
16757 print line
b4e70030 16758}
81ecdfbb
RW
16759\$ac_cs_awk_pipe_fini
16760_ACAWK
16761_ACEOF
16762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16763if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16764 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16765else
16766 cat
16767fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16768 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16769_ACEOF
16770
16771# VPATH may cause trouble with some makes, so we remove $(srcdir),
16772# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16773# trailing colons and then remove the whole line if VPATH becomes empty
16774# (actually we leave an empty line to preserve line numbers).
16775if test "x$srcdir" = x.; then
16776 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16777s/:*\$(srcdir):*/:/
16778s/:*\${srcdir}:*/:/
16779s/:*@srcdir@:*/:/
16780s/^\([^=]*=[ ]*\):*/\1/
16781s/:*$//
16782s/^[^=]*=[ ]*$//
16783}'
16784fi
16785
16786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16787fi # test -n "$CONFIG_FILES"
16788
16789# Set up the scripts for CONFIG_HEADERS section.
16790# No need to generate them if there are no CONFIG_HEADERS.
16791# This happens for instance with `./config.status Makefile'.
16792if test -n "$CONFIG_HEADERS"; then
16793cat >"$tmp/defines.awk" <<\_ACAWK ||
16794BEGIN {
16795_ACEOF
16796
16797# Transform confdefs.h into an awk script `defines.awk', embedded as
16798# here-document in config.status, that substitutes the proper values into
16799# config.h.in to produce config.h.
4e8d927d 16800
81ecdfbb
RW
16801# Create a delimiter string that does not exist in confdefs.h, to ease
16802# handling of long lines.
16803ac_delim='%!_!# '
16804for ac_last_try in false false :; do
16805 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16806 if test -z "$ac_t"; then
16807 break
16808 elif $ac_last_try; then
16809 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16810 else
16811 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16812 fi
16813done
4e8d927d 16814
81ecdfbb
RW
16815# For the awk script, D is an array of macro values keyed by name,
16816# likewise P contains macro parameters if any. Preserve backslash
16817# newline sequences.
16818
16819ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16820sed -n '
16821s/.\{148\}/&'"$ac_delim"'/g
16822t rset
16823:rset
16824s/^[ ]*#[ ]*define[ ][ ]*/ /
16825t def
16826d
16827:def
16828s/\\$//
16829t bsnl
16830s/["\\]/\\&/g
16831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16832D["\1"]=" \3"/p
16833s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16834d
16835:bsnl
16836s/["\\]/\\&/g
16837s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16838D["\1"]=" \3\\\\\\n"\\/p
16839t cont
16840s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16841t cont
16842d
16843:cont
16844n
16845s/.\{148\}/&'"$ac_delim"'/g
16846t clear
16847:clear
16848s/\\$//
16849t bsnlc
16850s/["\\]/\\&/g; s/^/"/; s/$/"/p
16851d
16852:bsnlc
16853s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16854b cont
16855' <confdefs.h | sed '
16856s/'"$ac_delim"'/"\\\
16857"/g' >>$CONFIG_STATUS || ac_write_fail=1
16858
16859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16860 for (key in D) D_is_set[key] = 1
16861 FS = "\a"
16862}
16863/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16864 line = \$ 0
16865 split(line, arg, " ")
16866 if (arg[1] == "#") {
16867 defundef = arg[2]
16868 mac1 = arg[3]
16869 } else {
16870 defundef = substr(arg[1], 2)
16871 mac1 = arg[2]
16872 }
16873 split(mac1, mac2, "(") #)
16874 macro = mac2[1]
16875 prefix = substr(line, 1, index(line, defundef) - 1)
16876 if (D_is_set[macro]) {
16877 # Preserve the white space surrounding the "#".
16878 print prefix "define", macro P[macro] D[macro]
16879 next
16880 } else {
16881 # Replace #undef with comments. This is necessary, for example,
16882 # in the case of _POSIX_SOURCE, which is predefined and required
16883 # on some systems where configure will not decide to define it.
16884 if (defundef == "undef") {
16885 print "/*", prefix defundef, macro, "*/"
16886 next
16887 }
16888 }
b4e70030 16889}
81ecdfbb
RW
16890{ print }
16891_ACAWK
b4e70030 16892_ACEOF
81ecdfbb
RW
16893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16894 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16895fi # test -n "$CONFIG_HEADERS"
4e8d927d 16896
4e8d927d 16897
81ecdfbb
RW
16898eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16899shift
16900for ac_tag
16901do
16902 case $ac_tag in
16903 :[FHLC]) ac_mode=$ac_tag; continue;;
16904 esac
16905 case $ac_mode$ac_tag in
16906 :[FHL]*:*);;
16907 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16908 :[FH]-) ac_tag=-:-;;
16909 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16910 esac
16911 ac_save_IFS=$IFS
16912 IFS=:
16913 set x $ac_tag
16914 IFS=$ac_save_IFS
16915 shift
16916 ac_file=$1
16917 shift
4e8d927d 16918
81ecdfbb
RW
16919 case $ac_mode in
16920 :L) ac_source=$1;;
16921 :[FH])
16922 ac_file_inputs=
16923 for ac_f
16924 do
16925 case $ac_f in
16926 -) ac_f="$tmp/stdin";;
16927 *) # Look for the file first in the build tree, then in the source tree
16928 # (if the path is not absolute). The absolute path cannot be DOS-style,
16929 # because $ac_f cannot contain `:'.
16930 test -f "$ac_f" ||
16931 case $ac_f in
16932 [\\/$]*) false;;
16933 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16934 esac ||
16935 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16936 esac
16937 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16938 as_fn_append ac_file_inputs " '$ac_f'"
16939 done
16940
16941 # Let's still pretend it is `configure' which instantiates (i.e., don't
16942 # use $as_me), people would be surprised to read:
16943 # /* config.h. Generated by config.status. */
16944 configure_input='Generated from '`
16945 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16946 `' by configure.'
16947 if test x"$ac_file" != x-; then
16948 configure_input="$ac_file. $configure_input"
16949 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16950$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16951 fi
81ecdfbb
RW
16952 # Neutralize special characters interpreted by sed in replacement strings.
16953 case $configure_input in #(
16954 *\&* | *\|* | *\\* )
16955 ac_sed_conf_input=`$as_echo "$configure_input" |
16956 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16957 *) ac_sed_conf_input=$configure_input;;
16958 esac
4e8d927d 16959
81ecdfbb
RW
16960 case $ac_tag in
16961 *:-:* | *:-) cat >"$tmp/stdin" \
16962 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16963 esac
16964 ;;
c906108c
SS
16965 esac
16966
81ecdfbb 16967 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16968$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16969 X"$ac_file" : 'X\(//\)[^/]' \| \
16970 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16971 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16972$as_echo X"$ac_file" |
16973 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16974 s//\1/
16975 q
16976 }
16977 /^X\(\/\/\)[^/].*/{
16978 s//\1/
16979 q
16980 }
16981 /^X\(\/\/\)$/{
16982 s//\1/
16983 q
16984 }
16985 /^X\(\/\).*/{
16986 s//\1/
16987 q
16988 }
16989 s/.*/./; q'`
16990 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16991 ac_builddir=.
16992
81ecdfbb
RW
16993case "$ac_dir" in
16994.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16995*)
16996 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16997 # A ".." for each directory in $ac_dir_suffix.
16998 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16999 case $ac_top_builddir_sub in
17000 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17001 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17002 esac ;;
17003esac
17004ac_abs_top_builddir=$ac_pwd
17005ac_abs_builddir=$ac_pwd$ac_dir_suffix
17006# for backward compatibility:
17007ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17008
17009case $srcdir in
81ecdfbb 17010 .) # We are building in place.
bec39cab 17011 ac_srcdir=.
81ecdfbb
RW
17012 ac_top_srcdir=$ac_top_builddir_sub
17013 ac_abs_top_srcdir=$ac_pwd ;;
17014 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17015 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17016 ac_top_srcdir=$srcdir
17017 ac_abs_top_srcdir=$srcdir ;;
17018 *) # Relative name.
17019 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17020 ac_top_srcdir=$ac_top_build_prefix$srcdir
17021 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17022esac
81ecdfbb 17023ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17024
c906108c 17025
81ecdfbb
RW
17026 case $ac_mode in
17027 :F)
17028 #
17029 # CONFIG_FILE
17030 #
c906108c 17031
bec39cab
AC
17032 case $INSTALL in
17033 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17034 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17035 esac
81ecdfbb
RW
17036 ac_MKDIR_P=$MKDIR_P
17037 case $MKDIR_P in
17038 [\\/$]* | ?:[\\/]* ) ;;
17039 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17040 esac
17041_ACEOF
121ce6e5 17042
81ecdfbb
RW
17043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17044# If the template does not know about datarootdir, expand it.
17045# FIXME: This hack should be removed a few years after 2.60.
17046ac_datarootdir_hack=; ac_datarootdir_seen=
17047ac_sed_dataroot='
17048/datarootdir/ {
17049 p
17050 q
17051}
17052/@datadir@/p
17053/@docdir@/p
17054/@infodir@/p
17055/@localedir@/p
17056/@mandir@/p'
17057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17058*datarootdir*) ac_datarootdir_seen=yes;;
17059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17062_ACEOF
17063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17064 ac_datarootdir_hack='
17065 s&@datadir@&$datadir&g
17066 s&@docdir@&$docdir&g
17067 s&@infodir@&$infodir&g
17068 s&@localedir@&$localedir&g
17069 s&@mandir@&$mandir&g
17070 s&\\\${datarootdir}&$datarootdir&g' ;;
17071esac
4e8d927d 17072_ACEOF
81ecdfbb
RW
17073
17074# Neutralize VPATH when `$srcdir' = `.'.
17075# Shell code in configure.ac might set extrasub.
17076# FIXME: do we really want to maintain this feature?
17077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17078ac_sed_extra="$ac_vpsub
bec39cab
AC
17079$extrasub
17080_ACEOF
81ecdfbb 17081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17082:t
17083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17084s|@configure_input@|$ac_sed_conf_input|;t t
17085s&@top_builddir@&$ac_top_builddir_sub&;t t
17086s&@top_build_prefix@&$ac_top_build_prefix&;t t
17087s&@srcdir@&$ac_srcdir&;t t
17088s&@abs_srcdir@&$ac_abs_srcdir&;t t
17089s&@top_srcdir@&$ac_top_srcdir&;t t
17090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17091s&@builddir@&$ac_builddir&;t t
17092s&@abs_builddir@&$ac_abs_builddir&;t t
17093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17094s&@INSTALL@&$ac_INSTALL&;t t
17095s&@MKDIR_P@&$ac_MKDIR_P&;t t
17096$ac_datarootdir_hack
17097"
17098eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17099if $ac_cs_awk_getline; then
17100 $AWK -f "$tmp/subs.awk"
17101else
17102 $AWK -f "$tmp/subs.awk" | $SHELL
17103fi >$tmp/out \
17104 || as_fn_error "could not create $ac_file" "$LINENO" 5
17105
17106test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17107 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17108 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17110which seems to be undefined. Please make sure it is defined." >&5
17111$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17112which seems to be undefined. Please make sure it is defined." >&2;}
17113
17114 rm -f "$tmp/stdin"
bec39cab 17115 case $ac_file in
81ecdfbb
RW
17116 -) cat "$tmp/out" && rm -f "$tmp/out";;
17117 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17118 esac \
17119 || as_fn_error "could not create $ac_file" "$LINENO" 5
17120 ;;
17121 :H)
17122 #
17123 # CONFIG_HEADER
17124 #
bec39cab 17125 if test x"$ac_file" != x-; then
81ecdfbb
RW
17126 {
17127 $as_echo "/* $configure_input */" \
17128 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17129 } >"$tmp/config.h" \
17130 || as_fn_error "could not create $ac_file" "$LINENO" 5
17131 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17133$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17134 else
81ecdfbb
RW
17135 rm -f "$ac_file"
17136 mv "$tmp/config.h" "$ac_file" \
17137 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17138 fi
17139 else
81ecdfbb
RW
17140 $as_echo "/* $configure_input */" \
17141 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17142 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17143 fi
81ecdfbb
RW
17144# Compute "$ac_file"'s index in $config_headers.
17145_am_arg="$ac_file"
e28b3332
DJ
17146_am_stamp_count=1
17147for _am_header in $config_headers :; do
17148 case $_am_header in
81ecdfbb 17149 $_am_arg | $_am_arg:* )
e28b3332
DJ
17150 break ;;
17151 * )
17152 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17153 esac
17154done
81ecdfbb
RW
17155echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17156$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17157 X"$_am_arg" : 'X\(//\)[^/]' \| \
17158 X"$_am_arg" : 'X\(//\)$' \| \
17159 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17160$as_echo X"$_am_arg" |
17161 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17162 s//\1/
17163 q
17164 }
17165 /^X\(\/\/\)[^/].*/{
17166 s//\1/
17167 q
17168 }
17169 /^X\(\/\/\)$/{
17170 s//\1/
17171 q
17172 }
17173 /^X\(\/\).*/{
17174 s//\1/
17175 q
17176 }
17177 s/.*/./; q'`/stamp-h$_am_stamp_count
17178 ;;
17179 :L)
17180 #
17181 # CONFIG_LINK
17182 #
c906108c 17183
81ecdfbb
RW
17184 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17185 :
b4e70030 17186 else
81ecdfbb
RW
17187 # Prefer the file from the source tree if names are identical.
17188 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17189 ac_source=$srcdir/$ac_source
17190 fi
b4e70030 17191
81ecdfbb
RW
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17193$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17194
81ecdfbb
RW
17195 if test ! -r "$ac_source"; then
17196 as_fn_error "$ac_source: file not found" "$LINENO" 5
17197 fi
17198 rm -f "$ac_file"
bec39cab 17199
81ecdfbb
RW
17200 # Try a relative symlink, then a hard link, then a copy.
17201 case $srcdir in
17202 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17203 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17204 esac
17205 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17206 ln "$ac_source" "$ac_file" 2>/dev/null ||
17207 cp -p "$ac_source" "$ac_file" ||
17208 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17209 fi
17210 ;;
17211 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17212$as_echo "$as_me: executing $ac_file commands" >&6;}
17213 ;;
c906108c 17214 esac
b4e70030 17215
bec39cab 17216
81ecdfbb
RW
17217 case $ac_file$ac_mode in
17218 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17219 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17220 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17221 # are listed without --file. Let's play safe and only enable the eval
17222 # if we detect the quoting.
17223 case $CONFIG_FILES in
17224 *\'*) eval set x "$CONFIG_FILES" ;;
17225 *) set x $CONFIG_FILES ;;
17226 esac
17227 shift
17228 for mf
17229 do
17230 # Strip MF so we end up with the name of the file.
17231 mf=`echo "$mf" | sed -e 's/:.*$//'`
17232 # Check whether this is an Automake generated Makefile or not.
17233 # We used to match only the files named `Makefile.in', but
17234 # some people rename them; so instead we look at the file content.
17235 # Grep'ing the first line is not enough: some people post-process
17236 # each Makefile.in and add a new line on top of each file to say so.
17237 # Grep'ing the whole file is not good either: AIX grep has a line
17238 # limit of 2048, but all sed's we know have understand at least 4000.
17239 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17240 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17241$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17242 X"$mf" : 'X\(//\)[^/]' \| \
17243 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17244 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17245$as_echo X"$mf" |
17246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17247 s//\1/
17248 q
17249 }
17250 /^X\(\/\/\)[^/].*/{
17251 s//\1/
17252 q
17253 }
17254 /^X\(\/\/\)$/{
17255 s//\1/
17256 q
17257 }
17258 /^X\(\/\).*/{
17259 s//\1/
17260 q
17261 }
17262 s/.*/./; q'`
17263 else
17264 continue
17265 fi
17266 # Extract the definition of DEPDIR, am__include, and am__quote
17267 # from the Makefile without running `make'.
17268 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17269 test -z "$DEPDIR" && continue
17270 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17271 test -z "am__include" && continue
17272 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17273 # When using ansi2knr, U may be empty or an underscore; expand it
17274 U=`sed -n 's/^U = //p' < "$mf"`
17275 # Find all dependency output files, they are included files with
17276 # $(DEPDIR) in their names. We invoke sed twice because it is the
17277 # simplest approach to changing $(DEPDIR) to its actual value in the
17278 # expansion.
17279 for file in `sed -n "
17280 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17281 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17282 # Make sure the directory exists.
17283 test -f "$dirpart/$file" && continue
17284 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17285$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17286 X"$file" : 'X\(//\)[^/]' \| \
17287 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17288 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17289$as_echo X"$file" |
17290 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17291 s//\1/
17292 q
17293 }
17294 /^X\(\/\/\)[^/].*/{
17295 s//\1/
17296 q
17297 }
17298 /^X\(\/\/\)$/{
17299 s//\1/
17300 q
17301 }
17302 /^X\(\/\).*/{
17303 s//\1/
17304 q
17305 }
17306 s/.*/./; q'`
17307 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17308 # echo "creating $dirpart/$file"
17309 echo '# dummy' > "$dirpart/$file"
e28b3332 17310 done
e28b3332 17311 done
81ecdfbb 17312}
4e8d927d 17313 ;;
81ecdfbb 17314 "default":C)
c906108c
SS
17315case x$CONFIG_HEADERS in
17316xconfig.h:config.in)
17317echo > stamp-h ;;
17318esac
bec39cab 17319 ;;
81ecdfbb 17320
bec39cab 17321 esac
81ecdfbb 17322done # for ac_tag
c906108c 17323
bec39cab 17324
81ecdfbb 17325as_fn_exit 0
bec39cab 17326_ACEOF
bec39cab
AC
17327ac_clean_files=$ac_clean_files_save
17328
81ecdfbb
RW
17329test $ac_write_fail = 0 ||
17330 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17331
bec39cab
AC
17332
17333# configure is writing to config.log, and then calls config.status.
17334# config.status does its own redirection, appending to config.log.
17335# Unfortunately, on DOS this fails, as config.log is still kept open
17336# by configure, so config.status won't be able to write to it; its
17337# output is simply discarded. So we exec the FD to /dev/null,
17338# effectively closing config.log, so it can be properly (re)opened and
17339# appended to by config.status. When coming back to configure, we
17340# need to make the FD available again.
17341if test "$no_create" != yes; then
17342 ac_cs_success=:
17343 ac_config_status_args=
17344 test "$silent" = yes &&
17345 ac_config_status_args="$ac_config_status_args --quiet"
17346 exec 5>/dev/null
17347 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17348 exec 5>>config.log
17349 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17350 # would make configure fail if this is the last instruction.
81ecdfbb 17351 $ac_cs_success || as_fn_exit $?
bec39cab 17352fi
c906108c 17353
bec39cab 17354#
81ecdfbb 17355# CONFIG_SUBDIRS section.
bec39cab 17356#
c906108c
SS
17357if test "$no_recursion" != yes; then
17358
81ecdfbb
RW
17359 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17360 # so they do not pile up.
c906108c
SS
17361 ac_sub_configure_args=
17362 ac_prev=
fdc59709
PB
17363 eval "set x $ac_configure_args"
17364 shift
17365 for ac_arg
17366 do
c906108c
SS
17367 if test -n "$ac_prev"; then
17368 ac_prev=
17369 continue
17370 fi
bec39cab 17371 case $ac_arg in
c906108c
SS
17372 -cache-file | --cache-file | --cache-fil | --cache-fi \
17373 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17374 ac_prev=cache_file ;;
17375 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17376 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17377 | --c=*)
17378 ;;
17379 --config-cache | -C)
c906108c
SS
17380 ;;
17381 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17382 ac_prev=srcdir ;;
17383 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17384 ;;
bec39cab
AC
17385 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17386 ac_prev=prefix ;;
17387 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17388 ;;
81ecdfbb
RW
17389 --disable-option-checking)
17390 ;;
fdc59709
PB
17391 *)
17392 case $ac_arg in
81ecdfbb 17393 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17394 esac
81ecdfbb 17395 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17396 esac
17397 done
17398
bec39cab
AC
17399 # Always prepend --prefix to ensure using the same prefix
17400 # in subdir configurations.
fdc59709
PB
17401 ac_arg="--prefix=$prefix"
17402 case $ac_arg in
81ecdfbb 17403 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17404 esac
81ecdfbb
RW
17405 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17406
17407 # Pass --silent
17408 if test "$silent" = yes; then
17409 ac_sub_configure_args="--silent $ac_sub_configure_args"
17410 fi
17411
17412 # Always prepend --disable-option-checking to silence warnings, since
17413 # different subdirs can have different --enable and --with options.
17414 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17415
b4e70030 17416 ac_popdir=`pwd`
bec39cab 17417 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17418
17419 # Do not complain, so a configure script can configure whichever
17420 # parts of a large source tree are present.
fdc59709 17421 test -d "$srcdir/$ac_dir" || continue
c906108c 17422
81ecdfbb
RW
17423 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17424 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17425 $as_echo "$ac_msg" >&6
17426 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17427 ac_builddir=.
17428
81ecdfbb
RW
17429case "$ac_dir" in
17430.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17431*)
17432 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17433 # A ".." for each directory in $ac_dir_suffix.
17434 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17435 case $ac_top_builddir_sub in
17436 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17437 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17438 esac ;;
17439esac
17440ac_abs_top_builddir=$ac_pwd
17441ac_abs_builddir=$ac_pwd$ac_dir_suffix
17442# for backward compatibility:
17443ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17444
17445case $srcdir in
81ecdfbb 17446 .) # We are building in place.
bec39cab 17447 ac_srcdir=.
81ecdfbb
RW
17448 ac_top_srcdir=$ac_top_builddir_sub
17449 ac_abs_top_srcdir=$ac_pwd ;;
17450 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17451 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17452 ac_top_srcdir=$srcdir
17453 ac_abs_top_srcdir=$srcdir ;;
17454 *) # Relative name.
17455 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17456 ac_top_srcdir=$ac_top_build_prefix$srcdir
17457 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17458esac
81ecdfbb 17459ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17460
c906108c 17461
fdc59709 17462 cd "$ac_dir"
c906108c
SS
17463
17464 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17465 if test -f "$ac_srcdir/configure.gnu"; then
17466 ac_sub_configure=$ac_srcdir/configure.gnu
17467 elif test -f "$ac_srcdir/configure"; then
17468 ac_sub_configure=$ac_srcdir/configure
17469 elif test -f "$ac_srcdir/configure.in"; then
17470 # This should be Cygnus configure.
17471 ac_sub_configure=$ac_aux_dir/configure
c906108c 17472 else
81ecdfbb
RW
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17474$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17475 ac_sub_configure=
17476 fi
17477
17478 # The recursion is here.
17479 if test -n "$ac_sub_configure"; then
c906108c 17480 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17481 case $cache_file in
17482 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17483 *) # Relative name.
17484 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17485 esac
c906108c 17486
81ecdfbb
RW
17487 { $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
17488$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17489 # The eval makes quoting arguments work.
fdc59709
PB
17490 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17491 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17492 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17493 fi
17494
fdc59709 17495 cd "$ac_popdir"
c906108c
SS
17496 done
17497fi
81ecdfbb
RW
17498if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17500$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17501fi
c906108c
SS
17502
17503
17504exit 0
This page took 2.103324 seconds and 4 git commands to generate.