gdb/gdbserver/
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
ac534cba
JB
661PYTHON_LIBS
662PYTHON_CPPFLAGS
81ecdfbb 663PYTHON_CFLAGS
ec685c5e 664python_prog_path
81ecdfbb
RW
665LTLIBEXPAT
666LIBEXPAT
667HAVE_LIBEXPAT
b8e0a31c 668JIT_READER_DIR
f997c383 669TARGET_PTR
39037522 670READLINE_TEXI_INCFLAG
81ecdfbb
RW
671READLINE_CFLAGS
672READLINE_DEPS
673READLINE
674MIG
675WINDRES
676DLLTOOL
677AR
678YFLAGS
679YACC
680LN_S
681REPORT_BUGS_TEXI
682REPORT_BUGS_TO
683PKGVERSION
684TARGET_OBS
685subdirs
686GDB_DATADIR
687DEBUGDIR
688am__fastdepCC_FALSE
689am__fastdepCC_TRUE
690AMDEPBACKSLASH
691AMDEP_FALSE
692AMDEP_TRUE
693am__quote
694am__include
695am__untar
696am__tar
697AMTAR
698AWK
699mkdir_p
700MKDIR_P
701INSTALL_STRIP_PROGRAM
702STRIP
703install_sh
81ecdfbb
RW
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709CYGPATH_W
710am__isrc
711INSTALL_DATA
712INSTALL_SCRIPT
713INSTALL_PROGRAM
5048e516
JK
714MAKEINFO_EXTRA_FLAGS
715MAKEINFOFLAGS
716MAKEINFO
81ecdfbb
RW
717PACKAGE
718GNULIB_STDINT_H
719LIBGNU_LTLIBDEPS
720LIBGNU_LIBDEPS
f434ba03
PA
721gltests_WITNESS
722HAVE_WINT_T
81ecdfbb 723HAVE_WCHAR_H
f434ba03
PA
724NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
725NEXT_WCHAR_H
81ecdfbb 726REPLACE_WCWIDTH
f434ba03
PA
727REPLACE_WCSNRTOMBS
728REPLACE_WCSRTOMBS
729REPLACE_WCRTOMB
730REPLACE_MBSNRTOWCS
731REPLACE_MBSRTOWCS
732REPLACE_MBRLEN
733REPLACE_MBRTOWC
734REPLACE_MBSINIT
735REPLACE_WCTOB
736REPLACE_BTOWC
737REPLACE_MBSTATE_T
81ecdfbb 738HAVE_DECL_WCWIDTH
f434ba03
PA
739HAVE_DECL_WCTOB
740HAVE_WCSNRTOMBS
741HAVE_WCSRTOMBS
742HAVE_WCRTOMB
743HAVE_MBSNRTOWCS
744HAVE_MBSRTOWCS
745HAVE_MBRLEN
746HAVE_MBRTOWC
747HAVE_MBSINIT
748HAVE_BTOWC
81ecdfbb 749GNULIB_WCWIDTH
f434ba03
PA
750GNULIB_WCSNRTOMBS
751GNULIB_WCSRTOMBS
752GNULIB_WCRTOMB
753GNULIB_MBSNRTOWCS
754GNULIB_MBSRTOWCS
755GNULIB_MBRLEN
756GNULIB_MBRTOWC
757GNULIB_MBSINIT
758GNULIB_WCTOB
759GNULIB_BTOWC
760NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
761NEXT_STRING_H
762STDINT_H
763WINT_T_SUFFIX
764WCHAR_T_SUFFIX
81ecdfbb 765SIG_ATOMIC_T_SUFFIX
f434ba03 766SIZE_T_SUFFIX
81ecdfbb
RW
767PTRDIFF_T_SUFFIX
768HAVE_SIGNED_WINT_T
769HAVE_SIGNED_WCHAR_T
770HAVE_SIGNED_SIG_ATOMIC_T
771BITSIZEOF_WINT_T
772BITSIZEOF_WCHAR_T
81ecdfbb 773BITSIZEOF_SIG_ATOMIC_T
f434ba03 774BITSIZEOF_SIZE_T
81ecdfbb
RW
775BITSIZEOF_PTRDIFF_T
776HAVE_SYS_BITYPES_H
777HAVE_SYS_INTTYPES_H
778HAVE_STDINT_H
f434ba03 779NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 780NEXT_STDINT_H
81ecdfbb
RW
781HAVE_SYS_TYPES_H
782HAVE_INTTYPES_H
783HAVE_UNSIGNED_LONG_LONG_INT
784HAVE_LONG_LONG_INT
f434ba03
PA
785NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
786NEXT_STDDEF_H
787PRAGMA_SYSTEM_HEADER
788INCLUDE_NEXT_AS_FIRST_DIRECTIVE
789INCLUDE_NEXT
790STDDEF_H
791HAVE_WCHAR_T
792REPLACE_NULL
793APPLE_UNIVERSAL_BUILD
794UNDEFINE_STRTOK_R
795REPLACE_STRTOK_R
81ecdfbb 796REPLACE_STRSIGNAL
f434ba03
PA
797REPLACE_STRNLEN
798REPLACE_STRNDUP
799REPLACE_STRNCAT
81ecdfbb 800REPLACE_STRERROR
f434ba03
PA
801REPLACE_STRCASESTR
802REPLACE_STRSTR
803REPLACE_STRDUP
804REPLACE_STPNCPY
805REPLACE_MEMMEM
806REPLACE_MEMCHR
807HAVE_STRVERSCMP
81ecdfbb 808HAVE_DECL_STRSIGNAL
81ecdfbb
RW
809HAVE_DECL_STRTOK_R
810HAVE_STRCASESTR
811HAVE_STRSEP
812HAVE_STRPBRK
813HAVE_DECL_STRNLEN
814HAVE_DECL_STRNDUP
81ecdfbb
RW
815HAVE_DECL_STRDUP
816HAVE_STRCHRNUL
817HAVE_STPNCPY
818HAVE_STPCPY
f434ba03 819HAVE_RAWMEMCHR
81ecdfbb
RW
820HAVE_DECL_MEMRCHR
821HAVE_MEMPCPY
822HAVE_DECL_MEMMEM
f434ba03
PA
823HAVE_MEMCHR
824HAVE_MBSLEN
825GNULIB_STRVERSCMP
81ecdfbb
RW
826GNULIB_STRSIGNAL
827GNULIB_STRERROR
828GNULIB_MBSTOK_R
829GNULIB_MBSSEP
830GNULIB_MBSSPN
831GNULIB_MBSPBRK
832GNULIB_MBSCSPN
833GNULIB_MBSCASESTR
834GNULIB_MBSPCASECMP
835GNULIB_MBSNCASECMP
836GNULIB_MBSCASECMP
837GNULIB_MBSSTR
838GNULIB_MBSRCHR
839GNULIB_MBSCHR
840GNULIB_MBSNLEN
841GNULIB_MBSLEN
842GNULIB_STRTOK_R
843GNULIB_STRCASESTR
844GNULIB_STRSTR
845GNULIB_STRSEP
846GNULIB_STRPBRK
847GNULIB_STRNLEN
848GNULIB_STRNDUP
f434ba03 849GNULIB_STRNCAT
81ecdfbb
RW
850GNULIB_STRDUP
851GNULIB_STRCHRNUL
852GNULIB_STPNCPY
853GNULIB_STPCPY
f434ba03 854GNULIB_RAWMEMCHR
81ecdfbb
RW
855GNULIB_MEMRCHR
856GNULIB_MEMPCPY
857GNULIB_MEMMEM
f434ba03 858GNULIB_MEMCHR
81ecdfbb
RW
859GL_COND_LIBTOOL_FALSE
860GL_COND_LIBTOOL_TRUE
861CATOBJEXT
862GENCAT
863INSTOBJEXT
864DATADIRNAME
865CATALOGS
866POSUB
867GMSGFMT
868XGETTEXT
869INCINTL
870LIBINTL_DEP
871LIBINTL
872USE_NLS
873SET_MAKE
874GMAKE_FALSE
875GMAKE_TRUE
876MAKE
877CCDEPMODE
878DEPDIR
879am__leading_dot
880target_os
881target_vendor
882target_cpu
883target
f434ba03
PA
884RANLIB
885EGREP
886GREP
887CPP
81ecdfbb
RW
888host_os
889host_vendor
890host_cpu
891host
892build_os
893build_vendor
894build_cpu
895build
81ecdfbb
RW
896OBJEXT
897EXEEXT
898ac_ct_CC
899CPPFLAGS
900LDFLAGS
901CFLAGS
902CC
903MAINT
904MAINTAINER_MODE_FALSE
905MAINTAINER_MODE_TRUE
906target_alias
907host_alias
908build_alias
909LIBS
910ECHO_T
911ECHO_N
912ECHO_C
913DEFS
914mandir
915localedir
916libdir
917psdir
918pdfdir
919dvidir
920htmldir
921infodir
922docdir
923oldincludedir
924includedir
925localstatedir
926sharedstatedir
927sysconfdir
928datadir
929datarootdir
930libexecdir
931sbindir
932bindir
933program_transform_name
934prefix
935exec_prefix
936PACKAGE_URL
937PACKAGE_BUGREPORT
938PACKAGE_STRING
939PACKAGE_VERSION
940PACKAGE_TARNAME
941PACKAGE_NAME
942PATH_SEPARATOR
943SHELL'
a4ce5b0d 944ac_subst_files='host_makefile_frag'
81ecdfbb
RW
945ac_user_opts='
946enable_option_checking
947enable_maintainer_mode
da2f07f1
JK
948enable_plugins
949enable_largefile
81ecdfbb
RW
950enable_dependency_tracking
951with_separate_debug_dir
952with_gdb_datadir
953with_relocated_sources
954enable_targets
955enable_64_bit_bfd
956enable_gdbcli
957enable_gdbmi
958enable_tui
959enable_gdbtk
05e7c244 960with_libunwind_ia64
81ecdfbb
RW
961with_curses
962enable_profiling
963with_pkgversion
964with_bugurl
b040ad30 965with_zlib
81ecdfbb 966with_libiconv_prefix
478aac75 967with_iconv_bin
81ecdfbb 968with_system_readline
b8e0a31c 969with_jit_reader_dir
81ecdfbb
RW
970with_expat
971with_gnu_ld
972enable_rpath
973with_libexpat_prefix
974with_python
975with_included_regex
976with_sysroot
977with_system_gdbinit
978enable_werror
979enable_build_warnings
980enable_gdb_build_warnings
981with_tcl
982with_tk
983with_x
984enable_sim
985enable_multi_ice
496c0e1b 986enable_gdbserver
81ecdfbb
RW
987'
988 ac_precious_vars='build_alias
989host_alias
990target_alias
991CC
992CFLAGS
993LDFLAGS
994LIBS
995CPPFLAGS
996CPP
f06e05e0
JK
997MAKEINFO
998MAKEINFOFLAGS
81ecdfbb
RW
999YACC
1000YFLAGS
1001XMKMF'
5ae98d25 1002ac_subdirs_all='testsuite
81ecdfbb
RW
1003gdbtk
1004multi-ice
1005gdbserver'
c906108c
SS
1006
1007# Initialize some variables set by options.
bec39cab
AC
1008ac_init_help=
1009ac_init_version=false
81ecdfbb
RW
1010ac_unrecognized_opts=
1011ac_unrecognized_sep=
c906108c
SS
1012# The variables have the same names as the options, with
1013# dashes changed to underlines.
bec39cab 1014cache_file=/dev/null
c906108c 1015exec_prefix=NONE
c906108c 1016no_create=
c906108c
SS
1017no_recursion=
1018prefix=NONE
1019program_prefix=NONE
1020program_suffix=NONE
1021program_transform_name=s,x,x,
1022silent=
1023site=
1024srcdir=
c906108c
SS
1025verbose=
1026x_includes=NONE
1027x_libraries=NONE
bec39cab
AC
1028
1029# Installation directory options.
1030# These are left unexpanded so users can "make install exec_prefix=/foo"
1031# and all the variables that are supposed to be based on exec_prefix
1032# by default will actually change.
1033# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1034# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1035bindir='${exec_prefix}/bin'
1036sbindir='${exec_prefix}/sbin'
1037libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1038datarootdir='${prefix}/share'
1039datadir='${datarootdir}'
c906108c
SS
1040sysconfdir='${prefix}/etc'
1041sharedstatedir='${prefix}/com'
1042localstatedir='${prefix}/var'
c906108c
SS
1043includedir='${prefix}/include'
1044oldincludedir='/usr/include'
81ecdfbb
RW
1045docdir='${datarootdir}/doc/${PACKAGE}'
1046infodir='${datarootdir}/info'
1047htmldir='${docdir}'
1048dvidir='${docdir}'
1049pdfdir='${docdir}'
1050psdir='${docdir}'
1051libdir='${exec_prefix}/lib'
1052localedir='${datarootdir}/locale'
1053mandir='${datarootdir}/man'
c906108c 1054
c906108c 1055ac_prev=
81ecdfbb 1056ac_dashdash=
c906108c
SS
1057for ac_option
1058do
c906108c
SS
1059 # If the previous option needs an argument, assign it.
1060 if test -n "$ac_prev"; then
81ecdfbb 1061 eval $ac_prev=\$ac_option
c906108c
SS
1062 ac_prev=
1063 continue
1064 fi
1065
81ecdfbb
RW
1066 case $ac_option in
1067 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1068 *) ac_optarg=yes ;;
1069 esac
c906108c
SS
1070
1071 # Accept the important Cygnus configure options, so we can diagnose typos.
1072
81ecdfbb
RW
1073 case $ac_dashdash$ac_option in
1074 --)
1075 ac_dashdash=yes ;;
c906108c
SS
1076
1077 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1078 ac_prev=bindir ;;
1079 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1080 bindir=$ac_optarg ;;
c906108c
SS
1081
1082 -build | --build | --buil | --bui | --bu)
bec39cab 1083 ac_prev=build_alias ;;
c906108c 1084 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1085 build_alias=$ac_optarg ;;
c906108c
SS
1086
1087 -cache-file | --cache-file | --cache-fil | --cache-fi \
1088 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1089 ac_prev=cache_file ;;
1090 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1091 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1092 cache_file=$ac_optarg ;;
1093
1094 --config-cache | -C)
1095 cache_file=config.cache ;;
c906108c 1096
81ecdfbb 1097 -datadir | --datadir | --datadi | --datad)
c906108c 1098 ac_prev=datadir ;;
81ecdfbb 1099 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1100 datadir=$ac_optarg ;;
c906108c 1101
81ecdfbb
RW
1102 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1103 | --dataroo | --dataro | --datar)
1104 ac_prev=datarootdir ;;
1105 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1106 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1107 datarootdir=$ac_optarg ;;
1108
c906108c 1109 -disable-* | --disable-*)
81ecdfbb 1110 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1111 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1113 as_fn_error "invalid feature name: $ac_useropt"
1114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"enable_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval enable_$ac_useropt=no ;;
1124
1125 -docdir | --docdir | --docdi | --doc | --do)
1126 ac_prev=docdir ;;
1127 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1128 docdir=$ac_optarg ;;
1129
1130 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1131 ac_prev=dvidir ;;
1132 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1133 dvidir=$ac_optarg ;;
c906108c
SS
1134
1135 -enable-* | --enable-*)
81ecdfbb 1136 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1137 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1138 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1139 as_fn_error "invalid feature name: $ac_useropt"
1140 ac_useropt_orig=$ac_useropt
1141 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1142 case $ac_user_opts in
1143 *"
1144"enable_$ac_useropt"
1145"*) ;;
1146 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1147 ac_unrecognized_sep=', ';;
b4e70030 1148 esac
81ecdfbb 1149 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1150
1151 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1152 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1153 | --exec | --exe | --ex)
1154 ac_prev=exec_prefix ;;
1155 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1156 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1157 | --exec=* | --exe=* | --ex=*)
bec39cab 1158 exec_prefix=$ac_optarg ;;
c906108c
SS
1159
1160 -gas | --gas | --ga | --g)
1161 # Obsolete; use --with-gas.
1162 with_gas=yes ;;
1163
bec39cab
AC
1164 -help | --help | --hel | --he | -h)
1165 ac_init_help=long ;;
1166 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1167 ac_init_help=recursive ;;
1168 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1169 ac_init_help=short ;;
c906108c
SS
1170
1171 -host | --host | --hos | --ho)
bec39cab 1172 ac_prev=host_alias ;;
c906108c 1173 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1174 host_alias=$ac_optarg ;;
c906108c 1175
81ecdfbb
RW
1176 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1177 ac_prev=htmldir ;;
1178 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1179 | --ht=*)
1180 htmldir=$ac_optarg ;;
1181
c906108c
SS
1182 -includedir | --includedir | --includedi | --included | --include \
1183 | --includ | --inclu | --incl | --inc)
1184 ac_prev=includedir ;;
1185 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1186 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1187 includedir=$ac_optarg ;;
c906108c
SS
1188
1189 -infodir | --infodir | --infodi | --infod | --info | --inf)
1190 ac_prev=infodir ;;
1191 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1192 infodir=$ac_optarg ;;
c906108c
SS
1193
1194 -libdir | --libdir | --libdi | --libd)
1195 ac_prev=libdir ;;
1196 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1197 libdir=$ac_optarg ;;
c906108c
SS
1198
1199 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1200 | --libexe | --libex | --libe)
1201 ac_prev=libexecdir ;;
1202 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1203 | --libexe=* | --libex=* | --libe=*)
bec39cab 1204 libexecdir=$ac_optarg ;;
c906108c 1205
81ecdfbb
RW
1206 -localedir | --localedir | --localedi | --localed | --locale)
1207 ac_prev=localedir ;;
1208 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1209 localedir=$ac_optarg ;;
1210
c906108c 1211 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1212 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1213 ac_prev=localstatedir ;;
1214 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1215 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1216 localstatedir=$ac_optarg ;;
c906108c
SS
1217
1218 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1219 ac_prev=mandir ;;
1220 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1221 mandir=$ac_optarg ;;
c906108c
SS
1222
1223 -nfp | --nfp | --nf)
1224 # Obsolete; use --without-fp.
1225 with_fp=no ;;
1226
1227 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1228 | --no-cr | --no-c | -n)
c906108c
SS
1229 no_create=yes ;;
1230
1231 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1232 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1233 no_recursion=yes ;;
1234
1235 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1236 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1237 | --oldin | --oldi | --old | --ol | --o)
1238 ac_prev=oldincludedir ;;
1239 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1240 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1241 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1242 oldincludedir=$ac_optarg ;;
c906108c
SS
1243
1244 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1245 ac_prev=prefix ;;
1246 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1247 prefix=$ac_optarg ;;
c906108c
SS
1248
1249 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1250 | --program-pre | --program-pr | --program-p)
1251 ac_prev=program_prefix ;;
1252 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1253 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1254 program_prefix=$ac_optarg ;;
c906108c
SS
1255
1256 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1257 | --program-suf | --program-su | --program-s)
1258 ac_prev=program_suffix ;;
1259 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1260 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1261 program_suffix=$ac_optarg ;;
c906108c
SS
1262
1263 -program-transform-name | --program-transform-name \
1264 | --program-transform-nam | --program-transform-na \
1265 | --program-transform-n | --program-transform- \
1266 | --program-transform | --program-transfor \
1267 | --program-transfo | --program-transf \
1268 | --program-trans | --program-tran \
1269 | --progr-tra | --program-tr | --program-t)
1270 ac_prev=program_transform_name ;;
1271 -program-transform-name=* | --program-transform-name=* \
1272 | --program-transform-nam=* | --program-transform-na=* \
1273 | --program-transform-n=* | --program-transform-=* \
1274 | --program-transform=* | --program-transfor=* \
1275 | --program-transfo=* | --program-transf=* \
1276 | --program-trans=* | --program-tran=* \
1277 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1278 program_transform_name=$ac_optarg ;;
c906108c 1279
81ecdfbb
RW
1280 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1281 ac_prev=pdfdir ;;
1282 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1283 pdfdir=$ac_optarg ;;
1284
1285 -psdir | --psdir | --psdi | --psd | --ps)
1286 ac_prev=psdir ;;
1287 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1288 psdir=$ac_optarg ;;
1289
c906108c
SS
1290 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1291 | -silent | --silent | --silen | --sile | --sil)
1292 silent=yes ;;
1293
1294 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1295 ac_prev=sbindir ;;
1296 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1297 | --sbi=* | --sb=*)
bec39cab 1298 sbindir=$ac_optarg ;;
c906108c
SS
1299
1300 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1301 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1302 | --sharedst | --shareds | --shared | --share | --shar \
1303 | --sha | --sh)
1304 ac_prev=sharedstatedir ;;
1305 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1306 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1307 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1308 | --sha=* | --sh=*)
bec39cab 1309 sharedstatedir=$ac_optarg ;;
c906108c
SS
1310
1311 -site | --site | --sit)
1312 ac_prev=site ;;
1313 -site=* | --site=* | --sit=*)
bec39cab 1314 site=$ac_optarg ;;
3ace7edb 1315
c906108c
SS
1316 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1317 ac_prev=srcdir ;;
1318 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1319 srcdir=$ac_optarg ;;
c906108c
SS
1320
1321 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1322 | --syscon | --sysco | --sysc | --sys | --sy)
1323 ac_prev=sysconfdir ;;
1324 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1325 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1326 sysconfdir=$ac_optarg ;;
c906108c
SS
1327
1328 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1329 ac_prev=target_alias ;;
c906108c 1330 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1331 target_alias=$ac_optarg ;;
c906108c
SS
1332
1333 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1334 verbose=yes ;;
1335
bec39cab
AC
1336 -version | --version | --versio | --versi | --vers | -V)
1337 ac_init_version=: ;;
c906108c
SS
1338
1339 -with-* | --with-*)
81ecdfbb 1340 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1341 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1342 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1343 as_fn_error "invalid package name: $ac_useropt"
1344 ac_useropt_orig=$ac_useropt
1345 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1346 case $ac_user_opts in
1347 *"
1348"with_$ac_useropt"
1349"*) ;;
1350 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1351 ac_unrecognized_sep=', ';;
b4e70030 1352 esac
81ecdfbb 1353 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1354
1355 -without-* | --without-*)
81ecdfbb 1356 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1357 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1358 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1359 as_fn_error "invalid package name: $ac_useropt"
1360 ac_useropt_orig=$ac_useropt
1361 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1362 case $ac_user_opts in
1363 *"
1364"with_$ac_useropt"
1365"*) ;;
1366 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1367 ac_unrecognized_sep=', ';;
1368 esac
1369 eval with_$ac_useropt=no ;;
c906108c
SS
1370
1371 --x)
1372 # Obsolete; use --with-x.
1373 with_x=yes ;;
1374
1375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1376 | --x-incl | --x-inc | --x-in | --x-i)
1377 ac_prev=x_includes ;;
1378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1380 x_includes=$ac_optarg ;;
c906108c
SS
1381
1382 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1384 ac_prev=x_libraries ;;
1385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1387 x_libraries=$ac_optarg ;;
c906108c 1388
81ecdfbb
RW
1389 -*) as_fn_error "unrecognized option: \`$ac_option'
1390Try \`$0 --help' for more information."
c906108c
SS
1391 ;;
1392
bec39cab
AC
1393 *=*)
1394 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1395 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1396 case $ac_envvar in #(
1397 '' | [0-9]* | *[!_$as_cr_alnum]* )
1398 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1399 esac
1400 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1401 export $ac_envvar ;;
1402
c906108c 1403 *)
bec39cab 1404 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1405 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1406 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1407 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1408 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1409 ;;
1410
1411 esac
1412done
1413
1414if test -n "$ac_prev"; then
bec39cab 1415 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1416 as_fn_error "missing argument to $ac_option"
c906108c 1417fi
c906108c 1418
81ecdfbb
RW
1419if test -n "$ac_unrecognized_opts"; then
1420 case $enable_option_checking in
1421 no) ;;
1422 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1423 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1424 esac
81ecdfbb 1425fi
b4e70030 1426
81ecdfbb
RW
1427# Check all directory arguments for consistency.
1428for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1429 datadir sysconfdir sharedstatedir localstatedir includedir \
1430 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1431 libdir localedir mandir
b4e70030 1432do
81ecdfbb
RW
1433 eval ac_val=\$$ac_var
1434 # Remove trailing slashes.
1435 case $ac_val in
1436 */ )
1437 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1438 eval $ac_var=\$ac_val;;
1439 esac
1440 # Be sure to have absolute directory names.
b4e70030 1441 case $ac_val in
81ecdfbb
RW
1442 [\\/$]* | ?:[\\/]* ) continue;;
1443 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1444 esac
81ecdfbb 1445 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1446done
1447
bec39cab
AC
1448# There might be people who depend on the old broken behavior: `$host'
1449# used to hold the argument of --host etc.
1450# FIXME: To remove some day.
1451build=$build_alias
1452host=$host_alias
1453target=$target_alias
1454
1455# FIXME: To remove some day.
1456if test "x$host_alias" != x; then
1457 if test "x$build_alias" = x; then
1458 cross_compiling=maybe
81ecdfbb 1459 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1460 If a cross compiler is detected then cross compile mode will be used." >&2
1461 elif test "x$build_alias" != "x$host_alias"; then
1462 cross_compiling=yes
1463 fi
1464fi
c906108c 1465
bec39cab
AC
1466ac_tool_prefix=
1467test -n "$host_alias" && ac_tool_prefix=$host_alias-
1468
1469test "$silent" = yes && exec 6>/dev/null
c906108c 1470
c906108c 1471
81ecdfbb
RW
1472ac_pwd=`pwd` && test -n "$ac_pwd" &&
1473ac_ls_di=`ls -di .` &&
1474ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1475 as_fn_error "working directory cannot be determined"
1476test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1477 as_fn_error "pwd does not report name of working directory"
1478
1479
c906108c
SS
1480# Find the source files, if location was not specified.
1481if test -z "$srcdir"; then
1482 ac_srcdir_defaulted=yes
81ecdfbb
RW
1483 # Try the directory containing this script, then the parent directory.
1484 ac_confdir=`$as_dirname -- "$as_myself" ||
1485$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1486 X"$as_myself" : 'X\(//\)[^/]' \| \
1487 X"$as_myself" : 'X\(//\)$' \| \
1488 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1489$as_echo X"$as_myself" |
1490 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1491 s//\1/
1492 q
1493 }
1494 /^X\(\/\/\)[^/].*/{
1495 s//\1/
1496 q
1497 }
1498 /^X\(\/\/\)$/{
1499 s//\1/
1500 q
1501 }
1502 /^X\(\/\).*/{
1503 s//\1/
1504 q
1505 }
1506 s/.*/./; q'`
c906108c 1507 srcdir=$ac_confdir
81ecdfbb 1508 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1509 srcdir=..
1510 fi
1511else
1512 ac_srcdir_defaulted=no
1513fi
81ecdfbb
RW
1514if test ! -r "$srcdir/$ac_unique_file"; then
1515 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1516 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1517fi
1518ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1519ac_abs_confdir=`(
1520 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1521 pwd)`
1522# When building in place, set srcdir=.
1523if test "$ac_abs_confdir" = "$ac_pwd"; then
1524 srcdir=.
1525fi
1526# Remove unnecessary trailing slashes from srcdir.
1527# Double slashes in file names in object file debugging info
1528# mess up M-x gdb in Emacs.
1529case $srcdir in
1530*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1531esac
1532for ac_var in $ac_precious_vars; do
1533 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1534 eval ac_env_${ac_var}_value=\$${ac_var}
1535 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1536 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1537done
c906108c 1538
bec39cab
AC
1539#
1540# Report the --help message.
1541#
1542if test "$ac_init_help" = "long"; then
1543 # Omit some internal or obsolete options to make the list less imposing.
1544 # This message is too long to be a string in the A/UX 3.1 sh.
1545 cat <<_ACEOF
1546\`configure' configures this package to adapt to many kinds of systems.
1547
1548Usage: $0 [OPTION]... [VAR=VALUE]...
1549
1550To assign environment variables (e.g., CC, CFLAGS...), specify them as
1551VAR=VALUE. See below for descriptions of some of the useful variables.
1552
1553Defaults for the options are specified in brackets.
1554
1555Configuration:
1556 -h, --help display this help and exit
1557 --help=short display options specific to this package
1558 --help=recursive display the short help of all the included packages
1559 -V, --version display version information and exit
1560 -q, --quiet, --silent do not print \`checking...' messages
1561 --cache-file=FILE cache test results in FILE [disabled]
1562 -C, --config-cache alias for \`--cache-file=config.cache'
1563 -n, --no-create do not create output files
1564 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1565
bec39cab
AC
1566Installation directories:
1567 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1568 [$ac_default_prefix]
bec39cab 1569 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1570 [PREFIX]
bec39cab
AC
1571
1572By default, \`make install' will install all the files in
1573\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1574an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1575for instance \`--prefix=\$HOME'.
1576
1577For better control, use the options below.
1578
1579Fine tuning of the installation directories:
81ecdfbb
RW
1580 --bindir=DIR user executables [EPREFIX/bin]
1581 --sbindir=DIR system admin executables [EPREFIX/sbin]
1582 --libexecdir=DIR program executables [EPREFIX/libexec]
1583 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1584 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1585 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1586 --libdir=DIR object code libraries [EPREFIX/lib]
1587 --includedir=DIR C header files [PREFIX/include]
1588 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1589 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1590 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1591 --infodir=DIR info documentation [DATAROOTDIR/info]
1592 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1593 --mandir=DIR man documentation [DATAROOTDIR/man]
1594 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1595 --htmldir=DIR html documentation [DOCDIR]
1596 --dvidir=DIR dvi documentation [DOCDIR]
1597 --pdfdir=DIR pdf documentation [DOCDIR]
1598 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1599_ACEOF
1600
1601 cat <<\_ACEOF
1602
1603Program names:
1604 --program-prefix=PREFIX prepend PREFIX to installed program names
1605 --program-suffix=SUFFIX append SUFFIX to installed program names
1606 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1607
1608X features:
1609 --x-includes=DIR X include files are in DIR
1610 --x-libraries=DIR X library files are in DIR
1611
1612System types:
1613 --build=BUILD configure for building on BUILD [guessed]
1614 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1615 --target=TARGET configure for building compilers for TARGET [HOST]
1616_ACEOF
1617fi
1618
1619if test -n "$ac_init_help"; then
1620
1621 cat <<\_ACEOF
1622
1623Optional Features:
81ecdfbb 1624 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1625 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1626 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1627 --enable-maintainer-mode enable make rules and dependencies not useful
1628 (and sometimes confusing) to the casual installer
da2f07f1
JK
1629 --enable-plugins Enable support for plugins (defaults no)
1630 --disable-largefile omit support for large files
e28b3332
DJ
1631 --disable-dependency-tracking speeds up one-time build
1632 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1633 --enable-targets=TARGETS
1634 alternative target configurations
c0993dbe 1635 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1636 --disable-gdbcli disable command-line interface (CLI)
1637 --disable-gdbmi disable machine-interface (MI)
1638 --enable-tui enable full-screen terminal user interface (TUI)
1639 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1640 --enable-profiling enable profiling of GDB
3841debe 1641 --disable-rpath do not hardcode runtime library paths
a1220294 1642 --enable-werror treat compile warnings as errors
32c1c914 1643 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1644 --enable-gdb-build-warnings
32c1c914 1645 enable GDB specific build-time compiler warnings if
a1220294 1646 gcc is used
32c1c914 1647 --enable-sim link gdb with simulator
bec39cab 1648 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1649 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1650 is auto)
bec39cab
AC
1651
1652Optional Packages:
1653 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1654 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1655 --with-separate-debug-dir=PATH
32c1c914 1656 look for global separate debug info in this path
62e4f60c 1657 [LIBDIR/debug]
b14b1491
TT
1658 --with-gdb-datadir=PATH look for global separate data files in this path
1659 [DATADIR/gdb]
29b0e8a2 1660 --with-relocated-sources=PATH
32c1c914 1661 automatically relocate this path for source files
05e7c244 1662 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1663 --with-curses use the curses library instead of the termcap
1664 library
c16158bc
JM
1665 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1666 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1667 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1668 --with-libiconv-prefix=DIR
1669 search for libiconv in DIR/include and DIR/lib
478aac75 1670 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1671 --with-system-readline use installed readline library
b8e0a31c
SD
1672 --with-jit-reader-dir=PATH
1673 directory to load the JIT readers from
5c39566f 1674 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1675 --with-gnu-ld assume the C compiler uses GNU ld default=no
1676 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1677 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1678 --with-python[=PYTHON] include python support
1679 (auto/yes/no/<python-program>)
a1220294
TT
1680 --without-included-regex
1681 don't use included regex; this is the default on
1682 systems with version 2 of the GNU C library (use
1683 with caution on other system)
81ecdfbb 1684 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1685 --with-system-gdbinit=PATH
32c1c914 1686 automatically load a system-wide gdbinit file
5062cc19
KS
1687 --with-tcl directory containing tcl configuration (tclConfig.sh)
1688 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1689 --with-x use the X Window System
bec39cab
AC
1690
1691Some influential environment variables:
1692 CC C compiler command
1693 CFLAGS C compiler flags
1694 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1695 nonstandard directory <lib dir>
81ecdfbb
RW
1696 LIBS libraries to pass to the linker, e.g. -l<library>
1697 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1698 you have headers in a nonstandard directory <include dir>
bec39cab 1699 CPP C preprocessor
f06e05e0
JK
1700 MAKEINFO Parent configure detects if it is of sufficient version.
1701 MAKEINFOFLAGS
1702 Parameters for MAKEINFO.
81ecdfbb
RW
1703 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1704 the first program found out of: `bison -y', `byacc', `yacc'.
1705 YFLAGS The list of arguments that will be passed by default to $YACC.
1706 This script will default YFLAGS to the empty string to avoid a
1707 default value of `-d' given by some make applications.
1708 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1709
1710Use these variables to override the choices made by `configure' or to help
1711it to find libraries and programs with nonstandard names/locations.
1712
81ecdfbb 1713Report bugs to the package provider.
bec39cab 1714_ACEOF
81ecdfbb 1715ac_status=$?
bec39cab
AC
1716fi
1717
1718if test "$ac_init_help" = "recursive"; then
1719 # If there are subdirs, report their specific --help.
bec39cab 1720 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1721 test -d "$ac_dir" ||
1722 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1723 continue
bec39cab
AC
1724 ac_builddir=.
1725
81ecdfbb
RW
1726case "$ac_dir" in
1727.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1728*)
1729 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1730 # A ".." for each directory in $ac_dir_suffix.
1731 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1732 case $ac_top_builddir_sub in
1733 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1734 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1735 esac ;;
1736esac
1737ac_abs_top_builddir=$ac_pwd
1738ac_abs_builddir=$ac_pwd$ac_dir_suffix
1739# for backward compatibility:
1740ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1741
1742case $srcdir in
81ecdfbb 1743 .) # We are building in place.
bec39cab 1744 ac_srcdir=.
81ecdfbb
RW
1745 ac_top_srcdir=$ac_top_builddir_sub
1746 ac_abs_top_srcdir=$ac_pwd ;;
1747 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1748 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1749 ac_top_srcdir=$srcdir
1750 ac_abs_top_srcdir=$srcdir ;;
1751 *) # Relative name.
1752 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1753 ac_top_srcdir=$ac_top_build_prefix$srcdir
1754 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1755esac
81ecdfbb 1756ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1757
81ecdfbb
RW
1758 cd "$ac_dir" || { ac_status=$?; continue; }
1759 # Check for guested configure.
1760 if test -f "$ac_srcdir/configure.gnu"; then
1761 echo &&
1762 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1763 elif test -f "$ac_srcdir/configure"; then
1764 echo &&
1765 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1766 else
81ecdfbb
RW
1767 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1768 fi || ac_status=$?
1769 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1770 done
1771fi
1772
81ecdfbb 1773test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1774if $ac_init_version; then
1775 cat <<\_ACEOF
81ecdfbb
RW
1776configure
1777generated by GNU Autoconf 2.64
bec39cab 1778
81ecdfbb 1779Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1780This configure script is free software; the Free Software Foundation
1781gives unlimited permission to copy, distribute and modify it.
1782_ACEOF
81ecdfbb 1783 exit
bec39cab 1784fi
bec39cab 1785
81ecdfbb
RW
1786## ------------------------ ##
1787## Autoconf initialization. ##
1788## ------------------------ ##
bec39cab 1789
81ecdfbb
RW
1790# ac_fn_c_try_compile LINENO
1791# --------------------------
1792# Try to compile conftest.$ac_ext, and return whether this succeeded.
1793ac_fn_c_try_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 rm -f conftest.$ac_objext
1797 if { { ac_try="$ac_compile"
1798case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_compile") 2>conftest.err
1805 ac_status=$?
1806 if test -s conftest.err; then
1807 grep -v '^ *+' conftest.err >conftest.er1
1808 cat conftest.er1 >&5
1809 mv -f conftest.er1 conftest.err
1810 fi
1811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1812 test $ac_status = 0; } && {
1813 test -z "$ac_c_werror_flag" ||
1814 test ! -s conftest.err
1815 } && test -s conftest.$ac_objext; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1820
81ecdfbb
RW
1821 ac_retval=1
1822fi
1823 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1824 return $ac_retval
1825
1826} # ac_fn_c_try_compile
1827
1828# ac_fn_c_try_cpp LINENO
1829# ----------------------
1830# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831ac_fn_c_try_cpp ()
bec39cab 1832{
81ecdfbb
RW
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838esac
1839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840$as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1847 fi
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849 test $ac_status = 0; } >/dev/null && {
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1857
81ecdfbb
RW
1858 ac_retval=1
1859fi
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861 return $ac_retval
bec39cab 1862
81ecdfbb 1863} # ac_fn_c_try_cpp
bec39cab 1864
81ecdfbb
RW
1865# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868# the include files in INCLUDES and setting the cache variable VAR
1869# accordingly.
1870ac_fn_c_check_header_mongrel ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
1876if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1877 $as_echo_n "(cached) " >&6
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882else
1883 # Is the header compilable?
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885$as_echo_n "checking $2 usability... " >&6; }
1886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893else
1894 ac_header_compiler=no
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898$as_echo "$ac_header_compiler" >&6; }
bec39cab 1899
81ecdfbb
RW
1900# Is the header present?
1901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902$as_echo_n "checking $2 presence... " >&6; }
1903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905#include <$2>
1906_ACEOF
1907if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909else
1910 ac_header_preproc=no
1911fi
1912rm -f conftest.err conftest.$ac_ext
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914$as_echo "$ac_header_preproc" >&6; }
bec39cab 1915
81ecdfbb
RW
1916# So? What about this header?
1917case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1923 ;;
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ;;
1936esac
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
1939if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=\$ac_header_compiler"
1943fi
1944eval ac_res=\$$3
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946$as_echo "$ac_res" >&6; }
1947fi
1948 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1949
81ecdfbb 1950} # ac_fn_c_check_header_mongrel
bec39cab 1951
81ecdfbb
RW
1952# ac_fn_c_try_run LINENO
1953# ----------------------
1954# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1955# that executables *can* be run.
1956ac_fn_c_try_run ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 if { { ac_try="$ac_link"
1960case "(($ac_try" in
1961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962 *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966 (eval "$ac_link") 2>&5
1967 ac_status=$?
1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1970 { { case "(($ac_try" in
1971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972 *) ac_try_echo=$ac_try;;
1973esac
1974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975$as_echo "$ac_try_echo"; } >&5
1976 (eval "$ac_try") 2>&5
1977 ac_status=$?
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; }; }; then :
1980 ac_retval=0
1981else
1982 $as_echo "$as_me: program exited with status $ac_status" >&5
1983 $as_echo "$as_me: failed program was:" >&5
1984sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1985
81ecdfbb
RW
1986 ac_retval=$ac_status
1987fi
1988 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1990 return $ac_retval
bec39cab 1991
81ecdfbb 1992} # ac_fn_c_try_run
bec39cab 1993
81ecdfbb
RW
1994# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1995# -------------------------------------------------------
1996# Tests whether HEADER exists and can be compiled using the include files in
1997# INCLUDES, setting the cache variable VAR accordingly.
1998ac_fn_c_check_header_compile ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2002$as_echo_n "checking for $2... " >&6; }
2003if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2004 $as_echo_n "(cached) " >&6
2005else
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009#include <$2>
bec39cab 2010_ACEOF
81ecdfbb
RW
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 eval "$3=yes"
2013else
2014 eval "$3=no"
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017fi
2018eval ac_res=\$$3
2019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2020$as_echo "$ac_res" >&6; }
2021 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2022
81ecdfbb 2023} # ac_fn_c_check_header_compile
bec39cab 2024
81ecdfbb
RW
2025# ac_fn_c_try_link LINENO
2026# -----------------------
2027# Try to link conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_c_try_link ()
b4e70030 2029{
81ecdfbb
RW
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 rm -f conftest.$ac_objext conftest$ac_exeext
2032 if { { ac_try="$ac_link"
2033case "(($ac_try" in
2034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035 *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039 (eval "$ac_link") 2>conftest.err
2040 ac_status=$?
2041 if test -s conftest.err; then
2042 grep -v '^ *+' conftest.err >conftest.er1
2043 cat conftest.er1 >&5
2044 mv -f conftest.er1 conftest.err
2045 fi
2046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047 test $ac_status = 0; } && {
2048 test -z "$ac_c_werror_flag" ||
2049 test ! -s conftest.err
2050 } && test -s conftest$ac_exeext && {
2051 test "$cross_compiling" = yes ||
2052 $as_test_x conftest$ac_exeext
2053 }; then :
2054 ac_retval=0
2055else
2056 $as_echo "$as_me: failed program was:" >&5
2057sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2058
81ecdfbb
RW
2059 ac_retval=1
2060fi
2061 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2062 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2063 # interfere with the next link command; also delete a directory that is
2064 # left behind by Apple's compiler. We do this before executing the actions.
2065 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2066 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2067 return $ac_retval
bec39cab 2068
81ecdfbb 2069} # ac_fn_c_try_link
bec39cab 2070
81ecdfbb
RW
2071# ac_fn_c_check_func LINENO FUNC VAR
2072# ----------------------------------
2073# Tests whether FUNC exists, setting the cache variable VAR accordingly
2074ac_fn_c_check_func ()
2075{
2076 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2078$as_echo_n "checking for $2... " >&6; }
2079if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2080 $as_echo_n "(cached) " >&6
2081else
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2085 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2086#define $2 innocuous_$2
bec39cab 2087
81ecdfbb
RW
2088/* System header to define __stub macros and hopefully few prototypes,
2089 which can conflict with char $2 (); below.
2090 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2091 <limits.h> exists even on freestanding compilers. */
bec39cab 2092
81ecdfbb
RW
2093#ifdef __STDC__
2094# include <limits.h>
2095#else
2096# include <assert.h>
2097#endif
bec39cab 2098
81ecdfbb 2099#undef $2
bec39cab 2100
81ecdfbb
RW
2101/* Override any GCC internal prototype to avoid an error.
2102 Use char because int might match the return type of a GCC
2103 builtin and then its argument prototype would still apply. */
2104#ifdef __cplusplus
2105extern "C"
2106#endif
2107char $2 ();
2108/* The GNU C library defines this for functions which it implements
2109 to always fail with ENOSYS. Some functions are actually named
2110 something starting with __ and the normal name is an alias. */
2111#if defined __stub_$2 || defined __stub___$2
2112choke me
2113#endif
bec39cab 2114
81ecdfbb
RW
2115int
2116main ()
2117{
2118return $2 ();
2119 ;
2120 return 0;
2121}
bec39cab 2122_ACEOF
81ecdfbb
RW
2123if ac_fn_c_try_link "$LINENO"; then :
2124 eval "$3=yes"
2125else
2126 eval "$3=no"
2127fi
2128rm -f core conftest.err conftest.$ac_objext \
2129 conftest$ac_exeext conftest.$ac_ext
2130fi
2131eval ac_res=\$$3
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2133$as_echo "$ac_res" >&6; }
2134 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2135
81ecdfbb 2136} # ac_fn_c_check_func
bec39cab 2137
81ecdfbb
RW
2138# ac_fn_c_check_decl LINENO SYMBOL VAR
2139# ------------------------------------
2140# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2141ac_fn_c_check_decl ()
2142{
2143 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2144 as_decl_name=`echo $2|sed 's/ *(.*//'`
2145 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2147$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2148if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2149 $as_echo_n "(cached) " >&6
2150else
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154int
2155main ()
2156{
e7a30f46
DE
2157#ifndef $as_decl_name
2158#ifdef __cplusplus
2159 (void) $as_decl_use;
2160#else
2161 (void) $as_decl_name;
2162#endif
81ecdfbb 2163#endif
bec39cab 2164
81ecdfbb
RW
2165 ;
2166 return 0;
2167}
bec39cab 2168_ACEOF
81ecdfbb
RW
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 eval "$3=yes"
2171else
2172 eval "$3=no"
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175fi
2176eval ac_res=\$$3
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2178$as_echo "$ac_res" >&6; }
2179 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2180
81ecdfbb 2181} # ac_fn_c_check_decl
bec39cab 2182
81ecdfbb
RW
2183# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2184# --------------------------------------------
2185# Tries to find the compile-time value of EXPR in a program that includes
2186# INCLUDES, setting VAR accordingly. Returns whether the value could be
2187# computed
2188ac_fn_c_compute_int ()
2189{
2190 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191 if test "$cross_compiling" = yes; then
2192 # Depending upon the size, compute the lo and hi bounds.
2193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195$4
2196int
2197main ()
2198{
2199static int test_array [1 - 2 * !(($2) >= 0)];
2200test_array [0] = 0
bec39cab 2201
81ecdfbb
RW
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206if ac_fn_c_try_compile "$LINENO"; then :
2207 ac_lo=0 ac_mid=0
2208 while :; do
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$4
2212int
2213main ()
2214{
2215static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2216test_array [0] = 0
bec39cab 2217
81ecdfbb
RW
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_compile "$LINENO"; then :
2223 ac_hi=$ac_mid; break
2224else
2225 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2226 if test $ac_lo -le $ac_mid; then
2227 ac_lo= ac_hi=
2228 break
2229 fi
2230 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2231fi
81ecdfbb
RW
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233 done
c906108c 2234else
81ecdfbb
RW
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h. */
2237$4
2238int
2239main ()
2240{
2241static int test_array [1 - 2 * !(($2) < 0)];
2242test_array [0] = 0
bec39cab 2243
81ecdfbb
RW
2244 ;
2245 return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_compile "$LINENO"; then :
2249 ac_hi=-1 ac_mid=-1
2250 while :; do
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2258test_array [0] = 0
bec39cab 2259
81ecdfbb
RW
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 ac_lo=$ac_mid; break
2266else
2267 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2268 if test $ac_mid -le $ac_hi; then
2269 ac_lo= ac_hi=
2270 break
2271 fi
2272 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275 done
2276else
2277 ac_lo= ac_hi=
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282# Binary search between lo and hi bounds.
2283while test "x$ac_lo" != "x$ac_hi"; do
2284 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$4
2288int
2289main ()
2290{
2291static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2292test_array [0] = 0
bec39cab 2293
81ecdfbb
RW
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 ac_hi=$ac_mid
2300else
2301 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304done
2305case $ac_lo in #((
2306?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2307'') ac_retval=1 ;;
2308esac
2309 else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$4
2313static long int longval () { return $2; }
2314static unsigned long int ulongval () { return $2; }
2315#include <stdio.h>
2316#include <stdlib.h>
2317int
2318main ()
2319{
bec39cab 2320
81ecdfbb
RW
2321 FILE *f = fopen ("conftest.val", "w");
2322 if (! f)
2323 return 1;
2324 if (($2) < 0)
2325 {
2326 long int i = longval ();
2327 if (i != ($2))
2328 return 1;
2329 fprintf (f, "%ld", i);
2330 }
2331 else
2332 {
2333 unsigned long int i = ulongval ();
2334 if (i != ($2))
2335 return 1;
2336 fprintf (f, "%lu", i);
2337 }
2338 /* Do not output a trailing newline, as this causes \r\n confusion
2339 on some platforms. */
2340 return ferror (f) || fclose (f) != 0;
bec39cab 2341
81ecdfbb
RW
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_run "$LINENO"; then :
2347 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2348else
2349 ac_retval=1
2350fi
2351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2352 conftest.$ac_objext conftest.beam conftest.$ac_ext
2353rm -f conftest.val
bec39cab 2354
81ecdfbb
RW
2355 fi
2356 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2357 return $ac_retval
bec39cab 2358
81ecdfbb 2359} # ac_fn_c_compute_int
bec39cab 2360
81ecdfbb
RW
2361# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2362# ----------------------------------------------------
2363# Tries to find if the field MEMBER exists in type AGGR, after including
2364# INCLUDES, setting cache variable VAR accordingly.
2365ac_fn_c_check_member ()
2366{
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2369$as_echo_n "checking for $2.$3... " >&6; }
2370if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2371 $as_echo_n "(cached) " >&6
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
2388else
2389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h. */
2391$5
2392int
2393main ()
2394{
2395static $2 ac_aggr;
2396if (sizeof ac_aggr.$3)
2397return 0;
2398 ;
2399 return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"; then :
2403 eval "$4=yes"
2404else
2405 eval "$4=no"
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411eval ac_res=\$$4
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2413$as_echo "$ac_res" >&6; }
2414 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2415
81ecdfbb 2416} # ac_fn_c_check_member
bec39cab 2417
81ecdfbb
RW
2418# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2419# -------------------------------------------
2420# Tests whether TYPE exists after having included INCLUDES, setting cache
2421# variable VAR accordingly.
2422ac_fn_c_check_type ()
2423{
2424 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426$as_echo_n "checking for $2... " >&6; }
2427if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2428 $as_echo_n "(cached) " >&6
2429else
2430 eval "$3=no"
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$4
2434int
2435main ()
2436{
2437if (sizeof ($2))
2438 return 0;
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h. */
2446$4
2447int
2448main ()
2449{
2450if (sizeof (($2)))
2451 return 0;
2452 ;
2453 return 0;
2454}
2455_ACEOF
2456if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2457
81ecdfbb
RW
2458else
2459 eval "$3=yes"
2460fi
2461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2462fi
2463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2464fi
2465eval ac_res=\$$3
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2467$as_echo "$ac_res" >&6; }
2468 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2469
81ecdfbb
RW
2470} # ac_fn_c_check_type
2471cat >config.log <<_ACEOF
2472This file contains any messages produced by compilers while
2473running configure, to aid debugging if configure makes a mistake.
d5af19ba 2474
81ecdfbb
RW
2475It was created by $as_me, which was
2476generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2477
81ecdfbb 2478 $ $0 $@
413ccac7 2479
81ecdfbb
RW
2480_ACEOF
2481exec 5>>config.log
2482{
2483cat <<_ASUNAME
2484## --------- ##
2485## Platform. ##
2486## --------- ##
413ccac7 2487
81ecdfbb
RW
2488hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2489uname -m = `(uname -m) 2>/dev/null || echo unknown`
2490uname -r = `(uname -r) 2>/dev/null || echo unknown`
2491uname -s = `(uname -s) 2>/dev/null || echo unknown`
2492uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2493
81ecdfbb
RW
2494/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2495/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2496
81ecdfbb
RW
2497/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2498/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2499/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2500/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2501/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2502/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2503/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2504
81ecdfbb 2505_ASUNAME
bec39cab 2506
bec39cab
AC
2507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2508for as_dir in $PATH
2509do
2510 IFS=$as_save_IFS
2511 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2512 $as_echo "PATH: $as_dir"
2513 done
2514IFS=$as_save_IFS
bec39cab 2515
81ecdfbb 2516} >&5
bec39cab 2517
81ecdfbb 2518cat >&5 <<_ACEOF
bec39cab 2519
bec39cab 2520
81ecdfbb
RW
2521## ----------- ##
2522## Core tests. ##
2523## ----------- ##
2524
2525_ACEOF
2526
2527
2528# Keep a trace of the command line.
2529# Strip out --no-create and --no-recursion so they do not pile up.
2530# Strip out --silent because we don't want to record it for future runs.
2531# Also quote any args containing shell meta-characters.
2532# Make two passes to allow for proper duplicate-argument suppression.
2533ac_configure_args=
2534ac_configure_args0=
2535ac_configure_args1=
2536ac_must_keep_next=false
2537for ac_pass in 1 2
2538do
2539 for ac_arg
2540 do
2541 case $ac_arg in
2542 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2543 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2544 | -silent | --silent | --silen | --sile | --sil)
2545 continue ;;
2546 *\'*)
2547 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2548 esac
2549 case $ac_pass in
2550 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2551 2)
2552 as_fn_append ac_configure_args1 " '$ac_arg'"
2553 if test $ac_must_keep_next = true; then
2554 ac_must_keep_next=false # Got value, back to normal.
2555 else
2556 case $ac_arg in
2557 *=* | --config-cache | -C | -disable-* | --disable-* \
2558 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2559 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2560 | -with-* | --with-* | -without-* | --without-* | --x)
2561 case "$ac_configure_args0 " in
2562 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2563 esac
2564 ;;
2565 -* ) ac_must_keep_next=true ;;
2566 esac
2567 fi
2568 as_fn_append ac_configure_args " '$ac_arg'"
2569 ;;
2570 esac
2571 done
2572done
2573{ ac_configure_args0=; unset ac_configure_args0;}
2574{ ac_configure_args1=; unset ac_configure_args1;}
2575
2576# When interrupted or exit'd, cleanup temporary files, and complete
2577# config.log. We remove comments because anyway the quotes in there
2578# would cause problems or look ugly.
2579# WARNING: Use '\'' to represent an apostrophe within the trap.
2580# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2581trap 'exit_status=$?
2582 # Save into config.log some information that might help in debugging.
2583 {
2584 echo
2585
2586 cat <<\_ASBOX
2587## ---------------- ##
2588## Cache variables. ##
2589## ---------------- ##
2590_ASBOX
2591 echo
2592 # The following way of writing the cache mishandles newlines in values,
2593(
2594 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2595 eval ac_val=\$$ac_var
2596 case $ac_val in #(
2597 *${as_nl}*)
2598 case $ac_var in #(
2599 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2600$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2601 esac
2602 case $ac_var in #(
2603 _ | IFS | as_nl) ;; #(
2604 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2605 *) { eval $ac_var=; unset $ac_var;} ;;
2606 esac ;;
2607 esac
2608 done
2609 (set) 2>&1 |
2610 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2611 *${as_nl}ac_space=\ *)
2612 sed -n \
2613 "s/'\''/'\''\\\\'\'''\''/g;
2614 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2615 ;; #(
2616 *)
2617 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2618 ;;
2619 esac |
2620 sort
2621)
2622 echo
2623
2624 cat <<\_ASBOX
2625## ----------------- ##
2626## Output variables. ##
2627## ----------------- ##
2628_ASBOX
2629 echo
2630 for ac_var in $ac_subst_vars
2631 do
2632 eval ac_val=\$$ac_var
2633 case $ac_val in
2634 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2635 esac
2636 $as_echo "$ac_var='\''$ac_val'\''"
2637 done | sort
2638 echo
2639
2640 if test -n "$ac_subst_files"; then
2641 cat <<\_ASBOX
2642## ------------------- ##
2643## File substitutions. ##
2644## ------------------- ##
2645_ASBOX
2646 echo
2647 for ac_var in $ac_subst_files
2648 do
2649 eval ac_val=\$$ac_var
2650 case $ac_val in
2651 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2652 esac
2653 $as_echo "$ac_var='\''$ac_val'\''"
2654 done | sort
2655 echo
2656 fi
2657
2658 if test -s confdefs.h; then
2659 cat <<\_ASBOX
2660## ----------- ##
2661## confdefs.h. ##
2662## ----------- ##
2663_ASBOX
2664 echo
2665 cat confdefs.h
2666 echo
2667 fi
2668 test "$ac_signal" != 0 &&
2669 $as_echo "$as_me: caught signal $ac_signal"
2670 $as_echo "$as_me: exit $exit_status"
2671 } >&5
2672 rm -f core *.core core.conftest.* &&
2673 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2674 exit $exit_status
2675' 0
2676for ac_signal in 1 2 13 15; do
2677 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2678done
2679ac_signal=0
2680
2681# confdefs.h avoids OS command line length limits that DEFS can exceed.
2682rm -f -r conftest* confdefs.h
2683
2684$as_echo "/* confdefs.h */" > confdefs.h
2685
2686# Predefined preprocessor variables.
2687
2688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_NAME "$PACKAGE_NAME"
2690_ACEOF
2691
2692cat >>confdefs.h <<_ACEOF
2693#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2694_ACEOF
2695
2696cat >>confdefs.h <<_ACEOF
2697#define PACKAGE_VERSION "$PACKAGE_VERSION"
2698_ACEOF
2699
2700cat >>confdefs.h <<_ACEOF
2701#define PACKAGE_STRING "$PACKAGE_STRING"
2702_ACEOF
2703
2704cat >>confdefs.h <<_ACEOF
2705#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2706_ACEOF
2707
2708cat >>confdefs.h <<_ACEOF
2709#define PACKAGE_URL "$PACKAGE_URL"
2710_ACEOF
2711
2712
2713# Let the site file select an alternate cache file if it wants to.
2714# Prefer an explicitly selected file to automatically selected ones.
2715ac_site_file1=NONE
2716ac_site_file2=NONE
2717if test -n "$CONFIG_SITE"; then
2718 ac_site_file1=$CONFIG_SITE
2719elif test "x$prefix" != xNONE; then
2720 ac_site_file1=$prefix/share/config.site
2721 ac_site_file2=$prefix/etc/config.site
2722else
2723 ac_site_file1=$ac_default_prefix/share/config.site
2724 ac_site_file2=$ac_default_prefix/etc/config.site
2725fi
2726for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2727do
2728 test "x$ac_site_file" = xNONE && continue
2729 if test -r "$ac_site_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2731$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2732 sed 's/^/| /' "$ac_site_file" >&5
2733 . "$ac_site_file"
2734 fi
2735done
2736
2737if test -r "$cache_file"; then
2738 # Some versions of bash will fail to source /dev/null (special
2739 # files actually), so we avoid doing that.
2740 if test -f "$cache_file"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2742$as_echo "$as_me: loading cache $cache_file" >&6;}
2743 case $cache_file in
2744 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2745 *) . "./$cache_file";;
2746 esac
2747 fi
2748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2750$as_echo "$as_me: creating cache $cache_file" >&6;}
2751 >$cache_file
bec39cab
AC
2752fi
2753
f434ba03
PA
2754gl_header_list="$gl_header_list sys/mman.h"
2755gl_func_list="$gl_func_list mprotect"
2756gl_func_list="$gl_func_list memchr"
2757gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2758gl_header_list="$gl_header_list stdint.h"
2759gl_header_list="$gl_header_list wchar.h"
2760gl_header_list="$gl_header_list string.h"
2761# Check that the precious variables saved in the cache have kept the same
2762# value.
2763ac_cache_corrupted=false
2764for ac_var in $ac_precious_vars; do
2765 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2766 eval ac_new_set=\$ac_env_${ac_var}_set
2767 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2768 eval ac_new_val=\$ac_env_${ac_var}_value
2769 case $ac_old_set,$ac_new_set in
2770 set,)
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2772$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2773 ac_cache_corrupted=: ;;
2774 ,set)
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2776$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2777 ac_cache_corrupted=: ;;
2778 ,);;
2779 *)
2780 if test "x$ac_old_val" != "x$ac_new_val"; then
2781 # differences in whitespace do not lead to failure.
2782 ac_old_val_w=`echo x $ac_old_val`
2783 ac_new_val_w=`echo x $ac_new_val`
2784 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2786$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2787 ac_cache_corrupted=:
2788 else
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2790$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2791 eval $ac_var=\$ac_old_val
2792 fi
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2794$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2796$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2797 fi;;
2798 esac
2799 # Pass precious variables to config.status.
2800 if test "$ac_new_set" = set; then
2801 case $ac_new_val in
2802 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2803 *) ac_arg=$ac_var=$ac_new_val ;;
2804 esac
2805 case " $ac_configure_args " in
2806 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2807 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2808 esac
2809 fi
2810done
2811if $ac_cache_corrupted; then
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2815$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2816 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2817fi
2818## -------------------- ##
2819## Main body of script. ##
2820## -------------------- ##
2821
2822ac_ext=c
2823ac_cpp='$CPP $CPPFLAGS'
2824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2826ac_compiler_gnu=$ac_cv_c_compiler_gnu
2827
2828
2829
2830
2831
2832ac_config_headers="$ac_config_headers config.h:config.in"
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2836$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2837 # Check whether --enable-maintainer-mode was given.
2838if test "${enable_maintainer_mode+set}" = set; then :
2839 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2840else
2841 USE_MAINTAINER_MODE=no
2842fi
2843
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2845$as_echo "$USE_MAINTAINER_MODE" >&6; }
2846 if test $USE_MAINTAINER_MODE = yes; then
2847 MAINTAINER_MODE_TRUE=
2848 MAINTAINER_MODE_FALSE='#'
2849else
2850 MAINTAINER_MODE_TRUE='#'
2851 MAINTAINER_MODE_FALSE=
2852fi
2853
2854 MAINT=$MAINTAINER_MODE_TRUE
2855
2856
2857
2858ac_ext=c
2859ac_cpp='$CPP $CPPFLAGS'
2860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2862ac_compiler_gnu=$ac_cv_c_compiler_gnu
2863if test -n "$ac_tool_prefix"; then
2864 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2865set dummy ${ac_tool_prefix}gcc; ac_word=$2
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867$as_echo_n "checking for $ac_word... " >&6; }
2868if test "${ac_cv_prog_CC+set}" = set; then :
2869 $as_echo_n "(cached) " >&6
c906108c
SS
2870else
2871 if test -n "$CC"; then
2872 ac_cv_prog_CC="$CC" # Let the user override the test.
2873else
bec39cab
AC
2874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2875for as_dir in $PATH
2876do
2877 IFS=$as_save_IFS
2878 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2879 for ac_exec_ext in '' $ac_executable_extensions; do
2880 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2881 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2883 break 2
2884 fi
2885done
81ecdfbb
RW
2886 done
2887IFS=$as_save_IFS
bec39cab 2888
c906108c
SS
2889fi
2890fi
bec39cab 2891CC=$ac_cv_prog_CC
c906108c 2892if test -n "$CC"; then
81ecdfbb
RW
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2894$as_echo "$CC" >&6; }
c906108c 2895else
81ecdfbb
RW
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2897$as_echo "no" >&6; }
c906108c
SS
2898fi
2899
81ecdfbb 2900
b4e70030
JB
2901fi
2902if test -z "$ac_cv_prog_CC"; then
2903 ac_ct_CC=$CC
81ecdfbb
RW
2904 # Extract the first word of "gcc", so it can be a program name with args.
2905set dummy gcc; ac_word=$2
2906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2907$as_echo_n "checking for $ac_word... " >&6; }
2908if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2909 $as_echo_n "(cached) " >&6
b4e70030
JB
2910else
2911 if test -n "$ac_ct_CC"; then
2912 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2913else
2914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915for as_dir in $PATH
2916do
2917 IFS=$as_save_IFS
2918 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2919 for ac_exec_ext in '' $ac_executable_extensions; do
2920 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2921 ac_cv_prog_ac_ct_CC="gcc"
2922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2923 break 2
4e8d927d 2924 fi
b4e70030 2925done
81ecdfbb
RW
2926 done
2927IFS=$as_save_IFS
b4e70030
JB
2928
2929fi
2930fi
2931ac_ct_CC=$ac_cv_prog_ac_ct_CC
2932if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2934$as_echo "$ac_ct_CC" >&6; }
b4e70030 2935else
81ecdfbb
RW
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2937$as_echo "no" >&6; }
b4e70030
JB
2938fi
2939
81ecdfbb
RW
2940 if test "x$ac_ct_CC" = x; then
2941 CC=""
2942 else
2943 case $cross_compiling:$ac_tool_warned in
2944yes:)
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2947ac_tool_warned=yes ;;
2948esac
2949 CC=$ac_ct_CC
2950 fi
b4e70030
JB
2951else
2952 CC="$ac_cv_prog_CC"
2953fi
2954
c906108c 2955if test -z "$CC"; then
81ecdfbb
RW
2956 if test -n "$ac_tool_prefix"; then
2957 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2958set dummy ${ac_tool_prefix}cc; ac_word=$2
2959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2960$as_echo_n "checking for $ac_word... " >&6; }
2961if test "${ac_cv_prog_CC+set}" = set; then :
2962 $as_echo_n "(cached) " >&6
c906108c
SS
2963else
2964 if test -n "$CC"; then
2965 ac_cv_prog_CC="$CC" # Let the user override the test.
2966else
bec39cab
AC
2967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2968for as_dir in $PATH
2969do
2970 IFS=$as_save_IFS
2971 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2972 for ac_exec_ext in '' $ac_executable_extensions; do
2973 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2974 ac_cv_prog_CC="${ac_tool_prefix}cc"
2975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2976 break 2
2977 fi
2978done
81ecdfbb
RW
2979 done
2980IFS=$as_save_IFS
2981
2982fi
2983fi
2984CC=$ac_cv_prog_CC
2985if test -n "$CC"; then
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2987$as_echo "$CC" >&6; }
2988else
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2990$as_echo "no" >&6; }
2991fi
2992
2993
2994 fi
2995fi
2996if test -z "$CC"; then
2997 # Extract the first word of "cc", so it can be a program name with args.
2998set dummy cc; ac_word=$2
2999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3000$as_echo_n "checking for $ac_word... " >&6; }
3001if test "${ac_cv_prog_CC+set}" = set; then :
3002 $as_echo_n "(cached) " >&6
3003else
3004 if test -n "$CC"; then
3005 ac_cv_prog_CC="$CC" # Let the user override the test.
3006else
3007 ac_prog_rejected=no
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 for ac_exec_ext in '' $ac_executable_extensions; do
3014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3015 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3016 ac_prog_rejected=yes
3017 continue
3018 fi
3019 ac_cv_prog_CC="cc"
3020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3021 break 2
3022 fi
3023done
3024 done
3025IFS=$as_save_IFS
bec39cab 3026
c906108c
SS
3027if test $ac_prog_rejected = yes; then
3028 # We found a bogon in the path, so make sure we never use it.
3029 set dummy $ac_cv_prog_CC
3030 shift
bec39cab 3031 if test $# != 0; then
c906108c
SS
3032 # We chose a different compiler from the bogus one.
3033 # However, it has the same basename, so the bogon will be chosen
3034 # first if we set CC to just the basename; use the full file name.
3035 shift
bec39cab 3036 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3037 fi
3038fi
3039fi
3040fi
bec39cab 3041CC=$ac_cv_prog_CC
c906108c 3042if test -n "$CC"; then
81ecdfbb
RW
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3044$as_echo "$CC" >&6; }
c906108c 3045else
81ecdfbb
RW
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
c906108c
SS
3048fi
3049
81ecdfbb 3050
bec39cab
AC
3051fi
3052if test -z "$CC"; then
3053 if test -n "$ac_tool_prefix"; then
81ecdfbb 3054 for ac_prog in cl.exe
bec39cab
AC
3055 do
3056 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3059$as_echo_n "checking for $ac_word... " >&6; }
3060if test "${ac_cv_prog_CC+set}" = set; then :
3061 $as_echo_n "(cached) " >&6
c906108c
SS
3062else
3063 if test -n "$CC"; then
3064 ac_cv_prog_CC="$CC" # Let the user override the test.
3065else
bec39cab
AC
3066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3067for as_dir in $PATH
3068do
3069 IFS=$as_save_IFS
3070 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3071 for ac_exec_ext in '' $ac_executable_extensions; do
3072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3073 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3075 break 2
3076 fi
3077done
81ecdfbb
RW
3078 done
3079IFS=$as_save_IFS
bec39cab 3080
c906108c
SS
3081fi
3082fi
bec39cab 3083CC=$ac_cv_prog_CC
c906108c 3084if test -n "$CC"; then
81ecdfbb
RW
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3086$as_echo "$CC" >&6; }
c906108c 3087else
81ecdfbb
RW
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
c906108c 3090fi
bec39cab 3091
81ecdfbb 3092
bec39cab
AC
3093 test -n "$CC" && break
3094 done
3095fi
3096if test -z "$CC"; then
3097 ac_ct_CC=$CC
81ecdfbb 3098 for ac_prog in cl.exe
bec39cab
AC
3099do
3100 # Extract the first word of "$ac_prog", so it can be a program name with args.
3101set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3103$as_echo_n "checking for $ac_word... " >&6; }
3104if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3105 $as_echo_n "(cached) " >&6
bec39cab
AC
3106else
3107 if test -n "$ac_ct_CC"; then
3108 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3109else
3110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3111for as_dir in $PATH
3112do
3113 IFS=$as_save_IFS
3114 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3115 for ac_exec_ext in '' $ac_executable_extensions; do
3116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3117 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3119 break 2
c906108c 3120 fi
bec39cab 3121done
81ecdfbb
RW
3122 done
3123IFS=$as_save_IFS
bec39cab
AC
3124
3125fi
3126fi
3127ac_ct_CC=$ac_cv_prog_ac_ct_CC
3128if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3130$as_echo "$ac_ct_CC" >&6; }
bec39cab 3131else
81ecdfbb
RW
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3133$as_echo "no" >&6; }
c906108c
SS
3134fi
3135
81ecdfbb 3136
bec39cab
AC
3137 test -n "$ac_ct_CC" && break
3138done
c906108c 3139
81ecdfbb
RW
3140 if test "x$ac_ct_CC" = x; then
3141 CC=""
3142 else
3143 case $cross_compiling:$ac_tool_warned in
3144yes:)
3145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3147ac_tool_warned=yes ;;
3148esac
3149 CC=$ac_ct_CC
3150 fi
bec39cab
AC
3151fi
3152
3153fi
3154
3155
81ecdfbb
RW
3156test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3158as_fn_error "no acceptable C compiler found in \$PATH
3159See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3160
3161# Provide some information about the compiler.
81ecdfbb
RW
3162$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3163set X $ac_compile
3164ac_compiler=$2
3165for ac_option in --version -v -V -qversion; do
3166 { { ac_try="$ac_compiler $ac_option >&5"
3167case "(($ac_try" in
3168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3169 *) ac_try_echo=$ac_try;;
3170esac
3171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3172$as_echo "$ac_try_echo"; } >&5
3173 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3174 ac_status=$?
81ecdfbb
RW
3175 if test -s conftest.err; then
3176 sed '10a\
3177... rest of stderr output deleted ...
3178 10q' conftest.err >conftest.er1
3179 cat conftest.er1 >&5
3180 rm -f conftest.er1 conftest.err
3181 fi
3182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3183 test $ac_status = 0; }
3184done
bec39cab 3185
81ecdfbb 3186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3187/* end confdefs.h. */
3188
3189int
3190main ()
3191{
3192
3193 ;
3194 return 0;
3195}
3196_ACEOF
3197ac_clean_files_save=$ac_clean_files
81ecdfbb 3198ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3199# Try to create an executable without -o first, disregard a.out.
3200# It will help us diagnose broken compilers, and finding out an intuition
3201# of exeext.
81ecdfbb
RW
3202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3203$as_echo_n "checking for C compiler default output file name... " >&6; }
3204ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3205
3206# The possible output files:
3207ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3208
3209ac_rmfiles=
3210for ac_file in $ac_files
3211do
3212 case $ac_file in
3213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3214 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3215 esac
3216done
3217rm -f $ac_rmfiles
3218
3219if { { ac_try="$ac_link_default"
3220case "(($ac_try" in
3221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3222 *) ac_try_echo=$ac_try;;
3223esac
3224eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3225$as_echo "$ac_try_echo"; } >&5
3226 (eval "$ac_link_default") 2>&5
3227 ac_status=$?
3228 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3229 test $ac_status = 0; }; then :
3230 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3231# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3232# in a Makefile. We should not override ac_cv_exeext if it was cached,
3233# so that the user can short-circuit this test for compilers unknown to
3234# Autoconf.
3235for ac_file in $ac_files ''
bec39cab
AC
3236do
3237 test -f "$ac_file" || continue
3238 case $ac_file in
81ecdfbb 3239 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3240 ;;
3241 [ab].out )
3242 # We found the default executable, but exeext='' is most
3243 # certainly right.
3244 break;;
3245 *.* )
81ecdfbb
RW
3246 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3247 then :; else
3248 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3249 fi
3250 # We set ac_cv_exeext here because the later test for it is not
3251 # safe: cross compilers may not add the suffix if given an `-o'
3252 # argument, so we may need to know it at that point already.
3253 # Even if this section looks crufty: it has the advantage of
3254 # actually working.
b4e70030
JB
3255 break;;
3256 * )
3257 break;;
bec39cab
AC
3258 esac
3259done
81ecdfbb
RW
3260test "$ac_cv_exeext" = no && ac_cv_exeext=
3261
bec39cab 3262else
81ecdfbb
RW
3263 ac_file=''
3264fi
3265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3266$as_echo "$ac_file" >&6; }
3267if test -z "$ac_file"; then :
3268 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3269sed 's/^/| /' conftest.$ac_ext >&5
3270
81ecdfbb
RW
3271{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3273{ as_fn_set_status 77
3274as_fn_error "C compiler cannot create executables
3275See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3276fi
b4e70030 3277ac_exeext=$ac_cv_exeext
b4e70030 3278
81ecdfbb 3279# Check that the compiler produces executables we can run. If not, either
bec39cab 3280# the compiler is broken, or we cross compile.
81ecdfbb
RW
3281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3282$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3283# If not cross compiling, check that we can run a simple program.
3284if test "$cross_compiling" != yes; then
3285 if { ac_try='./$ac_file'
81ecdfbb
RW
3286 { { case "(($ac_try" in
3287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288 *) ac_try_echo=$ac_try;;
3289esac
3290eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3291$as_echo "$ac_try_echo"; } >&5
3292 (eval "$ac_try") 2>&5
bec39cab 3293 ac_status=$?
81ecdfbb
RW
3294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3295 test $ac_status = 0; }; }; then
bec39cab 3296 cross_compiling=no
c906108c 3297 else
bec39cab
AC
3298 if test "$cross_compiling" = maybe; then
3299 cross_compiling=yes
3300 else
81ecdfbb
RW
3301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3303as_fn_error "cannot run C compiled programs.
bec39cab 3304If you meant to cross compile, use \`--host'.
81ecdfbb 3305See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3306 fi
c906108c 3307 fi
bec39cab 3308fi
81ecdfbb
RW
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3310$as_echo "yes" >&6; }
bec39cab 3311
81ecdfbb 3312rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3313ac_clean_files=$ac_clean_files_save
81ecdfbb 3314# Check that the compiler produces executables we can run. If not, either
b4e70030 3315# the compiler is broken, or we cross compile.
81ecdfbb
RW
3316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3317$as_echo_n "checking whether we are cross compiling... " >&6; }
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3319$as_echo "$cross_compiling" >&6; }
3320
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3322$as_echo_n "checking for suffix of executables... " >&6; }
3323if { { ac_try="$ac_link"
3324case "(($ac_try" in
3325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 *) ac_try_echo=$ac_try;;
3327esac
3328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329$as_echo "$ac_try_echo"; } >&5
3330 (eval "$ac_link") 2>&5
bec39cab 3331 ac_status=$?
81ecdfbb
RW
3332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3333 test $ac_status = 0; }; then :
b4e70030
JB
3334 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3335# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3336# work properly (i.e., refer to `conftest.exe'), while it won't with
3337# `rm'.
3338for ac_file in conftest.exe conftest conftest.*; do
3339 test -f "$ac_file" || continue
3340 case $ac_file in
81ecdfbb 3341 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3342 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3343 break;;
3344 * ) break;;
3345 esac
3346done
c906108c 3347else
81ecdfbb
RW
3348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350as_fn_error "cannot compute suffix of executables: cannot compile and link
3351See \`config.log' for more details." "$LINENO" 5; }
c906108c 3352fi
b4e70030 3353rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3355$as_echo "$ac_cv_exeext" >&6; }
c906108c 3356
b4e70030 3357rm -f conftest.$ac_ext
bec39cab
AC
3358EXEEXT=$ac_cv_exeext
3359ac_exeext=$EXEEXT
81ecdfbb
RW
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3361$as_echo_n "checking for suffix of object files... " >&6; }
3362if test "${ac_cv_objext+set}" = set; then :
3363 $as_echo_n "(cached) " >&6
bec39cab 3364else
81ecdfbb 3365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3366/* end confdefs.h. */
3367
3368int
3369main ()
3370{
3371
3372 ;
3373 return 0;
3374}
3375_ACEOF
3376rm -f conftest.o conftest.obj
81ecdfbb
RW
3377if { { ac_try="$ac_compile"
3378case "(($ac_try" in
3379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3380 *) ac_try_echo=$ac_try;;
3381esac
3382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3383$as_echo "$ac_try_echo"; } >&5
3384 (eval "$ac_compile") 2>&5
3385 ac_status=$?
3386 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3387 test $ac_status = 0; }; then :
3388 for ac_file in conftest.o conftest.obj conftest.*; do
3389 test -f "$ac_file" || continue;
bec39cab 3390 case $ac_file in
81ecdfbb 3391 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3392 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3393 break;;
3394 esac
3395done
c906108c 3396else
81ecdfbb 3397 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3398sed 's/^/| /' conftest.$ac_ext >&5
3399
81ecdfbb
RW
3400{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3402as_fn_error "cannot compute suffix of object files: cannot compile
3403See \`config.log' for more details." "$LINENO" 5; }
c906108c 3404fi
b4e70030 3405rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3406fi
81ecdfbb
RW
3407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3408$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3409OBJEXT=$ac_cv_objext
3410ac_objext=$OBJEXT
81ecdfbb
RW
3411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3412$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3413if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3414 $as_echo_n "(cached) " >&6
c906108c 3415else
81ecdfbb 3416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3417/* end confdefs.h. */
3418
3419int
3420main ()
3421{
3422#ifndef __GNUC__
3423 choke me
3424#endif
3425
3426 ;
3427 return 0;
3428}
3429_ACEOF
81ecdfbb 3430if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3431 ac_compiler_gnu=yes
3432else
81ecdfbb 3433 ac_compiler_gnu=no
bec39cab 3434fi
81ecdfbb 3435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3436ac_cv_c_compiler_gnu=$ac_compiler_gnu
3437
3438fi
81ecdfbb
RW
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3440$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3441if test $ac_compiler_gnu = yes; then
3442 GCC=yes
3443else
3444 GCC=
3445fi
bec39cab
AC
3446ac_test_CFLAGS=${CFLAGS+set}
3447ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3449$as_echo_n "checking whether $CC accepts -g... " >&6; }
3450if test "${ac_cv_prog_cc_g+set}" = set; then :
3451 $as_echo_n "(cached) " >&6
bec39cab 3452else
81ecdfbb
RW
3453 ac_save_c_werror_flag=$ac_c_werror_flag
3454 ac_c_werror_flag=yes
3455 ac_cv_prog_cc_g=no
3456 CFLAGS="-g"
3457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3458/* end confdefs.h. */
3459
3460int
3461main ()
3462{
3463
3464 ;
3465 return 0;
3466}
3467_ACEOF
81ecdfbb 3468if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3469 ac_cv_prog_cc_g=yes
3470else
81ecdfbb
RW
3471 CFLAGS=""
3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473/* end confdefs.h. */
3474
3475int
3476main ()
3477{
3478
3479 ;
3480 return 0;
3481}
3482_ACEOF
3483if ac_fn_c_try_compile "$LINENO"; then :
3484
3485else
3486 ac_c_werror_flag=$ac_save_c_werror_flag
3487 CFLAGS="-g"
3488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489/* end confdefs.h. */
3490
3491int
3492main ()
3493{
c906108c 3494
81ecdfbb
RW
3495 ;
3496 return 0;
3497}
3498_ACEOF
3499if ac_fn_c_try_compile "$LINENO"; then :
3500 ac_cv_prog_cc_g=yes
3501fi
3502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3503fi
3504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3505fi
81ecdfbb
RW
3506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3507 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3508fi
81ecdfbb
RW
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3510$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3511if test "$ac_test_CFLAGS" = set; then
bec39cab 3512 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3513elif test $ac_cv_prog_cc_g = yes; then
3514 if test "$GCC" = yes; then
3515 CFLAGS="-g -O2"
3516 else
3517 CFLAGS="-g"
3518 fi
3519else
3520 if test "$GCC" = yes; then
3521 CFLAGS="-O2"
3522 else
3523 CFLAGS=
3524 fi
3525fi
81ecdfbb
RW
3526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3527$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3528if test "${ac_cv_prog_cc_c89+set}" = set; then :
3529 $as_echo_n "(cached) " >&6
bec39cab 3530else
81ecdfbb 3531 ac_cv_prog_cc_c89=no
bec39cab 3532ac_save_CC=$CC
81ecdfbb 3533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3534/* end confdefs.h. */
c906108c
SS
3535#include <stdarg.h>
3536#include <stdio.h>
3537#include <sys/types.h>
3538#include <sys/stat.h>
3539/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3540struct buf { int x; };
3541FILE * (*rcsopen) (struct buf *, struct stat *, int);
3542static char *e (p, i)
3543 char **p;
3544 int i;
3545{
3546 return p[i];
3547}
3548static char *f (char * (*g) (char **, int), char **p, ...)
3549{
3550 char *s;
3551 va_list v;
3552 va_start (v,p);
3553 s = g (p, va_arg (v,int));
3554 va_end (v);
3555 return s;
3556}
bec39cab
AC
3557
3558/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3559 function prototypes and stuff, but not '\xHH' hex character constants.
3560 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3561 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3562 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3563 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3564 that's true only with -std. */
bec39cab
AC
3565int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3566
81ecdfbb
RW
3567/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3568 inside strings and character constants. */
3569#define FOO(x) 'x'
3570int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3571
c906108c
SS
3572int test (int i, double x);
3573struct s1 {int (*f) (int a);};
3574struct s2 {int (*f) (double a);};
3575int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3576int argc;
3577char **argv;
bec39cab
AC
3578int
3579main ()
3580{
c906108c 3581return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3582 ;
3583 return 0;
3584}
3585_ACEOF
81ecdfbb
RW
3586for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3587 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3588do
3589 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3590 if ac_fn_c_try_compile "$LINENO"; then :
3591 ac_cv_prog_cc_c89=$ac_arg
c906108c 3592fi
81ecdfbb
RW
3593rm -f core conftest.err conftest.$ac_objext
3594 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3595done
81ecdfbb 3596rm -f conftest.$ac_ext
bec39cab 3597CC=$ac_save_CC
c906108c
SS
3598
3599fi
81ecdfbb
RW
3600# AC_CACHE_VAL
3601case "x$ac_cv_prog_cc_c89" in
3602 x)
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3604$as_echo "none needed" >&6; } ;;
3605 xno)
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3607$as_echo "unsupported" >&6; } ;;
bec39cab 3608 *)
81ecdfbb
RW
3609 CC="$CC $ac_cv_prog_cc_c89"
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3611$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3612esac
81ecdfbb 3613if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3614
b4e70030
JB
3615fi
3616
bec39cab
AC
3617ac_ext=c
3618ac_cpp='$CPP $CPPFLAGS'
3619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3621ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3622
f434ba03
PA
3623ac_aux_dir=
3624for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3625 for ac_t in install-sh install.sh shtool; do
3626 if test -f "$ac_dir/$ac_t"; then
3627 ac_aux_dir=$ac_dir
3628 ac_install_sh="$ac_aux_dir/$ac_t -c"
3629 break 2
3630 fi
3631 done
3632done
3633if test -z "$ac_aux_dir"; then
3634 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3635fi
3636
3637# These three variables are undocumented and unsupported,
3638# and are intended to be withdrawn in a future Autoconf release.
3639# They can cause serious problems if a builder's source tree is in a directory
3640# whose full name contains unusual characters.
3641ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3642ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3643ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3644
3645
3646# Make sure we can run config.sub.
3647$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3648 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3649
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3651$as_echo_n "checking build system type... " >&6; }
3652if test "${ac_cv_build+set}" = set; then :
3653 $as_echo_n "(cached) " >&6
3654else
3655 ac_build_alias=$build_alias
3656test "x$ac_build_alias" = x &&
3657 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3658test "x$ac_build_alias" = x &&
3659 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3660ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3661 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3662
3663fi
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3665$as_echo "$ac_cv_build" >&6; }
3666case $ac_cv_build in
3667*-*-*) ;;
3668*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3669esac
3670build=$ac_cv_build
3671ac_save_IFS=$IFS; IFS='-'
3672set x $ac_cv_build
3673shift
3674build_cpu=$1
3675build_vendor=$2
3676shift; shift
3677# Remember, the first character of IFS is used to create $*,
3678# except with old shells:
3679build_os=$*
3680IFS=$ac_save_IFS
3681case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3682
3683
3684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3685$as_echo_n "checking host system type... " >&6; }
3686if test "${ac_cv_host+set}" = set; then :
3687 $as_echo_n "(cached) " >&6
3688else
3689 if test "x$host_alias" = x; then
3690 ac_cv_host=$ac_cv_build
3691else
3692 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3693 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3694fi
3695
3696fi
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3698$as_echo "$ac_cv_host" >&6; }
3699case $ac_cv_host in
3700*-*-*) ;;
3701*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3702esac
3703host=$ac_cv_host
3704ac_save_IFS=$IFS; IFS='-'
3705set x $ac_cv_host
3706shift
3707host_cpu=$1
3708host_vendor=$2
3709shift; shift
3710# Remember, the first character of IFS is used to create $*,
3711# except with old shells:
3712host_os=$*
3713IFS=$ac_save_IFS
3714case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3715
3716
60ca704f 3717
bec39cab
AC
3718ac_ext=c
3719ac_cpp='$CPP $CPPFLAGS'
3720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3722ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3724$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3725# On Suns, sometimes $CPP names a directory.
3726if test -n "$CPP" && test -d "$CPP"; then
3727 CPP=
8bb2c122 3728fi
bec39cab 3729if test -z "$CPP"; then
81ecdfbb
RW
3730 if test "${ac_cv_prog_CPP+set}" = set; then :
3731 $as_echo_n "(cached) " >&6
bec39cab
AC
3732else
3733 # Double quotes because CPP needs to be expanded
3734 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3735 do
3736 ac_preproc_ok=false
3737for ac_c_preproc_warn_flag in '' yes
3738do
3739 # Use a header file that comes with gcc, so configuring glibc
3740 # with a fresh cross-compiler works.
3741 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3742 # <limits.h> exists even on freestanding compilers.
3743 # On the NeXT, cc -E runs the code through the compiler's parser,
3744 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3746/* end confdefs.h. */
3747#ifdef __STDC__
3748# include <limits.h>
3749#else
3750# include <assert.h>
3751#endif
3752 Syntax error
3753_ACEOF
81ecdfbb 3754if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3755
81ecdfbb 3756else
bec39cab
AC
3757 # Broken: fails on valid input.
3758continue
3759fi
3760rm -f conftest.err conftest.$ac_ext
3761
81ecdfbb 3762 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3763 # can be detected and how.
81ecdfbb 3764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3765/* end confdefs.h. */
3766#include <ac_nonexistent.h>
3767_ACEOF
81ecdfbb 3768if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3769 # Broken: success on invalid input.
3770continue
8bb2c122 3771else
bec39cab
AC
3772 # Passes both tests.
3773ac_preproc_ok=:
3774break
8bb2c122 3775fi
bec39cab 3776rm -f conftest.err conftest.$ac_ext
8bb2c122 3777
bec39cab
AC
3778done
3779# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3780rm -f conftest.err conftest.$ac_ext
81ecdfbb 3781if $ac_preproc_ok; then :
bec39cab
AC
3782 break
3783fi
8bb2c122 3784
bec39cab
AC
3785 done
3786 ac_cv_prog_CPP=$CPP
ddc9cd0f 3787
c906108c 3788fi
bec39cab
AC
3789 CPP=$ac_cv_prog_CPP
3790else
3791 ac_cv_prog_CPP=$CPP
c906108c 3792fi
81ecdfbb
RW
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3794$as_echo "$CPP" >&6; }
bec39cab
AC
3795ac_preproc_ok=false
3796for ac_c_preproc_warn_flag in '' yes
3797do
3798 # Use a header file that comes with gcc, so configuring glibc
3799 # with a fresh cross-compiler works.
3800 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3801 # <limits.h> exists even on freestanding compilers.
3802 # On the NeXT, cc -E runs the code through the compiler's parser,
3803 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3805/* end confdefs.h. */
3806#ifdef __STDC__
3807# include <limits.h>
3808#else
3809# include <assert.h>
3810#endif
3811 Syntax error
3812_ACEOF
81ecdfbb 3813if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3814
81ecdfbb 3815else
bec39cab
AC
3816 # Broken: fails on valid input.
3817continue
3818fi
3819rm -f conftest.err conftest.$ac_ext
3820
81ecdfbb 3821 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3822 # can be detected and how.
81ecdfbb 3823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3824/* end confdefs.h. */
3825#include <ac_nonexistent.h>
3826_ACEOF
81ecdfbb 3827if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3828 # Broken: success on invalid input.
3829continue
c906108c 3830else
bec39cab
AC
3831 # Passes both tests.
3832ac_preproc_ok=:
3833break
c906108c 3834fi
bec39cab 3835rm -f conftest.err conftest.$ac_ext
c906108c 3836
bec39cab
AC
3837done
3838# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3839rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3840if $ac_preproc_ok; then :
3841
c906108c 3842else
81ecdfbb
RW
3843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3845as_fn_error "C preprocessor \"$CPP\" fails sanity check
3846See \`config.log' for more details." "$LINENO" 5; }
c906108c 3847fi
c906108c 3848
bec39cab
AC
3849ac_ext=c
3850ac_cpp='$CPP $CPPFLAGS'
3851ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3852ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3853ac_compiler_gnu=$ac_cv_c_compiler_gnu
3854
3855
81ecdfbb
RW
3856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3857$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3858if test "${ac_cv_path_GREP+set}" = set; then :
3859 $as_echo_n "(cached) " >&6
4e8d927d 3860else
81ecdfbb
RW
3861 if test -z "$GREP"; then
3862 ac_path_GREP_found=false
3863 # Loop through the user's path and test for each of PROGNAME-LIST
3864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3866do
3867 IFS=$as_save_IFS
3868 test -z "$as_dir" && as_dir=.
3869 for ac_prog in grep ggrep; do
3870 for ac_exec_ext in '' $ac_executable_extensions; do
3871 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3872 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3873# Check for GNU ac_path_GREP and select it if it is found.
3874 # Check for GNU $ac_path_GREP
3875case `"$ac_path_GREP" --version 2>&1` in
3876*GNU*)
3877 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3878*)
3879 ac_count=0
3880 $as_echo_n 0123456789 >"conftest.in"
3881 while :
3882 do
3883 cat "conftest.in" "conftest.in" >"conftest.tmp"
3884 mv "conftest.tmp" "conftest.in"
3885 cp "conftest.in" "conftest.nl"
3886 $as_echo 'GREP' >> "conftest.nl"
3887 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3888 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3889 as_fn_arith $ac_count + 1 && ac_count=$as_val
3890 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3891 # Best one so far, save it but keep looking for a better one
3892 ac_cv_path_GREP="$ac_path_GREP"
3893 ac_path_GREP_max=$ac_count
bec39cab 3894 fi
81ecdfbb
RW
3895 # 10*(2^10) chars as input seems more than enough
3896 test $ac_count -gt 10 && break
3897 done
3898 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3899esac
bec39cab 3900
81ecdfbb
RW
3901 $ac_path_GREP_found && break 3
3902 done
3903 done
3904 done
3905IFS=$as_save_IFS
3906 if test -z "$ac_cv_path_GREP"; then
3907 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3908 fi
c906108c 3909else
81ecdfbb 3910 ac_cv_path_GREP=$GREP
c906108c 3911fi
c906108c 3912
81ecdfbb
RW
3913fi
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3915$as_echo "$ac_cv_path_GREP" >&6; }
3916 GREP="$ac_cv_path_GREP"
c906108c 3917
c906108c 3918
81ecdfbb
RW
3919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3920$as_echo_n "checking for egrep... " >&6; }
3921if test "${ac_cv_path_EGREP+set}" = set; then :
3922 $as_echo_n "(cached) " >&6
783e057b 3923else
81ecdfbb
RW
3924 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3925 then ac_cv_path_EGREP="$GREP -E"
3926 else
3927 if test -z "$EGREP"; then
3928 ac_path_EGREP_found=false
3929 # Loop through the user's path and test for each of PROGNAME-LIST
3930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3932do
3933 IFS=$as_save_IFS
3934 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3935 for ac_prog in egrep; do
3936 for ac_exec_ext in '' $ac_executable_extensions; do
3937 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3938 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3939# Check for GNU ac_path_EGREP and select it if it is found.
3940 # Check for GNU $ac_path_EGREP
3941case `"$ac_path_EGREP" --version 2>&1` in
3942*GNU*)
3943 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3944*)
3945 ac_count=0
3946 $as_echo_n 0123456789 >"conftest.in"
3947 while :
3948 do
3949 cat "conftest.in" "conftest.in" >"conftest.tmp"
3950 mv "conftest.tmp" "conftest.in"
3951 cp "conftest.in" "conftest.nl"
3952 $as_echo 'EGREP' >> "conftest.nl"
3953 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3954 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3955 as_fn_arith $ac_count + 1 && ac_count=$as_val
3956 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3957 # Best one so far, save it but keep looking for a better one
3958 ac_cv_path_EGREP="$ac_path_EGREP"
3959 ac_path_EGREP_max=$ac_count
3960 fi
3961 # 10*(2^10) chars as input seems more than enough
3962 test $ac_count -gt 10 && break
3963 done
3964 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3965esac
bec39cab 3966
81ecdfbb
RW
3967 $ac_path_EGREP_found && break 3
3968 done
3969 done
3970 done
3971IFS=$as_save_IFS
3972 if test -z "$ac_cv_path_EGREP"; then
3973 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3974 fi
783e057b 3975else
81ecdfbb 3976 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3977fi
3978
81ecdfbb 3979 fi
783e057b 3980fi
81ecdfbb
RW
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3982$as_echo "$ac_cv_path_EGREP" >&6; }
3983 EGREP="$ac_cv_path_EGREP"
3984
783e057b 3985
81ecdfbb
RW
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3987$as_echo_n "checking for ANSI C header files... " >&6; }
3988if test "${ac_cv_header_stdc+set}" = set; then :
3989 $as_echo_n "(cached) " >&6
783e057b 3990else
81ecdfbb 3991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3992/* end confdefs.h. */
783e057b 3993#include <stdlib.h>
bec39cab 3994#include <stdarg.h>
783e057b
DJ
3995#include <string.h>
3996#include <float.h>
c906108c 3997
bec39cab
AC
3998int
3999main ()
4000{
c906108c 4001
bec39cab
AC
4002 ;
4003 return 0;
4004}
4005_ACEOF
81ecdfbb 4006if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4007 ac_cv_header_stdc=yes
c906108c 4008else
81ecdfbb 4009 ac_cv_header_stdc=no
c906108c 4010fi
81ecdfbb 4011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4012
783e057b
DJ
4013if test $ac_cv_header_stdc = yes; then
4014 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4016/* end confdefs.h. */
4017#include <string.h>
c906108c 4018
783e057b
DJ
4019_ACEOF
4020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4021 $EGREP "memchr" >/dev/null 2>&1; then :
4022
c906108c 4023else
783e057b 4024 ac_cv_header_stdc=no
c906108c 4025fi
783e057b 4026rm -f conftest*
c906108c
SS
4027
4028fi
4029
783e057b
DJ
4030if test $ac_cv_header_stdc = yes; then
4031 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4033/* end confdefs.h. */
4034#include <stdlib.h>
bec39cab 4035
783e057b
DJ
4036_ACEOF
4037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4038 $EGREP "free" >/dev/null 2>&1; then :
4039
bec39cab 4040else
783e057b 4041 ac_cv_header_stdc=no
bec39cab 4042fi
783e057b 4043rm -f conftest*
bec39cab
AC
4044
4045fi
bec39cab 4046
783e057b
DJ
4047if test $ac_cv_header_stdc = yes; then
4048 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4049 if test "$cross_compiling" = yes; then :
783e057b 4050 :
bec39cab 4051else
81ecdfbb 4052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4053/* end confdefs.h. */
4054#include <ctype.h>
81ecdfbb 4055#include <stdlib.h>
783e057b
DJ
4056#if ((' ' & 0x0FF) == 0x020)
4057# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4058# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4059#else
4060# define ISLOWER(c) \
4061 (('a' <= (c) && (c) <= 'i') \
4062 || ('j' <= (c) && (c) <= 'r') \
4063 || ('s' <= (c) && (c) <= 'z'))
4064# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4065#endif
4066
4067#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4068int
4069main ()
4070{
4071 int i;
4072 for (i = 0; i < 256; i++)
4073 if (XOR (islower (i), ISLOWER (i))
4074 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4075 return 2;
4076 return 0;
783e057b
DJ
4077}
4078_ACEOF
81ecdfbb 4079if ac_fn_c_try_run "$LINENO"; then :
783e057b 4080
81ecdfbb
RW
4081else
4082 ac_cv_header_stdc=no
783e057b 4083fi
81ecdfbb
RW
4084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4085 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4086fi
81ecdfbb 4087
783e057b
DJ
4088fi
4089fi
81ecdfbb
RW
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4091$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4092if test $ac_cv_header_stdc = yes; then
4093
81ecdfbb 4094$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4095
4096fi
4097
4098# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4099for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4100 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4101do :
4102 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4103ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4104"
4105eval as_val=\$$as_ac_Header
4106 if test "x$as_val" = x""yes; then :
783e057b 4107 cat >>confdefs.h <<_ACEOF
81ecdfbb 4108#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4109_ACEOF
4110
4111fi
4112
4113done
4114
4115
4116
f434ba03
PA
4117
4118
81ecdfbb
RW
4119 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4120if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4121 MINIX=yes
4122else
4123 MINIX=
4124fi
4125
4126
4127 if test "$MINIX" = yes; then
4128
81ecdfbb 4129$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4130
4131
81ecdfbb 4132$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4133
4134
81ecdfbb 4135$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4136
4137 fi
4138
f434ba03
PA
4139 case "$host_os" in
4140 hpux*)
4141
4142$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4143
4144 ;;
4145 esac
4146
783e057b 4147
81ecdfbb
RW
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4149$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4150if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4151 $as_echo_n "(cached) " >&6
783e057b 4152else
81ecdfbb 4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4154/* end confdefs.h. */
4155
f434ba03
PA
4156# define __EXTENSIONS__ 1
4157 $ac_includes_default
783e057b
DJ
4158int
4159main ()
4160{
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
81ecdfbb 4166if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4167 ac_cv_safe_to_define___extensions__=yes
4168else
81ecdfbb 4169 ac_cv_safe_to_define___extensions__=no
783e057b 4170fi
81ecdfbb 4171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4172fi
81ecdfbb
RW
4173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4174$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4175 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4176 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4177
81ecdfbb 4178 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4179
81ecdfbb 4180 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4181
81ecdfbb 4182 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4183
81ecdfbb 4184 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4185
4186
81ecdfbb
RW
4187if test -n "$ac_tool_prefix"; then
4188 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4191$as_echo_n "checking for $ac_word... " >&6; }
4192if test "${ac_cv_prog_RANLIB+set}" = set; then :
4193 $as_echo_n "(cached) " >&6
4194else
4195 if test -n "$RANLIB"; then
4196 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197else
4198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199for as_dir in $PATH
4200do
4201 IFS=$as_save_IFS
4202 test -z "$as_dir" && as_dir=.
4203 for ac_exec_ext in '' $ac_executable_extensions; do
4204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4205 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4207 break 2
4208 fi
4209done
4210 done
4211IFS=$as_save_IFS
783e057b 4212
81ecdfbb
RW
4213fi
4214fi
4215RANLIB=$ac_cv_prog_RANLIB
4216if test -n "$RANLIB"; then
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4218$as_echo "$RANLIB" >&6; }
4219else
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221$as_echo "no" >&6; }
4222fi
783e057b
DJ
4223
4224
81ecdfbb
RW
4225fi
4226if test -z "$ac_cv_prog_RANLIB"; then
4227 ac_ct_RANLIB=$RANLIB
4228 # Extract the first word of "ranlib", so it can be a program name with args.
4229set dummy ranlib; ac_word=$2
4230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4231$as_echo_n "checking for $ac_word... " >&6; }
4232if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4233 $as_echo_n "(cached) " >&6
783e057b 4234else
81ecdfbb
RW
4235 if test -n "$ac_ct_RANLIB"; then
4236 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_ac_ct_RANLIB="ranlib"
4246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4247 break 2
4248 fi
4249done
4250 done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256if test -n "$ac_ct_RANLIB"; then
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4258$as_echo "$ac_ct_RANLIB" >&6; }
4259else
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4261$as_echo "no" >&6; }
4262fi
4263
4264 if test "x$ac_ct_RANLIB" = x; then
4265 RANLIB=":"
4266 else
4267 case $cross_compiling:$ac_tool_warned in
4268yes:)
4269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4271ac_tool_warned=yes ;;
4272esac
4273 RANLIB=$ac_ct_RANLIB
4274 fi
4275else
4276 RANLIB="$ac_cv_prog_RANLIB"
4277fi
4278
4279
4280
4281
4282
4283
3388710e
JM
4284
4285
3388710e 4286
f434ba03
PA
4287 # Code from module arg-nonnull:
4288 # Code from module c++defs:
4289 # Code from module extensions:
3388710e 4290
f434ba03
PA
4291 # Code from module include_next:
4292 # Code from module memchr:
4293 # Code from module memmem:
4294 # Code from module memmem-simple:
4295 # Code from module multiarch:
4296 # Code from module stddef:
4297 # Code from module stdint:
4298 # Code from module string:
4299 # Code from module warn-on-use:
4300 # Code from module wchar:
3388710e
JM
4301
4302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4303$as_echo_n "checking target system type... " >&6; }
4304if test "${ac_cv_target+set}" = set; then :
4305 $as_echo_n "(cached) " >&6
4306else
4307 if test "x$target_alias" = x; then
4308 ac_cv_target=$ac_cv_host
4309else
4310 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4311 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4312fi
4313
4314fi
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4316$as_echo "$ac_cv_target" >&6; }
4317case $ac_cv_target in
4318*-*-*) ;;
4319*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4320esac
4321target=$ac_cv_target
4322ac_save_IFS=$IFS; IFS='-'
4323set x $ac_cv_target
4324shift
4325target_cpu=$1
4326target_vendor=$2
4327shift; shift
4328# Remember, the first character of IFS is used to create $*,
4329# except with old shells:
4330target_os=$*
4331IFS=$ac_save_IFS
4332case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4333
4334
4335# The aliases save the names the user supplied, while $host etc.
4336# will get canonicalized.
4337test -n "$target_alias" &&
4338 test "$program_prefix$program_suffix$program_transform_name" = \
4339 NONENONEs,x,x, &&
4340 program_prefix=${target_alias}-
4341
4342# The tests for host and target for $enable_largefile require
4343# canonical names.
4344
4345
81ecdfbb 4346
da2f07f1
JK
4347# As the $enable_largefile decision depends on --enable-plugins we must set it
4348# even in directories otherwise not depending on the $plugins option.
4349
4350
4351# Check whether --enable-plugins was given.
4352if test "${enable_plugins+set}" = set; then :
4353 enableval=$enable_plugins; case "${enableval}" in
4354 yes | "") plugins=yes ;;
4355 no) plugins=no ;;
4356 *) plugins=yes ;;
4357 esac
4358else
4359 plugins=no
4360fi
4361
4362
4363
4364case "${host}" in
4365 sparc-*-solaris*|i[3-7]86-*-solaris*)
4366 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4367 # are mutually exclusive; and without procfs support, the bfd/ elf module
4368 # cannot provide certain routines such as elfcore_write_prpsinfo
4369 # or elfcore_write_prstatus. So unless the user explicitly requested
4370 # large-file support through the --enable-largefile switch, disable
4371 # large-file support in favor of procfs support.
4372 test "${target}" = "${host}" -a "x$plugins" = xno \
4373 && : ${enable_largefile="no"}
4374 ;;
4375esac
4376
4377# Check whether --enable-largefile was given.
4378if test "${enable_largefile+set}" = set; then :
4379 enableval=$enable_largefile;
4380fi
4381
4382if test "$enable_largefile" != no; then
4383
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4385$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4386if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 ac_cv_sys_largefile_CC=no
4390 if test "$GCC" != yes; then
4391 ac_save_CC=$CC
4392 while :; do
4393 # IRIX 6.2 and later do not support large files by default,
4394 # so use the C compiler's -n32 option if that helps.
4395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4396/* end confdefs.h. */
4397#include <sys/types.h>
4398 /* Check that off_t can represent 2**63 - 1 correctly.
4399 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4400 since some C++ compilers masquerading as C compilers
4401 incorrectly reject 9223372036854775807. */
4402#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4403 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4404 && LARGE_OFF_T % 2147483647 == 1)
4405 ? 1 : -1];
4406int
4407main ()
4408{
4409
4410 ;
4411 return 0;
4412}
4413_ACEOF
4414 if ac_fn_c_try_compile "$LINENO"; then :
4415 break
4416fi
4417rm -f core conftest.err conftest.$ac_objext
4418 CC="$CC -n32"
4419 if ac_fn_c_try_compile "$LINENO"; then :
4420 ac_cv_sys_largefile_CC=' -n32'; break
4421fi
4422rm -f core conftest.err conftest.$ac_objext
4423 break
4424 done
4425 CC=$ac_save_CC
4426 rm -f conftest.$ac_ext
4427 fi
4428fi
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4430$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4431 if test "$ac_cv_sys_largefile_CC" != no; then
4432 CC=$CC$ac_cv_sys_largefile_CC
4433 fi
4434
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4436$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4437if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 while :; do
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442/* end confdefs.h. */
4443#include <sys/types.h>
4444 /* Check that off_t can represent 2**63 - 1 correctly.
4445 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4446 since some C++ compilers masquerading as C compilers
4447 incorrectly reject 9223372036854775807. */
4448#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4449 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4450 && LARGE_OFF_T % 2147483647 == 1)
4451 ? 1 : -1];
4452int
4453main ()
4454{
4455
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460if ac_fn_c_try_compile "$LINENO"; then :
4461 ac_cv_sys_file_offset_bits=no; break
4462fi
4463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#define _FILE_OFFSET_BITS 64
4467#include <sys/types.h>
4468 /* Check that off_t can represent 2**63 - 1 correctly.
4469 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4470 since some C++ compilers masquerading as C compilers
4471 incorrectly reject 9223372036854775807. */
4472#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4473 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4474 && LARGE_OFF_T % 2147483647 == 1)
4475 ? 1 : -1];
4476int
4477main ()
4478{
4479
4480 ;
4481 return 0;
4482}
4483_ACEOF
4484if ac_fn_c_try_compile "$LINENO"; then :
4485 ac_cv_sys_file_offset_bits=64; break
4486fi
4487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4488 ac_cv_sys_file_offset_bits=unknown
4489 break
4490done
4491fi
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4493$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4494case $ac_cv_sys_file_offset_bits in #(
4495 no | unknown) ;;
4496 *)
4497cat >>confdefs.h <<_ACEOF
4498#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4499_ACEOF
4500;;
4501esac
4502rm -rf conftest*
4503 if test $ac_cv_sys_file_offset_bits = unknown; then
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4505$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4506if test "${ac_cv_sys_large_files+set}" = set; then :
4507 $as_echo_n "(cached) " >&6
4508else
4509 while :; do
4510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4511/* end confdefs.h. */
4512#include <sys/types.h>
4513 /* Check that off_t can represent 2**63 - 1 correctly.
4514 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4515 since some C++ compilers masquerading as C compilers
4516 incorrectly reject 9223372036854775807. */
4517#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4518 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4519 && LARGE_OFF_T % 2147483647 == 1)
4520 ? 1 : -1];
4521int
4522main ()
4523{
4524
4525 ;
4526 return 0;
4527}
4528_ACEOF
4529if ac_fn_c_try_compile "$LINENO"; then :
4530 ac_cv_sys_large_files=no; break
4531fi
4532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#define _LARGE_FILES 1
4536#include <sys/types.h>
4537 /* Check that off_t can represent 2**63 - 1 correctly.
4538 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4539 since some C++ compilers masquerading as C compilers
4540 incorrectly reject 9223372036854775807. */
4541#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4542 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4543 && LARGE_OFF_T % 2147483647 == 1)
4544 ? 1 : -1];
4545int
4546main ()
4547{
4548
4549 ;
4550 return 0;
4551}
4552_ACEOF
4553if ac_fn_c_try_compile "$LINENO"; then :
4554 ac_cv_sys_large_files=1; break
4555fi
4556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4557 ac_cv_sys_large_files=unknown
4558 break
4559done
4560fi
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4562$as_echo "$ac_cv_sys_large_files" >&6; }
4563case $ac_cv_sys_large_files in #(
4564 no | unknown) ;;
4565 *)
4566cat >>confdefs.h <<_ACEOF
4567#define _LARGE_FILES $ac_cv_sys_large_files
4568_ACEOF
4569;;
4570esac
4571rm -rf conftest*
4572 fi
4573fi
4574
4575
4576
81ecdfbb
RW
4577
4578
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4580$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4581if test "${am_cv_prog_cc_stdc+set}" = set; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 am_cv_prog_cc_stdc=no
4585ac_save_CC="$CC"
4586# Don't try gcc -ansi; that turns off useful extensions and
4587# breaks some systems' header files.
4588# AIX -qlanglvl=ansi
4589# Ultrix and OSF/1 -std1
4590# HP-UX 10.20 and later -Ae
4591# HP-UX older versions -Aa -D_HPUX_SOURCE
4592# SVR4 -Xc -D__EXTENSIONS__
4593for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4594do
783e057b 4595 CC="$ac_save_CC $ac_arg"
81ecdfbb 4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4597/* end confdefs.h. */
4598#include <stdarg.h>
4599#include <stdio.h>
4600#include <sys/types.h>
4601#include <sys/stat.h>
4602/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4603struct buf { int x; };
4604FILE * (*rcsopen) (struct buf *, struct stat *, int);
4605static char *e (p, i)
4606 char **p;
4607 int i;
4608{
4609 return p[i];
4610}
4611static char *f (char * (*g) (char **, int), char **p, ...)
4612{
4613 char *s;
4614 va_list v;
4615 va_start (v,p);
4616 s = g (p, va_arg (v,int));
4617 va_end (v);
4618 return s;
4619}
4620int test (int i, double x);
4621struct s1 {int (*f) (int a);};
4622struct s2 {int (*f) (double a);};
4623int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4624int argc;
4625char **argv;
4626
4627int
4628main ()
4629{
4630
4631return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4632
4633 ;
4634 return 0;
4635}
4636_ACEOF
81ecdfbb 4637if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4638 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4639fi
81ecdfbb 4640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4641done
4642CC="$ac_save_CC"
4643
4644fi
4645
4646if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4648$as_echo "none needed" >&6; }
783e057b 4649else
81ecdfbb
RW
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4651$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4652fi
4653case "x$am_cv_prog_cc_stdc" in
4654 x|xno) ;;
4655 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4656esac
4657
4658
4659ac_aux_dir=
81ecdfbb
RW
4660for ac_dir in .. "$srcdir"/..; do
4661 for ac_t in install-sh install.sh shtool; do
4662 if test -f "$ac_dir/$ac_t"; then
4663 ac_aux_dir=$ac_dir
4664 ac_install_sh="$ac_aux_dir/$ac_t -c"
4665 break 2
4666 fi
4667 done
783e057b
DJ
4668done
4669if test -z "$ac_aux_dir"; then
81ecdfbb 4670 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4671fi
81ecdfbb
RW
4672
4673# These three variables are undocumented and unsupported,
4674# and are intended to be withdrawn in a future Autoconf release.
4675# They can cause serious problems if a builder's source tree is in a directory
4676# whose full name contains unusual characters.
4677ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4678ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4679ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4680
783e057b 4681
783e057b 4682
81ecdfbb 4683
a417dc56
RW
4684# Dependency checking.
4685rm -rf .tst 2>/dev/null
4686mkdir .tst 2>/dev/null
4687if test -d .tst; then
4688 am__leading_dot=.
4689else
4690 am__leading_dot=_
4691fi
4692rmdir .tst 2>/dev/null
4693
4694DEPDIR="${am__leading_dot}deps"
4695
81ecdfbb 4696ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4697
4698
4699depcc="$CC" am_compiler_list=
4700
4701am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4703$as_echo_n "checking dependency style of $depcc... " >&6; }
4704if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4705 $as_echo_n "(cached) " >&6
a417dc56
RW
4706else
4707 if test -f "$am_depcomp"; then
4708 # We make a subdir and do the tests there. Otherwise we can end up
4709 # making bogus files that we don't know about and never remove. For
4710 # instance it was reported that on HP-UX the gcc test will end up
4711 # making a dummy file named `D' -- because `-MD' means `put the output
4712 # in D'.
4713 mkdir conftest.dir
4714 # Copy depcomp to subdir because otherwise we won't find it if we're
4715 # using a relative directory.
4716 cp "$am_depcomp" conftest.dir
4717 cd conftest.dir
4718 # We will build objects and dependencies in a subdirectory because
4719 # it helps to detect inapplicable dependency modes. For instance
4720 # both Tru64's cc and ICC support -MD to output dependencies as a
4721 # side effect of compilation, but ICC will put the dependencies in
4722 # the current directory while Tru64 will put them in the object
4723 # directory.
4724 mkdir sub
4725
4726 am_cv_CC_dependencies_compiler_type=none
4727 if test "$am_compiler_list" = ""; then
4728 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4729 fi
4730 for depmode in $am_compiler_list; do
4731 if test $depmode = none; then break; fi
4732
81ecdfbb 4733 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4734 # Setup a source with many dependencies, because some compilers
4735 # like to wrap large dependency lists on column 80 (with \), and
4736 # we should not choose a depcomp mode which is confused by this.
4737 #
4738 # We need to recreate these files for each test, as the compiler may
4739 # overwrite some of them when testing with obscure command lines.
4740 # This happens at least with the AIX C compiler.
4741 : > sub/conftest.c
4742 for i in 1 2 3 4 5 6; do
4743 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4744 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4745 # Solaris 8's {/usr,}/bin/sh.
4746 touch sub/conftst$i.h
4747 done
4748 echo "include sub/conftest.Po" > confmf
4749
4750 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4751 # mode. It turns out that the SunPro C++ compiler does not properly
4752 # handle `-M -o', and we need to detect this.
4753 depcmd="depmode=$depmode \
4754 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4755 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4756 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4757 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4758 if env $depcmd > conftest.err 2>&1 &&
4759 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4760 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4761 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4762 # icc doesn't choke on unknown options, it will just issue warnings
4763 # or remarks (even with -Werror). So we grep stderr for any message
4764 # that says an option was ignored or not supported.
4765 # When given -MP, icc 7.0 and 7.1 complain thusly:
4766 # icc: Command line warning: ignoring option '-M'; no argument required
4767 # The diagnosis changed in icc 8.0:
4768 # icc: Command line remark: option '-MP' not supported
4769 if (grep 'ignoring option' conftest.err ||
4770 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4771 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4772 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4773 break
4774 fi
4775 fi
81ecdfbb 4776 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4777 sed -e 's/^/| /' < conftest.err >&5
4778 done
4779
4780 cd ..
4781 rm -rf conftest.dir
4782else
4783 am_cv_CC_dependencies_compiler_type=none
4784fi
4785
4786fi
81ecdfbb
RW
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4788$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4789if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4790then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4791else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4792
4793fi
4794
4795
4796# Check for the 'make' the user wants to use.
4797for ac_prog in make
4798do
4799 # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if test "${ac_cv_prog_MAKE+set}" = set; then :
4804 $as_echo_n "(cached) " >&6
a417dc56
RW
4805else
4806 if test -n "$MAKE"; then
4807 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4808else
4809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in $PATH
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4814 for ac_exec_ext in '' $ac_executable_extensions; do
4815 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4816 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4818 break 2
4819 fi
4820done
81ecdfbb
RW
4821 done
4822IFS=$as_save_IFS
a417dc56
RW
4823
4824fi
4825fi
4826MAKE=$ac_cv_prog_MAKE
4827if test -n "$MAKE"; then
81ecdfbb
RW
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4829$as_echo "$MAKE" >&6; }
a417dc56 4830else
81ecdfbb
RW
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
a417dc56
RW
4833fi
4834
81ecdfbb 4835
a417dc56
RW
4836 test -n "$MAKE" && break
4837done
4838
4839MAKE_IS_GNU=
4840case "`$MAKE --version 2>&1 | sed 1q`" in
4841 *GNU*)
4842 MAKE_IS_GNU=yes
4843 ;;
4844esac
81ecdfbb 4845 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4846 GMAKE_TRUE=
4847 GMAKE_FALSE='#'
4848else
4849 GMAKE_TRUE='#'
4850 GMAKE_FALSE=
4851fi
4852
81ecdfbb
RW
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4854$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4855set x ${MAKE-make}
4856ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4857if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4858 $as_echo_n "(cached) " >&6
a417dc56
RW
4859else
4860 cat >conftest.make <<\_ACEOF
81ecdfbb 4861SHELL = /bin/sh
a417dc56 4862all:
81ecdfbb 4863 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4864_ACEOF
4865# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4866case `${MAKE-make} -f conftest.make 2>/dev/null` in
4867 *@@@%%%=?*=@@@%%%*)
4868 eval ac_cv_prog_make_${ac_make}_set=yes;;
4869 *)
4870 eval ac_cv_prog_make_${ac_make}_set=no;;
4871esac
a417dc56
RW
4872rm -f conftest.make
4873fi
81ecdfbb
RW
4874if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4876$as_echo "yes" >&6; }
a417dc56
RW
4877 SET_MAKE=
4878else
81ecdfbb
RW
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
a417dc56
RW
4881 SET_MAKE="MAKE=${MAKE-make}"
4882fi
4883
4884
783e057b
DJ
4885
4886CONFIG_OBS=
4887CONFIG_DEPS=
4888CONFIG_SRCS=
4889ENABLE_CFLAGS=
4890
4891CONFIG_ALL=
4892CONFIG_CLEAN=
4893CONFIG_INSTALL=
4894CONFIG_UNINSTALL=
4895
4896# If we haven't got the data from the intl directory,
4897# assume NLS is disabled.
4898USE_NLS=no
4899LIBINTL=
4900LIBINTL_DEP=
4901INCINTL=
4902XGETTEXT=
4903GMSGFMT=
4904POSUB=
4905
4906if test -f ../intl/config.intl; then
4907 . ../intl/config.intl
4908fi
81ecdfbb
RW
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4910$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4911if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
783e057b 4914else
81ecdfbb
RW
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4916$as_echo "yes" >&6; }
783e057b 4917
81ecdfbb 4918$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4919
4920
81ecdfbb
RW
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4922$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4923 # Look for .po and .gmo files in the source directory.
4924 CATALOGS=
4925 XLINGUAS=
4926 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4927 # If there aren't any .gmo files the shell will give us the
4928 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4929 # weeded out.
4930 case "$cat" in *\**)
4931 continue;;
4932 esac
4933 # The quadruple backslash is collapsed to a double backslash
4934 # by the backticks, then collapsed again by the double quotes,
4935 # leaving us with one backslash in the sed expression (right
4936 # before the dot that mustn't act as a wildcard).
4937 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4938 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4939 # The user is allowed to set LINGUAS to a list of languages to
4940 # install catalogs for. If it's empty that means "all of them."
4941 if test "x$LINGUAS" = x; then
4942 CATALOGS="$CATALOGS $cat"
4943 XLINGUAS="$XLINGUAS $lang"
4944 else
4945 case "$LINGUAS" in *$lang*)
4946 CATALOGS="$CATALOGS $cat"
4947 XLINGUAS="$XLINGUAS $lang"
4948 ;;
4949 esac
4950 fi
4951 done
4952 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4954$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4955
4956
4957 DATADIRNAME=share
4958
4959 INSTOBJEXT=.mo
4960
4961 GENCAT=gencat
4962
4963 CATOBJEXT=.gmo
4964
4965fi
4966
4967localedir='${datadir}/locale'
4968
4969
4970if test x"$USE_NLS" = xyes; then
4971 CONFIG_ALL="$CONFIG_ALL all-po"
4972 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4973 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4974 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4975fi
4976
4977
f434ba03
PA
4978
4979
4980
4981 LIBC_FATAL_STDERR_=1
4982 export LIBC_FATAL_STDERR_
4983
4984
4985
4986
4987
4988 for ac_header in $gl_header_list
4989do :
4990 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4991ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4992eval as_val=\$$as_ac_Header
4993 if test "x$as_val" = x""yes; then :
4994 cat >>confdefs.h <<_ACEOF
4995#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4996_ACEOF
4997
4998fi
4999
5000done
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010 for ac_func in $gl_func_list
5011do :
5012 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5013ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5014eval as_val=\$$as_ac_var
5015 if test "x$as_val" = x""yes; then :
5016 cat >>confdefs.h <<_ACEOF
5017#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5018_ACEOF
5019
5020fi
5021done
5022
5023
5024
5025
5026
5027
5028 GNULIB_MEMCHR=0;
5029 GNULIB_MEMMEM=0;
5030 GNULIB_MEMPCPY=0;
5031 GNULIB_MEMRCHR=0;
5032 GNULIB_RAWMEMCHR=0;
5033 GNULIB_STPCPY=0;
5034 GNULIB_STPNCPY=0;
5035 GNULIB_STRCHRNUL=0;
5036 GNULIB_STRDUP=0;
5037 GNULIB_STRNCAT=0;
5038 GNULIB_STRNDUP=0;
5039 GNULIB_STRNLEN=0;
5040 GNULIB_STRPBRK=0;
5041 GNULIB_STRSEP=0;
5042 GNULIB_STRSTR=0;
5043 GNULIB_STRCASESTR=0;
5044 GNULIB_STRTOK_R=0;
5045 GNULIB_MBSLEN=0;
5046 GNULIB_MBSNLEN=0;
5047 GNULIB_MBSCHR=0;
5048 GNULIB_MBSRCHR=0;
5049 GNULIB_MBSSTR=0;
5050 GNULIB_MBSCASECMP=0;
5051 GNULIB_MBSNCASECMP=0;
5052 GNULIB_MBSPCASECMP=0;
5053 GNULIB_MBSCASESTR=0;
5054 GNULIB_MBSCSPN=0;
5055 GNULIB_MBSPBRK=0;
5056 GNULIB_MBSSPN=0;
5057 GNULIB_MBSSEP=0;
5058 GNULIB_MBSTOK_R=0;
5059 GNULIB_STRERROR=0;
5060 GNULIB_STRSIGNAL=0;
5061 GNULIB_STRVERSCMP=0;
5062 HAVE_MBSLEN=0;
5063 HAVE_MEMCHR=1;
5064 HAVE_DECL_MEMMEM=1;
5065 HAVE_MEMPCPY=1;
5066 HAVE_DECL_MEMRCHR=1;
5067 HAVE_RAWMEMCHR=1;
5068 HAVE_STPCPY=1;
5069 HAVE_STPNCPY=1;
5070 HAVE_STRCHRNUL=1;
5071 HAVE_DECL_STRDUP=1;
5072 HAVE_DECL_STRNDUP=1;
5073 HAVE_DECL_STRNLEN=1;
5074 HAVE_STRPBRK=1;
5075 HAVE_STRSEP=1;
5076 HAVE_STRCASESTR=1;
5077 HAVE_DECL_STRTOK_R=1;
5078 HAVE_DECL_STRSIGNAL=1;
5079 HAVE_STRVERSCMP=1;
5080 REPLACE_MEMCHR=0;
783e057b 5081 REPLACE_MEMMEM=0;
f434ba03
PA
5082 REPLACE_STPNCPY=0;
5083 REPLACE_STRDUP=0;
783e057b 5084 REPLACE_STRSTR=0;
f434ba03
PA
5085 REPLACE_STRCASESTR=0;
5086 REPLACE_STRERROR=0;
5087 REPLACE_STRNCAT=0;
5088 REPLACE_STRNDUP=0;
5089 REPLACE_STRNLEN=0;
5090 REPLACE_STRSIGNAL=0;
5091 REPLACE_STRTOK_R=0;
5092 UNDEFINE_STRTOK_R=0;
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5107 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5108 # irrelevant for anonymous mappings.
5109 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5110if test "x$ac_cv_func_mmap" = x""yes; then :
5111 gl_have_mmap=yes
5112else
5113 gl_have_mmap=no
5114fi
5115
5116
5117 # Try to allow MAP_ANONYMOUS.
5118 gl_have_mmap_anonymous=no
5119 if test $gl_have_mmap = yes; then
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5121$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123/* end confdefs.h. */
5124
5125#include <sys/mman.h>
5126#ifdef MAP_ANONYMOUS
5127 I cant identify this map.
5128#endif
5129
5130_ACEOF
5131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5132 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5133 gl_have_mmap_anonymous=yes
5134fi
5135rm -f conftest*
5136
5137 if test $gl_have_mmap_anonymous != yes; then
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139/* end confdefs.h. */
5140
5141#include <sys/mman.h>
5142#ifdef MAP_ANON
5143 I cant identify this map.
5144#endif
5145
5146_ACEOF
5147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5148 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5149
5150$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5151
5152 gl_have_mmap_anonymous=yes
5153fi
5154rm -f conftest*
5155
5156 fi
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5158$as_echo "$gl_have_mmap_anonymous" >&6; }
5159 if test $gl_have_mmap_anonymous = yes; then
5160
5161$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5162
5163 fi
5164 fi
5165
5166
5167 :
5168
5169
5170
5171
5172
5173
5174 :
5175
5176
5177
5178
5179
5180
5181
5182
5183 :
5184
5185
5186
5187
5188
5189 if test $ac_cv_func_memchr = yes; then
5190 # Detect platform-specific bugs in some versions of glibc:
5191 # memchr should not dereference anything with length 0
5192 # http://bugzilla.redhat.com/499689
5193 # memchr should not dereference overestimated length after a match
5194 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5195 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5196 # Assume that memchr works on platforms that lack mprotect.
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5198$as_echo_n "checking whether memchr works... " >&6; }
5199if test "${gl_cv_func_memchr_works+set}" = set; then :
5200 $as_echo_n "(cached) " >&6
5201else
5202 if test "$cross_compiling" = yes; then :
5203 gl_cv_func_memchr_works="guessing no"
5204else
5205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206/* end confdefs.h. */
5207
5208#include <string.h>
5209#if HAVE_SYS_MMAN_H
5210# include <fcntl.h>
5211# include <unistd.h>
5212# include <sys/types.h>
5213# include <sys/mman.h>
5214# ifndef MAP_FILE
5215# define MAP_FILE 0
5216# endif
5217#endif
5218
5219int
5220main ()
5221{
5222
5223 char *fence = NULL;
5224#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5225# if HAVE_MAP_ANONYMOUS
5226 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5227 const int fd = -1;
5228# else /* !HAVE_MAP_ANONYMOUS */
5229 const int flags = MAP_FILE | MAP_PRIVATE;
5230 int fd = open ("/dev/zero", O_RDONLY, 0666);
5231 if (fd >= 0)
5232# endif
5233 {
5234 int pagesize = getpagesize ();
5235 char *two_pages =
5236 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5237 flags, fd, 0);
5238 if (two_pages != (char *)(-1)
5239 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5240 fence = two_pages + pagesize;
5241 }
5242#endif
5243 if (fence)
5244 {
5245 if (memchr (fence, 0, 0))
5246 return 1;
5247 strcpy (fence - 9, "12345678");
5248 if (memchr (fence - 9, 0, 79) != fence - 1)
5249 return 2;
5250 }
5251 return 0;
5252
5253 ;
5254 return 0;
5255}
5256_ACEOF
5257if ac_fn_c_try_run "$LINENO"; then :
5258 gl_cv_func_memchr_works=yes
5259else
5260 gl_cv_func_memchr_works=no
5261fi
5262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5263 conftest.$ac_objext conftest.beam conftest.$ac_ext
5264fi
5265
5266fi
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5268$as_echo "$gl_cv_func_memchr_works" >&6; }
5269 if test "$gl_cv_func_memchr_works" != yes; then
5270 REPLACE_MEMCHR=1
5271 fi
5272 else
5273 HAVE_MEMCHR=0
5274 fi
5275 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5276
5277
5278
5279
5280
5281
5282
5283
5284 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5285
5286
5287 for ac_header in bp-sym.h
5288do :
5289 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5290if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5291 cat >>confdefs.h <<_ACEOF
5292#define HAVE_BP_SYM_H 1
5293_ACEOF
5294
5295fi
5296
5297done
5298
5299
5300 fi
783e057b
DJ
5301
5302
81ecdfbb
RW
5303 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5304if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5305 ac_have_decl=1
783e057b 5306else
81ecdfbb 5307 ac_have_decl=0
783e057b 5308fi
783e057b
DJ
5309
5310cat >>confdefs.h <<_ACEOF
81ecdfbb 5311#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5312_ACEOF
5313
5314
783e057b
DJ
5315
5316
5317
5318
5319
5320
5321
5322
783e057b 5323
783e057b 5324
783e057b 5325
f434ba03 5326
81ecdfbb
RW
5327 for ac_func in memmem
5328do :
5329 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5330if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5331 cat >>confdefs.h <<_ACEOF
81ecdfbb 5332#define HAVE_MEMMEM 1
783e057b
DJ
5333_ACEOF
5334
5335else
5336
5337 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5338
5339fi
5340done
5341
5342
5343
5344 :
5345
5346
5347
5348
5349
5350 if test $ac_cv_have_decl_memmem = no; then
5351 HAVE_DECL_MEMMEM=0
5352 fi
5353 :
5354
5355
f434ba03
PA
5356 gl_cv_c_multiarch=no
5357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358/* end confdefs.h. */
5359#ifndef __APPLE_CC__
5360 not a universal capable compiler
5361 #endif
5362 typedef int dummy;
5363
5364_ACEOF
5365if ac_fn_c_try_compile "$LINENO"; then :
5366
5367 arch=
5368 prev=
5369 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5370 if test -n "$prev"; then
5371 case $word in
5372 i?86 | x86_64 | ppc | ppc64)
5373 if test -z "$arch" || test "$arch" = "$word"; then
5374 arch="$word"
5375 else
5376 gl_cv_c_multiarch=yes
5377 fi
5378 ;;
5379 esac
5380 prev=
5381 else
5382 if test "x$word" = "x-arch"; then
5383 prev=arch
5384 fi
5385 fi
5386 done
5387
5388fi
5389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390 if test $gl_cv_c_multiarch = yes; then
5391
5392$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5393
5394 APPLE_UNIVERSAL_BUILD=1
5395 else
5396 APPLE_UNIVERSAL_BUILD=0
5397 fi
5398
5399
5400
5401 REPLACE_NULL=0;
5402 HAVE_WCHAR_T=1;
5403 STDDEF_H='';
5404
5405
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5407$as_echo_n "checking for wchar_t... " >&6; }
5408if test "${gt_cv_c_wchar_t+set}" = set; then :
5409 $as_echo_n "(cached) " >&6
5410else
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412/* end confdefs.h. */
5413#include <stddef.h>
5414 wchar_t foo = (wchar_t)'\0';
5415int
5416main ()
5417{
5418
5419 ;
5420 return 0;
5421}
5422_ACEOF
5423if ac_fn_c_try_compile "$LINENO"; then :
5424 gt_cv_c_wchar_t=yes
5425else
5426 gt_cv_c_wchar_t=no
5427fi
5428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5429fi
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5431$as_echo "$gt_cv_c_wchar_t" >&6; }
5432 if test $gt_cv_c_wchar_t = yes; then
5433
5434$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5435
5436 fi
5437
5438
5439
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5441$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5442if test "${gl_cv_have_include_next+set}" = set; then :
5443 $as_echo_n "(cached) " >&6
5444else
5445 rm -rf conftestd1a conftestd1b conftestd2
5446 mkdir conftestd1a conftestd1b conftestd2
5447 cat <<EOF > conftestd1a/conftest.h
5448#define DEFINED_IN_CONFTESTD1
5449#include_next <conftest.h>
5450#ifdef DEFINED_IN_CONFTESTD2
5451int foo;
5452#else
5453#error "include_next doesn't work"
5454#endif
5455EOF
5456 cat <<EOF > conftestd1b/conftest.h
5457#define DEFINED_IN_CONFTESTD1
5458#include <stdio.h>
5459#include_next <conftest.h>
5460#ifdef DEFINED_IN_CONFTESTD2
5461int foo;
5462#else
5463#error "include_next doesn't work"
5464#endif
5465EOF
5466 cat <<EOF > conftestd2/conftest.h
5467#ifndef DEFINED_IN_CONFTESTD1
5468#error "include_next test doesn't work"
5469#endif
5470#define DEFINED_IN_CONFTESTD2
5471EOF
5472 gl_save_CPPFLAGS="$CPPFLAGS"
5473 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <conftest.h>
5477_ACEOF
5478if ac_fn_c_try_compile "$LINENO"; then :
5479 gl_cv_have_include_next=yes
5480else
5481 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483/* end confdefs.h. */
5484#include <conftest.h>
5485_ACEOF
5486if ac_fn_c_try_compile "$LINENO"; then :
5487 gl_cv_have_include_next=buggy
5488else
5489 gl_cv_have_include_next=no
5490fi
5491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5492
5493fi
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495 CPPFLAGS="$gl_save_CPPFLAGS"
5496 rm -rf conftestd1a conftestd1b conftestd2
5497
5498fi
5499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5500$as_echo "$gl_cv_have_include_next" >&6; }
5501 PRAGMA_SYSTEM_HEADER=
5502 if test $gl_cv_have_include_next = yes; then
5503 INCLUDE_NEXT=include_next
5504 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5505 if test -n "$GCC"; then
5506 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5507 fi
5508 else
5509 if test $gl_cv_have_include_next = buggy; then
5510 INCLUDE_NEXT=include
5511 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5512 else
5513 INCLUDE_NEXT=include
5514 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5515 fi
5516 fi
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
81ecdfbb
RW
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5528$as_echo_n "checking for long long int... " >&6; }
5529if test "${ac_cv_type_long_long_int+set}" = set; then :
5530 $as_echo_n "(cached) " >&6
783e057b 5531else
81ecdfbb 5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5533/* end confdefs.h. */
81ecdfbb
RW
5534
5535 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5536 implementations with broken preprocessors. Perhaps this can
5537 be revisited in 2012. In the meantime, code should not expect
5538 #if to work with literals wider than 32 bits. */
783e057b
DJ
5539 /* Test literals. */
5540 long long int ll = 9223372036854775807ll;
5541 long long int nll = -9223372036854775807LL;
5542 unsigned long long int ull = 18446744073709551615ULL;
5543 /* Test constant expressions. */
5544 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5545 ? 1 : -1)];
783e057b 5546 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5547 ? 1 : -1)];
783e057b
DJ
5548 int i = 63;
5549int
5550main ()
5551{
5552/* Test availability of runtime routines for shift and division. */
5553 long long int llmax = 9223372036854775807ll;
5554 unsigned long long int ullmax = 18446744073709551615ull;
5555 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5556 | (llmax / ll) | (llmax % ll)
5557 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5558 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5559 ;
5560 return 0;
5561}
5562
5563_ACEOF
81ecdfbb 5564if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5565 if test "$cross_compiling" = yes; then :
783e057b
DJ
5566 ac_cv_type_long_long_int=yes
5567else
81ecdfbb 5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5569/* end confdefs.h. */
5570#include <limits.h>
f434ba03
PA
5571 #ifndef LLONG_MAX
5572 # define HALF \
5573 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5574 # define LLONG_MAX (HALF - 1 + HALF)
5575 #endif
783e057b
DJ
5576int
5577main ()
5578{
5579long long int n = 1;
f434ba03
PA
5580 int i;
5581 for (i = 0; ; i++)
5582 {
5583 long long int m = n << i;
5584 if (m >> i != n)
5585 return 1;
5586 if (LLONG_MAX / 2 < m)
5587 break;
5588 }
5589 return 0;
783e057b
DJ
5590 ;
5591 return 0;
5592}
5593_ACEOF
81ecdfbb 5594if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5595 ac_cv_type_long_long_int=yes
5596else
81ecdfbb 5597 ac_cv_type_long_long_int=no
783e057b 5598fi
81ecdfbb
RW
5599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5600 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5601fi
783e057b 5602
81ecdfbb
RW
5603else
5604 ac_cv_type_long_long_int=no
783e057b 5605fi
81ecdfbb
RW
5606rm -f core conftest.err conftest.$ac_objext \
5607 conftest$ac_exeext conftest.$ac_ext
783e057b 5608fi
81ecdfbb
RW
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5610$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5611 if test $ac_cv_type_long_long_int = yes; then
5612
81ecdfbb 5613$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5614
5615 fi
5616
5617
81ecdfbb
RW
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5619$as_echo_n "checking for unsigned long long int... " >&6; }
5620if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5621 $as_echo_n "(cached) " >&6
783e057b 5622else
81ecdfbb 5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5624/* end confdefs.h. */
81ecdfbb
RW
5625
5626 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5627 implementations with broken preprocessors. Perhaps this can
5628 be revisited in 2012. In the meantime, code should not expect
5629 #if to work with literals wider than 32 bits. */
783e057b
DJ
5630 /* Test literals. */
5631 long long int ll = 9223372036854775807ll;
5632 long long int nll = -9223372036854775807LL;
5633 unsigned long long int ull = 18446744073709551615ULL;
5634 /* Test constant expressions. */
5635 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5636 ? 1 : -1)];
783e057b 5637 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5638 ? 1 : -1)];
783e057b
DJ
5639 int i = 63;
5640int
5641main ()
5642{
5643/* Test availability of runtime routines for shift and division. */
5644 long long int llmax = 9223372036854775807ll;
5645 unsigned long long int ullmax = 18446744073709551615ull;
5646 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5647 | (llmax / ll) | (llmax % ll)
5648 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5649 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5650 ;
5651 return 0;
5652}
5653
5654_ACEOF
81ecdfbb 5655if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5656 ac_cv_type_unsigned_long_long_int=yes
5657else
81ecdfbb 5658 ac_cv_type_unsigned_long_long_int=no
783e057b 5659fi
81ecdfbb
RW
5660rm -f core conftest.err conftest.$ac_objext \
5661 conftest$ac_exeext conftest.$ac_ext
783e057b 5662fi
81ecdfbb
RW
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5664$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5665 if test $ac_cv_type_unsigned_long_long_int = yes; then
5666
81ecdfbb 5667$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5668
5669 fi
5670
5671
5672
783e057b
DJ
5673
5674
5675
5676
5677
5678
5679
5680
81ecdfbb
RW
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5682$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5683if test "${ac_cv_c_restrict+set}" = set; then :
5684 $as_echo_n "(cached) " >&6
783e057b
DJ
5685else
5686 ac_cv_c_restrict=no
5687 # The order here caters to the fact that C++ does not require restrict.
5688 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5690/* end confdefs.h. */
5691typedef int * int_ptr;
5692 int foo (int_ptr $ac_kw ip) {
5693 return ip[0];
5694 }
5695int
5696main ()
5697{
5698int s[1];
5699 int * $ac_kw t = s;
5700 t[0] = 0;
5701 return foo(t)
5702 ;
5703 return 0;
5704}
5705_ACEOF
81ecdfbb 5706if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5707 ac_cv_c_restrict=$ac_kw
783e057b 5708fi
81ecdfbb 5709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5710 test "$ac_cv_c_restrict" != no && break
5711 done
5712
5713fi
81ecdfbb
RW
5714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5715$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5716
5717 case $ac_cv_c_restrict in
5718 restrict) ;;
81ecdfbb 5719 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5720 ;;
5721 *) cat >>confdefs.h <<_ACEOF
5722#define restrict $ac_cv_c_restrict
5723_ACEOF
5724 ;;
5725 esac
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
f434ba03 5738
783e057b
DJ
5739 :
5740
5741
5742
5743
5744
5745
5746
f434ba03
PA
5747 if test $gl_cv_have_include_next = yes; then
5748 gl_cv_next_string_h='<'string.h'>'
5749 else
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5751$as_echo_n "checking absolute name of <string.h>... " >&6; }
5752if test "${gl_cv_next_string_h+set}" = set; then :
5753 $as_echo_n "(cached) " >&6
5754else
5755
5756 if test $ac_cv_header_string_h = yes; then
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758/* end confdefs.h. */
5759#include <string.h>
5760
5761_ACEOF
5762 case "$host_os" in
5763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5764 *) gl_absname_cpp="$ac_cpp" ;;
5765 esac
5766 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5767 sed -n '\#/string.h#{
5768 s#.*"\(.*/string.h\)".*#\1#
5769 s#^/[^/]#//&#
5770 p
5771 q
5772 }'`'"'
5773 else
5774 gl_cv_next_string_h='<'string.h'>'
5775 fi
5776
5777fi
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5779$as_echo "$gl_cv_next_string_h" >&6; }
5780 fi
5781 NEXT_STRING_H=$gl_cv_next_string_h
5782
5783 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5785 gl_next_as_first_directive='<'string.h'>'
5786 else
5787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5788 gl_next_as_first_directive=$gl_cv_next_string_h
5789 fi
5790 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5791
5792
5793
5794
5795
5796 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5797 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5799$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5800if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5801 $as_echo_n "(cached) " >&6
5802else
5803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5804/* end confdefs.h. */
5805#include <string.h>
5806
5807int
5808main ()
5809{
5810#undef $gl_func
5811 (void) $gl_func;
5812 ;
5813 return 0;
5814}
5815_ACEOF
5816if ac_fn_c_try_compile "$LINENO"; then :
5817 eval "$as_gl_Symbol=yes"
5818else
5819 eval "$as_gl_Symbol=no"
5820fi
5821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822fi
5823eval ac_res=\$$as_gl_Symbol
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5825$as_echo "$ac_res" >&6; }
5826 eval as_val=\$$as_gl_Symbol
5827 if test "x$as_val" = x""yes; then :
5828 cat >>confdefs.h <<_ACEOF
5829#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5830_ACEOF
5831
5832 eval ac_cv_have_decl_$gl_func=yes
5833fi
5834 done
5835
5836
5837
5838 GNULIB_BTOWC=0;
5839 GNULIB_WCTOB=0;
5840 GNULIB_MBSINIT=0;
5841 GNULIB_MBRTOWC=0;
5842 GNULIB_MBRLEN=0;
5843 GNULIB_MBSRTOWCS=0;
5844 GNULIB_MBSNRTOWCS=0;
5845 GNULIB_WCRTOMB=0;
5846 GNULIB_WCSRTOMBS=0;
5847 GNULIB_WCSNRTOMBS=0;
5848 GNULIB_WCWIDTH=0;
5849 HAVE_BTOWC=1;
5850 HAVE_MBSINIT=1;
5851 HAVE_MBRTOWC=1;
5852 HAVE_MBRLEN=1;
5853 HAVE_MBSRTOWCS=1;
5854 HAVE_MBSNRTOWCS=1;
5855 HAVE_WCRTOMB=1;
5856 HAVE_WCSRTOMBS=1;
5857 HAVE_WCSNRTOMBS=1;
5858 HAVE_DECL_WCTOB=1;
5859 HAVE_DECL_WCWIDTH=1;
5860 REPLACE_MBSTATE_T=0;
5861 REPLACE_BTOWC=0;
5862 REPLACE_WCTOB=0;
5863 REPLACE_MBSINIT=0;
5864 REPLACE_MBRTOWC=0;
5865 REPLACE_MBRLEN=0;
5866 REPLACE_MBSRTOWCS=0;
5867 REPLACE_MBSNRTOWCS=0;
5868 REPLACE_WCRTOMB=0;
5869 REPLACE_WCSRTOMBS=0;
5870 REPLACE_WCSNRTOMBS=0;
5871 REPLACE_WCWIDTH=0;
5872
5873
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5875$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5876if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5877 $as_echo_n "(cached) " >&6
783e057b 5878else
f434ba03
PA
5879 gl_cv_header_wchar_h_correct_inline=yes
5880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5881/* end confdefs.h. */
783e057b 5882
f434ba03
PA
5883 #define wcstod renamed_wcstod
5884#include <wchar.h>
5885extern int zero (void);
5886int main () { return zero(); }
5887
5888_ACEOF
5889 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5890 (eval $ac_compile) 2>&5
5891 ac_status=$?
5892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5893 test $ac_status = 0; }; then
5894 mv conftest.$ac_objext conftest1.$ac_objext
5895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5896/* end confdefs.h. */
f434ba03
PA
5897
5898 #define wcstod renamed_wcstod
5899#include <wchar.h>
5900int zero (void) { return 0; }
783e057b
DJ
5901
5902_ACEOF
f434ba03
PA
5903 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5904 (eval $ac_compile) 2>&5
5905 ac_status=$?
5906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5907 test $ac_status = 0; }; then
5908 mv conftest.$ac_objext conftest2.$ac_objext
5909 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5910 :
5911 else
5912 gl_cv_header_wchar_h_correct_inline=no
5913 fi
5914 fi
5915 fi
5916 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5917
5918fi
f434ba03
PA
5919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5920$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5921 if test $gl_cv_header_wchar_h_correct_inline = no; then
5922 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5923This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5924C99 mode. You have four options:
5925 - Add the flag -fgnu89-inline to CC and reconfigure, or
5926 - Fix your include files, using parts of
5927 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5928 - Use a gcc version older than 4.3, or
5929 - Don't use the flags -std=c99 or -std=gnu99.
5930Configuration aborted." "$LINENO" 5
5931 fi
783e057b
DJ
5932
5933
f434ba03
PA
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5935$as_echo_n "checking for wint_t... " >&6; }
5936if test "${gt_cv_c_wint_t+set}" = set; then :
5937 $as_echo_n "(cached) " >&6
5938else
5939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5940/* end confdefs.h. */
783e057b 5941
f434ba03
PA
5942/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5943 <wchar.h>.
5944 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5945 before <wchar.h>. */
5946#include <stddef.h>
5947#include <stdio.h>
5948#include <time.h>
5949#include <wchar.h>
5950 wint_t foo = (wchar_t)'\0';
5951int
5952main ()
5953{
783e057b 5954
f434ba03
PA
5955 ;
5956 return 0;
5957}
5958_ACEOF
5959if ac_fn_c_try_compile "$LINENO"; then :
5960 gt_cv_c_wint_t=yes
5961else
5962 gt_cv_c_wint_t=no
5963fi
5964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965fi
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5967$as_echo "$gt_cv_c_wint_t" >&6; }
5968 if test $gt_cv_c_wint_t = yes; then
783e057b 5969
f434ba03 5970$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5971
f434ba03 5972 fi
783e057b
DJ
5973
5974
81ecdfbb 5975 if false; then
783e057b
DJ
5976 GL_COND_LIBTOOL_TRUE=
5977 GL_COND_LIBTOOL_FALSE='#'
5978else
5979 GL_COND_LIBTOOL_TRUE='#'
5980 GL_COND_LIBTOOL_FALSE=
5981fi
5982
5983 gl_cond_libtool=false
5984 gl_libdeps=
5985 gl_ltlibdeps=
f434ba03 5986 gl_m4_base='gnulib/m4'
783e057b
DJ
5987
5988
5989
783e057b
DJ
5990
5991
5992
5993
5994
5995
f434ba03
PA
5996 gl_source_base='gnulib'
5997 # Code from module arg-nonnull:
5998 # Code from module c++defs:
5999 # Code from module extensions:
6000 # Code from module include_next:
6001 # Code from module memchr:
783e057b 6002
783e057b 6003
783e057b 6004
783e057b 6005
f434ba03 6006 GNULIB_MEMCHR=1
783e057b 6007
783e057b 6008
783e057b 6009
f434ba03 6010$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 6011
783e057b
DJ
6012
6013
f434ba03 6014 # Code from module memmem:
783e057b
DJ
6015
6016
f434ba03
PA
6017 if test $ac_cv_have_decl_memmem = yes; then
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6019$as_echo_n "checking whether memmem works in linear time... " >&6; }
6020if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6021 $as_echo_n "(cached) " >&6
783e057b 6022else
81ecdfbb 6023 if test "$cross_compiling" = yes; then :
f434ba03 6024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6025/* end confdefs.h. */
783e057b 6026
f434ba03
PA
6027#include <features.h>
6028#ifdef __GNU_LIBRARY__
6029 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6030 Lucky user
6031 #endif
6032#endif
6033#ifdef __CYGWIN__
6034 #include <cygwin/version.h>
6035 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6036 Lucky user
6037 #endif
6038#endif
783e057b 6039
783e057b 6040_ACEOF
f434ba03
PA
6041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6042 $EGREP "Lucky user" >/dev/null 2>&1; then :
6043 gl_cv_func_memmem_works=yes
783e057b 6044else
f434ba03 6045 gl_cv_func_memmem_works="guessing no"
783e057b 6046fi
f434ba03 6047rm -f conftest*
783e057b
DJ
6048
6049
783e057b 6050else
81ecdfbb 6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6052/* end confdefs.h. */
6053
f434ba03 6054#include <signal.h> /* for signal */
783e057b
DJ
6055#include <string.h> /* for memmem */
6056#include <stdlib.h> /* for malloc */
6057#include <unistd.h> /* for alarm */
6058
6059int
6060main ()
6061{
6062size_t m = 1000000;
6063 char *haystack = (char *) malloc (2 * m + 1);
6064 char *needle = (char *) malloc (m + 1);
6065 void *result = 0;
6066 /* Failure to compile this test due to missing alarm is okay,
6067 since all such platforms (mingw) also lack memmem. */
f434ba03 6068 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6069 alarm (5);
6070 /* Check for quadratic performance. */
6071 if (haystack && needle)
6072 {
f434ba03
PA
6073 memset (haystack, 'A', 2 * m);
6074 haystack[2 * m] = 'B';
6075 memset (needle, 'A', m);
6076 needle[m] = 'B';
6077 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6078 }
6079 /* Check for empty needle behavior. */
6080 return !result || !memmem ("a", 1, 0, 0);
6081 ;
6082 return 0;
6083}
6084_ACEOF
81ecdfbb 6085if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6086 gl_cv_func_memmem_works=yes
6087else
81ecdfbb 6088 gl_cv_func_memmem_works=no
783e057b 6089fi
81ecdfbb
RW
6090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6091 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6092fi
81ecdfbb 6093
f434ba03 6094
783e057b 6095fi
81ecdfbb
RW
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6097$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6098 if test "$gl_cv_func_memmem_works" != yes; then
6099 REPLACE_MEMMEM=1
6100
6101
6102
6103
6104
6105
6106
f434ba03 6107
783e057b
DJ
6108 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6109
6110 fi
6111 fi
6112
f434ba03
PA
6113 # Code from module memmem-simple:
6114
783e057b
DJ
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
81ecdfbb
RW
6126 for ac_func in memmem
6127do :
6128 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6129if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6130 cat >>confdefs.h <<_ACEOF
81ecdfbb 6131#define HAVE_MEMMEM 1
783e057b
DJ
6132_ACEOF
6133
6134else
6135
6136 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6137
6138fi
6139done
6140
6141
6142
6143 :
6144
6145
6146
6147
6148
6149 if test $ac_cv_have_decl_memmem = no; then
6150 HAVE_DECL_MEMMEM=0
6151 fi
6152 :
6153
6154
6155
f434ba03 6156
783e057b
DJ
6157 GNULIB_MEMMEM=1
6158
6159
6160
f434ba03
PA
6161$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6162
6163
6164
6165 # Code from module multiarch:
6166
6167 # Code from module stddef:
6168
6169
6170
6171 if test $gt_cv_c_wchar_t = no; then
6172 HAVE_WCHAR_T=0
6173 STDDEF_H=stddef.h
6174 fi
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6176$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6177if test "${gl_cv_decl_null_works+set}" = set; then :
6178 $as_echo_n "(cached) " >&6
6179else
6180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6181/* end confdefs.h. */
6182#include <stddef.h>
6183 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6184
6185int
6186main ()
6187{
6188
6189 ;
6190 return 0;
6191}
6192_ACEOF
6193if ac_fn_c_try_compile "$LINENO"; then :
6194 gl_cv_decl_null_works=yes
6195else
6196 gl_cv_decl_null_works=no
6197fi
6198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6199fi
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6201$as_echo "$gl_cv_decl_null_works" >&6; }
6202 if test $gl_cv_decl_null_works = no; then
6203 REPLACE_NULL=1
6204 STDDEF_H=stddef.h
6205 fi
6206 if test -n "$STDDEF_H"; then
6207
6208
6209
6210
6211 :
6212
6213
6214
6215
6216
6217
6218
6219 if test $gl_cv_have_include_next = yes; then
6220 gl_cv_next_stddef_h='<'stddef.h'>'
6221 else
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6223$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6224if test "${gl_cv_next_stddef_h+set}" = set; then :
6225 $as_echo_n "(cached) " >&6
6226else
6227
6228 if test $ac_cv_header_stddef_h = yes; then
6229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6230/* end confdefs.h. */
6231#include <stddef.h>
6232
6233_ACEOF
6234 case "$host_os" in
6235 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6236 *) gl_absname_cpp="$ac_cpp" ;;
6237 esac
6238 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6239 sed -n '\#/stddef.h#{
6240 s#.*"\(.*/stddef.h\)".*#\1#
6241 s#^/[^/]#//&#
6242 p
6243 q
6244 }'`'"'
6245 else
6246 gl_cv_next_stddef_h='<'stddef.h'>'
6247 fi
6248
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6251$as_echo "$gl_cv_next_stddef_h" >&6; }
6252 fi
6253 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6254
6255 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6256 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6257 gl_next_as_first_directive='<'stddef.h'>'
6258 else
6259 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6260 gl_next_as_first_directive=$gl_cv_next_stddef_h
6261 fi
6262 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6263
6264
6265
6266 fi
6267
6268 # Code from module stdint:
6269
6270
783e057b
DJ
6271
6272 if test $ac_cv_type_long_long_int = yes; then
6273 HAVE_LONG_LONG_INT=1
6274 else
6275 HAVE_LONG_LONG_INT=0
6276 fi
6277
6278
6279 if test $ac_cv_type_unsigned_long_long_int = yes; then
6280 HAVE_UNSIGNED_LONG_LONG_INT=1
6281 else
6282 HAVE_UNSIGNED_LONG_LONG_INT=0
6283 fi
6284
6285
6286 if test $ac_cv_header_inttypes_h = yes; then
6287 HAVE_INTTYPES_H=1
6288 else
6289 HAVE_INTTYPES_H=0
6290 fi
6291
6292
6293 if test $ac_cv_header_sys_types_h = yes; then
6294 HAVE_SYS_TYPES_H=1
6295 else
6296 HAVE_SYS_TYPES_H=0
6297 fi
6298
6299
6300
6301
6302
f434ba03 6303
783e057b
DJ
6304 :
6305
6306
6307
6308
6309
6310
6311
6312 if test $gl_cv_have_include_next = yes; then
6313 gl_cv_next_stdint_h='<'stdint.h'>'
6314 else
81ecdfbb
RW
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6316$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6317if test "${gl_cv_next_stdint_h+set}" = set; then :
6318 $as_echo_n "(cached) " >&6
783e057b
DJ
6319else
6320
f434ba03
PA
6321 if test $ac_cv_header_stdint_h = yes; then
6322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6323/* end confdefs.h. */
6324#include <stdint.h>
6325
6326_ACEOF
f434ba03
PA
6327 case "$host_os" in
6328 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6329 *) gl_absname_cpp="$ac_cpp" ;;
6330 esac
6331 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6332 sed -n '\#/stdint.h#{
6333 s#.*"\(.*/stdint.h\)".*#\1#
6334 s#^/[^/]#//&#
6335 p
6336 q
6337 }'`'"'
6338 else
6339 gl_cv_next_stdint_h='<'stdint.h'>'
6340 fi
783e057b
DJ
6341
6342fi
81ecdfbb
RW
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6344$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6345 fi
6346 NEXT_STDINT_H=$gl_cv_next_stdint_h
6347
f434ba03
PA
6348 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6349 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6350 gl_next_as_first_directive='<'stdint.h'>'
6351 else
6352 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6353 gl_next_as_first_directive=$gl_cv_next_stdint_h
6354 fi
6355 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6356
783e057b
DJ
6357
6358
6359 if test $ac_cv_header_stdint_h = yes; then
6360 HAVE_STDINT_H=1
6361 else
6362 HAVE_STDINT_H=0
6363 fi
6364
6365
6366 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6368$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6369if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6370 $as_echo_n "(cached) " >&6
783e057b
DJ
6371else
6372 gl_cv_header_working_stdint_h=no
81ecdfbb 6373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6374/* end confdefs.h. */
6375
81ecdfbb 6376
783e057b
DJ
6377#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6378#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6379#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6380#include <stdint.h>
6381/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6382#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6383#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6384#endif
6385
6386
6387 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6388 included before <wchar.h>. */
6389 #include <stddef.h>
6390 #include <signal.h>
6391 #if HAVE_WCHAR_H
6392 # include <stdio.h>
6393 # include <time.h>
6394 # include <wchar.h>
6395 #endif
6396
6397
6398#ifdef INT8_MAX
6399int8_t a1 = INT8_MAX;
6400int8_t a1min = INT8_MIN;
6401#endif
6402#ifdef INT16_MAX
6403int16_t a2 = INT16_MAX;
6404int16_t a2min = INT16_MIN;
6405#endif
6406#ifdef INT32_MAX
6407int32_t a3 = INT32_MAX;
6408int32_t a3min = INT32_MIN;
6409#endif
6410#ifdef INT64_MAX
6411int64_t a4 = INT64_MAX;
6412int64_t a4min = INT64_MIN;
6413#endif
6414#ifdef UINT8_MAX
6415uint8_t b1 = UINT8_MAX;
6416#else
6417typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6418#endif
6419#ifdef UINT16_MAX
6420uint16_t b2 = UINT16_MAX;
6421#endif
6422#ifdef UINT32_MAX
6423uint32_t b3 = UINT32_MAX;
6424#endif
6425#ifdef UINT64_MAX
6426uint64_t b4 = UINT64_MAX;
6427#endif
6428int_least8_t c1 = INT8_C (0x7f);
6429int_least8_t c1max = INT_LEAST8_MAX;
6430int_least8_t c1min = INT_LEAST8_MIN;
6431int_least16_t c2 = INT16_C (0x7fff);
6432int_least16_t c2max = INT_LEAST16_MAX;
6433int_least16_t c2min = INT_LEAST16_MIN;
6434int_least32_t c3 = INT32_C (0x7fffffff);
6435int_least32_t c3max = INT_LEAST32_MAX;
6436int_least32_t c3min = INT_LEAST32_MIN;
6437int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6438int_least64_t c4max = INT_LEAST64_MAX;
6439int_least64_t c4min = INT_LEAST64_MIN;
6440uint_least8_t d1 = UINT8_C (0xff);
6441uint_least8_t d1max = UINT_LEAST8_MAX;
6442uint_least16_t d2 = UINT16_C (0xffff);
6443uint_least16_t d2max = UINT_LEAST16_MAX;
6444uint_least32_t d3 = UINT32_C (0xffffffff);
6445uint_least32_t d3max = UINT_LEAST32_MAX;
6446uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6447uint_least64_t d4max = UINT_LEAST64_MAX;
6448int_fast8_t e1 = INT_FAST8_MAX;
6449int_fast8_t e1min = INT_FAST8_MIN;
6450int_fast16_t e2 = INT_FAST16_MAX;
6451int_fast16_t e2min = INT_FAST16_MIN;
6452int_fast32_t e3 = INT_FAST32_MAX;
6453int_fast32_t e3min = INT_FAST32_MIN;
6454int_fast64_t e4 = INT_FAST64_MAX;
6455int_fast64_t e4min = INT_FAST64_MIN;
6456uint_fast8_t f1 = UINT_FAST8_MAX;
6457uint_fast16_t f2 = UINT_FAST16_MAX;
6458uint_fast32_t f3 = UINT_FAST32_MAX;
6459uint_fast64_t f4 = UINT_FAST64_MAX;
6460#ifdef INTPTR_MAX
6461intptr_t g = INTPTR_MAX;
6462intptr_t gmin = INTPTR_MIN;
6463#endif
6464#ifdef UINTPTR_MAX
6465uintptr_t h = UINTPTR_MAX;
6466#endif
6467intmax_t i = INTMAX_MAX;
6468uintmax_t j = UINTMAX_MAX;
6469
6470#include <limits.h> /* for CHAR_BIT */
6471#define TYPE_MINIMUM(t) \
6472 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6473#define TYPE_MAXIMUM(t) \
6474 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6475struct s {
6476 int check_PTRDIFF:
6477 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6478 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6479 ? 1 : -1;
6480 /* Detect bug in FreeBSD 6.0 / ia64. */
6481 int check_SIG_ATOMIC:
6482 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6483 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6484 ? 1 : -1;
6485 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6486 int check_WCHAR:
6487 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6488 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6489 ? 1 : -1;
6490 /* Detect bug in mingw. */
6491 int check_WINT:
6492 WINT_MIN == TYPE_MINIMUM (wint_t)
6493 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6494 ? 1 : -1;
6495
f434ba03
PA
6496 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6497 int check_UINT8_C:
6498 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6499 int check_UINT16_C:
6500 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6501
6502 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6503#ifdef UINT8_MAX
6504 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6505#endif
6506#ifdef UINT16_MAX
6507 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6508#endif
6509#ifdef UINT32_MAX
6510 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6511#endif
6512#ifdef UINT64_MAX
6513 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6514#endif
6515 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6516 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6517 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6518 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6519 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6520 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6521 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6522 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6523 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6524 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6525 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6526};
6527
6528int
6529main ()
6530{
6531
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536if ac_fn_c_try_compile "$LINENO"; then :
6537 if test "$cross_compiling" = yes; then :
6538 gl_cv_header_working_stdint_h=yes
6539
6540else
6541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6542/* end confdefs.h. */
6543
6544
6545#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6546#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6547#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6548#include <stdint.h>
6549
783e057b 6550
f434ba03
PA
6551 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6552 included before <wchar.h>. */
6553 #include <stddef.h>
6554 #include <signal.h>
6555 #if HAVE_WCHAR_H
6556 # include <stdio.h>
6557 # include <time.h>
6558 # include <wchar.h>
6559 #endif
6560
6561
6562#include <stdio.h>
6563#include <string.h>
6564#define MVAL(macro) MVAL1(macro)
6565#define MVAL1(expression) #expression
6566static const char *macro_values[] =
6567 {
6568#ifdef INT8_MAX
6569 MVAL (INT8_MAX),
6570#endif
6571#ifdef INT16_MAX
6572 MVAL (INT16_MAX),
6573#endif
6574#ifdef INT32_MAX
6575 MVAL (INT32_MAX),
6576#endif
6577#ifdef INT64_MAX
6578 MVAL (INT64_MAX),
6579#endif
783e057b 6580#ifdef UINT8_MAX
f434ba03 6581 MVAL (UINT8_MAX),
783e057b
DJ
6582#endif
6583#ifdef UINT16_MAX
f434ba03 6584 MVAL (UINT16_MAX),
783e057b
DJ
6585#endif
6586#ifdef UINT32_MAX
f434ba03 6587 MVAL (UINT32_MAX),
783e057b
DJ
6588#endif
6589#ifdef UINT64_MAX
f434ba03 6590 MVAL (UINT64_MAX),
783e057b 6591#endif
f434ba03
PA
6592 NULL
6593 };
783e057b
DJ
6594
6595int
6596main ()
6597{
6598
f434ba03
PA
6599 const char **mv;
6600 for (mv = macro_values; *mv != NULL; mv++)
6601 {
6602 const char *value = *mv;
6603 /* Test whether it looks like a cast expression. */
6604 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6605 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6606 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6607 || strncmp (value, "((int)"/*)*/, 6) == 0
6608 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6609 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6610 return 1;
6611 }
6612 return 0;
6613
783e057b
DJ
6614 ;
6615 return 0;
6616}
6617_ACEOF
f434ba03 6618if ac_fn_c_try_run "$LINENO"; then :
783e057b 6619 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6620fi
6621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6622 conftest.$ac_objext conftest.beam conftest.$ac_ext
6623fi
6624
6625
783e057b 6626fi
81ecdfbb 6627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6628
783e057b 6629fi
81ecdfbb
RW
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6631$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6632 fi
6633 if test "$gl_cv_header_working_stdint_h" = yes; then
6634 STDINT_H=
6635 else
81ecdfbb
RW
6636 for ac_header in sys/inttypes.h sys/bitypes.h
6637do :
6638 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6639ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6640eval as_val=\$$as_ac_Header
6641 if test "x$as_val" = x""yes; then :
783e057b 6642 cat >>confdefs.h <<_ACEOF
81ecdfbb 6643#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6644_ACEOF
6645
6646fi
6647
6648done
6649
6650 if test $ac_cv_header_sys_inttypes_h = yes; then
6651 HAVE_SYS_INTTYPES_H=1
6652 else
6653 HAVE_SYS_INTTYPES_H=0
6654 fi
6655
6656 if test $ac_cv_header_sys_bitypes_h = yes; then
6657 HAVE_SYS_BITYPES_H=1
6658 else
6659 HAVE_SYS_BITYPES_H=0
6660 fi
6661
6662
6663
6664 :
6665
6666
6667
6668
6669
6670
6671
6672
f434ba03
PA
6673 if test $APPLE_UNIVERSAL_BUILD = 0; then
6674
6675
6676 for gltype in ptrdiff_t size_t ; do
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6678$as_echo_n "checking for bit size of $gltype... " >&6; }
6679if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6680 $as_echo_n "(cached) " >&6
6681else
6682 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6683 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6684 included before <wchar.h>. */
6685 #include <stddef.h>
6686 #include <signal.h>
6687 #if HAVE_WCHAR_H
6688 # include <stdio.h>
6689 # include <time.h>
6690 # include <wchar.h>
6691 #endif
6692
6693#include <limits.h>"; then :
6694
6695else
6696 result=unknown
6697fi
6698
6699 eval gl_cv_bitsizeof_${gltype}=\$result
6700
6701fi
6702eval ac_res=\$gl_cv_bitsizeof_${gltype}
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6704$as_echo "$ac_res" >&6; }
6705 eval result=\$gl_cv_bitsizeof_${gltype}
6706 if test $result = unknown; then
6707 result=0
6708 fi
6709 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6710 cat >>confdefs.h <<_ACEOF
6711#define BITSIZEOF_${GLTYPE} $result
6712_ACEOF
6713
6714 eval BITSIZEOF_${GLTYPE}=\$result
6715 done
6716
6717
6718 fi
6719
783e057b 6720
f434ba03 6721 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6723$as_echo_n "checking for bit size of $gltype... " >&6; }
6724if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6725 $as_echo_n "(cached) " >&6
6726else
6727 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6728 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6729 included before <wchar.h>. */
6730 #include <stddef.h>
6731 #include <signal.h>
6732 #if HAVE_WCHAR_H
6733 # include <stdio.h>
6734 # include <time.h>
6735 # include <wchar.h>
6736 #endif
6737
6738#include <limits.h>"; then :
6739
6740else
6741 result=unknown
6742fi
6743
6744 eval gl_cv_bitsizeof_${gltype}=\$result
6745
6746fi
6747eval ac_res=\$gl_cv_bitsizeof_${gltype}
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6749$as_echo "$ac_res" >&6; }
6750 eval result=\$gl_cv_bitsizeof_${gltype}
6751 if test $result = unknown; then
6752 result=0
6753 fi
6754 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6755 cat >>confdefs.h <<_ACEOF
6756#define BITSIZEOF_${GLTYPE} $result
6757_ACEOF
783e057b 6758
81ecdfbb
RW
6759 eval BITSIZEOF_${GLTYPE}=\$result
6760 done
783e057b
DJ
6761
6762
6763
6764
81ecdfbb
RW
6765 for gltype in sig_atomic_t wchar_t wint_t ; do
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6767$as_echo_n "checking whether $gltype is signed... " >&6; }
6768if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6769 $as_echo_n "(cached) " >&6
783e057b 6770else
81ecdfbb 6771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6772/* end confdefs.h. */
6773
6774 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6775 included before <wchar.h>. */
6776 #include <stddef.h>
6777 #include <signal.h>
6778 #if HAVE_WCHAR_H
6779 # include <stdio.h>
6780 # include <time.h>
6781 # include <wchar.h>
6782 #endif
6783
6784 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6785int
6786main ()
6787{
6788
6789 ;
6790 return 0;
6791}
6792_ACEOF
81ecdfbb 6793if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6794 result=yes
6795else
81ecdfbb 6796 result=no
20e95c23 6797fi
81ecdfbb 6798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6799 eval gl_cv_type_${gltype}_signed=\$result
6800
6801fi
81ecdfbb
RW
6802eval ac_res=\$gl_cv_type_${gltype}_signed
6803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6804$as_echo "$ac_res" >&6; }
783e057b
DJ
6805 eval result=\$gl_cv_type_${gltype}_signed
6806 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6807 if test "$result" = yes; then
6808 cat >>confdefs.h <<_ACEOF
6809#define HAVE_SIGNED_${GLTYPE} 1
6810_ACEOF
6811
6812 eval HAVE_SIGNED_${GLTYPE}=1
6813 else
6814 eval HAVE_SIGNED_${GLTYPE}=0
6815 fi
6816 done
6817
6818
6819 gl_cv_type_ptrdiff_t_signed=yes
6820 gl_cv_type_size_t_signed=no
f434ba03 6821 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6822
6823
f434ba03 6824 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6826$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6827if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6828 $as_echo_n "(cached) " >&6
c906108c 6829else
783e057b
DJ
6830 eval gl_cv_type_${gltype}_suffix=no
6831 eval result=\$gl_cv_type_${gltype}_signed
6832 if test "$result" = yes; then
6833 glsufu=
6834 else
6835 glsufu=u
6836 fi
6837 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6838 case $glsuf in
6839 '') gltype1='int';;
f434ba03
PA
6840 l) gltype1='long int';;
6841 ll) gltype1='long long int';;
6842 i64) gltype1='__int64';;
6843 u) gltype1='unsigned int';;
6844 ul) gltype1='unsigned long int';;
6845 ull) gltype1='unsigned long long int';;
783e057b
DJ
6846 ui64)gltype1='unsigned __int64';;
6847 esac
81ecdfbb 6848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6849/* end confdefs.h. */
6850
6851 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6852 included before <wchar.h>. */
6853 #include <stddef.h>
6854 #include <signal.h>
6855 #if HAVE_WCHAR_H
6856 # include <stdio.h>
6857 # include <time.h>
6858 # include <wchar.h>
6859 #endif
6860
6861 extern $gltype foo;
6862 extern $gltype1 foo;
6863int
6864main ()
6865{
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
81ecdfbb 6871if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6872 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6873fi
81ecdfbb 6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6875 eval result=\$gl_cv_type_${gltype}_suffix
6876 test "$result" != no && break
6877 done
6878fi
81ecdfbb
RW
6879eval ac_res=\$gl_cv_type_${gltype}_suffix
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6881$as_echo "$ac_res" >&6; }
783e057b
DJ
6882 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6883 eval result=\$gl_cv_type_${gltype}_suffix
6884 test "$result" = no && result=
6885 eval ${GLTYPE}_SUFFIX=\$result
6886 cat >>confdefs.h <<_ACEOF
6887#define ${GLTYPE}_SUFFIX $result
6888_ACEOF
6889
6890 done
6891
6892
783e057b
DJ
6893 fi
6894
6895
f434ba03
PA
6896 for gltype in sig_atomic_t wchar_t wint_t ; do
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6898$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6899if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6900 $as_echo_n "(cached) " >&6
783e057b 6901else
f434ba03
PA
6902 eval gl_cv_type_${gltype}_suffix=no
6903 eval result=\$gl_cv_type_${gltype}_signed
6904 if test "$result" = yes; then
6905 glsufu=
6906 else
6907 glsufu=u
6908 fi
6909 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6910 case $glsuf in
6911 '') gltype1='int';;
6912 l) gltype1='long int';;
6913 ll) gltype1='long long int';;
6914 i64) gltype1='__int64';;
6915 u) gltype1='unsigned int';;
6916 ul) gltype1='unsigned long int';;
6917 ull) gltype1='unsigned long long int';;
6918 ui64)gltype1='unsigned __int64';;
6919 esac
6920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6921/* end confdefs.h. */
f434ba03
PA
6922
6923 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6924 included before <wchar.h>. */
6925 #include <stddef.h>
6926 #include <signal.h>
6927 #if HAVE_WCHAR_H
6928 # include <stdio.h>
6929 # include <time.h>
6930 # include <wchar.h>
6931 #endif
6932
6933 extern $gltype foo;
6934 extern $gltype1 foo;
6935int
6936main ()
6937{
6938
6939 ;
6940 return 0;
6941}
783e057b 6942_ACEOF
81ecdfbb 6943if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6944 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6945fi
81ecdfbb 6946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6947 eval result=\$gl_cv_type_${gltype}_suffix
6948 test "$result" != no && break
6949 done
783e057b 6950fi
f434ba03
PA
6951eval ac_res=\$gl_cv_type_${gltype}_suffix
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6953$as_echo "$ac_res" >&6; }
6954 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6955 eval result=\$gl_cv_type_${gltype}_suffix
6956 test "$result" = no && result=
6957 eval ${GLTYPE}_SUFFIX=\$result
6958 cat >>confdefs.h <<_ACEOF
6959#define ${GLTYPE}_SUFFIX $result
6960_ACEOF
6961
6962 done
6963
6964
6965
6966 STDINT_H=stdint.h
783e057b
DJ
6967 fi
6968
6969
f434ba03
PA
6970 # Code from module string:
6971
6972
6973
6974 # Code from module warn-on-use:
6975 # Code from module wchar:
6976
6977
6978
6979
783e057b
DJ
6980 :
6981
6982
6983
6984
6985
783e057b
DJ
6986
6987
6988
6989
6990 :
6991
6992
6993
6994
6995
6996
6997
6998 if test $gl_cv_have_include_next = yes; then
6999 gl_cv_next_wchar_h='<'wchar.h'>'
7000 else
81ecdfbb
RW
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
7002$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
7003if test "${gl_cv_next_wchar_h+set}" = set; then :
7004 $as_echo_n "(cached) " >&6
783e057b
DJ
7005else
7006
f434ba03
PA
7007 if test $ac_cv_header_wchar_h = yes; then
7008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
7009/* end confdefs.h. */
7010#include <wchar.h>
7011
7012_ACEOF
f434ba03
PA
7013 case "$host_os" in
7014 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7015 *) gl_absname_cpp="$ac_cpp" ;;
7016 esac
7017 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7018 sed -n '\#/wchar.h#{
7019 s#.*"\(.*/wchar.h\)".*#\1#
7020 s#^/[^/]#//&#
7021 p
7022 q
7023 }'`'"'
7024 else
7025 gl_cv_next_wchar_h='<'wchar.h'>'
7026 fi
783e057b
DJ
7027
7028fi
81ecdfbb
RW
7029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7030$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7031 fi
7032 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7033
f434ba03
PA
7034 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7035 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7036 gl_next_as_first_directive='<'wchar.h'>'
7037 else
7038 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7039 gl_next_as_first_directive=$gl_cv_next_wchar_h
7040 fi
7041 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7042
7043
7044
7045 if test $ac_cv_header_wchar_h = yes; then
7046 HAVE_WCHAR_H=1
7047 else
7048 HAVE_WCHAR_H=0
7049 fi
7050
7051
7052
7053 if test $gt_cv_c_wint_t = yes; then
7054 HAVE_WINT_T=1
7055 else
7056 HAVE_WINT_T=0
7057 fi
7058
7059
7060
7061 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7062 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7064$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7065if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7066 $as_echo_n "(cached) " >&6
7067else
7068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7069/* end confdefs.h. */
7070
7071/* Some systems require additional headers. */
7072#ifndef __GLIBC__
7073# include <stddef.h>
7074# include <stdio.h>
7075# include <time.h>
7076#endif
7077#include <wchar.h>
7078
7079int
7080main ()
7081{
7082#undef $gl_func
7083 (void) $gl_func;
7084 ;
7085 return 0;
7086}
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089 eval "$as_gl_Symbol=yes"
7090else
7091 eval "$as_gl_Symbol=no"
7092fi
7093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7094fi
7095eval ac_res=\$$as_gl_Symbol
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7097$as_echo "$ac_res" >&6; }
7098 eval as_val=\$$as_gl_Symbol
7099 if test "x$as_val" = x""yes; then :
7100 cat >>confdefs.h <<_ACEOF
7101#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7102_ACEOF
7103
7104 eval ac_cv_have_decl_$gl_func=yes
7105fi
7106 done
7107
7108
7109 # Code from module dummy:
7110 # End of code from modules
7111
7112
c906108c 7113
c906108c 7114
c906108c 7115
c906108c 7116
c906108c 7117
c906108c 7118
c906108c 7119
783e057b
DJ
7120 gltests_libdeps=
7121 gltests_ltlibdeps=
20e95c23 7122
20e95c23 7123
20e95c23 7124
f434ba03
PA
7125
7126
7127
7128
7129
7130
783e057b 7131 gl_source_base='tests'
f434ba03
PA
7132 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
7133
7134 gl_module_indicator_condition=$gltests_WITNESS
7135
7136
7137
7138
7139
c906108c 7140
bec39cab 7141
bec39cab 7142
783e057b
DJ
7143
7144 LIBGNU_LIBDEPS="$gl_libdeps"
7145
7146 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7147
7148
e28b3332 7149
d5af19ba
DJ
7150# For Makefile dependencies.
7151GNULIB_STDINT_H=
7152if test x"$STDINT_H" != x; then
7153 GNULIB_STDINT_H=gnulib/$STDINT_H
7154fi
7155
7156
bec39cab
AC
7157PACKAGE=gdb
7158
7159cat >>confdefs.h <<_ACEOF
7160#define PACKAGE "$PACKAGE"
7161_ACEOF
7162
7163
7164
f06e05e0
JK
7165# We never need to detect it in this sub-configure.
7166# But preserve it for config.status --recheck.
5048e516 7167
5048e516
JK
7168
7169
7170MAKEINFO_EXTRA_FLAGS=""
7171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
7172$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
7173if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
7174 $as_echo_n "(cached) " >&6
7175else
7176 echo '@clicksequence{a @click{} b}' >conftest.texinfo
7177 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
7178 gdb_cv_have_makeinfo_click=yes
7179 else
7180 gdb_cv_have_makeinfo_click=no
7181 fi
7182fi
7183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
7184$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
7185if test x"$gdb_cv_have_makeinfo_click" = xyes; then
7186 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
7187fi
7188
7189
e28b3332
DJ
7190# GDB does not use automake, but gnulib does. This line lets us
7191# generate its Makefile.in.
81ecdfbb
RW
7192am__api_version='1.11'
7193
e28b3332
DJ
7194# Find a good install program. We prefer a C program (faster),
7195# so one script is as good as another. But avoid the broken or
7196# incompatible versions:
7197# SysV /etc/install, /usr/sbin/install
7198# SunOS /usr/etc/install
7199# IRIX /sbin/install
7200# AIX /bin/install
7201# AmigaOS /C/install, which installs bootblocks on floppy discs
7202# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7203# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7204# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7205# OS/2's system install, which has a completely different semantic
7206# ./install, which can be erroneously created by make from ./install.sh.
85541719 7207# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7209$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7210if test -z "$INSTALL"; then
81ecdfbb
RW
7211if test "${ac_cv_path_install+set}" = set; then :
7212 $as_echo_n "(cached) " >&6
e28b3332
DJ
7213else
7214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217 IFS=$as_save_IFS
7218 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7219 # Account for people who put trailing slashes in PATH elements.
7220case $as_dir/ in #((
7221 ./ | .// | /[cC]/* | \
e28b3332 7222 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7223 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7224 /usr/ucb/* ) ;;
7225 *)
7226 # OSF1 and SCO ODT 3.0 have their own names for install.
7227 # Don't use installbsd from OSF since it installs stuff as root
7228 # by default.
7229 for ac_prog in ginstall scoinst install; do
7230 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7231 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7232 if test $ac_prog = install &&
7233 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7234 # AIX install. It has an incompatible calling convention.
7235 :
7236 elif test $ac_prog = install &&
7237 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7238 # program-specific install script used by HP pwplus--don't use.
7239 :
7240 else
85541719
DE
7241 rm -rf conftest.one conftest.two conftest.dir
7242 echo one > conftest.one
7243 echo two > conftest.two
7244 mkdir conftest.dir
7245 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7246 test -s conftest.one && test -s conftest.two &&
7247 test -s conftest.dir/conftest.one &&
7248 test -s conftest.dir/conftest.two
7249 then
7250 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7251 break 3
7252 fi
e28b3332
DJ
7253 fi
7254 fi
7255 done
7256 done
7257 ;;
7258esac
81ecdfbb
RW
7259
7260 done
7261IFS=$as_save_IFS
e28b3332 7262
85541719 7263rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7264
7265fi
7266 if test "${ac_cv_path_install+set}" = set; then
7267 INSTALL=$ac_cv_path_install
7268 else
85541719
DE
7269 # As a last resort, use the slow shell script. Don't cache a
7270 # value for INSTALL within a source directory, because that will
e28b3332 7271 # break other packages using the cache if that directory is
85541719 7272 # removed, or if the value is a relative name.
e28b3332
DJ
7273 INSTALL=$ac_install_sh
7274 fi
7275fi
81ecdfbb
RW
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7277$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7278
7279# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7280# It thinks the first close brace ends the variable substitution.
7281test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7282
7283test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7284
7285test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7286
81ecdfbb
RW
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7288$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7289# Just in case
7290sleep 1
7291echo timestamp > conftest.file
81ecdfbb
RW
7292# Reject unsafe characters in $srcdir or the absolute working directory
7293# name. Accept space and tab only in the latter.
7294am_lf='
7295'
7296case `pwd` in
7297 *[\\\"\#\$\&\'\`$am_lf]*)
7298 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7299esac
7300case $srcdir in
7301 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7302 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7303esac
7304
e28b3332
DJ
7305# Do `set' in a subshell so we don't clobber the current shell's
7306# arguments. Must try -L first in case configure is actually a
7307# symlink; some systems play weird games with the mod time of symlinks
7308# (eg FreeBSD returns the mod time of the symlink's containing
7309# directory).
7310if (
81ecdfbb 7311 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7312 if test "$*" = "X"; then
7313 # -L didn't work.
81ecdfbb 7314 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7315 fi
7316 rm -f conftest.file
7317 if test "$*" != "X $srcdir/configure conftest.file" \
7318 && test "$*" != "X conftest.file $srcdir/configure"; then
7319
7320 # If neither matched, then we have a broken ls. This can happen
7321 # if, for instance, CONFIG_SHELL is bash and it inherits a
7322 # broken ls alias from the environment. This has actually
7323 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7324 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7325alias in your environment" "$LINENO" 5
e28b3332
DJ
7326 fi
7327
7328 test "$2" = conftest.file
7329 )
7330then
7331 # Ok.
7332 :
7333else
81ecdfbb
RW
7334 as_fn_error "newly created file is older than distributed files!
7335Check your system clock" "$LINENO" 5
e28b3332 7336fi
81ecdfbb
RW
7337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7338$as_echo "yes" >&6; }
e28b3332 7339test "$program_prefix" != NONE &&
81ecdfbb 7340 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7341# Use a double $ so make ignores it.
7342test "$program_suffix" != NONE &&
81ecdfbb
RW
7343 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7344# Double any \ or $.
e28b3332 7345# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7346ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7347program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7348
7349# expand $ac_aux_dir to an absolute path
7350am_aux_dir=`cd $ac_aux_dir && pwd`
7351
81ecdfbb
RW
7352if test x"${MISSING+set}" != xset; then
7353 case $am_aux_dir in
7354 *\ * | *\ *)
7355 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7356 *)
7357 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7358 esac
7359fi
e28b3332
DJ
7360# Use eval to expand $SHELL
7361if eval "$MISSING --run true"; then
7362 am_missing_run="$MISSING --run "
7363else
7364 am_missing_run=
81ecdfbb
RW
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7366$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7367fi
7368
7369if test x"${install_sh}" != xset; then
7370 case $am_aux_dir in
7371 *\ * | *\ *)
7372 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7373 *)
7374 install_sh="\${SHELL} $am_aux_dir/install-sh"
7375 esac
7376fi
7377
7378# Installed binaries are usually stripped using `strip' when the user
7379# run `make install-strip'. However `strip' might not be the right
7380# tool to use in cross-compilation environments, therefore Automake
7381# will honor the `STRIP' environment variable to overrule this program.
7382if test "$cross_compiling" != no; then
7383 if test -n "$ac_tool_prefix"; then
7384 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7385set dummy ${ac_tool_prefix}strip; ac_word=$2
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
7388if test "${ac_cv_prog_STRIP+set}" = set; then :
7389 $as_echo_n "(cached) " >&6
7390else
7391 if test -n "$STRIP"; then
7392 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7393else
7394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
7399 for ac_exec_ext in '' $ac_executable_extensions; do
7400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7401 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403 break 2
7404 fi
7405done
7406 done
7407IFS=$as_save_IFS
7408
7409fi
7410fi
7411STRIP=$ac_cv_prog_STRIP
7412if test -n "$STRIP"; then
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7414$as_echo "$STRIP" >&6; }
7415else
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421fi
7422if test -z "$ac_cv_prog_STRIP"; then
7423 ac_ct_STRIP=$STRIP
7424 # Extract the first word of "strip", so it can be a program name with args.
7425set dummy strip; ac_word=$2
7426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7427$as_echo_n "checking for $ac_word... " >&6; }
7428if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7429 $as_echo_n "(cached) " >&6
7430else
7431 if test -n "$ac_ct_STRIP"; then
7432 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7433else
7434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in $PATH
7436do
7437 IFS=$as_save_IFS
7438 test -z "$as_dir" && as_dir=.
7439 for ac_exec_ext in '' $ac_executable_extensions; do
7440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7441 ac_cv_prog_ac_ct_STRIP="strip"
7442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443 break 2
7444 fi
7445done
7446 done
7447IFS=$as_save_IFS
7448
7449fi
7450fi
7451ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7452if test -n "$ac_ct_STRIP"; then
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7454$as_echo "$ac_ct_STRIP" >&6; }
7455else
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457$as_echo "no" >&6; }
7458fi
7459
7460 if test "x$ac_ct_STRIP" = x; then
7461 STRIP=":"
7462 else
7463 case $cross_compiling:$ac_tool_warned in
7464yes:)
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7466$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7467ac_tool_warned=yes ;;
7468esac
7469 STRIP=$ac_ct_STRIP
7470 fi
7471else
7472 STRIP="$ac_cv_prog_STRIP"
7473fi
7474
7475fi
7476INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7477
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7479$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7480if test -z "$MKDIR_P"; then
7481 if test "${ac_cv_path_mkdir+set}" = set; then :
7482 $as_echo_n "(cached) " >&6
7483else
7484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7485for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7486do
7487 IFS=$as_save_IFS
7488 test -z "$as_dir" && as_dir=.
7489 for ac_prog in mkdir gmkdir; do
7490 for ac_exec_ext in '' $ac_executable_extensions; do
7491 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7492 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7493 'mkdir (GNU coreutils) '* | \
7494 'mkdir (coreutils) '* | \
7495 'mkdir (fileutils) '4.1*)
7496 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7497 break 3;;
7498 esac
7499 done
7500 done
e28b3332 7501 done
81ecdfbb
RW
7502IFS=$as_save_IFS
7503
7504fi
7505
7506 if test "${ac_cv_path_mkdir+set}" = set; then
7507 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7508 else
81ecdfbb
RW
7509 # As a last resort, use the slow shell script. Don't cache a
7510 # value for MKDIR_P within a source directory, because that will
7511 # break other packages using the cache if that directory is
7512 # removed, or if the value is a relative name.
7513 test -d ./--version && rmdir ./--version
7514 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7515 fi
7516fi
81ecdfbb
RW
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7518$as_echo "$MKDIR_P" >&6; }
7519
f434ba03 7520
81ecdfbb
RW
7521mkdir_p="$MKDIR_P"
7522case $mkdir_p in
7523 [\\/$]* | ?:[\\/]*) ;;
7524 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7525esac
e28b3332
DJ
7526
7527for ac_prog in gawk mawk nawk awk
7528do
7529 # Extract the first word of "$ac_prog", so it can be a program name with args.
7530set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7532$as_echo_n "checking for $ac_word... " >&6; }
7533if test "${ac_cv_prog_AWK+set}" = set; then :
7534 $as_echo_n "(cached) " >&6
e28b3332
DJ
7535else
7536 if test -n "$AWK"; then
7537 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7538else
7539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540for as_dir in $PATH
7541do
7542 IFS=$as_save_IFS
7543 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7544 for ac_exec_ext in '' $ac_executable_extensions; do
7545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7546 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7548 break 2
7549 fi
7550done
81ecdfbb
RW
7551 done
7552IFS=$as_save_IFS
e28b3332
DJ
7553
7554fi
7555fi
7556AWK=$ac_cv_prog_AWK
7557if test -n "$AWK"; then
81ecdfbb
RW
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7559$as_echo "$AWK" >&6; }
e28b3332 7560else
81ecdfbb
RW
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
e28b3332
DJ
7563fi
7564
81ecdfbb 7565
e28b3332
DJ
7566 test -n "$AWK" && break
7567done
7568
81ecdfbb 7569ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7570
7571
7572am_make=${MAKE-make}
7573cat > confinc << 'END'
7574am__doit:
81ecdfbb 7575 @echo this is the am__doit target
e28b3332
DJ
7576.PHONY: am__doit
7577END
7578# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7580$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7581am__include="#"
7582am__quote=
7583_am_result=none
7584# First try GNU make style include.
7585echo "include confinc" > confmf
81ecdfbb
RW
7586# Ignore all kinds of additional output from `make'.
7587case `$am_make -s -f confmf 2> /dev/null` in #(
7588*the\ am__doit\ target*)
7589 am__include=include
7590 am__quote=
7591 _am_result=GNU
7592 ;;
7593esac
e28b3332
DJ
7594# Now try BSD make style include.
7595if test "$am__include" = "#"; then
7596 echo '.include "confinc"' > confmf
81ecdfbb
RW
7597 case `$am_make -s -f confmf 2> /dev/null` in #(
7598 *the\ am__doit\ target*)
7599 am__include=.include
7600 am__quote="\""
7601 _am_result=BSD
7602 ;;
7603 esac
e28b3332
DJ
7604fi
7605
7606
81ecdfbb
RW
7607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7608$as_echo "$_am_result" >&6; }
e28b3332
DJ
7609rm -f confinc confmf
7610
81ecdfbb
RW
7611# Check whether --enable-dependency-tracking was given.
7612if test "${enable_dependency_tracking+set}" = set; then :
7613 enableval=$enable_dependency_tracking;
7614fi
e28b3332 7615
e28b3332
DJ
7616if test "x$enable_dependency_tracking" != xno; then
7617 am_depcomp="$ac_aux_dir/depcomp"
7618 AMDEPBACKSLASH='\'
7619fi
81ecdfbb 7620 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7621 AMDEP_TRUE=
7622 AMDEP_FALSE='#'
7623else
7624 AMDEP_TRUE='#'
7625 AMDEP_FALSE=
7626fi
7627
7628
81ecdfbb
RW
7629if test "`cd $srcdir && pwd`" != "`pwd`"; then
7630 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7631 # is not polluted with repeated "-I."
7632 am__isrc=' -I$(srcdir)'
7633 # test to see if srcdir already configured
7634 if test -f $srcdir/config.status; then
7635 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7636 fi
e28b3332
DJ
7637fi
7638
7639# test whether we have cygpath
7640if test -z "$CYGPATH_W"; then
7641 if (cygpath --version) >/dev/null 2>/dev/null; then
7642 CYGPATH_W='cygpath -w'
7643 else
7644 CYGPATH_W=echo
7645 fi
7646fi
7647
7648
7649# Define the identity of the package.
7650 PACKAGE=gdb
7651 VERSION=UNUSED-VERSION
7652
7653
7654# Some tools Automake needs.
7655
7656ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7657
7658
7659AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7660
7661
7662AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7663
7664
7665AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7666
7667
7668MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7669
e28b3332
DJ
7670# We need awk for the "check" target. The system "awk" is bad on
7671# some platforms.
7672# Always define AMTAR for backward compatibility.
7673
7674AMTAR=${AMTAR-"${am_missing_run}tar"}
7675
7676am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7677
7678
7679
7680
7681depcc="$CC" am_compiler_list=
7682
81ecdfbb
RW
7683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7684$as_echo_n "checking dependency style of $depcc... " >&6; }
7685if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7686 $as_echo_n "(cached) " >&6
e28b3332
DJ
7687else
7688 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7689 # We make a subdir and do the tests there. Otherwise we can end up
7690 # making bogus files that we don't know about and never remove. For
7691 # instance it was reported that on HP-UX the gcc test will end up
7692 # making a dummy file named `D' -- because `-MD' means `put the output
7693 # in D'.
7694 mkdir conftest.dir
7695 # Copy depcomp to subdir because otherwise we won't find it if we're
7696 # using a relative directory.
7697 cp "$am_depcomp" conftest.dir
7698 cd conftest.dir
7699 # We will build objects and dependencies in a subdirectory because
7700 # it helps to detect inapplicable dependency modes. For instance
7701 # both Tru64's cc and ICC support -MD to output dependencies as a
7702 # side effect of compilation, but ICC will put the dependencies in
7703 # the current directory while Tru64 will put them in the object
7704 # directory.
7705 mkdir sub
7706
7707 am_cv_CC_dependencies_compiler_type=none
7708 if test "$am_compiler_list" = ""; then
7709 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7710 fi
81ecdfbb
RW
7711 am__universal=false
7712 case " $depcc " in #(
7713 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7714 esac
7715
e28b3332
DJ
7716 for depmode in $am_compiler_list; do
7717 # Setup a source with many dependencies, because some compilers
7718 # like to wrap large dependency lists on column 80 (with \), and
7719 # we should not choose a depcomp mode which is confused by this.
7720 #
7721 # We need to recreate these files for each test, as the compiler may
7722 # overwrite some of them when testing with obscure command lines.
7723 # This happens at least with the AIX C compiler.
7724 : > sub/conftest.c
7725 for i in 1 2 3 4 5 6; do
7726 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7727 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7728 # Solaris 8's {/usr,}/bin/sh.
7729 touch sub/conftst$i.h
7730 done
7731 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7732
81ecdfbb
RW
7733 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7734 # mode. It turns out that the SunPro C++ compiler does not properly
7735 # handle `-M -o', and we need to detect this. Also, some Intel
7736 # versions had trouble with output in subdirs
7737 am__obj=sub/conftest.${OBJEXT-o}
7738 am__minus_obj="-o $am__obj"
e28b3332 7739 case $depmode in
81ecdfbb
RW
7740 gcc)
7741 # This depmode causes a compiler race in universal mode.
7742 test "$am__universal" = false || continue
7743 ;;
e28b3332
DJ
7744 nosideeffect)
7745 # after this tag, mechanisms are not by side-effect, so they'll
7746 # only be used when explicitly requested
7747 if test "x$enable_dependency_tracking" = xyes; then
7748 continue
7749 else
7750 break
7751 fi
7752 ;;
81ecdfbb
RW
7753 msvisualcpp | msvcmsys)
7754 # This compiler won't grok `-c -o', but also, the minuso test has
7755 # not run yet. These depmodes are late enough in the game, and
7756 # so weak that their functioning should not be impacted.
7757 am__obj=conftest.${OBJEXT-o}
7758 am__minus_obj=
7759 ;;
e28b3332
DJ
7760 none) break ;;
7761 esac
e28b3332 7762 if depmode=$depmode \
81ecdfbb 7763 source=sub/conftest.c object=$am__obj \
e28b3332 7764 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7765 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7766 >/dev/null 2>conftest.err &&
81ecdfbb 7767 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7768 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7769 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7770 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7771 # icc doesn't choke on unknown options, it will just issue warnings
7772 # or remarks (even with -Werror). So we grep stderr for any message
7773 # that says an option was ignored or not supported.
7774 # When given -MP, icc 7.0 and 7.1 complain thusly:
7775 # icc: Command line warning: ignoring option '-M'; no argument required
7776 # The diagnosis changed in icc 8.0:
7777 # icc: Command line remark: option '-MP' not supported
7778 if (grep 'ignoring option' conftest.err ||
7779 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7780 am_cv_CC_dependencies_compiler_type=$depmode
7781 break
7782 fi
7783 fi
7784 done
7785
7786 cd ..
7787 rm -rf conftest.dir
7788else
7789 am_cv_CC_dependencies_compiler_type=none
7790fi
7791
7792fi
81ecdfbb
RW
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7794$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7795CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7796
81ecdfbb 7797 if
e28b3332
DJ
7798 test "x$enable_dependency_tracking" != xno \
7799 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7800 am__fastdepCC_TRUE=
7801 am__fastdepCC_FALSE='#'
7802else
7803 am__fastdepCC_TRUE='#'
7804 am__fastdepCC_FALSE=
7805fi
7806
7807
7808
7809
bec39cab
AC
7810
7811
81ecdfbb
RW
7812# Check whether --with-separate-debug-dir was given.
7813if test "${with_separate_debug_dir+set}" = set; then :
7814 withval=$with_separate_debug_dir;
b14b1491
TT
7815 DEBUGDIR=$withval
7816else
7817 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7818fi
7819
20e95c23 7820
783e057b
DJ
7821 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7822 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7823 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7824 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7825
783e057b
DJ
7826cat >>confdefs.h <<_ACEOF
7827#define DEBUGDIR "$ac_define_dir"
20e95c23 7828_ACEOF
20e95c23 7829
20e95c23 7830
20e95c23 7831
0c4a4063 7832
b14b1491
TT
7833 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7834 if test "x$prefix" = xNONE; then
7835 test_prefix=/usr/local
7836 else
7837 test_prefix=$prefix
7838 fi
783e057b 7839 else
b14b1491 7840 test_prefix=$exec_prefix
783e057b 7841 fi
b14b1491
TT
7842 value=0
7843 case ${ac_define_dir} in
7844 "${test_prefix}"|"${test_prefix}/"*|\
7845 '${exec_prefix}'|'${exec_prefix}/'*)
7846 value=1
7847 ;;
7848 esac
7849
7850cat >>confdefs.h <<_ACEOF
7851#define DEBUGDIR_RELOCATABLE $value
7852_ACEOF
7853
7854
7855
0c4a4063 7856
f83d8a90
DE
7857# We can't pass paths as command line arguments.
7858# Mingw32 tries to be clever and will convert the paths for us.
7859# For example -DBINDIR="/usr/local/bin" passed on the command line may get
7860# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
7861# This breaks GDB's relocatable path conversions since paths passed in
7862# config.h would not get so translated, the path prefixes no longer match.
7863
7864 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7865 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7866 ac_define_dir=`eval echo $bindir`
7867 ac_define_dir=`eval echo $ac_define_dir`
7868
7869cat >>confdefs.h <<_ACEOF
7870#define BINDIR "$ac_define_dir"
7871_ACEOF
7872
7873
7874
b14b1491
TT
7875# GDB's datadir relocation
7876
7877
7878
81ecdfbb
RW
7879# Check whether --with-gdb-datadir was given.
7880if test "${with_gdb_datadir+set}" = set; then :
7881 withval=$with_gdb_datadir;
b14b1491 7882 GDB_DATADIR=$withval
20e95c23 7883else
b14b1491 7884 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7885fi
7886
20e95c23 7887
b14b1491
TT
7888 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7889 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7890 ac_define_dir=`eval echo $GDB_DATADIR`
7891 ac_define_dir=`eval echo $ac_define_dir`
7892
7893cat >>confdefs.h <<_ACEOF
7894#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7895_ACEOF
7896
b14b1491
TT
7897
7898
0c4a4063 7899
b14b1491
TT
7900 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7901 if test "x$prefix" = xNONE; then
7902 test_prefix=/usr/local
7903 else
7904 test_prefix=$prefix
7905 fi
7906 else
7907 test_prefix=$exec_prefix
7908 fi
7909 value=0
7910 case ${ac_define_dir} in
7911 "${test_prefix}"|"${test_prefix}/"*|\
7912 '${exec_prefix}'|'${exec_prefix}/'*)
7913 value=1
7914 ;;
7915 esac
7916
7917cat >>confdefs.h <<_ACEOF
7918#define GDB_DATADIR_RELOCATABLE $value
7919_ACEOF
7920
7921
783e057b 7922
20e95c23 7923
0c4a4063 7924
81ecdfbb
RW
7925# Check whether --with-relocated-sources was given.
7926if test "${with_relocated_sources+set}" = set; then :
7927 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7928
7929 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7930 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7931 ac_define_dir=`eval echo $reloc_srcdir`
7932 ac_define_dir=`eval echo $ac_define_dir`
7933
7934cat >>confdefs.h <<_ACEOF
7935#define RELOC_SRCDIR "$ac_define_dir"
7936_ACEOF
7937
7938
7939
81ecdfbb
RW
7940fi
7941
29b0e8a2
JM
7942
7943
20e95c23 7944
5ae98d25 7945subdirs="$subdirs testsuite"
20e95c23
DJ
7946
7947
783e057b 7948# Check whether to support alternative target configurations
81ecdfbb
RW
7949# Check whether --enable-targets was given.
7950if test "${enable_targets+set}" = set; then :
7951 enableval=$enable_targets; case "${enableval}" in
7952 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7953 ;;
7954 no) enable_targets= ;;
7955 *) enable_targets=$enableval ;;
7956esac
81ecdfbb
RW
7957fi
7958
20e95c23 7959
783e057b 7960# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7961# Check whether --enable-64-bit-bfd was given.
7962if test "${enable_64_bit_bfd+set}" = set; then :
7963 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7964 yes) want64=true ;;
7965 no) want64=false ;;
81ecdfbb 7966 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7967esac
7968else
7969 want64=false
81ecdfbb
RW
7970fi
7971
783e057b
DJ
7972# Provide defaults for some variables set by the per-host and per-target
7973# configuration.
7974gdb_host_obs=posix-hdep.o
20e95c23 7975
783e057b
DJ
7976if test "${target}" = "${host}"; then
7977 gdb_native=yes
7978else
7979 gdb_native=no
7980fi
20e95c23 7981
783e057b 7982. $srcdir/configure.host
20e95c23 7983
783e057b 7984# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7985
783e057b
DJ
7986TARGET_OBS=
7987all_targets=
20e95c23 7988
783e057b 7989for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7990do
783e057b
DJ
7991 if test "$targ_alias" = "all"; then
7992 all_targets=true
7993 else
7994 # Canonicalize the secondary target names.
7995 result=`$ac_config_sub $targ_alias 2>/dev/null`
7996 if test -n "$result"; then
7997 targ=$result
7998 else
7999 targ=$targ_alias
8000 fi
20e95c23 8001
783e057b 8002 . ${srcdir}/configure.tgt
20e95c23 8003
bf307134
JB
8004 if test -z "${gdb_target_obs}"; then :
8005 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
8006fi
8007
783e057b
DJ
8008 # Target-specific object files
8009 for i in ${gdb_target_obs}; do
8010 case " $TARGET_OBS " in
8011 *" ${i} "*) ;;
8012 *)
8013 TARGET_OBS="$TARGET_OBS ${i}"
8014 ;;
8015 esac
8016 done
20e95c23 8017
783e057b
DJ
8018 # Check whether this target needs 64-bit CORE_ADDR
8019 if test x${want64} = xfalse; then
8020 . ${srcdir}/../bfd/config.bfd
8021 fi
8022 fi
20e95c23
DJ
8023done
8024
783e057b
DJ
8025if test x${all_targets} = xtrue; then
8026
8027 # We want all 64-bit targets if we either:
8028 # - run on a 64-bit host or
8029 # - already require 64-bit support for some other target or
8030 # - the --enable-64-bit-bfd option was supplied
8031 # Otherwise we only support all 32-bit targets.
8032 #
8033 # NOTE: This test must be in sync with the corresponding
8034 # tests in BFD!
20e95c23 8035
783e057b 8036 if test x${want64} = xfalse; then
81ecdfbb
RW
8037 # The cast to long int works around a bug in the HP C Compiler
8038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8040# This bug is HP SR number 8606223364.
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8042$as_echo_n "checking size of long... " >&6; }
8043if test "${ac_cv_sizeof_long+set}" = set; then :
8044 $as_echo_n "(cached) " >&6
c0993dbe 8045else
81ecdfbb 8046 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 8047
81ecdfbb
RW
8048else
8049 if test "$ac_cv_type_long" = yes; then
8050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8052{ as_fn_set_status 77
8053as_fn_error "cannot compute sizeof (long)
8054See \`config.log' for more details." "$LINENO" 5; }; }
8055 else
8056 ac_cv_sizeof_long=0
8057 fi
c0993dbe 8058fi
81ecdfbb 8059
c0993dbe 8060fi
81ecdfbb
RW
8061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8062$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8063
c0993dbe 8064
c0993dbe 8065
c0993dbe
UW
8066cat >>confdefs.h <<_ACEOF
8067#define SIZEOF_LONG $ac_cv_sizeof_long
8068_ACEOF
8069
8070
8071 if test "x${ac_cv_sizeof_long}" = "x8"; then
8072 want64=true
8073 fi
8074 fi
8075 if test x${want64} = xtrue; then
8076 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8077 else
8078 TARGET_OBS='$(ALL_TARGET_OBS)'
8079 fi
8080fi
8081
8082
8083
8084# For other settings, only the main target counts.
8085gdb_sim=
8086gdb_osabi=
8087build_gdbserver=
8088targ=$target; . ${srcdir}/configure.tgt
8089
8090# Fetch the default architecture and default target vector from BFD.
8091targ=$target; . $srcdir/../bfd/config.bfd
8092
8093# We only want the first architecture, so strip off the others if
8094# there is more than one.
8095targ_archs=`echo $targ_archs | sed 's/ .*//'`
8096
8097if test "x$targ_archs" != x; then
8098
8099cat >>confdefs.h <<_ACEOF
8100#define DEFAULT_BFD_ARCH $targ_archs
8101_ACEOF
8102
8103fi
8104if test "x$targ_defvec" != x; then
8105
8106cat >>confdefs.h <<_ACEOF
8107#define DEFAULT_BFD_VEC $targ_defvec
8108_ACEOF
8109
8110fi
8111
c0993dbe
UW
8112# The CLI cannot be disabled yet, but may be in the future.
8113
8114# Enable CLI.
81ecdfbb
RW
8115# Check whether --enable-gdbcli was given.
8116if test "${enable_gdbcli+set}" = set; then :
8117 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8118 yes)
8119 ;;
8120 no)
81ecdfbb 8121 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8122 *)
81ecdfbb 8123 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8124 esac
8125else
8126 enable_gdbcli=yes
81ecdfbb
RW
8127fi
8128
c0993dbe
UW
8129if test x"$enable_gdbcli" = xyes; then
8130 if test -d $srcdir/cli; then
8131 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8132 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8133 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8134 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8135 fi
8136fi
8137
8138# Enable MI.
81ecdfbb
RW
8139# Check whether --enable-gdbmi was given.
8140if test "${enable_gdbmi+set}" = set; then :
8141 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8142 yes | no)
8143 ;;
8144 *)
81ecdfbb 8145 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8146 esac
8147else
8148 enable_gdbmi=yes
81ecdfbb
RW
8149fi
8150
c0993dbe
UW
8151if test x"$enable_gdbmi" = xyes; then
8152 if test -d $srcdir/mi; then
8153 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8154 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8155 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8156 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8157 fi
8158fi
8159
8160# Enable TUI.
81ecdfbb
RW
8161# Check whether --enable-tui was given.
8162if test "${enable_tui+set}" = set; then :
8163 enableval=$enable_tui; case $enableval in
3ca64bd3 8164 yes | no | auto)
c0993dbe
UW
8165 ;;
8166 *)
81ecdfbb 8167 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8168 esac
8169else
3ca64bd3 8170 enable_tui=auto
81ecdfbb
RW
8171fi
8172
c0993dbe
UW
8173
8174# Enable gdbtk.
81ecdfbb
RW
8175# Check whether --enable-gdbtk was given.
8176if test "${enable_gdbtk+set}" = set; then :
8177 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8178 yes | no)
8179 ;;
8180 *)
81ecdfbb 8181 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8182 esac
8183else
5062cc19 8184 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8185 enable_gdbtk=yes
8186 else
8187 enable_gdbtk=no
8188 fi
81ecdfbb
RW
8189fi
8190
c0993dbe
UW
8191# We unconditionally disable gdbtk tests on selected platforms.
8192case $host_os in
8193 go32* | windows*)
81ecdfbb
RW
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8195$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8196 enable_gdbtk=no ;;
8197esac
8198
05e7c244 8199# Libunwind support for ia64.
bec39cab 8200
05e7c244
JK
8201
8202# Check whether --with-libunwind-ia64 was given.
8203if test "${with_libunwind_ia64+set}" = set; then :
8204 withval=$with_libunwind_ia64;
bec39cab 8205else
05e7c244
JK
8206 with_libunwind_ia64=auto
8207fi
bec39cab 8208
05e7c244
JK
8209
8210# Backward compatibility option.
8211if test "${with_libunwind+set}" = set; then
8212 if test x"$with_libunwind_ia64" != xauto; then
8213 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
8214 fi
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
8216$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
8217 with_libunwind_ia64="$with_libunwind"
8218fi
8219
8220case "$with_libunwind_ia64" in
8221 yes | no)
8222 ;;
8223 auto)
8224 for ac_header in libunwind-ia64.h
81ecdfbb 8225do :
b54a8fd7
PA
8226 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8227if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8228 cat >>confdefs.h <<_ACEOF
b54a8fd7 8229#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8230_ACEOF
8231
8232fi
8233
8234done
8235
05e7c244
JK
8236 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
8237 ;;
8238 *)
8239 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
8240 ;;
8241esac
bec39cab 8242
05e7c244 8243if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 8244 for ac_header in libunwind-ia64.h
81ecdfbb 8245do :
b54a8fd7
PA
8246 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
8247if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 8248 cat >>confdefs.h <<_ACEOF
b54a8fd7 8249#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
8250_ACEOF
8251
8252fi
8253
8254done
8255
05e7c244
JK
8256 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
8257 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
8258 fi
8259 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
8260 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
8261 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
8262fi
8263
cb01cfba
JB
8264opt_curses=no
8265
81ecdfbb
RW
8266# Check whether --with-curses was given.
8267if test "${with_curses+set}" = set; then :
8268 withval=$with_curses; opt_curses=$withval
8269fi
8270
cb01cfba 8271
76a39ba7 8272prefer_curses=no
cb01cfba 8273if test "$opt_curses" = "yes"; then
76a39ba7 8274 prefer_curses=yes
cb01cfba
JB
8275fi
8276
a9322a30 8277# Profiling support.
81ecdfbb
RW
8278# Check whether --enable-profiling was given.
8279if test "${enable_profiling+set}" = set; then :
8280 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8281 yes | no)
8282 ;;
8283 *)
81ecdfbb 8284 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8285 esac
8286else
8287 enable_profiling=no
81ecdfbb 8288fi
bec39cab 8289
a9322a30
TT
8290
8291for ac_func in monstartup _mcleanup
81ecdfbb
RW
8292do :
8293 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8294ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8295eval as_val=\$$as_ac_var
8296 if test "x$as_val" = x""yes; then :
8297 cat >>confdefs.h <<_ACEOF
8298#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8299_ACEOF
a9322a30 8300
81ecdfbb
RW
8301fi
8302done
a9322a30 8303
81ecdfbb
RW
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8305$as_echo_n "checking for _etext... " >&6; }
8306if test "${ac_cv_var__etext+set}" = set; then :
8307 $as_echo_n "(cached) " >&6
8308else
8309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8310/* end confdefs.h. */
8311#include <stdlib.h>
8312extern char _etext;
a9322a30
TT
8313
8314int
8315main ()
8316{
8317free (&_etext);
8318 ;
8319 return 0;
8320}
bec39cab 8321_ACEOF
81ecdfbb 8322if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8323 ac_cv_var__etext=yes
bec39cab 8324else
81ecdfbb 8325 ac_cv_var__etext=no
bec39cab 8326fi
81ecdfbb
RW
8327rm -f core conftest.err conftest.$ac_objext \
8328 conftest$ac_exeext conftest.$ac_ext
bec39cab 8329fi
81ecdfbb
RW
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8331$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8332if test $ac_cv_var__etext = yes; then
60ca704f 8333
81ecdfbb 8334$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8335
bec39cab 8336fi
81ecdfbb
RW
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8338$as_echo_n "checking for etext... " >&6; }
8339if test "${ac_cv_var_etext+set}" = set; then :
8340 $as_echo_n "(cached) " >&6
bec39cab 8341else
81ecdfbb 8342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8343/* end confdefs.h. */
a9322a30
TT
8344#include <stdlib.h>
8345extern char etext;
bec39cab
AC
8346
8347int
8348main ()
8349{
a9322a30 8350free (&etext);
bec39cab
AC
8351 ;
8352 return 0;
8353}
8354_ACEOF
81ecdfbb 8355if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8356 ac_cv_var_etext=yes
bec39cab 8357else
81ecdfbb 8358 ac_cv_var_etext=no
bec39cab 8359fi
81ecdfbb
RW
8360rm -f core conftest.err conftest.$ac_objext \
8361 conftest$ac_exeext conftest.$ac_ext
bec39cab 8362fi
81ecdfbb
RW
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8364$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8365if test $ac_cv_var_etext = yes; then
8366
81ecdfbb 8367$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8368
8369fi
a9322a30
TT
8370if test "$enable_profiling" = yes ; then
8371 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8372 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8373 fi
8374 PROFILE_CFLAGS=-pg
8375 OLD_CFLAGS="$CFLAGS"
8376 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8377
81ecdfbb
RW
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8379$as_echo_n "checking whether $CC supports -pg... " >&6; }
8380if test "${ac_cv_cc_supports_pg+set}" = set; then :
8381 $as_echo_n "(cached) " >&6
bec39cab 8382else
81ecdfbb 8383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8384/* end confdefs.h. */
bec39cab
AC
8385
8386int
8387main ()
8388{
a9322a30 8389int x;
bec39cab
AC
8390 ;
8391 return 0;
8392}
8393_ACEOF
81ecdfbb 8394if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8395 ac_cv_cc_supports_pg=yes
bec39cab 8396else
81ecdfbb 8397 ac_cv_cc_supports_pg=no
bec39cab 8398fi
81ecdfbb 8399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8400fi
81ecdfbb
RW
8401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8402$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8403
a9322a30 8404 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8405 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8406 fi
bec39cab 8407
a9322a30 8408 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8409fi
8410
c16158bc
JM
8411
8412
81ecdfbb
RW
8413# Check whether --with-pkgversion was given.
8414if test "${with_pkgversion+set}" = set; then :
8415 withval=$with_pkgversion; case "$withval" in
8416 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8417 no) PKGVERSION= ;;
8418 *) PKGVERSION="($withval) " ;;
8419 esac
8420else
8421 PKGVERSION="(GDB) "
8422
81ecdfbb 8423fi
c16158bc
JM
8424
8425
8426
8427
81ecdfbb
RW
8428
8429# Check whether --with-bugurl was given.
8430if test "${with_bugurl+set}" = set; then :
8431 withval=$with_bugurl; case "$withval" in
8432 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8433 no) BUGURL=
8434 ;;
8435 *) BUGURL="$withval"
8436 ;;
8437 esac
8438else
8439 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8440
81ecdfbb
RW
8441fi
8442
c16158bc
JM
8443 case ${BUGURL} in
8444 "")
8445 REPORT_BUGS_TO=
8446 REPORT_BUGS_TEXI=
8447 ;;
8448 *)
8449 REPORT_BUGS_TO="<$BUGURL>"
8450 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8451 ;;
8452 esac;
8453
8454
8455
8456
8457cat >>confdefs.h <<_ACEOF
8458#define PKGVERSION "$PKGVERSION"
8459_ACEOF
8460
8461
8462cat >>confdefs.h <<_ACEOF
8463#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8464_ACEOF
8465
8466
bec39cab
AC
8467# --------------------- #
8468# Checks for programs. #
8469# --------------------- #
8470
8471for ac_prog in gawk mawk nawk awk
8472do
8473 # Extract the first word of "$ac_prog", so it can be a program name with args.
8474set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476$as_echo_n "checking for $ac_word... " >&6; }
8477if test "${ac_cv_prog_AWK+set}" = set; then :
8478 $as_echo_n "(cached) " >&6
bec39cab
AC
8479else
8480 if test -n "$AWK"; then
8481 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8482else
8483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484for as_dir in $PATH
8485do
8486 IFS=$as_save_IFS
8487 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8488 for ac_exec_ext in '' $ac_executable_extensions; do
8489 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8490 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8492 break 2
8493 fi
8494done
81ecdfbb
RW
8495 done
8496IFS=$as_save_IFS
bec39cab
AC
8497
8498fi
8499fi
8500AWK=$ac_cv_prog_AWK
8501if test -n "$AWK"; then
81ecdfbb
RW
8502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8503$as_echo "$AWK" >&6; }
bec39cab 8504else
81ecdfbb
RW
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8506$as_echo "no" >&6; }
bec39cab
AC
8507fi
8508
bec39cab 8509
81ecdfbb 8510 test -n "$AWK" && break
bec39cab
AC
8511done
8512
bec39cab 8513
81ecdfbb
RW
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8515$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8516LN_S=$as_ln_s
8517if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8519$as_echo "yes" >&6; }
bec39cab 8520else
81ecdfbb
RW
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8522$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8523fi
8524
8525if test -n "$ac_tool_prefix"; then
8526 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8527set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8529$as_echo_n "checking for $ac_word... " >&6; }
8530if test "${ac_cv_prog_RANLIB+set}" = set; then :
8531 $as_echo_n "(cached) " >&6
bec39cab
AC
8532else
8533 if test -n "$RANLIB"; then
8534 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8535else
8536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8537for as_dir in $PATH
8538do
8539 IFS=$as_save_IFS
8540 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8541 for ac_exec_ext in '' $ac_executable_extensions; do
8542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8543 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8545 break 2
8546 fi
8547done
81ecdfbb
RW
8548 done
8549IFS=$as_save_IFS
bec39cab
AC
8550
8551fi
8552fi
8553RANLIB=$ac_cv_prog_RANLIB
8554if test -n "$RANLIB"; then
81ecdfbb
RW
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8556$as_echo "$RANLIB" >&6; }
bec39cab 8557else
81ecdfbb
RW
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8559$as_echo "no" >&6; }
bec39cab
AC
8560fi
8561
81ecdfbb 8562
bec39cab
AC
8563fi
8564if test -z "$ac_cv_prog_RANLIB"; then
8565 ac_ct_RANLIB=$RANLIB
8566 # Extract the first word of "ranlib", so it can be a program name with args.
8567set dummy ranlib; ac_word=$2
81ecdfbb
RW
8568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8569$as_echo_n "checking for $ac_word... " >&6; }
8570if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8571 $as_echo_n "(cached) " >&6
bec39cab
AC
8572else
8573 if test -n "$ac_ct_RANLIB"; then
8574 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8575else
8576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8577for as_dir in $PATH
8578do
8579 IFS=$as_save_IFS
8580 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8581 for ac_exec_ext in '' $ac_executable_extensions; do
8582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8583 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8585 break 2
8586 fi
8587done
81ecdfbb
RW
8588 done
8589IFS=$as_save_IFS
bec39cab 8590
bec39cab
AC
8591fi
8592fi
8593ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8594if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8596$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8597else
81ecdfbb
RW
8598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
bec39cab
AC
8600fi
8601
81ecdfbb
RW
8602 if test "x$ac_ct_RANLIB" = x; then
8603 RANLIB=":"
8604 else
8605 case $cross_compiling:$ac_tool_warned in
8606yes:)
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8608$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8609ac_tool_warned=yes ;;
8610esac
8611 RANLIB=$ac_ct_RANLIB
8612 fi
bec39cab
AC
8613else
8614 RANLIB="$ac_cv_prog_RANLIB"
8615fi
8616
8617for ac_prog in 'bison -y' byacc
8618do
8619 # Extract the first word of "$ac_prog", so it can be a program name with args.
8620set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8622$as_echo_n "checking for $ac_word... " >&6; }
8623if test "${ac_cv_prog_YACC+set}" = set; then :
8624 $as_echo_n "(cached) " >&6
bec39cab
AC
8625else
8626 if test -n "$YACC"; then
8627 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8628else
8629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630for as_dir in $PATH
8631do
8632 IFS=$as_save_IFS
8633 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8634 for ac_exec_ext in '' $ac_executable_extensions; do
8635 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8636 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8638 break 2
8639 fi
8640done
81ecdfbb
RW
8641 done
8642IFS=$as_save_IFS
bec39cab
AC
8643
8644fi
8645fi
8646YACC=$ac_cv_prog_YACC
8647if test -n "$YACC"; then
81ecdfbb
RW
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8649$as_echo "$YACC" >&6; }
bec39cab 8650else
81ecdfbb
RW
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8652$as_echo "no" >&6; }
bec39cab
AC
8653fi
8654
81ecdfbb 8655
bec39cab
AC
8656 test -n "$YACC" && break
8657done
8658test -n "$YACC" || YACC="yacc"
8659
8660
8661if test -n "$ac_tool_prefix"; then
8662 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8663set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8665$as_echo_n "checking for $ac_word... " >&6; }
8666if test "${ac_cv_prog_AR+set}" = set; then :
8667 $as_echo_n "(cached) " >&6
bec39cab
AC
8668else
8669 if test -n "$AR"; then
8670 ac_cv_prog_AR="$AR" # Let the user override the test.
8671else
8672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8673for as_dir in $PATH
8674do
8675 IFS=$as_save_IFS
8676 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8677 for ac_exec_ext in '' $ac_executable_extensions; do
8678 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8679 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8681 break 2
8682 fi
8683done
81ecdfbb
RW
8684 done
8685IFS=$as_save_IFS
bec39cab
AC
8686
8687fi
8688fi
8689AR=$ac_cv_prog_AR
8690if test -n "$AR"; then
81ecdfbb
RW
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8692$as_echo "$AR" >&6; }
bec39cab 8693else
81ecdfbb
RW
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8695$as_echo "no" >&6; }
bec39cab
AC
8696fi
8697
81ecdfbb 8698
bec39cab
AC
8699fi
8700if test -z "$ac_cv_prog_AR"; then
8701 ac_ct_AR=$AR
8702 # Extract the first word of "ar", so it can be a program name with args.
8703set dummy ar; ac_word=$2
81ecdfbb
RW
8704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8705$as_echo_n "checking for $ac_word... " >&6; }
8706if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8707 $as_echo_n "(cached) " >&6
bec39cab
AC
8708else
8709 if test -n "$ac_ct_AR"; then
8710 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8711else
8712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715 IFS=$as_save_IFS
8716 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8717 for ac_exec_ext in '' $ac_executable_extensions; do
8718 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8719 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8721 break 2
8722 fi
8723done
81ecdfbb
RW
8724 done
8725IFS=$as_save_IFS
bec39cab
AC
8726
8727fi
8728fi
8729ac_ct_AR=$ac_cv_prog_ac_ct_AR
8730if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8732$as_echo "$ac_ct_AR" >&6; }
bec39cab 8733else
81ecdfbb
RW
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8735$as_echo "no" >&6; }
bec39cab
AC
8736fi
8737
81ecdfbb
RW
8738 if test "x$ac_ct_AR" = x; then
8739 AR=""
8740 else
8741 case $cross_compiling:$ac_tool_warned in
8742yes:)
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8745ac_tool_warned=yes ;;
8746esac
8747 AR=$ac_ct_AR
8748 fi
bec39cab
AC
8749else
8750 AR="$ac_cv_prog_AR"
8751fi
8752
8753if test -n "$ac_tool_prefix"; then
8754 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8755set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8757$as_echo_n "checking for $ac_word... " >&6; }
8758if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8759 $as_echo_n "(cached) " >&6
bec39cab
AC
8760else
8761 if test -n "$DLLTOOL"; then
8762 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8763else
8764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767 IFS=$as_save_IFS
8768 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8769 for ac_exec_ext in '' $ac_executable_extensions; do
8770 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8771 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8773 break 2
8774 fi
8775done
81ecdfbb
RW
8776 done
8777IFS=$as_save_IFS
bec39cab
AC
8778
8779fi
8780fi
8781DLLTOOL=$ac_cv_prog_DLLTOOL
8782if test -n "$DLLTOOL"; then
81ecdfbb
RW
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8784$as_echo "$DLLTOOL" >&6; }
bec39cab 8785else
81ecdfbb
RW
8786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
bec39cab
AC
8788fi
8789
81ecdfbb 8790
bec39cab
AC
8791fi
8792if test -z "$ac_cv_prog_DLLTOOL"; then
8793 ac_ct_DLLTOOL=$DLLTOOL
8794 # Extract the first word of "dlltool", so it can be a program name with args.
8795set dummy dlltool; ac_word=$2
81ecdfbb
RW
8796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8797$as_echo_n "checking for $ac_word... " >&6; }
8798if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8799 $as_echo_n "(cached) " >&6
bec39cab
AC
8800else
8801 if test -n "$ac_ct_DLLTOOL"; then
8802 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8803else
8804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8805for as_dir in $PATH
8806do
8807 IFS=$as_save_IFS
8808 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8809 for ac_exec_ext in '' $ac_executable_extensions; do
8810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8811 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8813 break 2
8814 fi
8815done
81ecdfbb
RW
8816 done
8817IFS=$as_save_IFS
bec39cab
AC
8818
8819fi
8820fi
8821ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8822if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8824$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8825else
81ecdfbb
RW
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
bec39cab
AC
8828fi
8829
81ecdfbb
RW
8830 if test "x$ac_ct_DLLTOOL" = x; then
8831 DLLTOOL=""
8832 else
8833 case $cross_compiling:$ac_tool_warned in
8834yes:)
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8836$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8837ac_tool_warned=yes ;;
8838esac
8839 DLLTOOL=$ac_ct_DLLTOOL
8840 fi
bec39cab
AC
8841else
8842 DLLTOOL="$ac_cv_prog_DLLTOOL"
8843fi
8844
8845if test -n "$ac_tool_prefix"; then
8846 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8847set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8849$as_echo_n "checking for $ac_word... " >&6; }
8850if test "${ac_cv_prog_WINDRES+set}" = set; then :
8851 $as_echo_n "(cached) " >&6
bec39cab
AC
8852else
8853 if test -n "$WINDRES"; then
8854 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8855else
8856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8857for as_dir in $PATH
8858do
8859 IFS=$as_save_IFS
8860 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8861 for ac_exec_ext in '' $ac_executable_extensions; do
8862 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8863 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8865 break 2
8866 fi
8867done
81ecdfbb
RW
8868 done
8869IFS=$as_save_IFS
bec39cab
AC
8870
8871fi
8872fi
8873WINDRES=$ac_cv_prog_WINDRES
8874if test -n "$WINDRES"; then
81ecdfbb
RW
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8876$as_echo "$WINDRES" >&6; }
bec39cab 8877else
81ecdfbb
RW
8878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
bec39cab
AC
8880fi
8881
81ecdfbb 8882
bec39cab
AC
8883fi
8884if test -z "$ac_cv_prog_WINDRES"; then
8885 ac_ct_WINDRES=$WINDRES
8886 # Extract the first word of "windres", so it can be a program name with args.
8887set dummy windres; ac_word=$2
81ecdfbb
RW
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8889$as_echo_n "checking for $ac_word... " >&6; }
8890if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8891 $as_echo_n "(cached) " >&6
bec39cab
AC
8892else
8893 if test -n "$ac_ct_WINDRES"; then
8894 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8895else
8896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8897for as_dir in $PATH
8898do
8899 IFS=$as_save_IFS
8900 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8901 for ac_exec_ext in '' $ac_executable_extensions; do
8902 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8903 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8905 break 2
8906 fi
8907done
81ecdfbb
RW
8908 done
8909IFS=$as_save_IFS
bec39cab
AC
8910
8911fi
8912fi
8913ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8914if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8916$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8917else
81ecdfbb
RW
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
c906108c 8920fi
bec39cab 8921
81ecdfbb
RW
8922 if test "x$ac_ct_WINDRES" = x; then
8923 WINDRES=""
8924 else
8925 case $cross_compiling:$ac_tool_warned in
8926yes:)
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8928$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8929ac_tool_warned=yes ;;
8930esac
8931 WINDRES=$ac_ct_WINDRES
8932 fi
c906108c 8933else
bec39cab 8934 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8935fi
8936
bec39cab
AC
8937
8938# Needed for GNU/Hurd.
8939if test -n "$ac_tool_prefix"; then
8940 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8941set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8943$as_echo_n "checking for $ac_word... " >&6; }
8944if test "${ac_cv_prog_MIG+set}" = set; then :
8945 $as_echo_n "(cached) " >&6
c906108c 8946else
bec39cab
AC
8947 if test -n "$MIG"; then
8948 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8949else
8950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8951for as_dir in $PATH
8952do
8953 IFS=$as_save_IFS
8954 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8955 for ac_exec_ext in '' $ac_executable_extensions; do
8956 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8957 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8959 break 2
8960 fi
8961done
81ecdfbb
RW
8962 done
8963IFS=$as_save_IFS
bec39cab 8964
c906108c 8965fi
bec39cab
AC
8966fi
8967MIG=$ac_cv_prog_MIG
8968if test -n "$MIG"; then
81ecdfbb
RW
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8970$as_echo "$MIG" >&6; }
c906108c 8971else
81ecdfbb
RW
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
c906108c
SS
8974fi
8975
81ecdfbb 8976
bec39cab
AC
8977fi
8978if test -z "$ac_cv_prog_MIG"; then
8979 ac_ct_MIG=$MIG
8980 # Extract the first word of "mig", so it can be a program name with args.
8981set dummy mig; ac_word=$2
81ecdfbb
RW
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8983$as_echo_n "checking for $ac_word... " >&6; }
8984if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8985 $as_echo_n "(cached) " >&6
bec39cab
AC
8986else
8987 if test -n "$ac_ct_MIG"; then
8988 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8989else
8990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993 IFS=$as_save_IFS
8994 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8995 for ac_exec_ext in '' $ac_executable_extensions; do
8996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8997 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8999 break 2
9000 fi
9001done
81ecdfbb
RW
9002 done
9003IFS=$as_save_IFS
c906108c 9004
bec39cab
AC
9005fi
9006fi
9007ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9008if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
9009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
9010$as_echo "$ac_ct_MIG" >&6; }
bec39cab 9011else
81ecdfbb
RW
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013$as_echo "no" >&6; }
bec39cab 9014fi
c906108c 9015
81ecdfbb
RW
9016 if test "x$ac_ct_MIG" = x; then
9017 MIG=""
9018 else
9019 case $cross_compiling:$ac_tool_warned in
9020yes:)
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9023ac_tool_warned=yes ;;
9024esac
9025 MIG=$ac_ct_MIG
9026 fi
bec39cab
AC
9027else
9028 MIG="$ac_cv_prog_MIG"
9029fi
c906108c 9030
c906108c 9031
bec39cab
AC
9032# ---------------------- #
9033# Checks for libraries. #
9034# ---------------------- #
c906108c 9035
bec39cab 9036# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
9038$as_echo_n "checking for main in -lm... " >&6; }
9039if test "${ac_cv_lib_m_main+set}" = set; then :
9040 $as_echo_n "(cached) " >&6
bec39cab
AC
9041else
9042 ac_check_lib_save_LIBS=$LIBS
9043LIBS="-lm $LIBS"
81ecdfbb 9044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9045/* end confdefs.h. */
c906108c 9046
c906108c 9047
bec39cab
AC
9048int
9049main ()
9050{
81ecdfbb 9051return main ();
bec39cab
AC
9052 ;
9053 return 0;
9054}
9055_ACEOF
81ecdfbb 9056if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9057 ac_cv_lib_m_main=yes
9058else
81ecdfbb 9059 ac_cv_lib_m_main=no
bec39cab 9060fi
81ecdfbb
RW
9061rm -f core conftest.err conftest.$ac_objext \
9062 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9063LIBS=$ac_check_lib_save_LIBS
9064fi
81ecdfbb
RW
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9066$as_echo "$ac_cv_lib_m_main" >&6; }
9067if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9068 cat >>confdefs.h <<_ACEOF
9069#define HAVE_LIBM 1
9070_ACEOF
9071
9072 LIBS="-lm $LIBS"
c906108c 9073
c906108c 9074fi
bec39cab
AC
9075
9076
9077# We need to link with -lw to get `wctype' on Solaris before Solaris
9078# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9079# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9080# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9081ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9082if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9083
c906108c 9084else
81ecdfbb
RW
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9086$as_echo_n "checking for wctype in -lw... " >&6; }
9087if test "${ac_cv_lib_w_wctype+set}" = set; then :
9088 $as_echo_n "(cached) " >&6
bec39cab
AC
9089else
9090 ac_check_lib_save_LIBS=$LIBS
9091LIBS="-lw $LIBS"
81ecdfbb 9092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9093/* end confdefs.h. */
c906108c 9094
81ecdfbb
RW
9095/* Override any GCC internal prototype to avoid an error.
9096 Use char because int might match the return type of a GCC
9097 builtin and then its argument prototype would still apply. */
bec39cab
AC
9098#ifdef __cplusplus
9099extern "C"
9100#endif
bec39cab
AC
9101char wctype ();
9102int
9103main ()
9104{
81ecdfbb 9105return wctype ();
bec39cab
AC
9106 ;
9107 return 0;
9108}
9109_ACEOF
81ecdfbb 9110if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9111 ac_cv_lib_w_wctype=yes
9112else
81ecdfbb 9113 ac_cv_lib_w_wctype=no
bec39cab 9114fi
81ecdfbb
RW
9115rm -f core conftest.err conftest.$ac_objext \
9116 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9117LIBS=$ac_check_lib_save_LIBS
9118fi
81ecdfbb
RW
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9120$as_echo "$ac_cv_lib_w_wctype" >&6; }
9121if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9122 cat >>confdefs.h <<_ACEOF
9123#define HAVE_LIBW 1
9124_ACEOF
c906108c 9125
bec39cab 9126 LIBS="-lw $LIBS"
c906108c 9127
bec39cab 9128fi
c906108c 9129
bec39cab 9130fi
c906108c 9131
ddc9cd0f 9132
bec39cab 9133# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9135$as_echo_n "checking for library containing gethostbyname... " >&6; }
9136if test "${ac_cv_search_gethostbyname+set}" = set; then :
9137 $as_echo_n "(cached) " >&6
bec39cab
AC
9138else
9139 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9141/* end confdefs.h. */
ddc9cd0f 9142
81ecdfbb
RW
9143/* Override any GCC internal prototype to avoid an error.
9144 Use char because int might match the return type of a GCC
9145 builtin and then its argument prototype would still apply. */
bec39cab
AC
9146#ifdef __cplusplus
9147extern "C"
9148#endif
bec39cab
AC
9149char gethostbyname ();
9150int
9151main ()
9152{
81ecdfbb 9153return gethostbyname ();
bec39cab
AC
9154 ;
9155 return 0;
9156}
9157_ACEOF
81ecdfbb
RW
9158for ac_lib in '' nsl; do
9159 if test -z "$ac_lib"; then
9160 ac_res="none required"
9161 else
9162 ac_res=-l$ac_lib
b4e70030 9163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9164 fi
9165 if ac_fn_c_try_link "$LINENO"; then :
9166 ac_cv_search_gethostbyname=$ac_res
9167fi
9168rm -f core conftest.err conftest.$ac_objext \
9169 conftest$ac_exeext
9170 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9171 break
9172fi
9173done
9174if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9175
bec39cab 9176else
81ecdfbb 9177 ac_cv_search_gethostbyname=no
bec39cab 9178fi
81ecdfbb 9179rm conftest.$ac_ext
bec39cab
AC
9180LIBS=$ac_func_search_save_LIBS
9181fi
81ecdfbb
RW
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9183$as_echo "$ac_cv_search_gethostbyname" >&6; }
9184ac_res=$ac_cv_search_gethostbyname
9185if test "$ac_res" != no; then :
9186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9187
bec39cab 9188fi
96baa820 9189
c906108c 9190
b4e70030 9191# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9193$as_echo_n "checking for library containing socketpair... " >&6; }
9194if test "${ac_cv_search_socketpair+set}" = set; then :
9195 $as_echo_n "(cached) " >&6
b4e70030
JB
9196else
9197 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9199/* end confdefs.h. */
9200
81ecdfbb
RW
9201/* Override any GCC internal prototype to avoid an error.
9202 Use char because int might match the return type of a GCC
9203 builtin and then its argument prototype would still apply. */
b4e70030
JB
9204#ifdef __cplusplus
9205extern "C"
9206#endif
b4e70030
JB
9207char socketpair ();
9208int
9209main ()
9210{
81ecdfbb 9211return socketpair ();
b4e70030
JB
9212 ;
9213 return 0;
9214}
9215_ACEOF
81ecdfbb
RW
9216for ac_lib in '' socket; do
9217 if test -z "$ac_lib"; then
9218 ac_res="none required"
9219 else
9220 ac_res=-l$ac_lib
b4e70030 9221 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9222 fi
9223 if ac_fn_c_try_link "$LINENO"; then :
9224 ac_cv_search_socketpair=$ac_res
9225fi
9226rm -f core conftest.err conftest.$ac_objext \
9227 conftest$ac_exeext
9228 if test "${ac_cv_search_socketpair+set}" = set; then :
9229 break
9230fi
9231done
9232if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9233
b4e70030 9234else
81ecdfbb 9235 ac_cv_search_socketpair=no
b4e70030 9236fi
81ecdfbb 9237rm conftest.$ac_ext
b4e70030
JB
9238LIBS=$ac_func_search_save_LIBS
9239fi
81ecdfbb
RW
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9241$as_echo "$ac_cv_search_socketpair" >&6; }
9242ac_res=$ac_cv_search_socketpair
9243if test "$ac_res" != no; then :
9244 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9245
9246fi
9247
9248
233a11ab 9249# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9250
9251 # See if the user specified whether he wants zlib support or not.
9252
9253# Check whether --with-zlib was given.
9254if test "${with_zlib+set}" = set; then :
9255 withval=$with_zlib;
9256else
9257 with_zlib=auto
9258fi
9259
9260
9261 if test "$with_zlib" != "no"; then
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9263$as_echo_n "checking for library containing zlibVersion... " >&6; }
9264if test "${ac_cv_search_zlibVersion+set}" = set; then :
9265 $as_echo_n "(cached) " >&6
233a11ab
CS
9266else
9267 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9269/* end confdefs.h. */
9270
81ecdfbb
RW
9271/* Override any GCC internal prototype to avoid an error.
9272 Use char because int might match the return type of a GCC
233a11ab 9273 builtin and then its argument prototype would still apply. */
233a11ab
CS
9274#ifdef __cplusplus
9275extern "C"
9276#endif
233a11ab
CS
9277char zlibVersion ();
9278int
9279main ()
9280{
81ecdfbb 9281return zlibVersion ();
233a11ab
CS
9282 ;
9283 return 0;
9284}
9285_ACEOF
81ecdfbb
RW
9286for ac_lib in '' z; do
9287 if test -z "$ac_lib"; then
9288 ac_res="none required"
233a11ab 9289 else
81ecdfbb
RW
9290 ac_res=-l$ac_lib
9291 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9292 fi
81ecdfbb
RW
9293 if ac_fn_c_try_link "$LINENO"; then :
9294 ac_cv_search_zlibVersion=$ac_res
233a11ab 9295fi
81ecdfbb
RW
9296rm -f core conftest.err conftest.$ac_objext \
9297 conftest$ac_exeext
9298 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9299 break
233a11ab 9300fi
81ecdfbb
RW
9301done
9302if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9303
233a11ab 9304else
81ecdfbb 9305 ac_cv_search_zlibVersion=no
233a11ab 9306fi
81ecdfbb
RW
9307rm conftest.$ac_ext
9308LIBS=$ac_func_search_save_LIBS
233a11ab 9309fi
81ecdfbb
RW
9310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9311$as_echo "$ac_cv_search_zlibVersion" >&6; }
9312ac_res=$ac_cv_search_zlibVersion
9313if test "$ac_res" != no; then :
9314 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9315 for ac_header in zlib.h
9316do :
9317 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9318if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9319 cat >>confdefs.h <<_ACEOF
81ecdfbb 9320#define HAVE_ZLIB_H 1
233a11ab
CS
9321_ACEOF
9322
9323fi
9324
9325done
9326
9327fi
9328
b040ad30
JB
9329 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9330 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9331 fi
9332 fi
9333
233a11ab 9334
77f120bf 9335# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9337$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9338if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9339 $as_echo_n "(cached) " >&6
bec39cab
AC
9340else
9341 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9343/* end confdefs.h. */
c906108c 9344
81ecdfbb
RW
9345/* Override any GCC internal prototype to avoid an error.
9346 Use char because int might match the return type of a GCC
9347 builtin and then its argument prototype would still apply. */
bec39cab
AC
9348#ifdef __cplusplus
9349extern "C"
9350#endif
77f120bf 9351char dlgetmodinfo ();
bec39cab
AC
9352int
9353main ()
9354{
81ecdfbb 9355return dlgetmodinfo ();
bec39cab
AC
9356 ;
9357 return 0;
9358}
9359_ACEOF
81ecdfbb
RW
9360for ac_lib in '' dl xpdl; do
9361 if test -z "$ac_lib"; then
9362 ac_res="none required"
9363 else
9364 ac_res=-l$ac_lib
b4e70030 9365 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9366 fi
9367 if ac_fn_c_try_link "$LINENO"; then :
9368 ac_cv_search_dlgetmodinfo=$ac_res
9369fi
9370rm -f core conftest.err conftest.$ac_objext \
9371 conftest$ac_exeext
9372 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9373 break
9374fi
9375done
9376if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9377
4e8d927d 9378else
81ecdfbb 9379 ac_cv_search_dlgetmodinfo=no
1ba607ad 9380fi
81ecdfbb 9381rm conftest.$ac_ext
bec39cab
AC
9382LIBS=$ac_func_search_save_LIBS
9383fi
81ecdfbb
RW
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9385$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9386ac_res=$ac_cv_search_dlgetmodinfo
9387if test "$ac_res" != no; then :
9388 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9389
8bb2c122 9390fi
8bb2c122 9391
8bb2c122 9392
77f120bf 9393
77f120bf 9394
6c7a06a3 9395
81ecdfbb
RW
9396# Check whether --with-libiconv-prefix was given.
9397if test "${with_libiconv_prefix+set}" = set; then :
9398 withval=$with_libiconv_prefix;
6c7a06a3 9399 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9400 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9401 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9402 done
9403
81ecdfbb
RW
9404fi
9405
6c7a06a3 9406
f18c4681 9407 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9408 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9409
81ecdfbb
RW
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9411$as_echo_n "checking for iconv... " >&6; }
9412if test "${am_cv_func_iconv+set}" = set; then :
9413 $as_echo_n "(cached) " >&6
d542061a 9414else
6c7a06a3
TT
9415
9416 am_cv_func_iconv="no, consider installing GNU libiconv"
9417 am_cv_lib_iconv=no
9418 am_cv_use_build_libiconv=no
f0f20949 9419 am_cv_build_libiconv_path=
4edb1e84
JB
9420
9421 # If libiconv is part of the build tree, then try using it over
9422 # any system iconv.
9423 if test -d ../libiconv; then
f18c4681
JB
9424 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9425 am_save_LIBS="$LIBS"
9426 am_save_CPPFLAGS="$CPPFLAGS"
9427 LIBS="$LIBS $lib_dir/libiconv.a"
9428 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9430/* end confdefs.h. */
6c7a06a3
TT
9431#include <stdlib.h>
9432#include <iconv.h>
d542061a
UW
9433int
9434main ()
9435{
6c7a06a3 9436iconv_t cd = iconv_open("","");
f18c4681
JB
9437 iconv(cd,NULL,NULL,NULL,NULL);
9438 iconv_close(cd);
d542061a
UW
9439 ;
9440 return 0;
9441}
9442_ACEOF
81ecdfbb 9443if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9444 am_cv_use_build_libiconv=yes
f0f20949 9445 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9446 am_cv_lib_iconv=yes
9447 am_cv_func_iconv=yes
d542061a 9448fi
81ecdfbb
RW
9449rm -f core conftest.err conftest.$ac_objext \
9450 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9451 LIBS="$am_save_LIBS"
9452 CPPFLAGS="$am_save_CPPFLAGS"
9453 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9454 break
9455 fi
9456 done
4edb1e84 9457 fi
94ae1714 9458
4edb1e84 9459 # Next, try to find iconv in libc.
6c7a06a3 9460 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9462/* end confdefs.h. */
6c7a06a3
TT
9463#include <stdlib.h>
9464#include <iconv.h>
d542061a
UW
9465int
9466main ()
9467{
6c7a06a3
TT
9468iconv_t cd = iconv_open("","");
9469 iconv(cd,NULL,NULL,NULL,NULL);
9470 iconv_close(cd);
d542061a
UW
9471 ;
9472 return 0;
9473}
9474_ACEOF
81ecdfbb 9475if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9476 am_cv_func_iconv=yes
d542061a 9477fi
81ecdfbb
RW
9478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
77f120bf 9480 fi
94ae1714 9481
4edb1e84
JB
9482 # If iconv was not in libc, try -liconv. In this case, arrange to
9483 # look in the libiconv prefix, if it was specified by the user.
9484 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9485 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9486 am_save_LIBS="$LIBS"
9487 if test -n "$LIBICONV_INCLUDE"; then
9488 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9489 LIBS="$LIBS $LIBICONV_LIBDIR"
9490 fi
9491 LIBS="$LIBS -liconv"
81ecdfbb 9492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9493/* end confdefs.h. */
6c7a06a3
TT
9494#include <stdlib.h>
9495#include <iconv.h>
bec39cab
AC
9496int
9497main ()
9498{
6c7a06a3
TT
9499iconv_t cd = iconv_open("","");
9500 iconv(cd,NULL,NULL,NULL,NULL);
9501 iconv_close(cd);
bec39cab
AC
9502 ;
9503 return 0;
9504}
9505_ACEOF
81ecdfbb 9506if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9507 am_cv_lib_iconv=yes
6c7a06a3 9508 am_cv_func_iconv=yes
627af7ea 9509fi
81ecdfbb
RW
9510rm -f core conftest.err conftest.$ac_objext \
9511 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9512 LIBS="$am_save_LIBS"
fc3b640d 9513 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9514 fi
9515
9516fi
81ecdfbb
RW
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9518$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9519
9520 # Set the various flags based on the cache variables. We can't rely
9521 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9522 LIBICONV=
9523 if test "$am_cv_lib_iconv" = yes; then
9524 LIBICONV="-liconv"
94ae1714
TT
9525 else
9526 LIBICONV_LIBDIR=
9527 LIBICONV_INCLUDE=
fc3b640d
TT
9528 fi
9529 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9530 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9531 LIBICONV_LIBDIR=""
fc3b640d
TT
9532 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9533 fi
9534 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9535 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9536
6c7a06a3
TT
9537 if test "$am_cv_func_iconv" = yes; then
9538
81ecdfbb 9539$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9540
81ecdfbb
RW
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9542$as_echo_n "checking for iconv declaration... " >&6; }
9543 if test "${am_cv_proto_iconv+set}" = set; then :
9544 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9545else
9546
81ecdfbb 9547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9548/* end confdefs.h. */
9549
6c7a06a3
TT
9550#include <stdlib.h>
9551#include <iconv.h>
9552extern
b4e70030 9553#ifdef __cplusplus
6c7a06a3 9554"C"
b4e70030 9555#endif
6c7a06a3
TT
9556#if defined(__STDC__) || defined(__cplusplus)
9557size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9558#else
9559size_t iconv();
9560#endif
9561
b4e70030
JB
9562int
9563main ()
9564{
6c7a06a3 9565
b4e70030
JB
9566 ;
9567 return 0;
9568}
9569_ACEOF
81ecdfbb 9570if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9571 am_cv_proto_iconv_arg1=""
4e8d927d 9572else
81ecdfbb 9573 am_cv_proto_iconv_arg1="const"
b4e70030 9574fi
81ecdfbb 9575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9576 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);"
9577fi
9578
9579 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9581 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9582$as_echo "${ac_t:-
9583 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9584
9585cat >>confdefs.h <<_ACEOF
9586#define ICONV_CONST $am_cv_proto_iconv_arg1
9587_ACEOF
9588
9589 fi
6c7a06a3
TT
9590
9591
478aac75
DE
9592# GDB may fork/exec the iconv program to get the list of supported character
9593# sets. Allow the user to specify where to find it.
9594# There are several factors affecting the choice of option name:
9595# - There is already --with-libiconv-prefix but we can't use it, it specifies
9596# the build-time location of libiconv files.
9597# - The program we need to find is iconv, which comes with glibc. The user
9598# doesn't necessarily have libiconv installed. Therefore naming this
9599# --with-libiconv-foo feels wrong.
9600# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9601# defined to work on directories not files (though it really doesn't know
9602# the difference).
9603# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9604# with --with-libiconv-prefix.
9605# Putting these together is why the option name is --with-iconv-bin.
9606
9607
9608# Check whether --with-iconv-bin was given.
9609if test "${with_iconv_bin+set}" = set; then :
9610 withval=$with_iconv_bin; iconv_bin="${withval}"
9611
9612cat >>confdefs.h <<_ACEOF
9613#define ICONV_BIN "${iconv_bin}"
9614_ACEOF
9615
9616
9617 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9618 if test "x$prefix" = xNONE; then
9619 test_prefix=/usr/local
9620 else
9621 test_prefix=$prefix
9622 fi
9623 else
9624 test_prefix=$exec_prefix
9625 fi
9626 value=0
9627 case ${iconv_bin} in
9628 "${test_prefix}"|"${test_prefix}/"*|\
9629 '${exec_prefix}'|'${exec_prefix}/'*)
9630 value=1
9631 ;;
9632 esac
9633
9634cat >>confdefs.h <<_ACEOF
9635#define ICONV_BIN_RELOCATABLE $value
9636_ACEOF
9637
9638
9639
9640fi
9641
9642
6c7a06a3
TT
9643# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9644# There is a very specific comment in /usr/include/curses.h explaining that
9645# termcap routines built into libcurses must not be used.
9646#
9647# The symptoms we observed so far is GDB unexpectedly changing
9648# the terminal settings when tgetent is called - this is particularly
9649# visible as the output is missing carriage returns, and so rapidly
9650# becomes very hard to read.
9651#
9652# The readline configure script has already decided that libtermcap
9653# was enough for its purposes, and so decided to build readline using
9654# libtermcap. Since the TUI mode requires curses, building GDB with
9655# TUI enabled results in both libraries to be used at the same time,
9656# which is not allowed. This basically means that GDB with TUI is
9657# broken on alpha-osf.
9658
9659case $host_os in
6bcc772d
RO
9660 osf* )
9661 if test x"$enable_tui" = xyes; then
81ecdfbb 9662 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9663 fi
6bcc772d 9664 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9665 enable_tui=no
9666 fi
9667 ;;
9668esac
9669
cb01cfba 9670# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9671if test x"$enable_tui" != xno; then
cb01cfba
JB
9672 prefer_curses=yes
9673fi
9674
9675curses_found=no
9676if test x"$prefer_curses" = xyes; then
9677 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9678 # curses library because the latter might not provide all the
9679 # functionality we need. However, this leads to problems on systems
9680 # where the linker searches /usr/local/lib, but the compiler doesn't
9681 # search /usr/local/include, if ncurses is installed in /usr/local. A
9682 # default installation of ncurses on alpha*-dec-osf* will lead to such
9683 # a situation.
81ecdfbb
RW
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9685$as_echo_n "checking for library containing waddstr... " >&6; }
9686if test "${ac_cv_search_waddstr+set}" = set; then :
9687 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9688else
9689 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9691/* end confdefs.h. */
9692
81ecdfbb
RW
9693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9696#ifdef __cplusplus
9697extern "C"
9698#endif
6c7a06a3
TT
9699char waddstr ();
9700int
9701main ()
9702{
81ecdfbb 9703return waddstr ();
6c7a06a3
TT
9704 ;
9705 return 0;
9706}
9707_ACEOF
81ecdfbb
RW
9708for ac_lib in '' ncurses cursesX curses; do
9709 if test -z "$ac_lib"; then
9710 ac_res="none required"
9711 else
9712 ac_res=-l$ac_lib
9713 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9714 fi
9715 if ac_fn_c_try_link "$LINENO"; then :
9716 ac_cv_search_waddstr=$ac_res
9717fi
9718rm -f core conftest.err conftest.$ac_objext \
9719 conftest$ac_exeext
9720 if test "${ac_cv_search_waddstr+set}" = set; then :
9721 break
9722fi
9723done
9724if test "${ac_cv_search_waddstr+set}" = set; then :
9725
6c7a06a3 9726else
81ecdfbb
RW
9727 ac_cv_search_waddstr=no
9728fi
9729rm conftest.$ac_ext
9730LIBS=$ac_func_search_save_LIBS
9731fi
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9733$as_echo "$ac_cv_search_waddstr" >&6; }
9734ac_res=$ac_cv_search_waddstr
9735if test "$ac_res" != no; then :
9736 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9737
9738fi
9739
9740
cb01cfba
JB
9741 if test "$ac_cv_search_waddstr" != no; then
9742 curses_found=yes
9743 fi
9744fi
9745
9746# Check whether we should enable the TUI, but only do so if we really
9747# can.
9748if test x"$enable_tui" != xno; then
9749 if test -d $srcdir/tui; then
9750 if test "$curses_found" != no; then
6c7a06a3
TT
9751 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9752 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9753 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9754 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9755 else
9756 if test x"$enable_tui" = xyes; then
81ecdfbb 9757 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9758 else
81ecdfbb
RW
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9760$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9761 fi
9762 fi
9763 fi
9764fi
9765
9766# Since GDB uses Readline, we need termcap functionality. In many
9767# cases this will be provided by the curses library, but some systems
9768# have a seperate termcap library, or no curses library at all.
9769
9770case $host_os in
9771 cygwin*)
9772 if test -d $srcdir/libtermcap; then
9773 LIBS="../libtermcap/libtermcap.a $LIBS"
9774 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9775 fi ;;
9776 go32* | *djgpp*)
9777 ac_cv_search_tgetent="none required"
9778 ;;
9779 *mingw32*)
9780 ac_cv_search_tgetent="none required"
9781 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9782 ;;
9783esac
9784
9785# These are the libraries checked by Readline.
81ecdfbb
RW
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9787$as_echo_n "checking for library containing tgetent... " >&6; }
9788if test "${ac_cv_search_tgetent+set}" = set; then :
9789 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9790else
9791 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9793/* end confdefs.h. */
9794
81ecdfbb
RW
9795/* Override any GCC internal prototype to avoid an error.
9796 Use char because int might match the return type of a GCC
9797 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9798#ifdef __cplusplus
9799extern "C"
9800#endif
6c7a06a3
TT
9801char tgetent ();
9802int
9803main ()
9804{
81ecdfbb 9805return tgetent ();
6c7a06a3
TT
9806 ;
9807 return 0;
9808}
9809_ACEOF
81ecdfbb
RW
9810for ac_lib in '' termcap tinfo curses ncurses; do
9811 if test -z "$ac_lib"; then
9812 ac_res="none required"
9813 else
9814 ac_res=-l$ac_lib
6c7a06a3 9815 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9816 fi
9817 if ac_fn_c_try_link "$LINENO"; then :
9818 ac_cv_search_tgetent=$ac_res
9819fi
9820rm -f core conftest.err conftest.$ac_objext \
9821 conftest$ac_exeext
9822 if test "${ac_cv_search_tgetent+set}" = set; then :
9823 break
9824fi
9825done
9826if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9827
6c7a06a3 9828else
81ecdfbb 9829 ac_cv_search_tgetent=no
6c7a06a3 9830fi
81ecdfbb 9831rm conftest.$ac_ext
6c7a06a3
TT
9832LIBS=$ac_func_search_save_LIBS
9833fi
81ecdfbb
RW
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9835$as_echo "$ac_cv_search_tgetent" >&6; }
9836ac_res=$ac_cv_search_tgetent
9837if test "$ac_res" != no; then :
9838 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9839
06825bd1
MK
9840fi
9841
06825bd1 9842
bec39cab 9843if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9844 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9845fi
9846
3841debe 9847
81ecdfbb
RW
9848# Check whether --with-system-readline was given.
9849if test "${with_system_readline+set}" = set; then :
9850 withval=$with_system_readline;
9851fi
6a30b0a5 9852
6a30b0a5
AS
9853
9854if test "$with_system_readline" = yes; then
9855 READLINE=-lreadline
9856 READLINE_DEPS=
9857 READLINE_CFLAGS=
39037522 9858 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9859else
9860 READLINE='$(READLINE_DIR)/libreadline.a'
9861 READLINE_DEPS='$(READLINE)'
9862 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9863 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9864fi
9865
9866
9867
9868
9869
f997c383
SD
9870# Generate jit-reader.h
9871
9872# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9873TARGET_PTR=
9874
9875# The cast to long int works around a bug in the HP C Compiler
9876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9878# This bug is HP SR number 8606223364.
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9880$as_echo_n "checking size of unsigned long long... " >&6; }
9881if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9882 $as_echo_n "(cached) " >&6
9883else
9884 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9885
9886else
9887 if test "$ac_cv_type_unsigned_long_long" = yes; then
9888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9890{ as_fn_set_status 77
9891as_fn_error "cannot compute sizeof (unsigned long long)
9892See \`config.log' for more details." "$LINENO" 5; }; }
9893 else
9894 ac_cv_sizeof_unsigned_long_long=0
9895 fi
9896fi
9897
9898fi
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9900$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9901
9902
9903
9904cat >>confdefs.h <<_ACEOF
9905#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9906_ACEOF
9907
9908
9909# The cast to long int works around a bug in the HP C Compiler
9910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9912# This bug is HP SR number 8606223364.
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9914$as_echo_n "checking size of unsigned long... " >&6; }
9915if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9916 $as_echo_n "(cached) " >&6
9917else
9918 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9919
9920else
9921 if test "$ac_cv_type_unsigned_long" = yes; then
9922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9924{ as_fn_set_status 77
9925as_fn_error "cannot compute sizeof (unsigned long)
9926See \`config.log' for more details." "$LINENO" 5; }; }
9927 else
9928 ac_cv_sizeof_unsigned_long=0
9929 fi
9930fi
9931
9932fi
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9934$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9935
9936
9937
9938cat >>confdefs.h <<_ACEOF
9939#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9940_ACEOF
9941
9942
9943# The cast to long int works around a bug in the HP C Compiler
9944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9946# This bug is HP SR number 8606223364.
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9948$as_echo_n "checking size of unsigned __int128... " >&6; }
9949if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9950 $as_echo_n "(cached) " >&6
9951else
9952 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9953
9954else
9955 if test "$ac_cv_type_unsigned___int128" = yes; then
9956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9958{ as_fn_set_status 77
9959as_fn_error "cannot compute sizeof (unsigned __int128)
9960See \`config.log' for more details." "$LINENO" 5; }; }
9961 else
9962 ac_cv_sizeof_unsigned___int128=0
9963 fi
9964fi
9965
9966fi
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9968$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9969
9970
9971
9972cat >>confdefs.h <<_ACEOF
9973#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9974_ACEOF
9975
9976
9977
9978if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9979 TARGET_PTR="unsigned long"
9980elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9981 TARGET_PTR="unsigned long long"
9982elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9983 TARGET_PTR="unsigned __int128"
9984else
9985 TARGET_PTR="unsigned long"
9986fi
9987
9988
9989ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9990
9991
a2d08b9e
SD
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9993$as_echo_n "checking for library containing dlopen... " >&6; }
9994if test "${ac_cv_search_dlopen+set}" = set; then :
9995 $as_echo_n "(cached) " >&6
9996else
9997 ac_func_search_save_LIBS=$LIBS
9998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9999/* end confdefs.h. */
10000
10001/* Override any GCC internal prototype to avoid an error.
10002 Use char because int might match the return type of a GCC
10003 builtin and then its argument prototype would still apply. */
10004#ifdef __cplusplus
10005extern "C"
10006#endif
10007char dlopen ();
10008int
10009main ()
10010{
10011return dlopen ();
10012 ;
10013 return 0;
10014}
10015_ACEOF
10016for ac_lib in '' dl; do
10017 if test -z "$ac_lib"; then
10018 ac_res="none required"
10019 else
10020 ac_res=-l$ac_lib
10021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10022 fi
10023 if ac_fn_c_try_link "$LINENO"; then :
10024 ac_cv_search_dlopen=$ac_res
10025fi
10026rm -f core conftest.err conftest.$ac_objext \
10027 conftest$ac_exeext
10028 if test "${ac_cv_search_dlopen+set}" = set; then :
10029 break
10030fi
10031done
10032if test "${ac_cv_search_dlopen+set}" = set; then :
10033
10034else
10035 ac_cv_search_dlopen=no
10036fi
10037rm conftest.$ac_ext
10038LIBS=$ac_func_search_save_LIBS
10039fi
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10041$as_echo "$ac_cv_search_dlopen" >&6; }
10042ac_res=$ac_cv_search_dlopen
10043if test "$ac_res" != no; then :
10044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10045
10046fi
10047
10048
39037522 10049
b8e0a31c
SD
10050
10051# Check whether --with-jit-reader-dir was given.
10052if test "${with_jit_reader_dir+set}" = set; then :
10053 withval=$with_jit_reader_dir;
10054 JIT_READER_DIR=$withval
10055else
10056 JIT_READER_DIR=${libdir}/gdb
10057fi
10058
10059
10060 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10061 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10062 ac_define_dir=`eval echo $JIT_READER_DIR`
10063 ac_define_dir=`eval echo $ac_define_dir`
10064
10065cat >>confdefs.h <<_ACEOF
10066#define JIT_READER_DIR "$ac_define_dir"
10067_ACEOF
10068
10069
10070
10071
10072 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10073 if test "x$prefix" = xNONE; then
10074 test_prefix=/usr/local
10075 else
10076 test_prefix=$prefix
10077 fi
10078 else
10079 test_prefix=$exec_prefix
10080 fi
10081 value=0
10082 case ${ac_define_dir} in
10083 "${test_prefix}"|"${test_prefix}/"*|\
10084 '${exec_prefix}'|'${exec_prefix}/'*)
10085 value=1
10086 ;;
10087 esac
10088
10089cat >>confdefs.h <<_ACEOF
10090#define JIT_READER_DIR_RELOCATABLE $value
10091_ACEOF
10092
10093
10094
10095
10096
81ecdfbb
RW
10097# Check whether --with-expat was given.
10098if test "${with_expat+set}" = set; then :
10099 withval=$with_expat;
5c39566f
DJ
10100else
10101 with_expat=auto
81ecdfbb
RW
10102fi
10103
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
10105$as_echo_n "checking whether to use expat... " >&6; }
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
10107$as_echo "$with_expat" >&6; }
5c39566f
DJ
10108
10109if test "${with_expat}" = no; then
81ecdfbb
RW
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
10111$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
10112 HAVE_LIBEXPAT=no
10113else
10114
3841debe
DJ
10115 if test "X$prefix" = "XNONE"; then
10116 acl_final_prefix="$ac_default_prefix"
10117 else
10118 acl_final_prefix="$prefix"
10119 fi
10120 if test "X$exec_prefix" = "XNONE"; then
10121 acl_final_exec_prefix='${prefix}'
10122 else
10123 acl_final_exec_prefix="$exec_prefix"
10124 fi
10125 acl_save_prefix="$prefix"
10126 prefix="$acl_final_prefix"
10127 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10128 prefix="$acl_save_prefix"
10129
10130
81ecdfbb
RW
10131# Check whether --with-gnu-ld was given.
10132if test "${with_gnu_ld+set}" = set; then :
10133 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
10134else
10135 with_gnu_ld=no
81ecdfbb
RW
10136fi
10137
3841debe
DJ
10138# Prepare PATH_SEPARATOR.
10139# The user is always right.
10140if test "${PATH_SEPARATOR+set}" != set; then
10141 echo "#! /bin/sh" >conf$$.sh
10142 echo "exit 0" >>conf$$.sh
10143 chmod +x conf$$.sh
10144 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10145 PATH_SEPARATOR=';'
10146 else
10147 PATH_SEPARATOR=:
10148 fi
10149 rm -f conf$$.sh
10150fi
10151ac_prog=ld
10152if test "$GCC" = yes; then
10153 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
10155$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
10156 case $host in
10157 *-*-mingw*)
10158 # gcc leaves a trailing carriage return which upsets mingw
10159 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10160 *)
10161 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10162 esac
10163 case $ac_prog in
10164 # Accept absolute paths.
10165 [\\/]* | [A-Za-z]:[\\/]*)
10166 re_direlt='/[^/][^/]*/\.\./'
10167 # Canonicalize the path of ld
10168 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10169 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10170 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10171 done
10172 test -z "$LD" && LD="$ac_prog"
10173 ;;
10174 "")
10175 # If it fails, then pretend we aren't using GCC.
10176 ac_prog=ld
10177 ;;
10178 *)
10179 # If it is relative, then search for the first ld in PATH.
10180 with_gnu_ld=unknown
10181 ;;
10182 esac
10183elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10185$as_echo_n "checking for GNU ld... " >&6; }
3841debe 10186else
81ecdfbb
RW
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10188$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 10189fi
81ecdfbb
RW
10190if test "${acl_cv_path_LD+set}" = set; then :
10191 $as_echo_n "(cached) " >&6
3841debe
DJ
10192else
10193 if test -z "$LD"; then
10194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10195 for ac_dir in $PATH; do
10196 test -z "$ac_dir" && ac_dir=.
10197 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10198 acl_cv_path_LD="$ac_dir/$ac_prog"
10199 # Check to see if the program is GNU ld. I'd rather use --version,
10200 # but apparently some GNU ld's only accept -v.
10201 # Break only if it was the GNU/non-GNU ld that we prefer.
10202 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10203 test "$with_gnu_ld" != no && break
10204 else
10205 test "$with_gnu_ld" != yes && break
10206 fi
10207 fi
10208 done
10209 IFS="$ac_save_ifs"
10210else
10211 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10212fi
10213fi
10214
10215LD="$acl_cv_path_LD"
10216if test -n "$LD"; then
81ecdfbb
RW
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10218$as_echo "$LD" >&6; }
3841debe 10219else
81ecdfbb
RW
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
3841debe 10222fi
81ecdfbb
RW
10223test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10225$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10226if test "${acl_cv_prog_gnu_ld+set}" = set; then :
10227 $as_echo_n "(cached) " >&6
3841debe
DJ
10228else
10229 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10230if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10231 acl_cv_prog_gnu_ld=yes
10232else
10233 acl_cv_prog_gnu_ld=no
10234fi
10235fi
81ecdfbb
RW
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10237$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
10238with_gnu_ld=$acl_cv_prog_gnu_ld
10239
10240
10241
81ecdfbb
RW
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10243$as_echo_n "checking for shared library run path origin... " >&6; }
10244if test "${acl_cv_rpath+set}" = set; then :
10245 $as_echo_n "(cached) " >&6
3841debe
DJ
10246else
10247
10248 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10249 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10250 . ./conftest.sh
10251 rm -f ./conftest.sh
10252 acl_cv_rpath=done
10253
10254fi
81ecdfbb
RW
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10256$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
10257 wl="$acl_cv_wl"
10258 libext="$acl_cv_libext"
10259 shlibext="$acl_cv_shlibext"
10260 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10261 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10262 hardcode_direct="$acl_cv_hardcode_direct"
10263 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
10264 # Check whether --enable-rpath was given.
10265if test "${enable_rpath+set}" = set; then :
10266 enableval=$enable_rpath; :
3841debe
DJ
10267else
10268 enable_rpath=yes
81ecdfbb
RW
10269fi
10270
3841debe
DJ
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280 use_additional=yes
10281
10282 acl_save_prefix="$prefix"
10283 prefix="$acl_final_prefix"
10284 acl_save_exec_prefix="$exec_prefix"
10285 exec_prefix="$acl_final_exec_prefix"
10286
10287 eval additional_includedir=\"$includedir\"
10288 eval additional_libdir=\"$libdir\"
10289
10290 exec_prefix="$acl_save_exec_prefix"
10291 prefix="$acl_save_prefix"
10292
10293
81ecdfbb
RW
10294# Check whether --with-libexpat-prefix was given.
10295if test "${with_libexpat_prefix+set}" = set; then :
10296 withval=$with_libexpat_prefix;
3841debe
DJ
10297 if test "X$withval" = "Xno"; then
10298 use_additional=no
10299 else
10300 if test "X$withval" = "X"; then
10301
10302 acl_save_prefix="$prefix"
10303 prefix="$acl_final_prefix"
10304 acl_save_exec_prefix="$exec_prefix"
10305 exec_prefix="$acl_final_exec_prefix"
10306
10307 eval additional_includedir=\"$includedir\"
10308 eval additional_libdir=\"$libdir\"
10309
10310 exec_prefix="$acl_save_exec_prefix"
10311 prefix="$acl_save_prefix"
10312
10313 else
10314 additional_includedir="$withval/include"
10315 additional_libdir="$withval/lib"
10316 fi
10317 fi
10318
81ecdfbb
RW
10319fi
10320
3841debe
DJ
10321 LIBEXPAT=
10322 LTLIBEXPAT=
10323 INCEXPAT=
10324 rpathdirs=
10325 ltrpathdirs=
10326 names_already_handled=
10327 names_next_round='expat '
10328 while test -n "$names_next_round"; do
10329 names_this_round="$names_next_round"
10330 names_next_round=
10331 for name in $names_this_round; do
10332 already_handled=
10333 for n in $names_already_handled; do
10334 if test "$n" = "$name"; then
10335 already_handled=yes
10336 break
10337 fi
10338 done
10339 if test -z "$already_handled"; then
10340 names_already_handled="$names_already_handled $name"
10341 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10342 eval value=\"\$HAVE_LIB$uppername\"
10343 if test -n "$value"; then
10344 if test "$value" = yes; then
10345 eval value=\"\$LIB$uppername\"
10346 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10347 eval value=\"\$LTLIB$uppername\"
10348 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10349 else
10350 :
10351 fi
10352 else
10353 found_dir=
10354 found_la=
10355 found_so=
10356 found_a=
10357 if test $use_additional = yes; then
10358 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10359 found_dir="$additional_libdir"
10360 found_so="$additional_libdir/lib$name.$shlibext"
10361 if test -f "$additional_libdir/lib$name.la"; then
10362 found_la="$additional_libdir/lib$name.la"
10363 fi
10364 else
10365 if test -f "$additional_libdir/lib$name.$libext"; then
10366 found_dir="$additional_libdir"
10367 found_a="$additional_libdir/lib$name.$libext"
10368 if test -f "$additional_libdir/lib$name.la"; then
10369 found_la="$additional_libdir/lib$name.la"
10370 fi
10371 fi
10372 fi
10373 fi
10374 if test "X$found_dir" = "X"; then
10375 for x in $LDFLAGS $LTLIBEXPAT; do
10376
10377 acl_save_prefix="$prefix"
10378 prefix="$acl_final_prefix"
10379 acl_save_exec_prefix="$exec_prefix"
10380 exec_prefix="$acl_final_exec_prefix"
10381 eval x=\"$x\"
10382 exec_prefix="$acl_save_exec_prefix"
10383 prefix="$acl_save_prefix"
10384
10385 case "$x" in
10386 -L*)
10387 dir=`echo "X$x" | sed -e 's/^X-L//'`
10388 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10389 found_dir="$dir"
10390 found_so="$dir/lib$name.$shlibext"
10391 if test -f "$dir/lib$name.la"; then
10392 found_la="$dir/lib$name.la"
10393 fi
10394 else
10395 if test -f "$dir/lib$name.$libext"; then
10396 found_dir="$dir"
10397 found_a="$dir/lib$name.$libext"
10398 if test -f "$dir/lib$name.la"; then
10399 found_la="$dir/lib$name.la"
10400 fi
10401 fi
10402 fi
10403 ;;
10404 esac
10405 if test "X$found_dir" != "X"; then
10406 break
10407 fi
10408 done
10409 fi
10410 if test "X$found_dir" != "X"; then
10411 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10412 if test "X$found_so" != "X"; then
10413 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10414 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10415 else
10416 haveit=
10417 for x in $ltrpathdirs; do
10418 if test "X$x" = "X$found_dir"; then
10419 haveit=yes
10420 break
10421 fi
10422 done
10423 if test -z "$haveit"; then
10424 ltrpathdirs="$ltrpathdirs $found_dir"
10425 fi
10426 if test "$hardcode_direct" = yes; then
10427 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10428 else
10429 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10430 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10431 haveit=
10432 for x in $rpathdirs; do
10433 if test "X$x" = "X$found_dir"; then
10434 haveit=yes
10435 break
10436 fi
10437 done
10438 if test -z "$haveit"; then
10439 rpathdirs="$rpathdirs $found_dir"
10440 fi
10441 else
10442 haveit=
10443 for x in $LDFLAGS $LIBEXPAT; do
10444
10445 acl_save_prefix="$prefix"
10446 prefix="$acl_final_prefix"
10447 acl_save_exec_prefix="$exec_prefix"
10448 exec_prefix="$acl_final_exec_prefix"
10449 eval x=\"$x\"
10450 exec_prefix="$acl_save_exec_prefix"
10451 prefix="$acl_save_prefix"
10452
10453 if test "X$x" = "X-L$found_dir"; then
10454 haveit=yes
10455 break
10456 fi
10457 done
10458 if test -z "$haveit"; then
10459 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10460 fi
10461 if test "$hardcode_minus_L" != no; then
10462 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10463 else
10464 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10465 fi
10466 fi
10467 fi
10468 fi
10469 else
10470 if test "X$found_a" != "X"; then
10471 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10472 else
10473 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10474 fi
10475 fi
10476 additional_includedir=
10477 case "$found_dir" in
10478 */lib | */lib/)
10479 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10480 additional_includedir="$basedir/include"
10481 ;;
10482 esac
10483 if test "X$additional_includedir" != "X"; then
10484 if test "X$additional_includedir" != "X/usr/include"; then
10485 haveit=
10486 if test "X$additional_includedir" = "X/usr/local/include"; then
10487 if test -n "$GCC"; then
10488 case $host_os in
10489 linux*) haveit=yes;;
10490 esac
10491 fi
10492 fi
10493 if test -z "$haveit"; then
10494 for x in $CPPFLAGS $INCEXPAT; do
10495
10496 acl_save_prefix="$prefix"
10497 prefix="$acl_final_prefix"
10498 acl_save_exec_prefix="$exec_prefix"
10499 exec_prefix="$acl_final_exec_prefix"
10500 eval x=\"$x\"
10501 exec_prefix="$acl_save_exec_prefix"
10502 prefix="$acl_save_prefix"
10503
10504 if test "X$x" = "X-I$additional_includedir"; then
10505 haveit=yes
10506 break
10507 fi
10508 done
10509 if test -z "$haveit"; then
10510 if test -d "$additional_includedir"; then
10511 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10512 fi
10513 fi
10514 fi
10515 fi
10516 fi
10517 if test -n "$found_la"; then
10518 save_libdir="$libdir"
10519 case "$found_la" in
10520 */* | *\\*) . "$found_la" ;;
10521 *) . "./$found_la" ;;
10522 esac
10523 libdir="$save_libdir"
10524 for dep in $dependency_libs; do
10525 case "$dep" in
10526 -L*)
10527 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10528 if test "X$additional_libdir" != "X/usr/lib"; then
10529 haveit=
10530 if test "X$additional_libdir" = "X/usr/local/lib"; then
10531 if test -n "$GCC"; then
10532 case $host_os in
10533 linux*) haveit=yes;;
10534 esac
10535 fi
10536 fi
10537 if test -z "$haveit"; then
10538 haveit=
10539 for x in $LDFLAGS $LIBEXPAT; do
10540
10541 acl_save_prefix="$prefix"
10542 prefix="$acl_final_prefix"
10543 acl_save_exec_prefix="$exec_prefix"
10544 exec_prefix="$acl_final_exec_prefix"
10545 eval x=\"$x\"
10546 exec_prefix="$acl_save_exec_prefix"
10547 prefix="$acl_save_prefix"
10548
10549 if test "X$x" = "X-L$additional_libdir"; then
10550 haveit=yes
10551 break
10552 fi
10553 done
10554 if test -z "$haveit"; then
10555 if test -d "$additional_libdir"; then
10556 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10557 fi
10558 fi
10559 haveit=
10560 for x in $LDFLAGS $LTLIBEXPAT; do
10561
10562 acl_save_prefix="$prefix"
10563 prefix="$acl_final_prefix"
10564 acl_save_exec_prefix="$exec_prefix"
10565 exec_prefix="$acl_final_exec_prefix"
10566 eval x=\"$x\"
10567 exec_prefix="$acl_save_exec_prefix"
10568 prefix="$acl_save_prefix"
10569
10570 if test "X$x" = "X-L$additional_libdir"; then
10571 haveit=yes
10572 break
10573 fi
10574 done
10575 if test -z "$haveit"; then
10576 if test -d "$additional_libdir"; then
10577 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10578 fi
10579 fi
10580 fi
10581 fi
10582 ;;
10583 -R*)
10584 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10585 if test "$enable_rpath" != no; then
10586 haveit=
10587 for x in $rpathdirs; do
10588 if test "X$x" = "X$dir"; then
10589 haveit=yes
10590 break
10591 fi
10592 done
10593 if test -z "$haveit"; then
10594 rpathdirs="$rpathdirs $dir"
10595 fi
10596 haveit=
10597 for x in $ltrpathdirs; do
10598 if test "X$x" = "X$dir"; then
10599 haveit=yes
10600 break
10601 fi
10602 done
10603 if test -z "$haveit"; then
10604 ltrpathdirs="$ltrpathdirs $dir"
10605 fi
10606 fi
10607 ;;
10608 -l*)
10609 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10610 ;;
10611 *.la)
10612 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10613 ;;
10614 *)
10615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10616 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10617 ;;
81ecdfbb
RW
10618 esac
10619 done
10620 fi
10621 else
10622 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10623 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10624 fi
10625 fi
10626 fi
10627 done
10628 done
10629 if test "X$rpathdirs" != "X"; then
10630 if test -n "$hardcode_libdir_separator"; then
10631 alldirs=
10632 for found_dir in $rpathdirs; do
10633 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10634 done
10635 acl_save_libdir="$libdir"
10636 libdir="$alldirs"
10637 eval flag=\"$hardcode_libdir_flag_spec\"
10638 libdir="$acl_save_libdir"
10639 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10640 else
10641 for found_dir in $rpathdirs; do
10642 acl_save_libdir="$libdir"
10643 libdir="$found_dir"
10644 eval flag=\"$hardcode_libdir_flag_spec\"
10645 libdir="$acl_save_libdir"
10646 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10647 done
10648 fi
10649 fi
10650 if test "X$ltrpathdirs" != "X"; then
10651 for found_dir in $ltrpathdirs; do
10652 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10653 done
10654 fi
a9322a30
TT
10655
10656
81ecdfbb 10657 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10658
81ecdfbb
RW
10659 for element in $INCEXPAT; do
10660 haveit=
10661 for x in $CPPFLAGS; do
a9322a30 10662
81ecdfbb
RW
10663 acl_save_prefix="$prefix"
10664 prefix="$acl_final_prefix"
10665 acl_save_exec_prefix="$exec_prefix"
10666 exec_prefix="$acl_final_exec_prefix"
10667 eval x=\"$x\"
10668 exec_prefix="$acl_save_exec_prefix"
10669 prefix="$acl_save_prefix"
a8111142 10670
81ecdfbb
RW
10671 if test "X$x" = "X$element"; then
10672 haveit=yes
10673 break
10674 fi
10675 done
10676 if test -z "$haveit"; then
10677 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10678 fi
10679 done
a9322a30
TT
10680
10681
81ecdfbb
RW
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10683$as_echo_n "checking for libexpat... " >&6; }
10684if test "${ac_cv_libexpat+set}" = set; then :
10685 $as_echo_n "(cached) " >&6
bec39cab 10686else
bec39cab 10687
81ecdfbb
RW
10688 ac_save_LIBS="$LIBS"
10689 LIBS="$LIBS $LIBEXPAT"
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10691/* end confdefs.h. */
81ecdfbb
RW
10692#include "expat.h"
10693int
10694main ()
10695{
10696XML_Parser p = XML_ParserCreate (0);
10697 ;
10698 return 0;
10699}
bec39cab 10700_ACEOF
81ecdfbb
RW
10701if ac_fn_c_try_link "$LINENO"; then :
10702 ac_cv_libexpat=yes
c906108c 10703else
81ecdfbb 10704 ac_cv_libexpat=no
bec39cab 10705fi
81ecdfbb
RW
10706rm -f core conftest.err conftest.$ac_objext \
10707 conftest$ac_exeext conftest.$ac_ext
10708 LIBS="$ac_save_LIBS"
c906108c 10709
95ca63c4 10710fi
81ecdfbb
RW
10711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10712$as_echo "$ac_cv_libexpat" >&6; }
10713 if test "$ac_cv_libexpat" = yes; then
10714 HAVE_LIBEXPAT=yes
bec39cab 10715
81ecdfbb 10716$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10717
81ecdfbb
RW
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10719$as_echo_n "checking how to link with libexpat... " >&6; }
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10721$as_echo "$LIBEXPAT" >&6; }
10722 else
10723 HAVE_LIBEXPAT=no
10724 CPPFLAGS="$ac_save_CPPFLAGS"
10725 LIBEXPAT=
10726 LTLIBEXPAT=
10727 fi
95ca63c4
CF
10728
10729
10730
7cb9022a
MK
10731
10732
bec39cab 10733
81ecdfbb
RW
10734 if test "$HAVE_LIBEXPAT" != yes; then
10735 if test "$with_expat" = yes; then
10736 as_fn_error "expat is missing or unusable" "$LINENO" 5
10737 else
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10739$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10740 fi
10741 else
10742 save_LIBS=$LIBS
10743 LIBS="$LIBS $LIBEXPAT"
10744 for ac_func in XML_StopParser
10745do :
10746 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10747if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10748 cat >>confdefs.h <<_ACEOF
81ecdfbb 10749#define HAVE_XML_STOPPARSER 1
bec39cab 10750_ACEOF
95ca63c4 10751
bec39cab 10752fi
bec39cab 10753done
95ca63c4 10754
81ecdfbb
RW
10755 LIBS=$save_LIBS
10756 fi
a9322a30
TT
10757fi
10758
a9322a30 10759
a9322a30
TT
10760
10761
ec685c5e 10762
0c4a4063 10763
81ecdfbb
RW
10764# Check whether --with-python was given.
10765if test "${with_python+set}" = set; then :
10766 withval=$with_python;
bec39cab 10767else
81ecdfbb 10768 with_python=auto
bec39cab 10769fi
bec39cab 10770
81ecdfbb
RW
10771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10772$as_echo_n "checking whether to use python... " >&6; }
10773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10774$as_echo "$with_python" >&6; }
9a156167 10775
81ecdfbb
RW
10776if test "${with_python}" = no; then
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10778$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10779 have_libpython=no
bec39cab 10780else
81ecdfbb 10781 case "${with_python}" in
8c85a4e2 10782 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10783 if test -d ${with_python}; then
10784 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10785 python_prog="${with_python}/bin/python"
0c4a4063 10786 python_prefix=
9c4ea6c5
JB
10787 # If python does not exit ${with_python}/bin, then try in
10788 # ${with_python}. On Windows/MinGW, this is where the Python
10789 # executable is.
10790 if test ! -x "${python_prog}"; then
10791 python_prog="${with_python}/python"
10792 python_prefix=
10793 fi
e7a30f46 10794 if test ! -x "${python_prog}"; then
ec685c5e
DE
10795 # Fall back to gdb 7.0/7.1 behaviour.
10796 python_prog=missing
0c4a4063 10797 python_prefix=${with_python}
ec685c5e 10798 fi
e7a30f46 10799 elif test -x "${with_python}"; then
ec685c5e
DE
10800 # While we can't run python compiled for $host (unless host == build),
10801 # the user could write a script that provides the needed information,
10802 # so we support that.
ec685c5e 10803 python_prog=${with_python}
0c4a4063 10804 python_prefix=
ec685c5e
DE
10805 else
10806 as_fn_error "invalid value for --with-python" "$LINENO" 5
10807 fi
81ecdfbb 10808 ;;
ec685c5e
DE
10809 */*)
10810 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10811 as_fn_error "invalid value for --with-python" "$LINENO" 5
10812 ;;
ec685c5e
DE
10813 *)
10814 # The user has either specified auto, yes, or the name of the python
10815 # program assumed to be in $PATH.
10816 python_prefix=
10817 case "${with_python}" in
10818 yes | auto)
10819 if test ${build} = ${host}; then
10820 # Extract the first word of "python", so it can be a program name with args.
10821set dummy python; ac_word=$2
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10823$as_echo_n "checking for $ac_word... " >&6; }
10824if test "${ac_cv_path_python_prog_path+set}" = set; then :
10825 $as_echo_n "(cached) " >&6
10826else
10827 case $python_prog_path in
10828 [\\/]* | ?:[\\/]*)
10829 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10830 ;;
10831 *)
10832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10833for as_dir in $PATH
10834do
10835 IFS=$as_save_IFS
10836 test -z "$as_dir" && as_dir=.
10837 for ac_exec_ext in '' $ac_executable_extensions; do
10838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10839 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10841 break 2
10842 fi
10843done
10844 done
10845IFS=$as_save_IFS
10846
10847 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10848 ;;
10849esac
10850fi
10851python_prog_path=$ac_cv_path_python_prog_path
10852if test -n "$python_prog_path"; then
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10854$as_echo "$python_prog_path" >&6; }
10855else
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857$as_echo "no" >&6; }
10858fi
10859
10860
10861 if test "${python_prog_path}" = missing; then
10862 python_prog=missing
10863 else
10864 python_prog=${python_prog_path}
10865 fi
10866 else
10867 # Not much we can do except assume the cross-compiler will find the
10868 # right files.
10869 python_prog=missing
10870 fi
10871 ;;
10872 *)
10873 # While we can't run python compiled for $host (unless host == build),
10874 # the user could write a script that provides the needed information,
10875 # so we support that.
10876 python_prog="${with_python}"
10877 # Extract the first word of "${python_prog}", so it can be a program name with args.
10878set dummy ${python_prog}; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if test "${ac_cv_path_python_prog_path+set}" = set; then :
10882 $as_echo_n "(cached) " >&6
10883else
10884 case $python_prog_path in
10885 [\\/]* | ?:[\\/]*)
10886 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10887 ;;
10888 *)
10889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892 IFS=$as_save_IFS
10893 test -z "$as_dir" && as_dir=.
10894 for ac_exec_ext in '' $ac_executable_extensions; do
10895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10896 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898 break 2
10899 fi
10900done
10901 done
10902IFS=$as_save_IFS
10903
10904 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10905 ;;
10906esac
10907fi
10908python_prog_path=$ac_cv_path_python_prog_path
10909if test -n "$python_prog_path"; then
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10911$as_echo "$python_prog_path" >&6; }
10912else
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915fi
10916
10917
10918 if test "${python_prog_path}" = missing; then
10919 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10920 fi
10921 ;;
10922 esac
81ecdfbb
RW
10923 esac
10924
ec685c5e 10925 if test "${python_prog}" != missing; then
e7a30f46
DE
10926 # We have a python program to use, but it may be too old.
10927 # Don't flag an error for --with-python=auto (the default).
10928 have_python_config=yes
ec685c5e
DE
10929 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10930 if test $? != 0; then
e7a30f46
DE
10931 have_python_config=failed
10932 if test "${with_python}" != auto; then
10933 as_fn_error "failure running python-config --includes" "$LINENO" 5
10934 fi
ec685c5e
DE
10935 fi
10936 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10937 if test $? != 0; then
e7a30f46
DE
10938 have_python_config=failed
10939 if test "${with_python}" != auto; then
10940 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10941 fi
ec685c5e 10942 fi
0c4a4063
DE
10943 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10944 if test $? != 0; then
e7a30f46
DE
10945 have_python_config=failed
10946 if test "${with_python}" != auto; then
10947 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10948 fi
0c4a4063 10949 fi
ec685c5e 10950 else
ac534cba
JB
10951 # We do not have a python executable we can use to determine where
10952 # to find the Python headers and libs. We cannot guess the include
10953 # path from the python_prefix either, because that include path
10954 # depends on the Python version. So, there is nothing much we can
10955 # do except assume that the compiler will be able to find those files.
10956 python_includes=
10957 python_libs=
0c4a4063 10958 have_python_config=no
ec685c5e 10959 fi
bec39cab 10960
ec685c5e
DE
10961 # If we have python-config, only try the configuration it provides.
10962 # Otherwise fallback on the old way of trying different versions of
10963 # python in turn.
81ecdfbb 10964
ec685c5e
DE
10965 have_libpython=no
10966 if test "${have_python_config}" = yes; then
c1039e3c
JB
10967 # Determine the Python version by extracting "-lpython<version>"
10968 # part of the python_libs. <version> is usually X.Y with X and Y
10969 # being decimal numbers, but can also be XY (seen on Windows).
10970 #
10971 # The extraction is performed using sed with a regular expression.
10972 # Initially, the regexp used was using the '?' quantifier to make
10973 # the dot in the version number optional. Unfortunately, this
10974 # does not work with non-GNU versions of sed because, because of
10975 # what looks like a limitation (the '?' quantifier does not work
10976 # with back-references). We work around this limitation by using
10977 # the '*' quantifier instead. It means that, in theory, we might
10978 # match unexpected version strings such as "-lpython2..7", but
10979 # this seems unlikely in practice. And even if that happens,
10980 # an error will be triggered later on, when checking that version
10981 # number.
ec685c5e 10982 python_version=`echo " ${python_libs} " \
c1039e3c 10983 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10984 case "${python_version}" in
10985 python*)
ec685c5e
DE
10986
10987 version=${python_version}
10988
10989 new_CPPFLAGS=${python_includes}
10990 new_LIBS=${python_libs}
81ecdfbb
RW
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10992$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10993 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10994 save_LIBS=$LIBS
ec685c5e
DE
10995 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10996 LIBS="$LIBS $new_LIBS"
10997 found_usable_python=no
81ecdfbb 10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10999/* end confdefs.h. */
ac534cba 11000#include "Python.h"
81ecdfbb
RW
11001int
11002main ()
11003{
11004Py_Initialize ();
11005 ;
11006 return 0;
11007}
bec39cab 11008_ACEOF
81ecdfbb 11009if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11010 have_libpython=${version}
11011 found_usable_python=yes
ac534cba
JB
11012 PYTHON_CPPFLAGS=$new_CPPFLAGS
11013 PYTHON_LIBS=$new_LIBS
9a156167 11014fi
81ecdfbb
RW
11015rm -f core conftest.err conftest.$ac_objext \
11016 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11017 CPPFLAGS=$save_CPPFLAGS
11018 LIBS=$save_LIBS
ec685c5e
DE
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11020$as_echo "${found_usable_python}" >&6; }
9a156167 11021
0c4a4063
DE
11022 ;;
11023 *)
ec685c5e 11024 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
11025 ;;
11026 esac
e7a30f46 11027 elif test "${have_python_config}" != failed; then
ec685c5e 11028 if test "${have_libpython}" = no; then
9a156167 11029
420697bb
TT
11030 version=python2.7
11031
11032 new_CPPFLAGS=${python_includes}
11033 new_LIBS="${python_libs} -lpython2.7"
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11035$as_echo_n "checking for ${version}... " >&6; }
11036 save_CPPFLAGS=$CPPFLAGS
11037 save_LIBS=$LIBS
11038 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11039 LIBS="$LIBS $new_LIBS"
11040 found_usable_python=no
11041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11042/* end confdefs.h. */
ac534cba 11043#include "Python.h"
420697bb
TT
11044int
11045main ()
11046{
11047Py_Initialize ();
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052if ac_fn_c_try_link "$LINENO"; then :
11053 have_libpython=${version}
11054 found_usable_python=yes
ac534cba
JB
11055 PYTHON_CPPFLAGS=$new_CPPFLAGS
11056 PYTHON_LIBS=$new_LIBS
420697bb
TT
11057fi
11058rm -f core conftest.err conftest.$ac_objext \
11059 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11060 CPPFLAGS=$save_CPPFLAGS
11061 LIBS=$save_LIBS
420697bb
TT
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11063$as_echo "${found_usable_python}" >&6; }
11064
11065 fi
11066 if test "${have_libpython}" = no; then
11067
ec685c5e
DE
11068 version=python2.6
11069
11070 new_CPPFLAGS=${python_includes}
11071 new_LIBS="${python_libs} -lpython2.6"
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11073$as_echo_n "checking for ${version}... " >&6; }
11074 save_CPPFLAGS=$CPPFLAGS
11075 save_LIBS=$LIBS
11076 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11077 LIBS="$LIBS $new_LIBS"
11078 found_usable_python=no
11079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080/* end confdefs.h. */
ac534cba 11081#include "Python.h"
ec685c5e
DE
11082int
11083main ()
11084{
11085Py_Initialize ();
11086 ;
11087 return 0;
11088}
11089_ACEOF
11090if ac_fn_c_try_link "$LINENO"; then :
11091 have_libpython=${version}
11092 found_usable_python=yes
ac534cba
JB
11093 PYTHON_CPPFLAGS=$new_CPPFLAGS
11094 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
11095fi
11096rm -f core conftest.err conftest.$ac_objext \
11097 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11098 CPPFLAGS=$save_CPPFLAGS
11099 LIBS=$save_LIBS
ec685c5e
DE
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11101$as_echo "${found_usable_python}" >&6; }
9a156167 11102
81ecdfbb 11103 fi
ec685c5e 11104 if test ${have_libpython} = no; then
9a156167 11105
81ecdfbb 11106 version=python2.5
9a156167 11107
ec685c5e
DE
11108 new_CPPFLAGS=${python_includes}
11109 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11111$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11112 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11113 save_LIBS=$LIBS
ec685c5e
DE
11114 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11115 LIBS="$LIBS $new_LIBS"
11116 found_usable_python=no
81ecdfbb 11117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11118/* end confdefs.h. */
ac534cba 11119#include "Python.h"
81ecdfbb
RW
11120int
11121main ()
11122{
11123Py_Initialize ();
11124 ;
11125 return 0;
11126}
436868fb 11127_ACEOF
81ecdfbb 11128if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11129 have_libpython=${version}
11130 found_usable_python=yes
ac534cba
JB
11131 PYTHON_CPPFLAGS=$new_CPPFLAGS
11132 PYTHON_LIBS=$new_LIBS
436868fb 11133fi
81ecdfbb
RW
11134rm -f core conftest.err conftest.$ac_objext \
11135 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11136 CPPFLAGS=$save_CPPFLAGS
11137 LIBS=$save_LIBS
ec685c5e
DE
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11139$as_echo "${found_usable_python}" >&6; }
a9322a30 11140
81ecdfbb 11141 fi
ec685c5e 11142 if test ${have_libpython} = no; then
a9322a30 11143
81ecdfbb 11144 version=python2.4
a9322a30 11145
ec685c5e
DE
11146 new_CPPFLAGS=${python_includes}
11147 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
11149$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 11150 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11151 save_LIBS=$LIBS
ec685c5e
DE
11152 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11153 LIBS="$LIBS $new_LIBS"
11154 found_usable_python=no
81ecdfbb 11155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 11156/* end confdefs.h. */
ac534cba 11157#include "Python.h"
a9322a30
TT
11158int
11159main ()
11160{
81ecdfbb 11161Py_Initialize ();
a9322a30
TT
11162 ;
11163 return 0;
11164}
436868fb 11165_ACEOF
81ecdfbb 11166if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
11167 have_libpython=${version}
11168 found_usable_python=yes
ac534cba
JB
11169 PYTHON_CPPFLAGS=$new_CPPFLAGS
11170 PYTHON_LIBS=$new_LIBS
436868fb 11171fi
81ecdfbb
RW
11172rm -f core conftest.err conftest.$ac_objext \
11173 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11174 CPPFLAGS=$save_CPPFLAGS
11175 LIBS=$save_LIBS
ec685c5e
DE
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11177$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11178
ec685c5e
DE
11179 fi
11180 fi
9c4ea6c5 11181 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
11182
11183$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
11184
9c4ea6c5 11185 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
11186
11187$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
11188
9c4ea6c5 11189 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
11190
11191$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
11192
9c4ea6c5 11193 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
11194
11195$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
11196
81ecdfbb 11197 fi
ec685c5e
DE
11198
11199 if test "${have_libpython}" = no; then
81ecdfbb
RW
11200 case "${with_python}" in
11201 yes)
11202 as_fn_error "python is missing or unusable" "$LINENO" 5
11203 ;;
11204 auto)
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11206$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11207 ;;
11208 *)
11209 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
11210 ;;
11211 esac
0c4a4063
DE
11212 else
11213 if test -n "${python_prefix}"; then
11214
11215cat >>confdefs.h <<_ACEOF
11216#define WITH_PYTHON_PATH "${python_prefix}"
11217_ACEOF
11218
11219
11220 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11221 if test "x$prefix" = xNONE; then
11222 test_prefix=/usr/local
11223 else
11224 test_prefix=$prefix
11225 fi
11226 else
11227 test_prefix=$exec_prefix
11228 fi
11229 value=0
11230 case ${python_prefix} in
11231 "${test_prefix}"|"${test_prefix}/"*|\
11232 '${exec_prefix}'|'${exec_prefix}/'*)
11233 value=1
11234 ;;
11235 esac
11236
11237cat >>confdefs.h <<_ACEOF
11238#define PYTHON_PATH_RELOCATABLE $value
11239_ACEOF
11240
11241
11242 fi
81ecdfbb 11243 fi
436868fb 11244fi
436868fb 11245
ec685c5e 11246if test "${have_libpython}" != no; then
436868fb 11247
81ecdfbb 11248$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11249
81ecdfbb
RW
11250 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11251 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11252 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11253 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11254 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11255
81ecdfbb
RW
11256 # Flags needed to compile Python code (taken from python-config --cflags).
11257 # We cannot call python-config directly because it will output whatever was
11258 # used when compiling the Python interpreter itself, including flags which
11259 # would make the python-related objects be compiled differently from the
11260 # rest of GDB (e.g., -O2 and -fPIC).
11261 if test "${GCC}" = yes; then
11262 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11263 fi
436868fb 11264
81ecdfbb
RW
11265 if test "x${tentative_python_cflags}" != x; then
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11267$as_echo_n "checking compiler flags for python code... " >&6; }
11268 for flag in ${tentative_python_cflags}; do
11269 # Check that the compiler accepts it
11270 saved_CFLAGS="$CFLAGS"
11271 CFLAGS="$CFLAGS $flag"
11272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11273/* end confdefs.h. */
81ecdfbb 11274
a9322a30
TT
11275int
11276main ()
11277{
a9322a30
TT
11278
11279 ;
11280 return 0;
11281}
bec39cab 11282_ACEOF
81ecdfbb
RW
11283if ac_fn_c_try_compile "$LINENO"; then :
11284 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11285fi
81ecdfbb
RW
11286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287 CFLAGS="$saved_CFLAGS"
11288 done
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11290$as_echo "${PYTHON_CFLAGS}" >&6; }
11291 fi
043b6510
JB
11292
11293 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
11294 # #if _SGIAPI
11295 # #define siginfo __siginfo
11296 # #endif
11297 # The problem is that including Python causes some XOPEN macros to be
11298 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
11299 # to false. So, we work around this issue by defining siginfo ourself
11300 # though the command-line.
11301 case "$gdb_host" in
11302 irix*) if test "${GCC}" = yes; then
11303 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11304 fi
11305 ;;
11306 esac
81ecdfbb
RW
11307else
11308 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11309 # included.
11310 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11311 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11312 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11313fi
9a156167 11314
9a156167 11315
ac534cba
JB
11316
11317
81ecdfbb
RW
11318# ------------------------- #
11319# Checks for header files. #
11320# ------------------------- #
c890192f 11321
81ecdfbb
RW
11322ac_header_dirent=no
11323for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11324 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11326$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11327if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11328 $as_echo_n "(cached) " >&6
bec39cab 11329else
81ecdfbb 11330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11331/* end confdefs.h. */
81ecdfbb
RW
11332#include <sys/types.h>
11333#include <$ac_hdr>
11334
a9322a30
TT
11335int
11336main ()
11337{
81ecdfbb
RW
11338if ((DIR *) 0)
11339return 0;
a9322a30
TT
11340 ;
11341 return 0;
11342}
bec39cab 11343_ACEOF
81ecdfbb
RW
11344if ac_fn_c_try_compile "$LINENO"; then :
11345 eval "$as_ac_Header=yes"
bec39cab 11346else
81ecdfbb 11347 eval "$as_ac_Header=no"
bec39cab 11348fi
81ecdfbb 11349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11350fi
81ecdfbb
RW
11351eval ac_res=\$$as_ac_Header
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11353$as_echo "$ac_res" >&6; }
11354eval as_val=\$$as_ac_Header
11355 if test "x$as_val" = x""yes; then :
11356 cat >>confdefs.h <<_ACEOF
11357#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11358_ACEOF
bec39cab 11359
81ecdfbb
RW
11360ac_header_dirent=$ac_hdr; break
11361fi
bec39cab 11362
81ecdfbb
RW
11363done
11364# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11365if test $ac_header_dirent = dirent.h; then
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11367$as_echo_n "checking for library containing opendir... " >&6; }
11368if test "${ac_cv_search_opendir+set}" = set; then :
11369 $as_echo_n "(cached) " >&6
c890192f 11370else
81ecdfbb
RW
11371 ac_func_search_save_LIBS=$LIBS
11372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373/* end confdefs.h. */
11374
11375/* Override any GCC internal prototype to avoid an error.
11376 Use char because int might match the return type of a GCC
11377 builtin and then its argument prototype would still apply. */
11378#ifdef __cplusplus
11379extern "C"
11380#endif
11381char opendir ();
11382int
11383main ()
11384{
11385return opendir ();
11386 ;
11387 return 0;
11388}
bec39cab 11389_ACEOF
81ecdfbb
RW
11390for ac_lib in '' dir; do
11391 if test -z "$ac_lib"; then
11392 ac_res="none required"
11393 else
11394 ac_res=-l$ac_lib
11395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11396 fi
11397 if ac_fn_c_try_link "$LINENO"; then :
11398 ac_cv_search_opendir=$ac_res
11399fi
11400rm -f core conftest.err conftest.$ac_objext \
11401 conftest$ac_exeext
11402 if test "${ac_cv_search_opendir+set}" = set; then :
11403 break
11404fi
11405done
11406if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11407
81ecdfbb
RW
11408else
11409 ac_cv_search_opendir=no
11410fi
11411rm conftest.$ac_ext
11412LIBS=$ac_func_search_save_LIBS
11413fi
11414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11415$as_echo "$ac_cv_search_opendir" >&6; }
11416ac_res=$ac_cv_search_opendir
11417if test "$ac_res" != no; then :
11418 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11419
bec39cab 11420fi
81ecdfbb 11421
bec39cab 11422else
81ecdfbb
RW
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11424$as_echo_n "checking for library containing opendir... " >&6; }
11425if test "${ac_cv_search_opendir+set}" = set; then :
11426 $as_echo_n "(cached) " >&6
11427else
11428 ac_func_search_save_LIBS=$LIBS
11429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11430/* end confdefs.h. */
81ecdfbb
RW
11431
11432/* Override any GCC internal prototype to avoid an error.
11433 Use char because int might match the return type of a GCC
11434 builtin and then its argument prototype would still apply. */
11435#ifdef __cplusplus
11436extern "C"
11437#endif
11438char opendir ();
a9322a30
TT
11439int
11440main ()
11441{
81ecdfbb 11442return opendir ();
a9322a30
TT
11443 ;
11444 return 0;
11445}
bec39cab 11446_ACEOF
81ecdfbb
RW
11447for ac_lib in '' x; do
11448 if test -z "$ac_lib"; then
11449 ac_res="none required"
11450 else
11451 ac_res=-l$ac_lib
11452 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11453 fi
11454 if ac_fn_c_try_link "$LINENO"; then :
11455 ac_cv_search_opendir=$ac_res
11456fi
11457rm -f core conftest.err conftest.$ac_objext \
11458 conftest$ac_exeext
11459 if test "${ac_cv_search_opendir+set}" = set; then :
11460 break
11461fi
11462done
11463if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11464
81ecdfbb
RW
11465else
11466 ac_cv_search_opendir=no
bec39cab 11467fi
81ecdfbb
RW
11468rm conftest.$ac_ext
11469LIBS=$ac_func_search_save_LIBS
a9322a30 11470fi
81ecdfbb
RW
11471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11472$as_echo "$ac_cv_search_opendir" >&6; }
11473ac_res=$ac_cv_search_opendir
11474if test "$ac_res" != no; then :
11475 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11476
81ecdfbb 11477fi
bec39cab 11478
81ecdfbb 11479fi
bec39cab 11480
81ecdfbb
RW
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11482$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11483if test "${ac_cv_header_stat_broken+set}" = set; then :
11484 $as_echo_n "(cached) " >&6
9a156167 11485else
81ecdfbb
RW
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488#include <sys/types.h>
11489#include <sys/stat.h>
11490
11491#if defined S_ISBLK && defined S_IFDIR
11492extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11493#endif
11494
11495#if defined S_ISBLK && defined S_IFCHR
11496extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11497#endif
11498
11499#if defined S_ISLNK && defined S_IFREG
11500extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11501#endif
11502
11503#if defined S_ISSOCK && defined S_IFREG
11504extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11505#endif
11506
bec39cab 11507_ACEOF
81ecdfbb
RW
11508if ac_fn_c_try_compile "$LINENO"; then :
11509 ac_cv_header_stat_broken=no
11510else
11511 ac_cv_header_stat_broken=yes
11512fi
11513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11514fi
11515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11516$as_echo "$ac_cv_header_stat_broken" >&6; }
11517if test $ac_cv_header_stat_broken = yes; then
9a156167 11518
81ecdfbb 11519$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11520
bec39cab 11521fi
81ecdfbb
RW
11522
11523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11524$as_echo_n "checking for ANSI C header files... " >&6; }
11525if test "${ac_cv_header_stdc+set}" = set; then :
11526 $as_echo_n "(cached) " >&6
bec39cab 11527else
81ecdfbb 11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11529/* end confdefs.h. */
81ecdfbb
RW
11530#include <stdlib.h>
11531#include <stdarg.h>
11532#include <string.h>
11533#include <float.h>
11534
a9322a30
TT
11535int
11536main ()
11537{
a9322a30
TT
11538
11539 ;
11540 return 0;
11541}
bec39cab 11542_ACEOF
81ecdfbb
RW
11543if ac_fn_c_try_compile "$LINENO"; then :
11544 ac_cv_header_stdc=yes
bec39cab 11545else
81ecdfbb 11546 ac_cv_header_stdc=no
a9322a30 11547fi
81ecdfbb 11548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11549
81ecdfbb
RW
11550if test $ac_cv_header_stdc = yes; then
11551 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553/* end confdefs.h. */
11554#include <string.h>
bec39cab 11555
81ecdfbb
RW
11556_ACEOF
11557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11558 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11559
bec39cab 11560else
81ecdfbb
RW
11561 ac_cv_header_stdc=no
11562fi
11563rm -f conftest*
11564
11565fi
11566
11567if test $ac_cv_header_stdc = yes; then
11568 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570/* end confdefs.h. */
11571#include <stdlib.h>
11572
bec39cab 11573_ACEOF
81ecdfbb
RW
11574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11575 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11576
81ecdfbb
RW
11577else
11578 ac_cv_header_stdc=no
11579fi
11580rm -f conftest*
bec39cab 11581
bec39cab 11582fi
81ecdfbb
RW
11583
11584if test $ac_cv_header_stdc = yes; then
11585 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11586 if test "$cross_compiling" = yes; then :
11587 :
bec39cab 11588else
81ecdfbb 11589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11590/* end confdefs.h. */
81ecdfbb
RW
11591#include <ctype.h>
11592#include <stdlib.h>
11593#if ((' ' & 0x0FF) == 0x020)
11594# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11595# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11596#else
11597# define ISLOWER(c) \
11598 (('a' <= (c) && (c) <= 'i') \
11599 || ('j' <= (c) && (c) <= 'r') \
11600 || ('s' <= (c) && (c) <= 'z'))
11601# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11602#endif
11603
11604#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11605int
11606main ()
11607{
81ecdfbb
RW
11608 int i;
11609 for (i = 0; i < 256; i++)
11610 if (XOR (islower (i), ISLOWER (i))
11611 || toupper (i) != TOUPPER (i))
11612 return 2;
a9322a30
TT
11613 return 0;
11614}
bec39cab 11615_ACEOF
81ecdfbb
RW
11616if ac_fn_c_try_run "$LINENO"; then :
11617
bec39cab 11618else
81ecdfbb
RW
11619 ac_cv_header_stdc=no
11620fi
11621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11622 conftest.$ac_objext conftest.beam conftest.$ac_ext
11623fi
bec39cab 11624
bec39cab 11625fi
a9322a30 11626fi
81ecdfbb
RW
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11628$as_echo "$ac_cv_header_stdc" >&6; }
11629if test $ac_cv_header_stdc = yes; then
bec39cab 11630
81ecdfbb 11631$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11632
81ecdfbb 11633fi
bec39cab 11634
81ecdfbb
RW
11635# elf_hp.h is for HP/UX 64-bit shared library support.
11636# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11637# unconditionally, so what's the point in checking these?
11638for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11639 thread_db.h gnu/libc-version.h signal.h stddef.h \
11640 stdlib.h string.h memory.h strings.h sys/fault.h \
11641 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11642 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11643 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11644 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 11645 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 11646 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
11647do :
11648 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11649ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11650eval as_val=\$$as_ac_Header
11651 if test "x$as_val" = x""yes; then :
bec39cab 11652 cat >>confdefs.h <<_ACEOF
81ecdfbb 11653#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11654_ACEOF
c906108c 11655
bec39cab 11656fi
81ecdfbb
RW
11657
11658done
11659
11660for ac_header in link.h
11661do :
11662 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11663# include <sys/types.h>
11664#endif
11665#if HAVE_NLIST_H
11666# include <nlist.h>
a9322a30
TT
11667#endif
11668
81ecdfbb
RW
11669"
11670if test "x$ac_cv_header_link_h" = x""yes; then :
11671 cat >>confdefs.h <<_ACEOF
11672#define HAVE_LINK_H 1
bec39cab 11673_ACEOF
bec39cab 11674
a9322a30 11675fi
bec39cab 11676
81ecdfbb 11677done
c906108c 11678
81ecdfbb
RW
11679for ac_header in sys/proc.h
11680do :
11681 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11682# include <sys/param.h>
11683#endif
c906108c 11684
81ecdfbb
RW
11685"
11686if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11687 cat >>confdefs.h <<_ACEOF
81ecdfbb 11688#define HAVE_SYS_PROC_H 1
bec39cab 11689_ACEOF
5ee754fc 11690
bec39cab 11691fi
81ecdfbb
RW
11692
11693done
11694
11695for ac_header in sys/user.h
11696do :
11697 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11698# include <sys/param.h>
a9322a30
TT
11699#endif
11700
81ecdfbb
RW
11701"
11702if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11703 cat >>confdefs.h <<_ACEOF
11704#define HAVE_SYS_USER_H 1
bec39cab 11705_ACEOF
bec39cab 11706
a9322a30 11707fi
bec39cab 11708
81ecdfbb 11709done
5ee754fc 11710
5ee754fc 11711
81ecdfbb
RW
11712# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11713# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11714# think that we don't have <curses.h> if we're using GCC.
11715case $host_os in
11716 solaris2.[789])
11717 if test "$GCC" = yes; then
11718
11719$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11720
11721 fi ;;
11722esac
11723for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11724do :
11725 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11726ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11727eval as_val=\$$as_ac_Header
11728 if test "x$as_val" = x""yes; then :
bec39cab 11729 cat >>confdefs.h <<_ACEOF
81ecdfbb 11730#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11731_ACEOF
5ee754fc
MK
11732
11733fi
11734
81ecdfbb 11735done
bec39cab 11736
81ecdfbb
RW
11737for ac_header in term.h
11738do :
11739 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11740# include <curses.h>
11741#endif
bec39cab 11742
81ecdfbb
RW
11743"
11744if test "x$ac_cv_header_term_h" = x""yes; then :
11745 cat >>confdefs.h <<_ACEOF
11746#define HAVE_TERM_H 1
a8111142 11747_ACEOF
a8111142 11748
a8111142 11749fi
a8111142 11750
81ecdfbb 11751done
a8111142
TT
11752
11753
81ecdfbb
RW
11754# ------------------------- #
11755# Checks for declarations. #
11756# ------------------------- #
a9322a30 11757
81ecdfbb
RW
11758ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11759if test "x$ac_cv_have_decl_free" = x""yes; then :
11760 ac_have_decl=1
bec39cab 11761else
81ecdfbb
RW
11762 ac_have_decl=0
11763fi
11764
11765cat >>confdefs.h <<_ACEOF
11766#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11767_ACEOF
81ecdfbb
RW
11768ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11769if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11770 ac_have_decl=1
11771else
11772 ac_have_decl=0
11773fi
11774
11775cat >>confdefs.h <<_ACEOF
11776#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11777_ACEOF
81ecdfbb
RW
11778ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11779if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11780 ac_have_decl=1
bec39cab 11781else
81ecdfbb
RW
11782 ac_have_decl=0
11783fi
bec39cab 11784
81ecdfbb
RW
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11787_ACEOF
81ecdfbb
RW
11788ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11789if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11790 ac_have_decl=1
11791else
11792 ac_have_decl=0
11793fi
11794
11795cat >>confdefs.h <<_ACEOF
11796#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11797_ACEOF
81ecdfbb
RW
11798ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11799if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11800 ac_have_decl=1
bec39cab 11801else
81ecdfbb
RW
11802 ac_have_decl=0
11803fi
5ee754fc 11804
81ecdfbb
RW
11805cat >>confdefs.h <<_ACEOF
11806#define HAVE_DECL_STRSTR $ac_have_decl
11807_ACEOF
11808ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11809if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11810 ac_have_decl=1
11811else
11812 ac_have_decl=0
5ee754fc 11813fi
81ecdfbb
RW
11814
11815cat >>confdefs.h <<_ACEOF
11816#define HAVE_DECL_GETOPT $ac_have_decl
11817_ACEOF
11818ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11819if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11820 ac_have_decl=1
11821else
11822 ac_have_decl=0
5ee754fc 11823fi
81ecdfbb
RW
11824
11825cat >>confdefs.h <<_ACEOF
11826#define HAVE_DECL_SNPRINTF $ac_have_decl
11827_ACEOF
11828ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11829if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11830 ac_have_decl=1
11831else
11832 ac_have_decl=0
5ee754fc
MK
11833fi
11834
a9322a30 11835cat >>confdefs.h <<_ACEOF
81ecdfbb 11836#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11837_ACEOF
5ee754fc 11838
5ee754fc 11839
81ecdfbb
RW
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11841$as_echo_n "checking for LC_MESSAGES... " >&6; }
11842if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11843 $as_echo_n "(cached) " >&6
bec39cab 11844else
81ecdfbb 11845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11846/* end confdefs.h. */
81ecdfbb 11847#include <locale.h>
a9322a30
TT
11848int
11849main ()
11850{
81ecdfbb 11851return LC_MESSAGES
a9322a30
TT
11852 ;
11853 return 0;
11854}
bec39cab 11855_ACEOF
81ecdfbb
RW
11856if ac_fn_c_try_link "$LINENO"; then :
11857 am_cv_val_LC_MESSAGES=yes
bec39cab 11858else
81ecdfbb
RW
11859 am_cv_val_LC_MESSAGES=no
11860fi
11861rm -f core conftest.err conftest.$ac_objext \
11862 conftest$ac_exeext conftest.$ac_ext
11863fi
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11865$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11866 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11867
81ecdfbb
RW
11868$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11869
11870 fi
11871
11872
11873# ----------------------- #
11874# Checks for structures. #
11875# ----------------------- #
11876
11877ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11878if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11879
11880cat >>confdefs.h <<_ACEOF
11881#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11882_ACEOF
7eb368b3 11883
81ecdfbb 11884
7eb368b3 11885fi
81ecdfbb
RW
11886ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11887if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11888
a9322a30
TT
11889cat >>confdefs.h <<_ACEOF
11890#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11891_ACEOF
11892
a9322a30 11893
7eb368b3
NR
11894fi
11895
7eb368b3 11896
a9322a30
TT
11897# ------------------ #
11898# Checks for types. #
11899# ------------------ #
7eb368b3 11900
81ecdfbb
RW
11901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11902$as_echo_n "checking return type of signal handlers... " >&6; }
11903if test "${ac_cv_type_signal+set}" = set; then :
11904 $as_echo_n "(cached) " >&6
bec39cab 11905else
81ecdfbb 11906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11907/* end confdefs.h. */
a9322a30
TT
11908#include <sys/types.h>
11909#include <signal.h>
7cb9022a 11910
a9322a30
TT
11911int
11912main ()
11913{
81ecdfbb 11914return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11915 ;
11916 return 0;
11917}
bec39cab 11918_ACEOF
81ecdfbb
RW
11919if ac_fn_c_try_compile "$LINENO"; then :
11920 ac_cv_type_signal=int
bec39cab 11921else
81ecdfbb 11922 ac_cv_type_signal=void
bec39cab 11923fi
81ecdfbb 11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11925fi
81ecdfbb
RW
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11927$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11928
a9322a30
TT
11929cat >>confdefs.h <<_ACEOF
11930#define RETSIGTYPE $ac_cv_type_signal
11931_ACEOF
5ee754fc 11932
bec39cab 11933
81ecdfbb 11934ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11935#include <sys/socket.h>
11936
81ecdfbb
RW
11937"
11938if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11939
a9322a30
TT
11940cat >>confdefs.h <<_ACEOF
11941#define HAVE_SOCKLEN_T 1
11942_ACEOF
11943
11944
11945fi
11946
11947
11948# ------------------------------------- #
11949# Checks for compiler characteristics. #
11950# ------------------------------------- #
11951
81ecdfbb
RW
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11953$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11954if test "${ac_cv_c_const+set}" = set; then :
11955 $as_echo_n "(cached) " >&6
a9322a30 11956else
81ecdfbb 11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11958/* end confdefs.h. */
a9322a30
TT
11959
11960int
11961main ()
11962{
11963/* FIXME: Include the comments suggested by Paul. */
11964#ifndef __cplusplus
11965 /* Ultrix mips cc rejects this. */
11966 typedef int charset[2];
81ecdfbb 11967 const charset cs;
a9322a30 11968 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11969 char const *const *pcpcc;
11970 char **ppc;
a9322a30
TT
11971 /* NEC SVR4.0.2 mips cc rejects this. */
11972 struct point {int x, y;};
11973 static struct point const zero = {0,0};
11974 /* AIX XL C 1.02.0.0 rejects this.
11975 It does not let you subtract one const X* pointer from another in
11976 an arm of an if-expression whose if-part is not a constant
11977 expression */
11978 const char *g = "string";
81ecdfbb 11979 pcpcc = &g + (g ? g-g : 0);
a9322a30 11980 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11981 ++pcpcc;
11982 ppc = (char**) pcpcc;
11983 pcpcc = (char const *const *) ppc;
a9322a30
TT
11984 { /* SCO 3.2v4 cc rejects this. */
11985 char *t;
11986 char const *s = 0 ? (char *) 0 : (char const *) 0;
11987
11988 *t++ = 0;
81ecdfbb 11989 if (s) return 0;
a9322a30
TT
11990 }
11991 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11992 int x[] = {25, 17};
11993 const int *foo = &x[0];
11994 ++foo;
11995 }
11996 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11997 typedef const int *iptr;
11998 iptr p = 0;
11999 ++p;
12000 }
12001 { /* AIX XL C 1.02.0.0 rejects this saying
12002 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12003 struct s { int j; const int *ap[3]; };
12004 struct s *b; b->j = 5;
12005 }
12006 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12007 const int foo = 10;
81ecdfbb 12008 if (!foo) return 0;
a9322a30 12009 }
81ecdfbb 12010 return !cs[0] && !zero.x;
a9322a30
TT
12011#endif
12012
12013 ;
12014 return 0;
12015}
bec39cab 12016_ACEOF
81ecdfbb 12017if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12018 ac_cv_c_const=yes
5ee754fc 12019else
81ecdfbb 12020 ac_cv_c_const=no
5ee754fc 12021fi
81ecdfbb 12022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12023fi
81ecdfbb
RW
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12025$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12026if test $ac_cv_c_const = no; then
bec39cab 12027
81ecdfbb 12028$as_echo "#define const /**/" >>confdefs.h
bec39cab 12029
5ee754fc 12030fi
bec39cab 12031
81ecdfbb
RW
12032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12033$as_echo_n "checking for inline... " >&6; }
12034if test "${ac_cv_c_inline+set}" = set; then :
12035 $as_echo_n "(cached) " >&6
bec39cab 12036else
a9322a30
TT
12037 ac_cv_c_inline=no
12038for ac_kw in inline __inline__ __inline; do
81ecdfbb 12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12040/* end confdefs.h. */
a9322a30
TT
12041#ifndef __cplusplus
12042typedef int foo_t;
12043static $ac_kw foo_t static_foo () {return 0; }
12044$ac_kw foo_t foo () {return 0; }
12045#endif
12046
bec39cab 12047_ACEOF
81ecdfbb
RW
12048if ac_fn_c_try_compile "$LINENO"; then :
12049 ac_cv_c_inline=$ac_kw
bec39cab 12050fi
81ecdfbb
RW
12051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12052 test "$ac_cv_c_inline" != no && break
a9322a30 12053done
bec39cab 12054
5ee754fc 12055fi
81ecdfbb
RW
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12057$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12058
a9322a30
TT
12059case $ac_cv_c_inline in
12060 inline | yes) ;;
12061 *)
12062 case $ac_cv_c_inline in
12063 no) ac_val=;;
12064 *) ac_val=$ac_cv_c_inline;;
12065 esac
12066 cat >>confdefs.h <<_ACEOF
12067#ifndef __cplusplus
12068#define inline $ac_val
12069#endif
12070_ACEOF
bec39cab
AC
12071 ;;
12072esac
bec39cab 12073
81ecdfbb
RW
12074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12075$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12076if test "${ac_cv_c_bigendian+set}" = set; then :
12077 $as_echo_n "(cached) " >&6
bec39cab 12078else
81ecdfbb
RW
12079 ac_cv_c_bigendian=unknown
12080 # See if we're dealing with a universal compiler.
12081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12082/* end confdefs.h. */
12083#ifndef __APPLE_CC__
12084 not a universal capable compiler
12085 #endif
12086 typedef int dummy;
12087
12088_ACEOF
12089if ac_fn_c_try_compile "$LINENO"; then :
12090
12091 # Check for potential -arch flags. It is not universal unless
12092 # there are at least two -arch flags with different values.
12093 ac_arch=
12094 ac_prev=
12095 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12096 if test -n "$ac_prev"; then
12097 case $ac_word in
12098 i?86 | x86_64 | ppc | ppc64)
12099 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12100 ac_arch=$ac_word
12101 else
12102 ac_cv_c_bigendian=universal
12103 break
12104 fi
12105 ;;
12106 esac
12107 ac_prev=
12108 elif test "x$ac_word" = "x-arch"; then
12109 ac_prev=arch
12110 fi
12111 done
12112fi
12113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12114 if test $ac_cv_c_bigendian = unknown; then
12115 # See if sys/param.h defines the BYTE_ORDER macro.
12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12117/* end confdefs.h. */
a9322a30 12118#include <sys/types.h>
81ecdfbb 12119 #include <sys/param.h>
a9322a30
TT
12120
12121int
12122main ()
12123{
81ecdfbb
RW
12124#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12125 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12126 && LITTLE_ENDIAN)
12127 bogus endian macros
12128 #endif
a9322a30
TT
12129
12130 ;
12131 return 0;
12132}
bec39cab 12133_ACEOF
81ecdfbb 12134if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12135 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12137/* end confdefs.h. */
a9322a30 12138#include <sys/types.h>
81ecdfbb 12139 #include <sys/param.h>
a9322a30
TT
12140
12141int
12142main ()
12143{
12144#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12145 not big endian
12146 #endif
a9322a30
TT
12147
12148 ;
12149 return 0;
12150}
bec39cab 12151_ACEOF
81ecdfbb 12152if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12153 ac_cv_c_bigendian=yes
5ee754fc 12154else
81ecdfbb 12155 ac_cv_c_bigendian=no
5ee754fc 12156fi
81ecdfbb
RW
12157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12158fi
12159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160 fi
12161 if test $ac_cv_c_bigendian = unknown; then
12162 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h. */
12165#include <limits.h>
bec39cab 12166
81ecdfbb
RW
12167int
12168main ()
12169{
12170#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12171 bogus endian macros
12172 #endif
12173
12174 ;
12175 return 0;
12176}
7eb368b3 12177_ACEOF
81ecdfbb
RW
12178if ac_fn_c_try_compile "$LINENO"; then :
12179 # It does; now see whether it defined to _BIG_ENDIAN or not.
12180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12181/* end confdefs.h. */
81ecdfbb
RW
12182#include <limits.h>
12183
7eb368b3
NR
12184int
12185main ()
12186{
81ecdfbb
RW
12187#ifndef _BIG_ENDIAN
12188 not big endian
12189 #endif
12190
7eb368b3
NR
12191 ;
12192 return 0;
12193}
12194_ACEOF
81ecdfbb 12195if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12196 ac_cv_c_bigendian=yes
81ecdfbb
RW
12197else
12198 ac_cv_c_bigendian=no
a9322a30 12199fi
81ecdfbb 12200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12201fi
81ecdfbb
RW
12202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203 fi
12204 if test $ac_cv_c_bigendian = unknown; then
12205 # Compile a test program.
12206 if test "$cross_compiling" = yes; then :
12207 # Try to guess by grepping values from an object file.
12208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12209/* end confdefs.h. */
12210short int ascii_mm[] =
12211 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12212 short int ascii_ii[] =
12213 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12214 int use_ascii (int i) {
12215 return ascii_mm[i] + ascii_ii[i];
12216 }
12217 short int ebcdic_ii[] =
12218 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12219 short int ebcdic_mm[] =
12220 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12221 int use_ebcdic (int i) {
12222 return ebcdic_mm[i] + ebcdic_ii[i];
12223 }
12224 extern int foo;
7eb368b3 12225
81ecdfbb
RW
12226int
12227main ()
12228{
12229return use_ascii (foo) == use_ebcdic (foo);
12230 ;
12231 return 0;
12232}
12233_ACEOF
12234if ac_fn_c_try_compile "$LINENO"; then :
12235 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12236 ac_cv_c_bigendian=yes
12237 fi
12238 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12239 if test "$ac_cv_c_bigendian" = unknown; then
12240 ac_cv_c_bigendian=no
12241 else
12242 # finding both strings is unlikely to happen, but who knows?
12243 ac_cv_c_bigendian=unknown
12244 fi
12245 fi
7eb368b3 12246fi
81ecdfbb 12247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12248else
81ecdfbb 12249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12250/* end confdefs.h. */
81ecdfbb 12251$ac_includes_default
d3ea6809
MM
12252int
12253main ()
12254{
81ecdfbb
RW
12255
12256 /* Are we little or big endian? From Harbison&Steele. */
12257 union
12258 {
12259 long int l;
12260 char c[sizeof (long int)];
12261 } u;
12262 u.l = 1;
12263 return u.c[sizeof (long int) - 1] == 1;
12264
12265 ;
12266 return 0;
d3ea6809
MM
12267}
12268_ACEOF
81ecdfbb 12269if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12270 ac_cv_c_bigendian=no
d3ea6809 12271else
81ecdfbb 12272 ac_cv_c_bigendian=yes
d3ea6809 12273fi
81ecdfbb
RW
12274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12275 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12276fi
a9322a30 12277
81ecdfbb
RW
12278 fi
12279fi
12280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12281$as_echo "$ac_cv_c_bigendian" >&6; }
12282 case $ac_cv_c_bigendian in #(
12283 yes)
12284 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12285;; #(
12286 no)
12287 ;; #(
12288 universal)
12289
12290$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12291
12292 ;; #(
12293 *)
12294 as_fn_error "unknown endianness
12295 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12296 esac
d3ea6809
MM
12297
12298
a9322a30
TT
12299# ------------------------------ #
12300# Checks for library functions. #
12301# ------------------------------ #
d3ea6809 12302
a9322a30
TT
12303# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12304# for constant arguments. Useless!
81ecdfbb
RW
12305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12306$as_echo_n "checking for working alloca.h... " >&6; }
12307if test "${ac_cv_working_alloca_h+set}" = set; then :
12308 $as_echo_n "(cached) " >&6
d3ea6809 12309else
81ecdfbb 12310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12311/* end confdefs.h. */
a9322a30 12312#include <alloca.h>
bec39cab
AC
12313int
12314main ()
12315{
a9322a30 12316char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12317 if (p) return 0;
bec39cab
AC
12318 ;
12319 return 0;
12320}
12321_ACEOF
81ecdfbb 12322if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12323 ac_cv_working_alloca_h=yes
bec39cab 12324else
81ecdfbb 12325 ac_cv_working_alloca_h=no
bec39cab 12326fi
81ecdfbb
RW
12327rm -f core conftest.err conftest.$ac_objext \
12328 conftest$ac_exeext conftest.$ac_ext
bec39cab 12329fi
81ecdfbb
RW
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12331$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12332if test $ac_cv_working_alloca_h = yes; then
12333
81ecdfbb 12334$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12335
c906108c 12336fi
bec39cab 12337
81ecdfbb
RW
12338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12339$as_echo_n "checking for alloca... " >&6; }
12340if test "${ac_cv_func_alloca_works+set}" = set; then :
12341 $as_echo_n "(cached) " >&6
bec39cab 12342else
81ecdfbb 12343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12344/* end confdefs.h. */
a9322a30
TT
12345#ifdef __GNUC__
12346# define alloca __builtin_alloca
b4e70030 12347#else
a9322a30
TT
12348# ifdef _MSC_VER
12349# include <malloc.h>
12350# define alloca _alloca
12351# else
81ecdfbb 12352# ifdef HAVE_ALLOCA_H
a9322a30
TT
12353# include <alloca.h>
12354# else
12355# ifdef _AIX
12356 #pragma alloca
12357# else
12358# ifndef alloca /* predefined by HP cc +Olibcalls */
12359char *alloca ();
12360# endif
12361# endif
12362# endif
12363# endif
c906108c 12364#endif
97bf5e38 12365
bec39cab
AC
12366int
12367main ()
12368{
a9322a30 12369char *p = (char *) alloca (1);
81ecdfbb 12370 if (p) return 0;
bec39cab
AC
12371 ;
12372 return 0;
12373}
12374_ACEOF
81ecdfbb 12375if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12376 ac_cv_func_alloca_works=yes
bec39cab 12377else
81ecdfbb 12378 ac_cv_func_alloca_works=no
bec39cab 12379fi
81ecdfbb
RW
12380rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
bec39cab 12382fi
81ecdfbb
RW
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12384$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12385
12386if test $ac_cv_func_alloca_works = yes; then
12387
81ecdfbb 12388$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12389
a9322a30
TT
12390else
12391 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12392# that cause trouble. Some versions do not even contain alloca or
12393# contain a buggy version. If you still want to use their alloca,
12394# use ar to extract alloca.o from them instead of compiling alloca.c.
12395
81ecdfbb 12396ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12397
81ecdfbb 12398$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12399
bec39cab 12400
81ecdfbb
RW
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12402$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12403if test "${ac_cv_os_cray+set}" = set; then :
12404 $as_echo_n "(cached) " >&6
a9322a30 12405else
81ecdfbb 12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12407/* end confdefs.h. */
81ecdfbb 12408#if defined CRAY && ! defined CRAY2
a9322a30
TT
12409webecray
12410#else
12411wenotbecray
12412#endif
12413
12414_ACEOF
12415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12416 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12417 ac_cv_os_cray=yes
12418else
81ecdfbb 12419 ac_cv_os_cray=no
bec39cab 12420fi
81ecdfbb
RW
12421rm -f conftest*
12422
bec39cab 12423fi
81ecdfbb
RW
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12425$as_echo "$ac_cv_os_cray" >&6; }
12426if test $ac_cv_os_cray = yes; then
12427 for ac_func in _getb67 GETB67 getb67; do
12428 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12429ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12430eval as_val=\$$as_ac_var
12431 if test "x$as_val" = x""yes; then :
a9322a30
TT
12432
12433cat >>confdefs.h <<_ACEOF
12434#define CRAY_STACKSEG_END $ac_func
bec39cab 12435_ACEOF
c906108c 12436
a9322a30 12437 break
c906108c
SS
12438fi
12439
a9322a30
TT
12440 done
12441fi
bec39cab 12442
81ecdfbb
RW
12443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12444$as_echo_n "checking stack direction for C alloca... " >&6; }
12445if test "${ac_cv_c_stack_direction+set}" = set; then :
12446 $as_echo_n "(cached) " >&6
a9322a30 12447else
81ecdfbb 12448 if test "$cross_compiling" = yes; then :
a9322a30 12449 ac_cv_c_stack_direction=0
bec39cab 12450else
81ecdfbb 12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12452/* end confdefs.h. */
81ecdfbb 12453$ac_includes_default
a9322a30
TT
12454int
12455find_stack_direction ()
b4e70030 12456{
a9322a30
TT
12457 static char *addr = 0;
12458 auto char dummy;
12459 if (addr == 0)
12460 {
12461 addr = &dummy;
12462 return find_stack_direction ();
12463 }
12464 else
12465 return (&dummy > addr) ? 1 : -1;
b4e70030 12466}
b757528f 12467
bec39cab
AC
12468int
12469main ()
12470{
81ecdfbb 12471 return find_stack_direction () < 0;
bec39cab
AC
12472}
12473_ACEOF
81ecdfbb 12474if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12475 ac_cv_c_stack_direction=1
12476else
81ecdfbb 12477 ac_cv_c_stack_direction=-1
a9322a30 12478fi
81ecdfbb
RW
12479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12480 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12481fi
a9322a30 12482
81ecdfbb
RW
12483fi
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12485$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12486cat >>confdefs.h <<_ACEOF
12487#define STACK_DIRECTION $ac_cv_c_stack_direction
12488_ACEOF
12489
12490
12491fi
12492
a9322a30 12493for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12494do :
12495 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12496ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12497eval as_val=\$$as_ac_Header
12498 if test "x$as_val" = x""yes; then :
bec39cab 12499 cat >>confdefs.h <<_ACEOF
81ecdfbb 12500#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12501_ACEOF
b757528f 12502
b757528f 12503fi
bec39cab 12504
a9322a30 12505done
a3828db0 12506
a9322a30 12507for ac_func in getpagesize
81ecdfbb
RW
12508do :
12509 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12510if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12511 cat >>confdefs.h <<_ACEOF
81ecdfbb 12512#define HAVE_GETPAGESIZE 1
bec39cab 12513_ACEOF
bcb3dc3d 12514
bcb3dc3d
MK
12515fi
12516done
12517
81ecdfbb
RW
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12519$as_echo_n "checking for working mmap... " >&6; }
12520if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12521 $as_echo_n "(cached) " >&6
a9322a30 12522else
81ecdfbb 12523 if test "$cross_compiling" = yes; then :
a9322a30 12524 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12525else
81ecdfbb 12526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12527/* end confdefs.h. */
a9322a30
TT
12528$ac_includes_default
12529/* malloc might have been renamed as rpl_malloc. */
12530#undef malloc
bec39cab 12531
a9322a30
TT
12532/* Thanks to Mike Haertel and Jim Avera for this test.
12533 Here is a matrix of mmap possibilities:
12534 mmap private not fixed
12535 mmap private fixed at somewhere currently unmapped
12536 mmap private fixed at somewhere already mapped
12537 mmap shared not fixed
12538 mmap shared fixed at somewhere currently unmapped
12539 mmap shared fixed at somewhere already mapped
12540 For private mappings, we should verify that changes cannot be read()
12541 back from the file, nor mmap's back from the file at a different
12542 address. (There have been systems where private was not correctly
12543 implemented like the infamous i386 svr4.0, and systems where the
12544 VM page cache was not coherent with the file system buffer cache
12545 like early versions of FreeBSD and possibly contemporary NetBSD.)
12546 For shared mappings, we should conversely verify that changes get
12547 propagated back to all the places they're supposed to be.
bec39cab 12548
a9322a30
TT
12549 Grep wants private fixed already mapped.
12550 The main things grep needs to know about mmap are:
12551 * does it exist and is it safe to write into the mmap'd area
12552 * how to use it (BSD variants) */
8b9cf735 12553
a9322a30
TT
12554#include <fcntl.h>
12555#include <sys/mman.h>
8b9cf735 12556
81ecdfbb 12557#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12558char *malloc ();
a3828db0
MK
12559#endif
12560
a9322a30 12561/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12562#ifndef HAVE_GETPAGESIZE
a9322a30 12563/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12564# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12565# define HAVE_SYS_PARAM_H 1
12566# endif
12567
12568# ifdef _SC_PAGESIZE
12569# define getpagesize() sysconf(_SC_PAGESIZE)
12570# else /* no _SC_PAGESIZE */
81ecdfbb 12571# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12572# include <sys/param.h>
12573# ifdef EXEC_PAGESIZE
12574# define getpagesize() EXEC_PAGESIZE
12575# else /* no EXEC_PAGESIZE */
12576# ifdef NBPG
12577# define getpagesize() NBPG * CLSIZE
12578# ifndef CLSIZE
12579# define CLSIZE 1
12580# endif /* no CLSIZE */
12581# else /* no NBPG */
12582# ifdef NBPC
12583# define getpagesize() NBPC
12584# else /* no NBPC */
12585# ifdef PAGESIZE
12586# define getpagesize() PAGESIZE
12587# endif /* PAGESIZE */
12588# endif /* no NBPC */
12589# endif /* no NBPG */
12590# endif /* no EXEC_PAGESIZE */
12591# else /* no HAVE_SYS_PARAM_H */
12592# define getpagesize() 8192 /* punt totally */
12593# endif /* no HAVE_SYS_PARAM_H */
12594# endif /* no _SC_PAGESIZE */
12595
12596#endif /* no HAVE_GETPAGESIZE */
12597
bec39cab
AC
12598int
12599main ()
12600{
a9322a30
TT
12601 char *data, *data2, *data3;
12602 int i, pagesize;
12603 int fd;
12604
12605 pagesize = getpagesize ();
12606
12607 /* First, make a file with some known garbage in it. */
12608 data = (char *) malloc (pagesize);
12609 if (!data)
81ecdfbb 12610 return 1;
a9322a30
TT
12611 for (i = 0; i < pagesize; ++i)
12612 *(data + i) = rand ();
12613 umask (0);
12614 fd = creat ("conftest.mmap", 0600);
12615 if (fd < 0)
81ecdfbb 12616 return 1;
a9322a30 12617 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12618 return 1;
a9322a30
TT
12619 close (fd);
12620
12621 /* Next, try to mmap the file at a fixed address which already has
12622 something else allocated at it. If we can, also make sure that
12623 we see the same garbage. */
12624 fd = open ("conftest.mmap", O_RDWR);
12625 if (fd < 0)
81ecdfbb 12626 return 1;
a9322a30
TT
12627 data2 = (char *) malloc (2 * pagesize);
12628 if (!data2)
81ecdfbb
RW
12629 return 1;
12630 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12631 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12632 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12633 return 1;
a9322a30
TT
12634 for (i = 0; i < pagesize; ++i)
12635 if (*(data + i) != *(data2 + i))
81ecdfbb 12636 return 1;
a9322a30
TT
12637
12638 /* Finally, make sure that changes to the mapped area do not
12639 percolate back to the file as seen by read(). (This is a bug on
12640 some variants of i386 svr4.0.) */
12641 for (i = 0; i < pagesize; ++i)
12642 *(data2 + i) = *(data2 + i) + 1;
12643 data3 = (char *) malloc (pagesize);
12644 if (!data3)
81ecdfbb 12645 return 1;
a9322a30 12646 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12647 return 1;
a9322a30
TT
12648 for (i = 0; i < pagesize; ++i)
12649 if (*(data + i) != *(data3 + i))
81ecdfbb 12650 return 1;
a9322a30 12651 close (fd);
81ecdfbb 12652 return 0;
bec39cab
AC
12653}
12654_ACEOF
81ecdfbb 12655if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12656 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12657else
81ecdfbb 12658 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12659fi
81ecdfbb
RW
12660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12661 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12662fi
81ecdfbb 12663
a9322a30 12664fi
81ecdfbb
RW
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12666$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12667if test $ac_cv_func_mmap_fixed_mapped = yes; then
12668
81ecdfbb 12669$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12670
086ec9eb 12671fi
a9322a30 12672rm -f conftest.mmap
a3828db0 12673
81ecdfbb
RW
12674ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12675if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12676
a9322a30
TT
12677else
12678
12679cat >>confdefs.h <<_ACEOF
12680#define pid_t int
bec39cab 12681_ACEOF
086ec9eb
MK
12682
12683fi
12684
81ecdfbb
RW
12685for ac_header in vfork.h
12686do :
12687 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12688if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12689 cat >>confdefs.h <<_ACEOF
81ecdfbb 12690#define HAVE_VFORK_H 1
bec39cab 12691_ACEOF
c906108c
SS
12692
12693fi
a9322a30 12694
a3828db0 12695done
c906108c 12696
a9322a30 12697for ac_func in fork vfork
81ecdfbb
RW
12698do :
12699 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12700ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12701eval as_val=\$$as_ac_var
12702 if test "x$as_val" = x""yes; then :
a3828db0 12703 cat >>confdefs.h <<_ACEOF
81ecdfbb 12704#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12705_ACEOF
b83266a0 12706
97bf5e38 12707fi
a3828db0 12708done
b83266a0 12709
a9322a30 12710if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12712$as_echo_n "checking for working fork... " >&6; }
12713if test "${ac_cv_func_fork_works+set}" = set; then :
12714 $as_echo_n "(cached) " >&6
a9322a30 12715else
81ecdfbb 12716 if test "$cross_compiling" = yes; then :
a9322a30
TT
12717 ac_cv_func_fork_works=cross
12718else
81ecdfbb
RW
12719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12720/* end confdefs.h. */
12721$ac_includes_default
12722int
12723main ()
12724{
12725
12726 /* By Ruediger Kuhlmann. */
12727 return fork () < 0;
12728
12729 ;
12730 return 0;
12731}
a9322a30 12732_ACEOF
81ecdfbb 12733if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12734 ac_cv_func_fork_works=yes
12735else
81ecdfbb 12736 ac_cv_func_fork_works=no
a9322a30 12737fi
81ecdfbb
RW
12738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12739 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12740fi
81ecdfbb 12741
a9322a30 12742fi
81ecdfbb
RW
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12744$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12745
12746else
12747 ac_cv_func_fork_works=$ac_cv_func_fork
12748fi
12749if test "x$ac_cv_func_fork_works" = xcross; then
12750 case $host in
12751 *-*-amigaos* | *-*-msdosdjgpp*)
12752 # Override, as these systems have only a dummy fork() stub
12753 ac_cv_func_fork_works=no
12754 ;;
12755 *)
12756 ac_cv_func_fork_works=yes
12757 ;;
12758 esac
81ecdfbb
RW
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12760$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12761fi
12762ac_cv_func_vfork_works=$ac_cv_func_vfork
12763if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12765$as_echo_n "checking for working vfork... " >&6; }
12766if test "${ac_cv_func_vfork_works+set}" = set; then :
12767 $as_echo_n "(cached) " >&6
a9322a30 12768else
81ecdfbb 12769 if test "$cross_compiling" = yes; then :
a9322a30
TT
12770 ac_cv_func_vfork_works=cross
12771else
81ecdfbb 12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12773/* end confdefs.h. */
12774/* Thanks to Paul Eggert for this test. */
81ecdfbb 12775$ac_includes_default
a9322a30 12776#include <sys/wait.h>
81ecdfbb 12777#ifdef HAVE_VFORK_H
a9322a30
TT
12778# include <vfork.h>
12779#endif
12780/* On some sparc systems, changes by the child to local and incoming
12781 argument registers are propagated back to the parent. The compiler
12782 is told about this with #include <vfork.h>, but some compilers
12783 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12784 static variable whose address is put into a register that is
12785 clobbered by the vfork. */
12786static void
12787#ifdef __cplusplus
12788sparc_address_test (int arg)
12789# else
12790sparc_address_test (arg) int arg;
12791#endif
12792{
12793 static pid_t child;
12794 if (!child) {
12795 child = vfork ();
12796 if (child < 0) {
12797 perror ("vfork");
12798 _exit(2);
12799 }
12800 if (!child) {
12801 arg = getpid();
12802 write(-1, "", 0);
12803 _exit (arg);
12804 }
12805 }
12806}
12807
12808int
12809main ()
12810{
12811 pid_t parent = getpid ();
12812 pid_t child;
12813
12814 sparc_address_test (0);
12815
12816 child = vfork ();
12817
12818 if (child == 0) {
12819 /* Here is another test for sparc vfork register problems. This
12820 test uses lots of local variables, at least as many local
12821 variables as main has allocated so far including compiler
12822 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12823 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12824 reuse the register of parent for one of the local variables,
12825 since it will think that parent can't possibly be used any more
12826 in this routine. Assigning to the local variable will thus
12827 munge parent in the parent process. */
12828 pid_t
12829 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12830 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12831 /* Convince the compiler that p..p7 are live; otherwise, it might
12832 use the same hardware register for all 8 local variables. */
12833 if (p != p1 || p != p2 || p != p3 || p != p4
12834 || p != p5 || p != p6 || p != p7)
12835 _exit(1);
12836
12837 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12838 from child file descriptors. If the child closes a descriptor
12839 before it execs or exits, this munges the parent's descriptor
12840 as well. Test for this by closing stdout in the child. */
12841 _exit(close(fileno(stdout)) != 0);
12842 } else {
12843 int status;
12844 struct stat st;
12845
12846 while (wait(&status) != child)
12847 ;
81ecdfbb 12848 return (
a9322a30
TT
12849 /* Was there some problem with vforking? */
12850 child < 0
12851
12852 /* Did the child fail? (This shouldn't happen.) */
12853 || status
12854
12855 /* Did the vfork/compiler bug occur? */
12856 || parent != getpid()
12857
12858 /* Did the file descriptor bug occur? */
12859 || fstat(fileno(stdout), &st) != 0
12860 );
12861 }
12862}
12863_ACEOF
81ecdfbb 12864if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12865 ac_cv_func_vfork_works=yes
12866else
81ecdfbb 12867 ac_cv_func_vfork_works=no
a9322a30 12868fi
81ecdfbb
RW
12869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12870 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12871fi
81ecdfbb 12872
a9322a30 12873fi
81ecdfbb
RW
12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12875$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12876
12877fi;
12878if test "x$ac_cv_func_fork_works" = xcross; then
12879 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12881$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12882fi
12883
12884if test "x$ac_cv_func_vfork_works" = xyes; then
12885
81ecdfbb 12886$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12887
12888else
12889
81ecdfbb 12890$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12891
12892fi
12893if test "x$ac_cv_func_fork_works" = xyes; then
12894
81ecdfbb 12895$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12896
12897fi
12898
7313baad 12899for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 12900 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 12901 sbrk setpgid setpgrp setsid \
a9322a30 12902 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12903 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 12904 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
12905do :
12906 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12907ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12908eval as_val=\$$as_ac_var
12909 if test "x$as_val" = x""yes; then :
6c7a06a3 12910 cat >>confdefs.h <<_ACEOF
81ecdfbb 12911#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12912_ACEOF
12913
12914fi
12915done
12916
12917
81ecdfbb
RW
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12919$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12920if test "${am_cv_langinfo_codeset+set}" = set; then :
12921 $as_echo_n "(cached) " >&6
6c7a06a3 12922else
81ecdfbb 12923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12924/* end confdefs.h. */
12925#include <langinfo.h>
12926int
12927main ()
12928{
12929char* cs = nl_langinfo(CODESET);
bec39cab
AC
12930 ;
12931 return 0;
12932}
12933_ACEOF
81ecdfbb 12934if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12935 am_cv_langinfo_codeset=yes
a4db0f07 12936else
81ecdfbb 12937 am_cv_langinfo_codeset=no
a4db0f07 12938fi
81ecdfbb
RW
12939rm -f core conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12941
a4db0f07 12942fi
81ecdfbb
RW
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12944$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12945 if test $am_cv_langinfo_codeset = yes; then
12946
81ecdfbb 12947$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12948
6c7a06a3 12949 fi
c906108c 12950
06825bd1 12951
a3828db0
MK
12952# Check the return and argument types of ptrace. No canned test for
12953# this, so roll our own.
12954gdb_ptrace_headers='
12955#if HAVE_SYS_TYPES_H
12956# include <sys/types.h>
12957#endif
12958#if HAVE_SYS_PTRACE_H
12959# include <sys/ptrace.h>
12960#endif
12961#if HAVE_UNISTD_H
12962# include <unistd.h>
12963#endif
12964'
12965# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12966ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12967"
12968if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12969 ac_have_decl=1
06825bd1 12970else
81ecdfbb 12971 ac_have_decl=0
06825bd1 12972fi
06825bd1 12973
a3828db0 12974cat >>confdefs.h <<_ACEOF
81ecdfbb 12975#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12976_ACEOF
81ecdfbb 12977if test $ac_have_decl = 1; then :
bec39cab 12978
a3828db0 12979else
a3828db0
MK
12980
12981 : ${gdb_cv_func_ptrace_ret='int'}
12982 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12983
06825bd1
MK
12984fi
12985
064ef605
DJ
12986# Check return type. Varargs (used on GNU/Linux) conflict with the
12987# empty argument list, so check for that explicitly.
81ecdfbb
RW
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12989$as_echo_n "checking return type of ptrace... " >&6; }
12990if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12991 $as_echo_n "(cached) " >&6
bec39cab 12992else
81ecdfbb 12993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12994/* end confdefs.h. */
a3828db0 12995$gdb_ptrace_headers
bec39cab
AC
12996int
12997main ()
12998{
064ef605
DJ
12999extern long ptrace (enum __ptrace_request, ...);
13000 ;
13001 return 0;
13002}
13003_ACEOF
81ecdfbb 13004if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13005 gdb_cv_func_ptrace_ret='long'
13006else
81ecdfbb 13007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13008/* end confdefs.h. */
13009$gdb_ptrace_headers
13010int
13011main ()
13012{
a3828db0 13013extern int ptrace ();
bec39cab
AC
13014 ;
13015 return 0;
13016}
13017_ACEOF
81ecdfbb 13018if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13019 gdb_cv_func_ptrace_ret='int'
70f9f479 13020else
81ecdfbb 13021 gdb_cv_func_ptrace_ret='long'
70f9f479 13022fi
81ecdfbb 13023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13024fi
81ecdfbb 13025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13026fi
81ecdfbb
RW
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13028$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13029
a3828db0
MK
13030cat >>confdefs.h <<_ACEOF
13031#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13032_ACEOF
70f9f479 13033
a3828db0 13034# Check argument types.
81ecdfbb
RW
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13036$as_echo_n "checking types of arguments for ptrace... " >&6; }
13037if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13038 $as_echo_n "(cached) " >&6
bec39cab 13039else
a3828db0 13040
81ecdfbb 13041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13042/* end confdefs.h. */
13043$gdb_ptrace_headers
13044int
13045main ()
13046{
13047extern long ptrace (enum __ptrace_request, ...);
13048 ;
13049 return 0;
13050}
13051_ACEOF
81ecdfbb 13052if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13053 gdb_cv_func_ptrace_args='int,int,long,long'
13054else
064ef605 13055
a3828db0
MK
13056for gdb_arg1 in 'int' 'long'; do
13057 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13058 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 13059 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 13060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13061/* end confdefs.h. */
a3828db0 13062$gdb_ptrace_headers
bec39cab
AC
13063int
13064main ()
13065{
a3828db0
MK
13066
13067extern $gdb_cv_func_ptrace_ret
13068 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13069
bec39cab
AC
13070 ;
13071 return 0;
13072}
13073_ACEOF
81ecdfbb 13074if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13075 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13076 break 4;
5c7f2947 13077fi
81ecdfbb 13078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13079 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13081/* end confdefs.h. */
a3828db0 13082$gdb_ptrace_headers
bec39cab
AC
13083int
13084main ()
13085{
a3828db0
MK
13086
13087extern $gdb_cv_func_ptrace_ret
13088 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13089
bec39cab
AC
13090 ;
13091 return 0;
13092}
13093_ACEOF
81ecdfbb 13094if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13095
13096gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13097 break 5;
78434e59 13098fi
81ecdfbb 13099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13100 done
13101 done
13102 done
13103 done
13104done
13105# Provide a safe default value.
13106: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13107
064ef605 13108fi
81ecdfbb 13109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13110fi
81ecdfbb
RW
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13112$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13113ac_save_IFS=$IFS; IFS=','
13114set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13115IFS=$ac_save_IFS
13116shift
bec39cab 13117
a3828db0
MK
13118cat >>confdefs.h <<_ACEOF
13119#define PTRACE_TYPE_ARG3 $3
13120_ACEOF
13121
13122if test -n "$5"; then
13123
13124cat >>confdefs.h <<_ACEOF
13125#define PTRACE_TYPE_ARG5 $5
bec39cab 13126_ACEOF
78434e59
MK
13127
13128fi
13129
a3828db0 13130if test "$cross_compiling" = no; then
81ecdfbb
RW
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13132$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13133if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13134 $as_echo_n "(cached) " >&6
a3828db0 13135else
81ecdfbb
RW
13136 if test "$cross_compiling" = yes; then :
13137 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13138else
81ecdfbb 13139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13140/* end confdefs.h. */
81ecdfbb 13141$ac_includes_default
bec39cab
AC
13142int
13143main ()
13144{
a3828db0
MK
13145/* If this system has a BSD-style setpgrp which takes arguments,
13146 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13147 exit successfully. */
81ecdfbb 13148 return setpgrp (1,1) != -1;
bec39cab
AC
13149 ;
13150 return 0;
13151}
13152_ACEOF
81ecdfbb 13153if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13154 ac_cv_func_setpgrp_void=no
c906108c 13155else
81ecdfbb 13156 ac_cv_func_setpgrp_void=yes
c906108c 13157fi
81ecdfbb
RW
13158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13159 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13160fi
81ecdfbb 13161
a3828db0 13162fi
81ecdfbb
RW
13163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13164$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13165if test $ac_cv_func_setpgrp_void = yes; then
13166
81ecdfbb 13167$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13168
13169fi
a3828db0
MK
13170
13171else
81ecdfbb
RW
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13173$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13174if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13175 $as_echo_n "(cached) " >&6
97bf5e38 13176else
81ecdfbb 13177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13178/* end confdefs.h. */
a3828db0
MK
13179
13180#include <unistd.h>
13181
bec39cab
AC
13182int
13183main ()
13184{
a3828db0
MK
13185
13186 if (setpgrp(1,1) == -1)
13187 exit (0);
13188 else
13189 exit (1);
13190
bec39cab
AC
13191 ;
13192 return 0;
13193}
13194_ACEOF
81ecdfbb 13195if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13196 ac_cv_func_setpgrp_void=no
c906108c 13197else
81ecdfbb 13198 ac_cv_func_setpgrp_void=yes
c906108c 13199fi
81ecdfbb 13200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13201fi
81ecdfbb
RW
13202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13203$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13204if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13205 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13206
a3828db0 13207fi
c906108c
SS
13208fi
13209
a3828db0
MK
13210# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
13211# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
13212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13213$as_echo_n "checking for sigsetjmp... " >&6; }
13214if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13215 $as_echo_n "(cached) " >&6
bec39cab 13216else
81ecdfbb 13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13218/* end confdefs.h. */
a3828db0
MK
13219
13220#include <setjmp.h>
13221
bec39cab
AC
13222int
13223main ()
13224{
a3828db0 13225sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
13226 ;
13227 return 0;
13228}
13229_ACEOF
81ecdfbb 13230if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13231 gdb_cv_func_sigsetjmp=yes
c906108c 13232else
81ecdfbb 13233 gdb_cv_func_sigsetjmp=no
c906108c 13234fi
81ecdfbb 13235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13236fi
81ecdfbb
RW
13237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13238$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 13239if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 13240
81ecdfbb 13241$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 13242
97bf5e38 13243fi
c906108c 13244
a3828db0
MK
13245# Assume we'll default to using the included libiberty regex.
13246gdb_use_included_regex=yes
13247
13248# However, if the system regex is GNU regex, then default to *not*
13249# using the included regex.
81ecdfbb
RW
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13251$as_echo_n "checking for GNU regex... " >&6; }
13252if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13253 $as_echo_n "(cached) " >&6
bec39cab 13254else
81ecdfbb 13255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13256/* end confdefs.h. */
a3828db0 13257#include <gnu-versions.h>
bec39cab
AC
13258int
13259main ()
13260{
81ecdfbb
RW
13261#define REGEX_INTERFACE_VERSION 1
13262#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13263# error "Version mismatch"
13264#endif
5c45e068
MK
13265 ;
13266 return 0;
13267}
13268_ACEOF
81ecdfbb
RW
13269if ac_fn_c_try_compile "$LINENO"; then :
13270 gdb_cv_have_gnu_regex=yes
5c45e068 13271else
81ecdfbb
RW
13272 gdb_cv_have_gnu_regex=no
13273fi
13274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13275fi
13276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13277$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13278if test $gdb_cv_have_gnu_regex = yes; then
13279 gdb_use_included_regex=no
5c45e068 13280fi
81ecdfbb
RW
13281
13282
13283# Check whether --with-included-regex was given.
13284if test "${with_included_regex+set}" = set; then :
13285 withval=$with_included_regex; gdb_with_regex=$withval
13286else
13287 gdb_with_regex=$gdb_use_included_regex
c906108c 13288fi
81ecdfbb
RW
13289
13290if test "$gdb_with_regex" = yes; then
13291
13292$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13293
c906108c 13294fi
81ecdfbb
RW
13295
13296# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13297ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13298#include <sys/proc.h>
13299
13300"
13301if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13302
5c45e068 13303cat >>confdefs.h <<_ACEOF
a3828db0 13304#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13305_ACEOF
c906108c 13306
5c45e068 13307
97bf5e38 13308fi
c906108c 13309
5c45e068 13310
a3828db0 13311# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13313$as_echo_n "checking for struct lwp... " >&6; }
13314if test "${gdb_cv_struct_lwp+set}" = set; then :
13315 $as_echo_n "(cached) " >&6
bec39cab 13316else
81ecdfbb 13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13318/* end confdefs.h. */
a3828db0
MK
13319#include <sys/param.h>
13320#include <sys/lwp.h>
bec39cab
AC
13321int
13322main ()
13323{
a3828db0 13324struct lwp l;
bec39cab
AC
13325 ;
13326 return 0;
13327}
13328_ACEOF
81ecdfbb 13329if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13330 gdb_cv_struct_lwp=yes
c906108c 13331else
81ecdfbb 13332 gdb_cv_struct_lwp=no
c906108c 13333fi
81ecdfbb 13334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13335fi
81ecdfbb
RW
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13337$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13338if test $gdb_cv_struct_lwp = yes; then
c906108c 13339
81ecdfbb 13340$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13341
97bf5e38 13342fi
c906108c 13343
a3828db0 13344# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13346$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13347if test "${gdb_cv_struct_reg+set}" = set; then :
13348 $as_echo_n "(cached) " >&6
bec39cab 13349else
81ecdfbb 13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13351/* end confdefs.h. */
a3828db0
MK
13352#include <sys/types.h>
13353#include <machine/reg.h>
bec39cab
AC
13354int
13355main ()
13356{
a3828db0 13357struct reg r;
bec39cab
AC
13358 ;
13359 return 0;
13360}
13361_ACEOF
81ecdfbb 13362if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13363 gdb_cv_struct_reg=yes
27ca5dad 13364else
81ecdfbb 13365 gdb_cv_struct_reg=no
27ca5dad 13366fi
81ecdfbb 13367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13368fi
81ecdfbb
RW
13369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13370$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13371if test $gdb_cv_struct_reg = yes; then
bec39cab 13372
81ecdfbb 13373$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13374
13375fi
97bf5e38 13376
a3828db0
MK
13377# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13378# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13379ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13380"
13381if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13382
13383cat >>confdefs.h <<_ACEOF
a3828db0 13384#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13385_ACEOF
3862412b 13386
5c45e068 13387
97bf5e38 13388fi
81ecdfbb
RW
13389ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13390"
13391if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13392
13393cat >>confdefs.h <<_ACEOF
a3828db0 13394#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13395_ACEOF
3862412b 13396
5c45e068 13397
97bf5e38 13398fi
3862412b 13399
5c45e068 13400
a3828db0 13401# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13403$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13404if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13405 $as_echo_n "(cached) " >&6
451928c5 13406else
81ecdfbb 13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13408/* end confdefs.h. */
a3828db0 13409#include <sys/ptrace.h>
bec39cab
AC
13410int
13411main ()
13412{
a3828db0 13413PTRACE_GETREGS;
bec39cab
AC
13414 ;
13415 return 0;
13416}
13417_ACEOF
81ecdfbb 13418if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13419 gdb_cv_have_ptrace_getregs=yes
451928c5 13420else
81ecdfbb 13421 gdb_cv_have_ptrace_getregs=no
451928c5 13422fi
81ecdfbb 13423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13424fi
13425
81ecdfbb
RW
13426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13427$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13428if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13429
81ecdfbb 13430$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13431
97bf5e38 13432fi
451928c5 13433
a3828db0 13434# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13436$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13437if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13438 $as_echo_n "(cached) " >&6
451928c5 13439else
81ecdfbb 13440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13441/* end confdefs.h. */
a3828db0 13442#include <sys/ptrace.h>
bec39cab
AC
13443int
13444main ()
13445{
a3828db0 13446PTRACE_GETFPXREGS;
bec39cab
AC
13447 ;
13448 return 0;
13449}
13450_ACEOF
81ecdfbb 13451if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13452 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13453else
81ecdfbb 13454 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13455fi
81ecdfbb 13456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13457fi
13458
81ecdfbb
RW
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13460$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13461if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13462
81ecdfbb 13463$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13464
97bf5e38 13465fi
451928c5 13466
a3828db0 13467# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13469$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13470if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13471 $as_echo_n "(cached) " >&6
3862412b 13472else
81ecdfbb 13473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13474/* end confdefs.h. */
a3828db0
MK
13475#include <sys/types.h>
13476#include <sys/ptrace.h>
bec39cab
AC
13477int
13478main ()
13479{
a3828db0 13480PT_GETDBREGS;
bec39cab
AC
13481 ;
13482 return 0;
13483}
13484_ACEOF
81ecdfbb 13485if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13486 gdb_cv_have_pt_getdbregs=yes
3862412b 13487else
81ecdfbb 13488 gdb_cv_have_pt_getdbregs=no
3862412b 13489fi
81ecdfbb 13490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13491fi
13492
81ecdfbb
RW
13493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13494$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13495if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13496
81ecdfbb 13497$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13498
97bf5e38 13499fi
3862412b 13500
a3828db0 13501# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13503$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13504if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13505 $as_echo_n "(cached) " >&6
3862412b 13506else
81ecdfbb 13507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13508/* end confdefs.h. */
a3828db0
MK
13509#include <sys/types.h>
13510#include <sys/ptrace.h>
bec39cab
AC
13511int
13512main ()
13513{
a3828db0 13514PT_GETXMMREGS;
bec39cab
AC
13515 ;
13516 return 0;
13517}
13518_ACEOF
81ecdfbb 13519if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13520 gdb_cv_have_pt_getxmmregs=yes
3862412b 13521else
81ecdfbb 13522 gdb_cv_have_pt_getxmmregs=no
3862412b 13523fi
81ecdfbb 13524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13525fi
13526
81ecdfbb
RW
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13528$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13529if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13530
81ecdfbb 13531$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13532
97bf5e38 13533fi
3862412b 13534
eb368090 13535# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13536
13537if test "${target}" = "${host}"; then
13538 case "${host}" in
97bf5e38 13539 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13540
81ecdfbb 13541$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13542
13543 ;;
c162e8c9 13544 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13545
81ecdfbb 13546$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13547
13548 ;;
13549 mips-sgi-irix5*)
13550 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13551
81ecdfbb 13552$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13553
13554 ;;
13555 esac
13556fi
13557
13558if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13560$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13561 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
bec39cab 13563else
81ecdfbb 13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13565/* end confdefs.h. */
596c9d4b
KB
13566
13567#define _SYSCALL32
d30c5336
JK
13568/* Needed for new procfs interface on sparc-solaris. */
13569#define _STRUCTURED_PROC 1
596c9d4b 13570#include <sys/procfs.h>
bec39cab
AC
13571int
13572main ()
13573{
97bf5e38 13574pstatus_t avar
bec39cab
AC
13575 ;
13576 return 0;
13577}
13578_ACEOF
81ecdfbb 13579if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13580 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13581else
81ecdfbb 13582 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13583
596c9d4b 13584fi
81ecdfbb 13585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13586fi
13587
97bf5e38 13588 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13589
81ecdfbb 13590$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13591
13592 fi
81ecdfbb
RW
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13594$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13595
81ecdfbb
RW
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13597$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13598 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13599 $as_echo_n "(cached) " >&6
596c9d4b 13600else
81ecdfbb 13601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13602/* end confdefs.h. */
596c9d4b
KB
13603
13604#define _SYSCALL32
d30c5336
JK
13605/* Needed for new procfs interface on sparc-solaris. */
13606#define _STRUCTURED_PROC 1
596c9d4b 13607#include <sys/procfs.h>
bec39cab
AC
13608int
13609main ()
13610{
97bf5e38 13611prrun_t avar
bec39cab
AC
13612 ;
13613 return 0;
13614}
13615_ACEOF
81ecdfbb 13616if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13617 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13618else
81ecdfbb 13619 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13620
596c9d4b 13621fi
81ecdfbb 13622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13623fi
13624
97bf5e38 13625 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13626
81ecdfbb 13627$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13628
13629 fi
81ecdfbb
RW
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13631$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13632
81ecdfbb
RW
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13634$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13635 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13636 $as_echo_n "(cached) " >&6
596c9d4b 13637else
81ecdfbb 13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13639/* end confdefs.h. */
596c9d4b
KB
13640
13641#define _SYSCALL32
d30c5336
JK
13642/* Needed for new procfs interface on sparc-solaris. */
13643#define _STRUCTURED_PROC 1
596c9d4b 13644#include <sys/procfs.h>
bec39cab
AC
13645int
13646main ()
13647{
97bf5e38 13648gregset_t avar
bec39cab
AC
13649 ;
13650 return 0;
13651}
13652_ACEOF
81ecdfbb 13653if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13654 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13655else
81ecdfbb 13656 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13657
596c9d4b 13658fi
81ecdfbb 13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13660fi
13661
97bf5e38 13662 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13663
81ecdfbb 13664$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13665
13666 fi
81ecdfbb
RW
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13668$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13669
81ecdfbb
RW
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13671$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13672 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13673 $as_echo_n "(cached) " >&6
d84dd0c5 13674else
81ecdfbb 13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13676/* end confdefs.h. */
97bf5e38
MK
13677
13678#define _SYSCALL32
d30c5336
JK
13679/* Needed for new procfs interface on sparc-solaris. */
13680#define _STRUCTURED_PROC 1
d84dd0c5 13681#include <sys/procfs.h>
bec39cab
AC
13682int
13683main ()
13684{
97bf5e38 13685fpregset_t avar
bec39cab
AC
13686 ;
13687 return 0;
13688}
13689_ACEOF
81ecdfbb 13690if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13691 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13692else
81ecdfbb 13693 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13694
d84dd0c5 13695fi
81ecdfbb 13696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13697fi
13698
97bf5e38 13699 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13700
81ecdfbb 13701$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13702
97bf5e38 13703 fi
81ecdfbb
RW
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13705$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13706
81ecdfbb
RW
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13708$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13709 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13710 $as_echo_n "(cached) " >&6
c906108c 13711else
81ecdfbb 13712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13713/* end confdefs.h. */
c906108c 13714
97bf5e38 13715#define _SYSCALL32
d30c5336
JK
13716/* Needed for new procfs interface on sparc-solaris. */
13717#define _STRUCTURED_PROC 1
97bf5e38 13718#include <sys/procfs.h>
bec39cab
AC
13719int
13720main ()
13721{
97bf5e38 13722prgregset_t avar
bec39cab
AC
13723 ;
13724 return 0;
13725}
13726_ACEOF
81ecdfbb 13727if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13728 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13729else
81ecdfbb 13730 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13731
c906108c 13732fi
81ecdfbb 13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13734fi
13735
97bf5e38 13736 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13737
81ecdfbb 13738$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13739
97bf5e38 13740 fi
81ecdfbb
RW
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13742$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13743
81ecdfbb
RW
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13745$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13746 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13747 $as_echo_n "(cached) " >&6
d45fe813 13748else
81ecdfbb 13749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13750/* end confdefs.h. */
97bf5e38
MK
13751
13752#define _SYSCALL32
d30c5336
JK
13753/* Needed for new procfs interface on sparc-solaris. */
13754#define _STRUCTURED_PROC 1
97bf5e38 13755#include <sys/procfs.h>
bec39cab
AC
13756int
13757main ()
13758{
97bf5e38 13759prfpregset_t avar
bec39cab
AC
13760 ;
13761 return 0;
13762}
13763_ACEOF
81ecdfbb 13764if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13765 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13766else
81ecdfbb 13767 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13768
d45fe813 13769fi
81ecdfbb 13770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13771fi
13772
97bf5e38 13773 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13774
81ecdfbb 13775$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13776
97bf5e38 13777 fi
81ecdfbb
RW
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13779$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13780
81ecdfbb
RW
13781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13782$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13783 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13784 $as_echo_n "(cached) " >&6
d45fe813 13785else
81ecdfbb 13786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13787/* end confdefs.h. */
97bf5e38
MK
13788
13789#define _SYSCALL32
d30c5336
JK
13790/* Needed for new procfs interface on sparc-solaris. */
13791#define _STRUCTURED_PROC 1
97bf5e38 13792#include <sys/procfs.h>
bec39cab
AC
13793int
13794main ()
13795{
97bf5e38 13796prgregset32_t avar
bec39cab
AC
13797 ;
13798 return 0;
13799}
13800_ACEOF
81ecdfbb 13801if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13802 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13803else
81ecdfbb 13804 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13805
d45fe813 13806fi
81ecdfbb 13807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13808fi
13809
97bf5e38 13810 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13811
81ecdfbb 13812$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13813
97bf5e38 13814 fi
81ecdfbb
RW
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13816$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13817
81ecdfbb
RW
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13819$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13820 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13821 $as_echo_n "(cached) " >&6
d45fe813 13822else
81ecdfbb 13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13824/* end confdefs.h. */
97bf5e38
MK
13825
13826#define _SYSCALL32
d30c5336
JK
13827/* Needed for new procfs interface on sparc-solaris. */
13828#define _STRUCTURED_PROC 1
97bf5e38 13829#include <sys/procfs.h>
bec39cab
AC
13830int
13831main ()
13832{
97bf5e38 13833prfpregset32_t avar
bec39cab
AC
13834 ;
13835 return 0;
13836}
13837_ACEOF
81ecdfbb 13838if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13839 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13840else
81ecdfbb 13841 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13842
d45fe813 13843fi
81ecdfbb 13844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13845fi
13846
97bf5e38 13847 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13848
81ecdfbb 13849$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13850
97bf5e38 13851 fi
81ecdfbb
RW
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13853$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13854
81ecdfbb
RW
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13856$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13857 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13858 $as_echo_n "(cached) " >&6
d45fe813 13859else
81ecdfbb 13860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13861/* end confdefs.h. */
97bf5e38 13862
d45fe813 13863#define _SYSCALL32
d30c5336
JK
13864/* Needed for new procfs interface on sparc-solaris. */
13865#define _STRUCTURED_PROC 1
97bf5e38 13866#include <sys/procfs.h>
bec39cab
AC
13867int
13868main ()
13869{
97bf5e38 13870lwpid_t avar
bec39cab
AC
13871 ;
13872 return 0;
13873}
13874_ACEOF
81ecdfbb 13875if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13876 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13877else
81ecdfbb 13878 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13879
d45fe813 13880fi
81ecdfbb 13881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13882fi
13883
97bf5e38 13884 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13885
81ecdfbb 13886$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13887
97bf5e38 13888 fi
81ecdfbb
RW
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13890$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13891
81ecdfbb
RW
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13893$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13894 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13895 $as_echo_n "(cached) " >&6
c906108c 13896else
81ecdfbb 13897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13898/* end confdefs.h. */
c906108c 13899
97bf5e38 13900#define _SYSCALL32
d30c5336
JK
13901/* Needed for new procfs interface on sparc-solaris. */
13902#define _STRUCTURED_PROC 1
97bf5e38 13903#include <sys/procfs.h>
bec39cab
AC
13904int
13905main ()
13906{
97bf5e38 13907psaddr_t avar
bec39cab
AC
13908 ;
13909 return 0;
13910}
13911_ACEOF
81ecdfbb 13912if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13913 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13914else
81ecdfbb 13915 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13916
c906108c 13917fi
81ecdfbb 13918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13919fi
13920
97bf5e38 13921 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13922
81ecdfbb 13923$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13924
97bf5e38 13925 fi
81ecdfbb
RW
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13927$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13928
81ecdfbb
RW
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13930$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13931 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13932 $as_echo_n "(cached) " >&6
c906108c 13933else
81ecdfbb 13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13935/* end confdefs.h. */
c906108c 13936
97bf5e38 13937#define _SYSCALL32
d30c5336
JK
13938/* Needed for new procfs interface on sparc-solaris. */
13939#define _STRUCTURED_PROC 1
97bf5e38 13940#include <sys/procfs.h>
bec39cab
AC
13941int
13942main ()
13943{
97bf5e38 13944prsysent_t avar
bec39cab
AC
13945 ;
13946 return 0;
13947}
13948_ACEOF
81ecdfbb 13949if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13950 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13951else
81ecdfbb 13952 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13953
c906108c 13954fi
81ecdfbb 13955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13956fi
13957
97bf5e38 13958 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13959
81ecdfbb 13960$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13961
97bf5e38 13962 fi
81ecdfbb
RW
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13964$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13965
81ecdfbb
RW
13966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13967$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13968 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13969 $as_echo_n "(cached) " >&6
c906108c 13970else
81ecdfbb 13971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13972/* end confdefs.h. */
c906108c 13973
97bf5e38 13974#define _SYSCALL32
d30c5336
JK
13975/* Needed for new procfs interface on sparc-solaris. */
13976#define _STRUCTURED_PROC 1
97bf5e38 13977#include <sys/procfs.h>
bec39cab
AC
13978int
13979main ()
13980{
97bf5e38 13981pr_sigset_t avar
bec39cab
AC
13982 ;
13983 return 0;
13984}
13985_ACEOF
81ecdfbb 13986if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13987 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13988else
81ecdfbb 13989 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13990
c906108c 13991fi
81ecdfbb 13992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13993fi
13994
97bf5e38 13995 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13996
81ecdfbb 13997$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13998
97bf5e38 13999 fi
81ecdfbb
RW
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14001$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14002
81ecdfbb
RW
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14004$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14005 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14006 $as_echo_n "(cached) " >&6
c906108c 14007else
81ecdfbb 14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14009/* end confdefs.h. */
c906108c 14010
97bf5e38 14011#define _SYSCALL32
d30c5336
JK
14012/* Needed for new procfs interface on sparc-solaris. */
14013#define _STRUCTURED_PROC 1
97bf5e38 14014#include <sys/procfs.h>
bec39cab
AC
14015int
14016main ()
14017{
97bf5e38 14018pr_sigaction64_t avar
bec39cab
AC
14019 ;
14020 return 0;
14021}
14022_ACEOF
81ecdfbb 14023if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14024 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14025else
81ecdfbb 14026 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14027
c906108c 14028fi
81ecdfbb 14029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14030fi
14031
97bf5e38 14032 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14033
81ecdfbb 14034$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14035
97bf5e38 14036 fi
81ecdfbb
RW
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14038$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14039
81ecdfbb
RW
14040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14041$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14042 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14043 $as_echo_n "(cached) " >&6
97bf5e38 14044else
81ecdfbb 14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14046/* end confdefs.h. */
97bf5e38
MK
14047
14048#define _SYSCALL32
d30c5336
JK
14049/* Needed for new procfs interface on sparc-solaris. */
14050#define _STRUCTURED_PROC 1
97bf5e38 14051#include <sys/procfs.h>
bec39cab
AC
14052int
14053main ()
14054{
97bf5e38 14055pr_siginfo64_t avar
bec39cab
AC
14056 ;
14057 return 0;
14058}
14059_ACEOF
81ecdfbb 14060if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14061 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14062else
81ecdfbb 14063 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14064
97bf5e38 14065fi
81ecdfbb 14066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14067fi
c906108c 14068
97bf5e38 14069 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14070
81ecdfbb 14071$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14072
97bf5e38 14073 fi
81ecdfbb
RW
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14075$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14076
14077
97bf5e38
MK
14078
14079
14080
97bf5e38 14081 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14083$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14084 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14085 $as_echo_n "(cached) " >&6
c906108c 14086else
81ecdfbb 14087 if test "$cross_compiling" = yes; then :
97bf5e38 14088 gdb_cv_prfpregset_t_broken=yes
c906108c 14089else
81ecdfbb 14090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14091/* end confdefs.h. */
97bf5e38
MK
14092#include <sys/procfs.h>
14093 int main ()
14094 {
14095 if (sizeof (prfpregset_t) == sizeof (void *))
14096 return 1;
14097 return 0;
14098 }
bec39cab 14099_ACEOF
81ecdfbb 14100if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14101 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14102else
14103 gdb_cv_prfpregset_t_broken=yes
c906108c 14104fi
81ecdfbb
RW
14105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14106 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14107fi
81ecdfbb 14108
c906108c
SS
14109fi
14110
81ecdfbb
RW
14111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14112$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14113 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14114
81ecdfbb 14115$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14116
97bf5e38
MK
14117 fi
14118 fi
c906108c 14119
bec39cab 14120
81ecdfbb
RW
14121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
14122$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
14123 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
14124 $as_echo_n "(cached) " >&6
c906108c 14125else
81ecdfbb 14126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14127/* end confdefs.h. */
97bf5e38
MK
14128#include <unistd.h>
14129#include <sys/types.h>
14130#include <sys/procfs.h>
14131
bec39cab
AC
14132int
14133main ()
14134{
97bf5e38
MK
14135
14136 int dummy;;
14137 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
14138
14139 ;
14140 return 0;
14141}
14142_ACEOF
81ecdfbb 14143if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14144 gdb_cv_have_procfs_piocset=yes
c906108c 14145else
81ecdfbb 14146 gdb_cv_have_procfs_piocset=no
c906108c 14147fi
81ecdfbb 14148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14149fi
97bf5e38 14150
81ecdfbb
RW
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
14152$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 14153 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 14154
81ecdfbb 14155$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
14156
14157 fi
c906108c 14158fi
c906108c 14159
97bf5e38 14160if test ${host} = ${target} ; then
bec39cab 14161
81ecdfbb
RW
14162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
14163$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
14164 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
14165 $as_echo_n "(cached) " >&6
bec39cab 14166else
81ecdfbb 14167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14168/* end confdefs.h. */
97bf5e38 14169#include <link.h>
bec39cab
AC
14170int
14171main ()
14172{
97bf5e38 14173struct link_map lm; (void) lm.l_addr;
bec39cab
AC
14174 ;
14175 return 0;
14176}
14177_ACEOF
81ecdfbb 14178if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14179 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 14180else
81ecdfbb 14181 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 14182fi
81ecdfbb 14183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14184fi
14185
81ecdfbb
RW
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
14187$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 14188 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 14189
81ecdfbb 14190$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14191
14192 fi
14193
bec39cab 14194
81ecdfbb
RW
14195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
14196$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
14197 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
14198 $as_echo_n "(cached) " >&6
c906108c 14199else
81ecdfbb 14200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14201/* end confdefs.h. */
97bf5e38
MK
14202#include <sys/types.h>
14203#include <link.h>
bec39cab
AC
14204int
14205main ()
14206{
97bf5e38 14207struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
14208 ;
14209 return 0;
14210}
14211_ACEOF
81ecdfbb 14212if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14213 gdb_cv_have_struct_link_map_with_lm_members=yes
14214else
81ecdfbb 14215 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 14216fi
81ecdfbb 14217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14218fi
c906108c 14219
81ecdfbb
RW
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
14221$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 14222 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 14223
81ecdfbb 14224$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
14225
14226 fi
14227
bec39cab 14228
81ecdfbb
RW
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
14230$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
14231 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
14232 $as_echo_n "(cached) " >&6
c906108c 14233else
81ecdfbb 14234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14235/* end confdefs.h. */
97bf5e38
MK
14236#include <sys/types.h>
14237#ifdef HAVE_NLIST_H
14238#include <nlist.h>
14239#endif
14240#include <link.h>
bec39cab
AC
14241int
14242main ()
14243{
97bf5e38 14244struct so_map lm; (void) lm.som_addr;
bec39cab
AC
14245 ;
14246 return 0;
14247}
14248_ACEOF
81ecdfbb 14249if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14250 gdb_cv_have_struct_so_map_with_som_members=yes
14251else
81ecdfbb 14252 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 14253fi
81ecdfbb 14254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14255fi
c906108c 14256
81ecdfbb
RW
14257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
14258$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 14259 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 14260
81ecdfbb 14261$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 14262
97bf5e38 14263 fi
c906108c 14264
bec39cab 14265
81ecdfbb
RW
14266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
14267$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
14268 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
14269 $as_echo_n "(cached) " >&6
97bf5e38 14270else
81ecdfbb 14271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14272/* end confdefs.h. */
97bf5e38
MK
14273#define _SYSCALL32
14274#include <sys/link.h>
bec39cab
AC
14275int
14276main ()
14277{
97bf5e38 14278struct link_map32 l;
bec39cab
AC
14279 ;
14280 return 0;
14281}
14282_ACEOF
81ecdfbb 14283if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14284 gdb_cv_have_struct_link_map32=yes
14285else
81ecdfbb 14286 gdb_cv_have_struct_link_map32=no
97bf5e38 14287fi
81ecdfbb 14288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14289fi
c906108c 14290
81ecdfbb
RW
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
14292$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 14293 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 14294
81ecdfbb 14295$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 14296
60ca704f 14297
81ecdfbb 14298$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 14299
97bf5e38
MK
14300 fi
14301fi
c906108c 14302
bc8bcb4b 14303# Check if the compiler supports the `long long' type.
c906108c 14304
81ecdfbb
RW
14305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14306$as_echo_n "checking for long long support in compiler... " >&6; }
14307if test "${gdb_cv_c_long_long+set}" = set; then :
14308 $as_echo_n "(cached) " >&6
97bf5e38 14309else
81ecdfbb 14310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14311/* end confdefs.h. */
bc8bcb4b 14312extern long long foo;
bec39cab
AC
14313int
14314main ()
14315{
bc8bcb4b 14316switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14317 ;
14318 return 0;
14319}
14320_ACEOF
81ecdfbb 14321if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14322 gdb_cv_c_long_long=yes
14323else
81ecdfbb 14324 gdb_cv_c_long_long=no
97bf5e38 14325fi
81ecdfbb 14326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14327fi
81ecdfbb
RW
14328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14329$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14330if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14331
81ecdfbb 14332$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14333
14334fi
14335
bc8bcb4b 14336# Check if the compiler and runtime support printing long longs.
97bf5e38 14337
81ecdfbb
RW
14338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14339$as_echo_n "checking for long long support in printf... " >&6; }
14340if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14341 $as_echo_n "(cached) " >&6
97bf5e38 14342else
81ecdfbb 14343 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14344 gdb_cv_printf_has_long_long=no
14345else
81ecdfbb 14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14347/* end confdefs.h. */
bc8bcb4b
MK
14348$ac_includes_default
14349int
14350main ()
14351{
14352char buf[32];
97bf5e38
MK
14353 long long l = 0;
14354 l = (l << 16) + 0x0123;
14355 l = (l << 16) + 0x4567;
14356 l = (l << 16) + 0x89ab;
14357 l = (l << 16) + 0xcdef;
14358 sprintf (buf, "0x%016llx", l);
14359 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14360 ;
14361 return 0;
c906108c 14362}
bec39cab 14363_ACEOF
81ecdfbb 14364if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14365 gdb_cv_printf_has_long_long=yes
14366else
81ecdfbb 14367 gdb_cv_printf_has_long_long=no
97bf5e38 14368fi
81ecdfbb
RW
14369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14370 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14371fi
81ecdfbb 14372
97bf5e38 14373fi
81ecdfbb
RW
14374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14375$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14376if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14377
81ecdfbb 14378$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14379
14380fi
97bf5e38 14381
1a619819
LM
14382# Check if the compiler and runtime support printing decfloats.
14383
81ecdfbb
RW
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14385$as_echo_n "checking for decfloat support in printf... " >&6; }
14386if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14387 $as_echo_n "(cached) " >&6
1a619819 14388else
81ecdfbb 14389 if test "$cross_compiling" = yes; then :
1a619819
LM
14390 gdb_cv_printf_has_decfloat=no
14391else
81ecdfbb 14392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14393/* end confdefs.h. */
14394$ac_includes_default
14395int
14396main ()
14397{
14398char buf[64];
14399 _Decimal32 d32 = 1.2345df;
14400 _Decimal64 d64 = 1.2345dd;
14401 _Decimal128 d128 = 1.2345dl;
14402 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14403 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14404 ;
14405 return 0;
14406}
14407_ACEOF
81ecdfbb 14408if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14409 gdb_cv_printf_has_decfloat=yes
14410else
81ecdfbb 14411 gdb_cv_printf_has_decfloat=no
1a619819 14412fi
81ecdfbb
RW
14413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14414 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14415fi
81ecdfbb 14416
1a619819 14417fi
81ecdfbb
RW
14418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14419$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14420if test $gdb_cv_printf_has_decfloat = yes; then
14421
81ecdfbb 14422$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14423
14424fi
14425
bc8bcb4b
MK
14426# Check if the compiler supports the `long double' type. We can't use
14427# AC_C_LONG_DOUBLE because that one does additional checks on the
14428# constants defined in <float.h> that fail on some systems,
14429# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14430
81ecdfbb
RW
14431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14432$as_echo_n "checking for long double support in compiler... " >&6; }
14433if test "${gdb_cv_c_long_double+set}" = set; then :
14434 $as_echo_n "(cached) " >&6
97bf5e38 14435else
81ecdfbb 14436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14437/* end confdefs.h. */
97bf5e38 14438long double foo;
bec39cab 14439_ACEOF
81ecdfbb 14440if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14441 gdb_cv_c_long_double=yes
97bf5e38 14442else
81ecdfbb 14443 gdb_cv_c_long_double=no
97bf5e38 14444fi
81ecdfbb 14445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14446fi
81ecdfbb
RW
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14448$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14449if test $gdb_cv_c_long_double = yes; then
c906108c 14450
81ecdfbb 14451$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14452
14453fi
14454
bc8bcb4b 14455# Check if the compiler and runtime support printing long doubles.
97bf5e38 14456
81ecdfbb
RW
14457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14458$as_echo_n "checking for long double support in printf... " >&6; }
14459if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14460 $as_echo_n "(cached) " >&6
97bf5e38 14461else
81ecdfbb 14462 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14463 gdb_cv_printf_has_long_double=no
14464else
81ecdfbb 14465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14466/* end confdefs.h. */
bc8bcb4b
MK
14467$ac_includes_default
14468int
14469main ()
14470{
14471char buf[16];
97bf5e38
MK
14472 long double f = 3.141592653;
14473 sprintf (buf, "%Lg", f);
14474 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14475 ;
14476 return 0;
97bf5e38 14477}
bec39cab 14478_ACEOF
81ecdfbb 14479if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14480 gdb_cv_printf_has_long_double=yes
c906108c 14481else
81ecdfbb 14482 gdb_cv_printf_has_long_double=no
c906108c 14483fi
81ecdfbb
RW
14484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14485 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14486fi
81ecdfbb 14487
c906108c 14488fi
81ecdfbb
RW
14489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14490$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14491if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14492
81ecdfbb 14493$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14494
14495fi
97bf5e38 14496
bc8bcb4b 14497# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14498
81ecdfbb
RW
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14500$as_echo_n "checking for long double support in scanf... " >&6; }
14501if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14502 $as_echo_n "(cached) " >&6
97bf5e38 14503else
81ecdfbb 14504 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14505 gdb_cv_scanf_has_long_double=no
14506else
81ecdfbb 14507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14508/* end confdefs.h. */
bc8bcb4b
MK
14509#include <stdio.h>
14510int
14511main ()
14512{
14513char *buf = "3.141592653";
97bf5e38
MK
14514 long double f = 0;
14515 sscanf (buf, "%Lg", &f);
14516 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14517 ;
14518 return 0;
97bf5e38 14519}
bec39cab 14520_ACEOF
81ecdfbb 14521if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14522 gdb_cv_scanf_has_long_double=yes
14523else
81ecdfbb 14524 gdb_cv_scanf_has_long_double=no
97bf5e38 14525fi
81ecdfbb
RW
14526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14527 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14528fi
81ecdfbb 14529
c906108c 14530fi
81ecdfbb
RW
14531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14532$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14533if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14534
81ecdfbb 14535$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14536
14537fi
c906108c 14538
438013df
AO
14539case ${host_os} in
14540aix*)
81ecdfbb
RW
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14542$as_echo_n "checking for -bbigtoc option... " >&6; }
14543if test "${gdb_cv_bigtoc+set}" = set; then :
14544 $as_echo_n "(cached) " >&6
438013df 14545else
bec39cab 14546
438013df
AO
14547 SAVE_LDFLAGS=$LDFLAGS
14548
14549 case $GCC in
14550 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14551 *) gdb_cv_bigtoc=-bbigtoc ;;
14552 esac
14553
14554 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14556/* end confdefs.h. */
438013df 14557
bec39cab
AC
14558int
14559main ()
14560{
438013df 14561int i;
bec39cab
AC
14562 ;
14563 return 0;
14564}
14565_ACEOF
81ecdfbb 14566if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14567
81ecdfbb
RW
14568else
14569 gdb_cv_bigtoc=
438013df 14570fi
81ecdfbb
RW
14571rm -f core conftest.err conftest.$ac_objext \
14572 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14573 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14574
bec39cab 14575fi
81ecdfbb
RW
14576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14577$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14578 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14579 ;;
14580esac
14581
38f6b338 14582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14583$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14584dynamic_list=false
14585if test "${gdb_native}" = yes; then
14586 # The dynamically loaded libthread_db needs access to symbols in the gdb
14587 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14588 # may not be supported there.
14589 old_LDFLAGS="$LDFLAGS"
14590 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14591 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14592 LDFLAGS="$LDFLAGS $RDYNAMIC"
14593 if test "${have_libpython}" = no; then
14594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14595/* end confdefs.h. */
14596
14597int
14598main ()
14599{
14600
14601 ;
14602 return 0;
14603}
14604_ACEOF
14605if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14606 dynamic_list=true
14607fi
14608rm -f core conftest.err conftest.$ac_objext \
14609 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14610 else
14611 # Workaround http://bugs.python.org/issue4434 where static
14612 # libpythonX.Y.a would get its symbols required for
14613 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14614 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14615 old_CFLAGS="$CFLAGS"
14616 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14617 if test "$cross_compiling" = yes; then :
3bebe2f2 14618 true
f6528abd 14619else
3bebe2f2
JK
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h. */
14622#include "${have_libpython}/Python.h"
14623int
14624main ()
14625{
14626int err;
38f6b338
JK
14627 Py_Initialize ();
14628 err = PyRun_SimpleString ("import itertools\n");
14629 Py_Finalize ();
14630 return err == 0 ? 0 : 1;
3bebe2f2
JK
14631 ;
14632 return 0;
14633}
14634_ACEOF
14635if ac_fn_c_try_run "$LINENO"; then :
14636 dynamic_list=true
14637fi
14638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14639 conftest.$ac_objext conftest.beam conftest.$ac_ext
14640fi
14641
38f6b338
JK
14642 CFLAGS="$old_CFLAGS"
14643 fi
14644 LDFLAGS="$old_LDFLAGS"
14645fi
14646if $dynamic_list; then
14647 found="-Wl,--dynamic-list"
14648 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14649else
38f6b338
JK
14650 found="-rdynamic"
14651 RDYNAMIC="-rdynamic"
f6528abd 14652fi
f6528abd 14653
38f6b338 14654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14655$as_echo "$found" >&6; }
0407b3f1 14656
f6528abd 14657
0407b3f1 14658if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14659 case ${host_os} in
c906108c 14660 solaris*)
d92419e5
JB
14661 # See if thread_db library is around for Solaris thread debugging.
14662 # Note that we must explicitly test for version 1 of the library
14663 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14664 # the same API.
81ecdfbb
RW
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14666$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14667 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14669$as_echo "yes" >&6; }
60ca704f 14670
81ecdfbb 14671$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14672
3483b318 14673 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14674 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14676$as_echo_n "checking for dlopen in -ldl... " >&6; }
14677if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14678 $as_echo_n "(cached) " >&6
c906108c 14679else
bec39cab 14680 ac_check_lib_save_LIBS=$LIBS
c906108c 14681LIBS="-ldl $LIBS"
81ecdfbb 14682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14683/* end confdefs.h. */
14684
81ecdfbb
RW
14685/* Override any GCC internal prototype to avoid an error.
14686 Use char because int might match the return type of a GCC
14687 builtin and then its argument prototype would still apply. */
bec39cab
AC
14688#ifdef __cplusplus
14689extern "C"
14690#endif
bec39cab
AC
14691char dlopen ();
14692int
14693main ()
14694{
81ecdfbb 14695return dlopen ();
bec39cab
AC
14696 ;
14697 return 0;
14698}
14699_ACEOF
81ecdfbb 14700if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14701 ac_cv_lib_dl_dlopen=yes
14702else
81ecdfbb 14703 ac_cv_lib_dl_dlopen=no
bec39cab 14704fi
81ecdfbb
RW
14705rm -f core conftest.err conftest.$ac_objext \
14706 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14707LIBS=$ac_check_lib_save_LIBS
14708fi
81ecdfbb
RW
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14710$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14711if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14712 cat >>confdefs.h <<_ACEOF
14713#define HAVE_LIBDL 1
14714_ACEOF
c906108c
SS
14715
14716 LIBS="-ldl $LIBS"
14717
c906108c
SS
14718fi
14719
f6528abd 14720 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14721 # Sun randomly tweaked the prototypes in <proc_service.h>
14722 # at one point.
81ecdfbb
RW
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14724$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14725 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14726 $as_echo_n "(cached) " >&6
c906108c 14727else
bec39cab 14728
81ecdfbb 14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14730/* end confdefs.h. */
c906108c
SS
14731
14732 #include <proc_service.h>
14733 ps_err_e ps_pdwrite
14734 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14735
bec39cab
AC
14736int
14737main ()
14738{
14739
14740 ;
14741 return 0;
14742}
14743_ACEOF
81ecdfbb 14744if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14745 gdb_cv_proc_service_is_old=no
14746else
81ecdfbb 14747 gdb_cv_proc_service_is_old=yes
c906108c 14748fi
81ecdfbb 14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14750
c906108c
SS
14751fi
14752
81ecdfbb
RW
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14754$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14755 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14756
81ecdfbb 14757$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14758
14759 fi
14760 else
81ecdfbb
RW
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14762$as_echo "no" >&6; }
c906108c
SS
14763 fi
14764 ;;
d92419e5 14765 aix*)
81ecdfbb
RW
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14767$as_echo_n "checking for AiX thread debugging library... " >&6; }
14768 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14769 $as_echo_n "(cached) " >&6
bec39cab 14770else
81ecdfbb 14771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14772/* end confdefs.h. */
d92419e5 14773#include <sys/pthdebug.h>
bec39cab
AC
14774int
14775main ()
14776{
d92419e5
JB
14777#ifndef PTHDB_VERSION_3
14778 #error
14779 #endif
bec39cab
AC
14780 ;
14781 return 0;
14782}
14783_ACEOF
81ecdfbb 14784if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14785 gdb_cv_have_aix_thread_debug=yes
14786else
81ecdfbb 14787 gdb_cv_have_aix_thread_debug=no
d92419e5 14788fi
81ecdfbb 14789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14790fi
14791
81ecdfbb
RW
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14793$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14794 if test $gdb_cv_have_aix_thread_debug = yes; then
14795 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14796 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14797 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14798
14799 # Older versions of AIX do not provide the declaration for
14800 # the getthrds function (it appears that it was introduced
14801 # with AIX 6.x).
14802 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14803"
14804if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14805 ac_have_decl=1
14806else
14807 ac_have_decl=0
14808fi
14809
14810cat >>confdefs.h <<_ACEOF
14811#define HAVE_DECL_GETTHRDS $ac_have_decl
14812_ACEOF
14813
d92419e5
JB
14814 fi
14815 ;;
c906108c 14816 esac
bec39cab 14817
c906108c
SS
14818fi
14819
3f47be5c 14820if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14822$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14823if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14824 $as_echo_n "(cached) " >&6
bec39cab 14825else
81ecdfbb 14826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14827/* end confdefs.h. */
3f47be5c 14828#include <thread_db.h>
bec39cab
AC
14829int
14830main ()
14831{
3f47be5c 14832int i = TD_NOTALLOC;
bec39cab
AC
14833 ;
14834 return 0;
14835}
14836_ACEOF
81ecdfbb 14837if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14838 gdb_cv_thread_db_h_has_td_notalloc=yes
14839else
81ecdfbb 14840 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14841
3f47be5c 14842fi
81ecdfbb 14843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14844
bec39cab 14845fi
81ecdfbb
RW
14846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14847$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14849$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14850if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14851 $as_echo_n "(cached) " >&6
59f80f10 14852else
81ecdfbb 14853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14854/* end confdefs.h. */
14855#include <thread_db.h>
14856int
14857main ()
14858{
14859int i = TD_VERSION;
14860 ;
14861 return 0;
14862}
14863_ACEOF
81ecdfbb 14864if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14865 gdb_cv_thread_db_h_has_td_version=yes
14866else
81ecdfbb 14867 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14868
14869fi
81ecdfbb 14870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14871
14872fi
81ecdfbb
RW
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14874$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14876$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14877if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14878 $as_echo_n "(cached) " >&6
59f80f10 14879else
81ecdfbb 14880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14881/* end confdefs.h. */
14882#include <thread_db.h>
14883int
14884main ()
14885{
14886int i = TD_NOTLS;
14887 ;
14888 return 0;
14889}
14890_ACEOF
81ecdfbb 14891if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14892 gdb_cv_thread_db_h_has_td_notls=yes
14893else
81ecdfbb 14894 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14895
14896fi
81ecdfbb 14897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14898
14899fi
81ecdfbb
RW
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14901$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14902fi
14903if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14904
81ecdfbb 14905$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14906
59f80f10
DJ
14907fi
14908if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14909
81ecdfbb 14910$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14911
14912fi
14913if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14914
81ecdfbb 14915$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14916
3f47be5c
EZ
14917fi
14918
b757528f 14919if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14921$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14922if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14923 $as_echo_n "(cached) " >&6
bec39cab 14924else
81ecdfbb 14925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14926/* end confdefs.h. */
b757528f 14927#include <sys/syscall.h>
bec39cab
AC
14928int
14929main ()
14930{
b757528f 14931int i = __NR_tkill;
bec39cab
AC
14932 ;
14933 return 0;
14934}
14935_ACEOF
81ecdfbb 14936if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14937 gdb_cv_sys_syscall_h_has_tkill=yes
14938else
81ecdfbb 14939 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14940
b757528f 14941fi
81ecdfbb 14942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14943
bec39cab 14944fi
81ecdfbb
RW
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14946$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14947fi
14948if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14949
81ecdfbb 14950$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14951
14952fi
14953
81ecdfbb
RW
14954ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14955"
14956if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14957 ac_have_decl=1
10568435 14958else
81ecdfbb 14959 ac_have_decl=0
10568435 14960fi
10568435
JK
14961
14962cat >>confdefs.h <<_ACEOF
81ecdfbb 14963#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14964_ACEOF
14965
14966
81ecdfbb
RW
14967if test "$cross_compiling" = yes; then :
14968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14969/* end confdefs.h. */
14970#include <sys/personality.h>
14971int
14972main ()
14973{
14974
14975# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14976# define ADDR_NO_RANDOMIZE 0x0040000
14977# endif
14978 /* Test the flag could be set and stays set. */
14979 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14980 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14981 return 1
14982 ;
14983 return 0;
14984}
14985_ACEOF
81ecdfbb 14986if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14987 have_personality=true
14988else
81ecdfbb 14989 have_personality=false
10568435 14990fi
81ecdfbb
RW
14991rm -f core conftest.err conftest.$ac_objext \
14992 conftest$ac_exeext conftest.$ac_ext
10568435 14993else
81ecdfbb 14994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14995/* end confdefs.h. */
14996#include <sys/personality.h>
14997int
14998main ()
14999{
15000
15001# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15002# define ADDR_NO_RANDOMIZE 0x0040000
15003# endif
15004 /* Test the flag could be set and stays set. */
15005 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15006 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15007 return 1
15008 ;
15009 return 0;
15010}
15011_ACEOF
81ecdfbb 15012if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15013 have_personality=true
15014else
81ecdfbb 15015 have_personality=false
10568435 15016fi
81ecdfbb
RW
15017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15018 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15019fi
81ecdfbb 15020
10568435
JK
15021if $have_personality
15022then
15023
81ecdfbb 15024$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15025
15026fi
15027
fb40c209 15028
f83d8a90
DE
15029# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15030# except that the argument to --with-sysroot is optional.
15031# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15032if test "x$with_sysroot" = xyes; then
15033 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15034fi
bec39cab 15035
81ecdfbb
RW
15036# Check whether --with-sysroot was given.
15037if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15038 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15039else
15040 TARGET_SYSTEM_ROOT=
15041fi
030292b7 15042
030292b7 15043
f83d8a90
DE
15044 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15045 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15046 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15047 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15048
f83d8a90
DE
15049cat >>confdefs.h <<_ACEOF
15050#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15051_ACEOF
bec39cab 15052
030292b7 15053
b14b1491 15054
f83d8a90
DE
15055
15056 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15057 if test "x$prefix" = xNONE; then
15058 test_prefix=/usr/local
15059 else
15060 test_prefix=$prefix
15061 fi
15062 else
15063 test_prefix=$exec_prefix
15064 fi
15065 value=0
15066 case ${ac_define_dir} in
15067 "${test_prefix}"|"${test_prefix}/"*|\
15068 '${exec_prefix}'|'${exec_prefix}/'*)
15069 value=1
15070 ;;
15071 esac
15072
15073cat >>confdefs.h <<_ACEOF
15074#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15075_ACEOF
030292b7
DJ
15076
15077
15078
16e7150e 15079
16e7150e 15080
81ecdfbb
RW
15081# Check whether --with-system-gdbinit was given.
15082if test "${with_system_gdbinit+set}" = set; then :
15083 withval=$with_system_gdbinit;
b14b1491
TT
15084 SYSTEM_GDBINIT=$withval
15085else
15086 SYSTEM_GDBINIT=
81ecdfbb
RW
15087fi
15088
16e7150e
JG
15089
15090 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15091 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15092 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15093 ac_define_dir=`eval echo $ac_define_dir`
15094
15095cat >>confdefs.h <<_ACEOF
15096#define SYSTEM_GDBINIT "$ac_define_dir"
15097_ACEOF
15098
15099
15100
0c4a4063 15101
b14b1491
TT
15102 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15103 if test "x$prefix" = xNONE; then
15104 test_prefix=/usr/local
15105 else
15106 test_prefix=$prefix
15107 fi
15108 else
15109 test_prefix=$exec_prefix
15110 fi
15111 value=0
15112 case ${ac_define_dir} in
15113 "${test_prefix}"|"${test_prefix}/"*|\
15114 '${exec_prefix}'|'${exec_prefix}/'*)
15115 value=1
15116 ;;
15117 esac
16e7150e 15118
b14b1491
TT
15119cat >>confdefs.h <<_ACEOF
15120#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15121_ACEOF
15122
b14b1491 15123
16e7150e 15124
0c4a4063 15125
81ecdfbb
RW
15126# Check whether --enable-werror was given.
15127if test "${enable_werror+set}" = set; then :
15128 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15129 yes | y) ERROR_ON_WARNING="yes" ;;
15130 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15131 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15132 esac
81ecdfbb
RW
15133fi
15134
094a342e
MK
15135
15136# Enable -Werror by default when using gcc
15137if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
15138 ERROR_ON_WARNING=yes
15139fi
15140
15141WERROR_CFLAGS=""
15142if test "${ERROR_ON_WARNING}" = yes ; then
15143 WERROR_CFLAGS="-Werror"
15144fi
15145
aa79a185
DJ
15146# The entries after -Wno-pointer-sign are disabled warnings which may
15147# be enabled in the future, which can not currently be used to build
15148# GDB.
15149# NOTE: If you change this list, remember to update
3b851bce 15150# gdb/doc/gdbint.texinfo.
aa79a185
DJ
15151build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
15152-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 15153-Wno-unused -Wunused-value -Wunused-function \
b03a2011 15154-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 15155
3526781e
DJ
15156# Enable -Wno-format by default when using gcc on mingw since many
15157# GCC versions complain about %I64.
15158case "${host}" in
15159 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15160esac
15161
81ecdfbb
RW
15162# Check whether --enable-build-warnings was given.
15163if test "${enable_build_warnings+set}" = set; then :
15164 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15165 yes) ;;
15166 no) build_warnings="-w";;
15167 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15168 build_warnings="${build_warnings} ${t}";;
15169 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15170 build_warnings="${t} ${build_warnings}";;
15171 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15172esac
d4f3574e 15173if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15174 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15175fi
81ecdfbb
RW
15176fi
15177# Check whether --enable-gdb-build-warnings was given.
15178if test "${enable_gdb_build_warnings+set}" = set; then :
15179 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15180 yes) ;;
15181 no) build_warnings="-w";;
15182 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15183 build_warnings="${build_warnings} ${t}";;
15184 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15185 build_warnings="${t} ${build_warnings}";;
15186 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15187esac
15188if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15189 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15190fi
81ecdfbb
RW
15191fi
15192WARN_CFLAGS=""
c906108c
SS
15193if test "x${build_warnings}" != x -a "x$GCC" = xyes
15194then
81ecdfbb
RW
15195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15196$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15197 # Separate out the -Werror flag as some files just cannot be
15198 # compiled with it enabled.
15199 for w in ${build_warnings}; do
15200 case $w in
15201 -Werr*) WERROR_CFLAGS=-Werror ;;
15202 *) # Check that GCC accepts it
4536bbc6
AC
15203 saved_CFLAGS="$CFLAGS"
15204 CFLAGS="$CFLAGS $w"
81ecdfbb 15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15206/* end confdefs.h. */
4536bbc6 15207
bec39cab
AC
15208int
15209main ()
15210{
4536bbc6 15211
bec39cab
AC
15212 ;
15213 return 0;
15214}
15215_ACEOF
81ecdfbb 15216if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 15217 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15218fi
81ecdfbb 15219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15220 CFLAGS="$saved_CFLAGS"
746a987d
AC
15221 esac
15222 done
81ecdfbb
RW
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15224$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15225fi
15226
15227
104c1213 15228
7a292a7a 15229# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15231$as_echo_n "checking for cygwin... " >&6; }
15232if test "${gdb_cv_os_cygwin+set}" = set; then :
15233 $as_echo_n "(cached) " >&6
bec39cab 15234else
81ecdfbb 15235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15236/* end confdefs.h. */
7a292a7a
SS
15237
15238#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15239lose
15240#endif
bec39cab 15241_ACEOF
7a292a7a 15242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 15243 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
15244 gdb_cv_os_cygwin=yes
15245else
7a292a7a
SS
15246 gdb_cv_os_cygwin=no
15247fi
15248rm -f conftest*
15249
15250fi
81ecdfbb
RW
15251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15252$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15253
aff38e61 15254
3eb25fda 15255SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15256case ${host} in
95cbc983
AC
15257 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15258 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15259 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15260esac
15261
15262
cd0fc7c3
SS
15263# libreadline needs libuser32.a in a cygwin environment
15264WIN32LIBS=
15265if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15266 WIN32LIBS="-luser32"
15267 case "${target}" in
15268 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15269 ;;
15270 esac
cd0fc7c3 15271fi
c906108c 15272
b4505029
MM
15273# The ser-tcp.c module requires sockets.
15274case ${host} in
15275 *mingw32*)
15276
81ecdfbb 15277$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15278
15279 WIN32LIBS="$WIN32LIBS -lws2_32"
15280 ;;
15281esac
15282
7a292a7a 15283
31d99776
DJ
15284# Add ELF support to GDB, but only if BFD includes ELF support.
15285OLD_CFLAGS=$CFLAGS
15286OLD_LDFLAGS=$LDFLAGS
15287OLD_LIBS=$LIBS
12cd34f3
PA
15288# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15289# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15290# always want our bfd.
15291CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 15292LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 15293intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
15294# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15295if test "$plugins" = "yes"; then
15296 LIBS="-ldl $LIBS"
15297fi
0f72fb1c 15298LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
15299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15300$as_echo_n "checking for ELF support in BFD... " >&6; }
15301if test "${gdb_cv_var_elf+set}" = set; then :
15302 $as_echo_n "(cached) " >&6
31d99776 15303else
81ecdfbb 15304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15305/* end confdefs.h. */
15306#include <stdlib.h>
15307#include "bfd.h"
15308#include "elf-bfd.h"
15309
15310int
15311main ()
15312{
15313bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
15314 ;
15315 return 0;
15316}
15317_ACEOF
81ecdfbb 15318if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15319 gdb_cv_var_elf=yes
15320else
81ecdfbb 15321 gdb_cv_var_elf=no
31d99776 15322fi
81ecdfbb
RW
15323rm -f core conftest.err conftest.$ac_objext \
15324 conftest$ac_exeext conftest.$ac_ext
31d99776 15325fi
81ecdfbb
RW
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15327$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15328if test $gdb_cv_var_elf = yes; then
15329 CONFIG_OBS="$CONFIG_OBS elfread.o"
15330
81ecdfbb 15331$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15332
075ff26d
JK
15333 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15334 if test "$plugins" = "yes"; then
15335 OLD_LIBS="-ldl $OLD_LIBS"
15336 fi
31d99776
DJ
15337fi
15338CFLAGS=$OLD_CFLAGS
15339LDFLAGS=$OLD_LDFLAGS
15340LIBS=$OLD_LIBS
15341
121ce6e5
DJ
15342# Add any host-specific objects to GDB.
15343CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15344
3fc11d3e
JM
15345LIBGUI="../libgui/src/libgui.a"
15346GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15347
15348
7a292a7a 15349
3fc11d3e
JM
15350WIN32LDAPP=
15351
15352
15353
d91670b9 15354case "${host}" in
686a5eed 15355*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15356 configdir="win"
15357 ;;
15358*)
15359 configdir="unix"
15360 ;;
15361esac
3fc11d3e
JM
15362
15363GDBTKLIBS=
15364if test "${enable_gdbtk}" = "yes"; then
15365
d1c3b63a
KS
15366 # Gdbtk must have an absolute path to srcdir in order to run
15367 # properly when not installed.
15368 here=`pwd`
15369 cd ${srcdir}
15370 GDBTK_SRC_DIR=`pwd`
15371 cd $here
15372
bec39cab 15373
5062cc19
KS
15374 #
15375 # Ok, lets find the tcl configuration
15376 # First, look for one uninstalled.
15377 # the alternative search directory is invoked by --with-tcl
15378 #
3fc11d3e 15379
5062cc19
KS
15380 if test x"${no_tcl}" = x ; then
15381 # we reset no_tcl in case something fails here
15382 no_tcl=true
bec39cab 15383
81ecdfbb
RW
15384# Check whether --with-tcl was given.
15385if test "${with_tcl+set}" = set; then :
15386 withval=$with_tcl; with_tclconfig=${withval}
15387fi
15388
15389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15390$as_echo_n "checking for Tcl configuration... " >&6; }
15391 if test "${ac_cv_c_tclconfig+set}" = set; then :
15392 $as_echo_n "(cached) " >&6
3fc11d3e 15393else
bec39cab 15394
3fc11d3e 15395
5062cc19
KS
15396 # First check to see if --with-tcl was specified.
15397 case "${host}" in
15398 *-*-cygwin*) platDir="win" ;;
15399 *) platDir="unix" ;;
15400 esac
15401 if test x"${with_tclconfig}" != x ; then
15402 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15403 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15404 else
81ecdfbb 15405 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15406 fi
15407 fi
15408
15409 # then check for a private Tcl installation
15410 if test x"${ac_cv_c_tclconfig}" = x ; then
15411 for i in \
15412 ../tcl \
15413 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15414 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15415 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15416 ../../tcl \
15417 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15418 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15419 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15420 ../../../tcl \
15421 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15422 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15423 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15424 if test -f "$i/$platDir/tclConfig.sh" ; then
15425 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15426 break
15427 fi
15428 done
15429 fi
15430
15431 # on Darwin, check in Framework installation locations
15432 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15433 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15434 `ls -d /Library/Frameworks 2>/dev/null` \
15435 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15436 `ls -d /System/Library/Frameworks 2>/dev/null` \
15437 ; do
15438 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15439 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15440 break
15441 fi
15442 done
15443 fi
15444
15445 # check in a few common install locations
15446 if test x"${ac_cv_c_tclconfig}" = x ; then
15447 for i in `ls -d ${libdir} 2>/dev/null` \
15448 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15449 `ls -d ${prefix}/lib 2>/dev/null` \
15450 `ls -d /usr/local/lib 2>/dev/null` \
15451 `ls -d /usr/contrib/lib 2>/dev/null` \
15452 `ls -d /usr/lib 2>/dev/null` \
15453 ; do
15454 if test -f "$i/tclConfig.sh" ; then
15455 ac_cv_c_tclconfig=`(cd $i; pwd)`
15456 break
15457 fi
15458 done
15459 fi
3fc11d3e 15460
5062cc19
KS
15461 # check in a few other private locations
15462 if test x"${ac_cv_c_tclconfig}" = x ; then
15463 for i in \
15464 ${srcdir}/../tcl \
15465 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15466 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15467 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15468 if test -f "$i/$platDir/tclConfig.sh" ; then
15469 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15470 break
15471 fi
15472 done
15473 fi
bec39cab 15474
3fc11d3e
JM
15475fi
15476
5062cc19
KS
15477
15478 if test x"${ac_cv_c_tclconfig}" = x ; then
15479 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15481$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15482 else
15483 no_tcl=
15484 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15486$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15487 fi
15488 fi
3fc11d3e 15489
bec39cab 15490
85541719
DE
15491 # If $no_tk is nonempty, then we can't do Tk, and there is no
15492 # point to doing Tcl.
bec39cab 15493
5062cc19
KS
15494 #
15495 # Ok, lets find the tk configuration
15496 # First, look for one uninstalled.
15497 # the alternative search directory is invoked by --with-tk
15498 #
3fc11d3e 15499
5062cc19
KS
15500 if test x"${no_tk}" = x ; then
15501 # we reset no_tk in case something fails here
15502 no_tk=true
bec39cab 15503
81ecdfbb
RW
15504# Check whether --with-tk was given.
15505if test "${with_tk+set}" = set; then :
15506 withval=$with_tk; with_tkconfig=${withval}
15507fi
15508
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15510$as_echo_n "checking for Tk configuration... " >&6; }
15511 if test "${ac_cv_c_tkconfig+set}" = set; then :
15512 $as_echo_n "(cached) " >&6
bec39cab 15513else
3fc11d3e
JM
15514
15515
5062cc19
KS
15516 # First check to see if --with-tkconfig was specified.
15517 if test x"${with_tkconfig}" != x ; then
15518 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15519 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15520 else
81ecdfbb 15521 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15522 fi
15523 fi
3fc11d3e 15524
5062cc19
KS
15525 # then check for a private Tk library
15526 case "${host}" in
15527 *-*-cygwin*) platDir="win" ;;
15528 *) platDir="unix" ;;
15529 esac
15530 if test x"${ac_cv_c_tkconfig}" = x ; then
15531 for i in \
15532 ../tk \
15533 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15534 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15535 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15536 ../../tk \
15537 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15538 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15539 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15540 ../../../tk \
15541 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15542 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15543 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15544 if test -f "$i/$platDir/tkConfig.sh" ; then
15545 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15546 break
15547 fi
15548 done
15549 fi
15550
15551 # on Darwin, check in Framework installation locations
15552 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15553 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15554 `ls -d /Library/Frameworks 2>/dev/null` \
15555 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15556 `ls -d /System/Library/Frameworks 2>/dev/null` \
15557 ; do
15558 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15559 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15560 break
15561 fi
15562 done
15563 fi
15564
15565 # check in a few common install locations
15566 if test x"${ac_cv_c_tkconfig}" = x ; then
15567 for i in `ls -d ${libdir} 2>/dev/null` \
15568 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15569 `ls -d ${prefix}/lib 2>/dev/null` \
15570 `ls -d /usr/local/lib 2>/dev/null` \
15571 `ls -d /usr/contrib/lib 2>/dev/null` \
15572 `ls -d /usr/lib 2>/dev/null` \
15573 ; do
15574 if test -f "$i/tkConfig.sh" ; then
15575 ac_cv_c_tkconfig=`(cd $i; pwd)`
15576 break
15577 fi
15578 done
15579 fi
15580 # check in a few other private locations
15581 if test x"${ac_cv_c_tkconfig}" = x ; then
15582 for i in \
15583 ${srcdir}/../tk \
15584 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15585 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15586 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15587 if test -f "$i/$platDir/tkConfig.sh" ; then
15588 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15589 break
15590 fi
15591 done
15592 fi
3fc11d3e 15593
3fc11d3e
JM
15594fi
15595
15596
5062cc19
KS
15597 if test x"${ac_cv_c_tkconfig}" = x ; then
15598 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15600$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15601 else
15602 no_tk=
15603 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15605$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15606 fi
3fc11d3e 15607 fi
dd2504ab 15608
dd2504ab 15609
85541719
DE
15610 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15611
81ecdfbb
RW
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15613$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15614
15615 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15617$as_echo "loading" >&6; }
85541719
DE
15618 . ${TCL_BIN_DIR}/tclConfig.sh
15619 else
81ecdfbb
RW
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15621$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15622 fi
15623
15624 # eval is required to do the TCL_DBGX substitution
15625 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15626 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15627
15628 # If the TCL_BIN_DIR is the build directory (not the install directory),
15629 # then set the common variable name to the value of the build variables.
15630 # For example, the variable TCL_LIB_SPEC will be set to the value
15631 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15632 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15633 # installed and uninstalled version of Tcl.
15634 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15635 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15636 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15637 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15638 elif test "`uname -s`" = "Darwin"; then
15639 # If Tcl was built as a framework, attempt to use the libraries
15640 # from the framework at the given location so that linking works
15641 # against Tcl.framework installed in an arbitary location.
15642 case ${TCL_DEFS} in
15643 *TCL_FRAMEWORK*)
15644 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15645 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15646 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15647 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15648 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15649 break
15650 fi
15651 done
15652 fi
15653 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15654 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15655 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15656 fi
15657 ;;
15658 esac
15659 fi
15660
15661 # eval is required to do the TCL_DBGX substitution
15662 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15663 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15664 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15665 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681 # Check for in-tree tcl
15682 here=`pwd`
15683 cd ${srcdir}/..
15684 topdir=`pwd`
15685 cd ${here}
15686
15687 intree="no"
15688 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15689 intree="yes"
15690 fi
15691
15692 # Find Tcl private headers
15693 if test x"${intree}" = xno; then
15694
81ecdfbb
RW
15695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15696$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15697 private_dir=""
15698 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15699 if test -f ${dir}/tclInt.h ; then
15700 private_dir=${dir}
15701 fi
15702
15703 if test x"${private_dir}" = x; then
81ecdfbb 15704 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15705 else
15706 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15708$as_echo "${private_dir}" >&6; }
85541719
DE
15709 fi
15710
15711 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15712 TCL_LIBRARY="${TCL_LIB_SPEC}"
15713 TCL_DEPS=""
15714 else
15715 # If building tcl in the same src tree, private headers
15716 # are not needed, but we need to be sure to use the right
15717 # headers library
15718 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15719 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15720 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15721 fi
15722
15723
15724
15725
15726
81ecdfbb
RW
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15728$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15729
5062cc19 15730 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15732$as_echo "loading" >&6; }
5062cc19 15733 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15734 else
81ecdfbb
RW
15735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15736$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15737 fi
bec39cab 15738
5062cc19
KS
15739 # eval is required to do the TK_DBGX substitution
15740 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15741 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15742
15743 # If the TK_BIN_DIR is the build directory (not the install directory),
15744 # then set the common variable name to the value of the build variables.
15745 # For example, the variable TK_LIB_SPEC will be set to the value
15746 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15747 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15748 # installed and uninstalled version of Tcl.
85541719 15749 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15750 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15751 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15752 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15753 elif test "`uname -s`" = "Darwin"; then
15754 # If Tk was built as a framework, attempt to use the libraries
15755 # from the framework at the given location so that linking works
15756 # against Tk.framework installed in an arbitary location.
15757 case ${TK_DEFS} in
15758 *TK_FRAMEWORK*)
85541719 15759 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15760 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15761 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15762 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15763 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15764 break
15765 fi
15766 done
15767 fi
85541719 15768 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15769 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15770 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15771 fi
15772 ;;
15773 esac
3fc11d3e
JM
15774 fi
15775
5062cc19
KS
15776 # eval is required to do the TK_DBGX substitution
15777 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15778 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15779 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15780 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15781
3fc11d3e
JM
15782
15783
bec39cab
AC
15784
15785
15786
15787
15788
15789
15790
3fc11d3e 15791
3fc11d3e 15792
bec39cab 15793
bec39cab 15794
85541719
DE
15795 # Check for in-tree Tk
15796 intree="no"
15797 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15798 intree="yes"
15799 fi
3fc11d3e 15800
85541719
DE
15801 # Find Tk private headers
15802 if test x"${intree}" = xno; then
3fc11d3e 15803
81ecdfbb
RW
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15805$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15806 private_dir=""
15807 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15808 if test -f ${dir}/tkInt.h; then
15809 private_dir=${dir}
3fc11d3e 15810 fi
bec39cab 15811
5062cc19 15812 if test x"${private_dir}" = x; then
81ecdfbb 15813 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15814 else
5062cc19 15815 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15817$as_echo "${private_dir}" >&6; }
3fc11d3e 15818 fi
3fc11d3e 15819
85541719
DE
15820 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15821 TK_LIBRARY=${TK_LIB_SPEC}
15822 TK_DEPS=""
15823 else
15824 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15825 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15826 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15827 fi
3fc11d3e
JM
15828
15829
3fc11d3e
JM
15830
15831
3fc11d3e 15832
85541719 15833 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15834
85541719
DE
15835 # Include some libraries that Tcl and Tk want.
15836 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15837 # Yes, the ordering seems wrong here. But it isn't.
15838 # TK_LIBS is the list of libraries that need to be linked
15839 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15840 # were in LIBS then any link tests after this point would
15841 # try to include things like `$(LIBGUI)', which wouldn't work.
15842 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15843
85541719
DE
15844 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15845 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15846 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15847 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15848 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15849 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15850 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15851
85541719
DE
15852 if test x$gdb_cv_os_cygwin = xyes; then
15853 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15854 WIN32LDAPP="-Wl,--subsystem,console"
15855 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15856 fi
ffc6a242 15857
81ecdfbb 15858 subdirs="$subdirs gdbtk"
3ace7edb 15859
85541719 15860 fi
3fc11d3e
JM
15861fi
15862
15863
15864
15865
15866
15867
15868
15869
81ecdfbb
RW
15870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15871$as_echo_n "checking for X... " >&6; }
bec39cab 15872
c906108c 15873
81ecdfbb
RW
15874# Check whether --with-x was given.
15875if test "${with_x+set}" = set; then :
15876 withval=$with_x;
15877fi
c906108c
SS
15878
15879# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15880if test "x$with_x" = xno; then
15881 # The user explicitly disabled X.
15882 have_x=disabled
15883else
81ecdfbb
RW
15884 case $x_includes,$x_libraries in #(
15885 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15886 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15887 $as_echo_n "(cached) " >&6
c906108c
SS
15888else
15889 # One or both of the vars are not set, and there is no cached value.
bec39cab 15890ac_x_includes=no ac_x_libraries=no
81ecdfbb 15891rm -f -r conftest.dir
bec39cab
AC
15892if mkdir conftest.dir; then
15893 cd conftest.dir
bec39cab 15894 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15895incroot:
15896 @echo incroot='${INCROOT}'
15897usrlibdir:
15898 @echo usrlibdir='${USRLIBDIR}'
15899libdir:
15900 @echo libdir='${LIBDIR}'
15901_ACEOF
15902 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15903 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15904 for ac_var in incroot usrlibdir libdir; do
15905 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15906 done
c906108c 15907 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15908 for ac_extension in a so sl dylib la dll; do
15909 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15910 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15911 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15912 fi
15913 done
15914 # Screen out bogus values from the imake configuration. They are
15915 # bogus both because they are the default anyway, and because
15916 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15917 case $ac_im_incroot in
81ecdfbb 15918 /usr/include) ac_x_includes= ;;
bec39cab 15919 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15920 esac
bec39cab 15921 case $ac_im_usrlibdir in
81ecdfbb 15922 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15923 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15924 esac
15925 fi
15926 cd ..
81ecdfbb 15927 rm -f -r conftest.dir
c906108c
SS
15928fi
15929
bec39cab
AC
15930# Standard set of common directories for X headers.
15931# Check X11 before X11Rn because it is often a symlink to the current release.
15932ac_x_header_dirs='
15933/usr/X11/include
81ecdfbb 15934/usr/X11R7/include
bec39cab
AC
15935/usr/X11R6/include
15936/usr/X11R5/include
15937/usr/X11R4/include
15938
15939/usr/include/X11
81ecdfbb 15940/usr/include/X11R7
bec39cab
AC
15941/usr/include/X11R6
15942/usr/include/X11R5
15943/usr/include/X11R4
15944
15945/usr/local/X11/include
81ecdfbb 15946/usr/local/X11R7/include
bec39cab
AC
15947/usr/local/X11R6/include
15948/usr/local/X11R5/include
15949/usr/local/X11R4/include
15950
15951/usr/local/include/X11
81ecdfbb 15952/usr/local/include/X11R7
bec39cab
AC
15953/usr/local/include/X11R6
15954/usr/local/include/X11R5
15955/usr/local/include/X11R4
15956
15957/usr/X386/include
15958/usr/x386/include
15959/usr/XFree86/include/X11
15960
15961/usr/include
15962/usr/local/include
15963/usr/unsupported/include
15964/usr/athena/include
15965/usr/local/x11r5/include
15966/usr/lpp/Xamples/include
15967
15968/usr/openwin/include
15969/usr/openwin/share/include'
15970
15971if test "$ac_x_includes" = no; then
81ecdfbb 15972 # Guess where to find include files, by looking for Xlib.h.
c906108c 15973 # First, try using that file with no special directory specified.
81ecdfbb 15974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15975/* end confdefs.h. */
81ecdfbb 15976#include <X11/Xlib.h>
bec39cab 15977_ACEOF
81ecdfbb 15978if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15979 # We can compile using X headers with no special include directory.
15980ac_x_includes=
15981else
bec39cab 15982 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15983 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15984 ac_x_includes=$ac_dir
15985 break
15986 fi
15987done
c906108c 15988fi
bec39cab
AC
15989rm -f conftest.err conftest.$ac_ext
15990fi # $ac_x_includes = no
c906108c 15991
bec39cab 15992if test "$ac_x_libraries" = no; then
c906108c 15993 # Check for the libraries.
c906108c
SS
15994 # See if we find them without any special options.
15995 # Don't add to $LIBS permanently.
bec39cab 15996 ac_save_LIBS=$LIBS
81ecdfbb
RW
15997 LIBS="-lX11 $LIBS"
15998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15999/* end confdefs.h. */
81ecdfbb 16000#include <X11/Xlib.h>
bec39cab
AC
16001int
16002main ()
16003{
81ecdfbb 16004XrmInitialize ()
bec39cab
AC
16005 ;
16006 return 0;
16007}
16008_ACEOF
81ecdfbb 16009if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16010 LIBS=$ac_save_LIBS
c906108c
SS
16011# We can link X programs with no special library path.
16012ac_x_libraries=
16013else
81ecdfbb
RW
16014 LIBS=$ac_save_LIBS
16015for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16016do
bec39cab 16017 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16018 for ac_extension in a so sl dylib la dll; do
16019 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16020 ac_x_libraries=$ac_dir
16021 break 2
16022 fi
16023 done
16024done
16025fi
81ecdfbb
RW
16026rm -f core conftest.err conftest.$ac_objext \
16027 conftest$ac_exeext conftest.$ac_ext
bec39cab 16028fi # $ac_x_libraries = no
c906108c 16029
81ecdfbb
RW
16030case $ac_x_includes,$ac_x_libraries in #(
16031 no,* | *,no | *\'*)
16032 # Didn't find X, or a directory has "'" in its name.
16033 ac_cv_have_x="have_x=no";; #(
16034 *)
16035 # Record where we found X for the cache.
16036 ac_cv_have_x="have_x=yes\
16037 ac_x_includes='$ac_x_includes'\
16038 ac_x_libraries='$ac_x_libraries'"
16039esac
c906108c 16040fi
81ecdfbb
RW
16041;; #(
16042 *) have_x=yes;;
16043 esac
c906108c
SS
16044 eval "$ac_cv_have_x"
16045fi # $with_x != no
16046
16047if test "$have_x" != yes; then
81ecdfbb
RW
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16049$as_echo "$have_x" >&6; }
c906108c
SS
16050 no_x=yes
16051else
16052 # If each of the values was on the command line, it overrides each guess.
16053 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16054 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16055 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16056 ac_cv_have_x="have_x=yes\
16057 ac_x_includes='$x_includes'\
16058 ac_x_libraries='$x_libraries'"
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16060$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16061fi
16062
16063
bec39cab 16064# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16065# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16066# This code just checks for a few cases where we'd like to ignore those
16067# definitions, even when they're present in the '.mt' file. These cases
16068# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16069# not part of the source tree.
7a292a7a 16070#
81ecdfbb
RW
16071# Check whether --enable-sim was given.
16072if test "${enable_sim+set}" = set; then :
16073 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16074 echo "enableval = ${enableval}";
16075 case "${enableval}" in
16076 yes) ignore_sim=false ;;
16077 no) ignore_sim=true ;;
16078 *) ignore_sim=false ;;
16079 esac
16080else
16081 ignore_sim=false
81ecdfbb
RW
16082fi
16083
7a292a7a
SS
16084
16085if test ! -d "${srcdir}/../sim"; then
16086 ignore_sim=true
16087fi
16088
9b624dbe
UW
16089SIM=
16090SIM_OBS=
16091if test "${ignore_sim}" = "false"; then
16092 if test x"${gdb_sim}" != x ; then
16093 SIM="${gdb_sim}"
16094 SIM_OBS="remote-sim.o"
60ca704f 16095
81ecdfbb 16096$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16097
9b624dbe 16098 fi
7a292a7a
SS
16099fi
16100
16101
16102
c906108c
SS
16103
16104
16105
16106
16107
16108
dfcd3bfb 16109
e56ac5c3
AC
16110
16111
b3a90332
AC
16112
16113
c35f4ffc 16114# List of host floatformats.
bec39cab
AC
16115
16116cat >>confdefs.h <<_ACEOF
c35f4ffc 16117#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16118_ACEOF
c35f4ffc 16119
bec39cab
AC
16120
16121cat >>confdefs.h <<_ACEOF
c35f4ffc 16122#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16123_ACEOF
16124
c35f4ffc 16125
bec39cab 16126cat >>confdefs.h <<_ACEOF
c35f4ffc 16127#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16128_ACEOF
c35f4ffc
AC
16129
16130
c906108c
SS
16131# target_subdir is used by the testsuite to find the target libraries.
16132target_subdir=
16133if test "${host}" != "${target}"; then
16134 target_subdir="${target_alias}/"
16135fi
16136
16137
16138frags=
771b4502 16139if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16140 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16141 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16142 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16143 fi
16144 frags="$frags $host_makefile_frag"
16145else
16146 host_makefile_frag=/dev/null
c906108c 16147fi
c906108c 16148
c906108c
SS
16149
16150
16151
771b4502 16152if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16153# We pick this up from the host configuration file (.mh) because we
16154# do not have a native configuration Makefile fragment.
c906108c
SS
16155nativefile=`sed -n '
16156s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16157' ${host_makefile_frag}`
c906108c
SS
16158fi
16159
16160
b00a8037 16161if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16162
16163cat >>confdefs.h <<_ACEOF
b00a8037 16164#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16165_ACEOF
b00a8037
DJ
16166
16167fi
16168
8dcde887 16169# Enable multi-ice-gdb-server.
81ecdfbb
RW
16170# Check whether --enable-multi-ice was given.
16171if test "${enable_multi_ice+set}" = set; then :
16172 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16173 yes | no)
16174 ;;
81ecdfbb 16175 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16176 esac
81ecdfbb 16177fi
b4e70030 16178
81ecdfbb
RW
16179if test "x$enable_multi_ice" = xyes; then
16180 subdirs="$subdirs multi-ice"
3ace7edb 16181
a85f51e7
DJ
16182fi
16183
496c0e1b
JB
16184# Check whether --enable-gdbserver was given.
16185if test "${enable_gdbserver+set}" = set; then :
16186 enableval=$enable_gdbserver; case "${enableval}" in
16187 yes| no|auto) ;;
16188 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16189esac
16190else
16191 enable_gdbserver=auto
16192fi
16193
16194
16195# We only build gdbserver automatically in a native configuration, and
16196# only if the user did not explicitly disable its build.
16197if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16199$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16200 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16202$as_echo "yes" >&6; }
16203 subdirs="$subdirs gdbserver"
3ace7edb 16204
496c0e1b 16205 gdbserver_build_enabled=yes
8dcde887 16206 else
81ecdfbb
RW
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16208$as_echo "no" >&6; }
8dcde887
MK
16209 fi
16210fi
16211
496c0e1b
JB
16212# If the user explicitly request the gdbserver to be built, verify that
16213# we were in fact able to enable it.
16214if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16215 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16216fi
16217
db985757 16218# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16219# to an empty version.
c906108c
SS
16220
16221files=
16222links=
5a2402b8 16223
c906108c
SS
16224rm -f nm.h
16225if test "${nativefile}" != ""; then
0f475e27
AC
16226 case "${nativefile}" in
16227 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16228 * ) GDB_NM_FILE="${nativefile}"
16229 esac
5a2402b8
AC
16230 files="${files} ${GDB_NM_FILE}"
16231 links="${links} nm.h"
60ca704f
SE
16232
16233cat >>confdefs.h <<_ACEOF
b78960be 16234#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16235_ACEOF
5a2402b8 16236
c906108c 16237fi
5a2402b8
AC
16238
16239
bec39cab
AC
16240ac_sources="$files"
16241ac_dests="$links"
16242while test -n "$ac_sources"; do
16243 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16244 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16245 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16246done
81ecdfbb 16247ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16248
16249
c906108c
SS
16250
16251
c906108c 16252
81ecdfbb 16253$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16254
bec39cab 16255
5ae98d25 16256ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
16257
16258ac_config_commands="$ac_config_commands default"
89a34d1b 16259
bec39cab
AC
16260cat >confcache <<\_ACEOF
16261# This file is a shell script that caches the results of configure
16262# tests run on this system so they can be shared between configure
16263# scripts and configure runs, see configure's option --config-cache.
16264# It is not useful on other systems. If it contains results you don't
16265# want to keep, you may remove or edit it.
16266#
16267# config.status only pays attention to the cache file if you give it
16268# the --recheck option to rerun configure.
16269#
16270# `ac_cv_env_foo' variables (set or unset) will be overridden when
16271# loading this file, other *unset* `ac_cv_foo' will be assigned the
16272# following values.
16273
16274_ACEOF
16275
16276# The following way of writing the cache mishandles newlines in values,
16277# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16278# So, we kill variables containing newlines.
bec39cab
AC
16279# Ultrix sh set writes to stderr and can't be redirected directly,
16280# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16281(
16282 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16283 eval ac_val=\$$ac_var
16284 case $ac_val in #(
16285 *${as_nl}*)
16286 case $ac_var in #(
16287 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16288$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16289 esac
16290 case $ac_var in #(
16291 _ | IFS | as_nl) ;; #(
16292 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16293 *) { eval $ac_var=; unset $ac_var;} ;;
16294 esac ;;
16295 esac
16296 done
16297
bec39cab 16298 (set) 2>&1 |
81ecdfbb
RW
16299 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16300 *${as_nl}ac_space=\ *)
16301 # `set' does not quote correctly, so add quotes: double-quote
16302 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16303 sed -n \
16304 "s/'/'\\\\''/g;
16305 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16306 ;; #(
bec39cab
AC
16307 *)
16308 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16309 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16310 ;;
81ecdfbb
RW
16311 esac |
16312 sort
16313) |
bec39cab 16314 sed '
81ecdfbb 16315 /^ac_cv_env_/b end
bec39cab 16316 t clear
81ecdfbb 16317 :clear
bec39cab
AC
16318 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16319 t end
81ecdfbb
RW
16320 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16321 :end' >>confcache
16322if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16323 if test -w "$cache_file"; then
16324 test "x$cache_file" != "x/dev/null" &&
16325 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16326$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16327 cat confcache >$cache_file
16328 else
81ecdfbb
RW
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16330$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16331 fi
16332fi
16333rm -f confcache
16334
16335test "x$prefix" = xNONE && prefix=$ac_default_prefix
16336# Let make expand exec_prefix.
16337test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16338
bec39cab
AC
16339DEFS=-DHAVE_CONFIG_H
16340
16341ac_libobjs=
16342ac_ltlibobjs=
16343for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16344 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16345 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16346 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16347 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16348 # will be set to the directory where LIBOBJS objects are built.
16349 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16350 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16351done
16352LIBOBJS=$ac_libobjs
16353
16354LTLIBOBJS=$ac_ltlibobjs
16355
16356
85981d60 16357if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16358 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16359Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16360fi
a417dc56 16361if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16362 as_fn_error "conditional \"GMAKE\" was never defined.
16363Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16364fi
783e057b 16365if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16366 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16367Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16368fi
16369
16370 gl_libobjs=
16371 gl_ltlibobjs=
16372 if test -n "$gl_LIBOBJS"; then
16373 # Remove the extension.
16374 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16375 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16376 gl_libobjs="$gl_libobjs $i.$ac_objext"
16377 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16378 done
16379 fi
16380 gl_LIBOBJS=$gl_libobjs
16381
16382 gl_LTLIBOBJS=$gl_ltlibobjs
16383
16384
16385
16386 gltests_libobjs=
16387 gltests_ltlibobjs=
16388 if test -n "$gltests_LIBOBJS"; then
16389 # Remove the extension.
16390 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16391 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16392 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16393 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16394 done
16395 fi
16396 gltests_LIBOBJS=$gltests_libobjs
16397
16398 gltests_LTLIBOBJS=$gltests_ltlibobjs
16399
16400
e28b3332 16401if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16402 as_fn_error "conditional \"AMDEP\" was never defined.
16403Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16404fi
16405if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16406 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16407Usually this means the macro was only invoked conditionally." "$LINENO" 5
16408fi
16409 if test -n "$EXEEXT"; then
16410 am__EXEEXT_TRUE=
16411 am__EXEEXT_FALSE='#'
16412else
16413 am__EXEEXT_TRUE='#'
16414 am__EXEEXT_FALSE=
e28b3332 16415fi
bec39cab 16416
81ecdfbb
RW
16417
16418
bec39cab 16419: ${CONFIG_STATUS=./config.status}
81ecdfbb 16420ac_write_fail=0
bec39cab
AC
16421ac_clean_files_save=$ac_clean_files
16422ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16423{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16424$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16425as_write_fail=0
16426cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16427#! $SHELL
16428# Generated by $as_me.
16429# Run this file to recreate the current configuration.
16430# Compiler output produced by configure, useful for debugging
16431# configure, is in config.log if it exists.
16432
16433debug=false
16434ac_cs_recheck=false
16435ac_cs_silent=false
bec39cab 16436
81ecdfbb
RW
16437SHELL=\${CONFIG_SHELL-$SHELL}
16438export SHELL
16439_ASEOF
16440cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16441## -------------------- ##
16442## M4sh Initialization. ##
16443## -------------------- ##
16444
16445# Be more Bourne compatible
16446DUALCASE=1; export DUALCASE # for MKS sh
16447if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16448 emulate sh
16449 NULLCMD=:
81ecdfbb 16450 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16451 # is contrary to our usage. Disable this feature.
16452 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16453 setopt NO_GLOB_SUBST
16454else
16455 case `(set -o) 2>/dev/null` in #(
16456 *posix*) :
16457 set -o posix ;; #(
16458 *) :
16459 ;;
16460esac
bec39cab 16461fi
bec39cab 16462
81ecdfbb
RW
16463
16464as_nl='
16465'
16466export as_nl
16467# Printing a long string crashes Solaris 7 /usr/bin/printf.
16468as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16469as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16470as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16471# Prefer a ksh shell builtin over an external printf program on Solaris,
16472# but without wasting forks for bash or zsh.
16473if test -z "$BASH_VERSION$ZSH_VERSION" \
16474 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16475 as_echo='print -r --'
16476 as_echo_n='print -rn --'
16477elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16478 as_echo='printf %s\n'
16479 as_echo_n='printf %s'
16480else
16481 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16482 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16483 as_echo_n='/usr/ucb/echo -n'
16484 else
16485 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16486 as_echo_n_body='eval
16487 arg=$1;
16488 case $arg in #(
16489 *"$as_nl"*)
16490 expr "X$arg" : "X\\(.*\\)$as_nl";
16491 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16492 esac;
16493 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16494 '
16495 export as_echo_n_body
16496 as_echo_n='sh -c $as_echo_n_body as_echo'
16497 fi
16498 export as_echo_body
16499 as_echo='sh -c $as_echo_body as_echo'
16500fi
16501
16502# The user is always right.
16503if test "${PATH_SEPARATOR+set}" != set; then
16504 PATH_SEPARATOR=:
16505 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16506 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16507 PATH_SEPARATOR=';'
16508 }
bec39cab
AC
16509fi
16510
16511
81ecdfbb
RW
16512# IFS
16513# We need space, tab and new line, in precisely that order. Quoting is
16514# there to prevent editors from complaining about space-tab.
16515# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16516# splitting by setting IFS to empty value.)
16517IFS=" "" $as_nl"
16518
16519# Find who we are. Look in the path if we contain no directory separator.
16520case $0 in #((
16521 *[\\/]* ) as_myself=$0 ;;
16522 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16523for as_dir in $PATH
16524do
16525 IFS=$as_save_IFS
16526 test -z "$as_dir" && as_dir=.
16527 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16528 done
16529IFS=$as_save_IFS
16530
16531 ;;
16532esac
16533# We did not find ourselves, most probably we were run as `sh COMMAND'
16534# in which case we are not to be found in the path.
16535if test "x$as_myself" = x; then
16536 as_myself=$0
16537fi
16538if test ! -f "$as_myself"; then
16539 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16540 exit 1
16541fi
16542
16543# Unset variables that we do not need and which cause bugs (e.g. in
16544# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16545# suppresses any "Segmentation fault" message there. '((' could
16546# trigger a bug in pdksh 5.2.14.
16547for as_var in BASH_ENV ENV MAIL MAILPATH
16548do eval test x\${$as_var+set} = xset \
16549 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16550done
bec39cab
AC
16551PS1='$ '
16552PS2='> '
16553PS4='+ '
16554
16555# NLS nuisances.
81ecdfbb
RW
16556LC_ALL=C
16557export LC_ALL
16558LANGUAGE=C
16559export LANGUAGE
16560
16561# CDPATH.
16562(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16563
16564
16565# as_fn_error ERROR [LINENO LOG_FD]
16566# ---------------------------------
16567# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16568# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16569# script with status $?, using 1 if that was 0.
16570as_fn_error ()
16571{
16572 as_status=$?; test $as_status -eq 0 && as_status=1
16573 if test "$3"; then
16574 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16575 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16576 fi
16577 $as_echo "$as_me: error: $1" >&2
16578 as_fn_exit $as_status
16579} # as_fn_error
16580
16581
16582# as_fn_set_status STATUS
16583# -----------------------
16584# Set $? to STATUS, without forking.
16585as_fn_set_status ()
16586{
16587 return $1
16588} # as_fn_set_status
16589
16590# as_fn_exit STATUS
16591# -----------------
16592# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16593as_fn_exit ()
16594{
16595 set +e
16596 as_fn_set_status $1
16597 exit $1
16598} # as_fn_exit
16599
16600# as_fn_unset VAR
16601# ---------------
16602# Portably unset VAR.
16603as_fn_unset ()
16604{
16605 { eval $1=; unset $1;}
16606}
16607as_unset=as_fn_unset
16608# as_fn_append VAR VALUE
16609# ----------------------
16610# Append the text in VALUE to the end of the definition contained in VAR. Take
16611# advantage of any shell optimizations that allow amortized linear growth over
16612# repeated appends, instead of the typical quadratic growth present in naive
16613# implementations.
16614if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16615 eval 'as_fn_append ()
16616 {
16617 eval $1+=\$2
16618 }'
16619else
16620 as_fn_append ()
16621 {
16622 eval $1=\$$1\$2
16623 }
16624fi # as_fn_append
16625
16626# as_fn_arith ARG...
16627# ------------------
16628# Perform arithmetic evaluation on the ARGs, and store the result in the
16629# global $as_val. Take advantage of shells that can avoid forks. The arguments
16630# must be portable across $(()) and expr.
16631if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16632 eval 'as_fn_arith ()
16633 {
16634 as_val=$(( $* ))
16635 }'
16636else
16637 as_fn_arith ()
16638 {
16639 as_val=`expr "$@" || test $? -eq 1`
16640 }
16641fi # as_fn_arith
bec39cab 16642
81ecdfbb
RW
16643
16644if expr a : '\(a\)' >/dev/null 2>&1 &&
16645 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16646 as_expr=expr
16647else
16648 as_expr=false
16649fi
16650
81ecdfbb 16651if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16652 as_basename=basename
16653else
16654 as_basename=false
16655fi
16656
81ecdfbb
RW
16657if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16658 as_dirname=dirname
16659else
16660 as_dirname=false
16661fi
bec39cab 16662
81ecdfbb 16663as_me=`$as_basename -- "$0" ||
bec39cab
AC
16664$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16665 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16666 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16667$as_echo X/"$0" |
16668 sed '/^.*\/\([^/][^/]*\)\/*$/{
16669 s//\1/
16670 q
16671 }
16672 /^X\/\(\/\/\)$/{
16673 s//\1/
16674 q
16675 }
16676 /^X\/\(\/\).*/{
16677 s//\1/
16678 q
16679 }
16680 s/.*/./; q'`
b4e70030 16681
b4e70030
JB
16682# Avoid depending upon Character Ranges.
16683as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16684as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16685as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16686as_cr_digits='0123456789'
16687as_cr_alnum=$as_cr_Letters$as_cr_digits
16688
81ecdfbb
RW
16689ECHO_C= ECHO_N= ECHO_T=
16690case `echo -n x` in #(((((
16691-n*)
16692 case `echo 'xy\c'` in
16693 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16694 xy) ECHO_C='\c';;
16695 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16696 ECHO_T=' ';;
16697 esac;;
16698*)
16699 ECHO_N='-n';;
bec39cab
AC
16700esac
16701
81ecdfbb
RW
16702rm -f conf$$ conf$$.exe conf$$.file
16703if test -d conf$$.dir; then
16704 rm -f conf$$.dir/conf$$.file
bec39cab 16705else
81ecdfbb
RW
16706 rm -f conf$$.dir
16707 mkdir conf$$.dir 2>/dev/null
bec39cab 16708fi
81ecdfbb
RW
16709if (echo >conf$$.file) 2>/dev/null; then
16710 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16711 as_ln_s='ln -s'
81ecdfbb
RW
16712 # ... but there are two gotchas:
16713 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16714 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16715 # In both cases, we have to default to `cp -p'.
16716 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16717 as_ln_s='cp -p'
16718 elif ln conf$$.file conf$$ 2>/dev/null; then
16719 as_ln_s=ln
16720 else
16721 as_ln_s='cp -p'
b4e70030 16722 fi
bec39cab
AC
16723else
16724 as_ln_s='cp -p'
16725fi
81ecdfbb
RW
16726rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16727rmdir conf$$.dir 2>/dev/null
16728
16729
16730# as_fn_mkdir_p
16731# -------------
16732# Create "$as_dir" as a directory, including parents if necessary.
16733as_fn_mkdir_p ()
16734{
16735
16736 case $as_dir in #(
16737 -*) as_dir=./$as_dir;;
16738 esac
16739 test -d "$as_dir" || eval $as_mkdir_p || {
16740 as_dirs=
16741 while :; do
16742 case $as_dir in #(
16743 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16744 *) as_qdir=$as_dir;;
16745 esac
16746 as_dirs="'$as_qdir' $as_dirs"
16747 as_dir=`$as_dirname -- "$as_dir" ||
16748$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16749 X"$as_dir" : 'X\(//\)[^/]' \| \
16750 X"$as_dir" : 'X\(//\)$' \| \
16751 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16752$as_echo X"$as_dir" |
16753 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16754 s//\1/
16755 q
16756 }
16757 /^X\(\/\/\)[^/].*/{
16758 s//\1/
16759 q
16760 }
16761 /^X\(\/\/\)$/{
16762 s//\1/
16763 q
16764 }
16765 /^X\(\/\).*/{
16766 s//\1/
16767 q
16768 }
16769 s/.*/./; q'`
16770 test -d "$as_dir" && break
16771 done
16772 test -z "$as_dirs" || eval "mkdir $as_dirs"
16773 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16774
bec39cab 16775
81ecdfbb 16776} # as_fn_mkdir_p
bec39cab 16777if mkdir -p . 2>/dev/null; then
81ecdfbb 16778 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16779else
16780 test -d ./-p && rmdir ./-p
16781 as_mkdir_p=false
16782fi
16783
81ecdfbb
RW
16784if test -x / >/dev/null 2>&1; then
16785 as_test_x='test -x'
16786else
16787 if ls -dL / >/dev/null 2>&1; then
16788 as_ls_L_option=L
16789 else
16790 as_ls_L_option=
16791 fi
16792 as_test_x='
16793 eval sh -c '\''
16794 if test -d "$1"; then
16795 test -d "$1/.";
16796 else
16797 case $1 in #(
16798 -*)set "./$1";;
16799 esac;
16800 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16801 ???[sx]*):;;*)false;;esac;fi
16802 '\'' sh
16803 '
16804fi
16805as_executable_p=$as_test_x
bec39cab
AC
16806
16807# Sed expression to map a string onto a valid CPP name.
16808as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16809
16810# Sed expression to map a string onto a valid variable name.
16811as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16812
16813
bec39cab 16814exec 6>&1
81ecdfbb
RW
16815## ----------------------------------- ##
16816## Main body of $CONFIG_STATUS script. ##
16817## ----------------------------------- ##
16818_ASEOF
16819test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16820
16821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16822# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16823# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16824# values after options handling.
16825ac_log="
bec39cab 16826This file was extended by $as_me, which was
81ecdfbb 16827generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16828
16829 CONFIG_FILES = $CONFIG_FILES
16830 CONFIG_HEADERS = $CONFIG_HEADERS
16831 CONFIG_LINKS = $CONFIG_LINKS
16832 CONFIG_COMMANDS = $CONFIG_COMMANDS
16833 $ $0 $@
16834
81ecdfbb
RW
16835on `(hostname || uname -n) 2>/dev/null | sed 1q`
16836"
16837
bec39cab
AC
16838_ACEOF
16839
81ecdfbb
RW
16840case $ac_config_files in *"
16841"*) set x $ac_config_files; shift; ac_config_files=$*;;
16842esac
234b45d4 16843
81ecdfbb
RW
16844case $ac_config_headers in *"
16845"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16846esac
b4e70030 16847
b4e70030 16848
81ecdfbb
RW
16849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16850# Files that config.status was made for.
16851config_files="$ac_config_files"
16852config_headers="$ac_config_headers"
16853config_links="$ac_config_links"
16854config_commands="$ac_config_commands"
234b45d4 16855
81ecdfbb 16856_ACEOF
b4e70030 16857
81ecdfbb 16858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16859ac_cs_usage="\
81ecdfbb
RW
16860\`$as_me' instantiates files and other configuration actions
16861from templates according to the current configuration. Unless the files
16862and actions are specified as TAGs, all are instantiated by default.
234b45d4 16863
81ecdfbb 16864Usage: $0 [OPTION]... [TAG]...
234b45d4 16865
bec39cab 16866 -h, --help print this help, then exit
81ecdfbb
RW
16867 -V, --version print version number and configuration settings, then exit
16868 -q, --quiet, --silent
16869 do not print progress messages
bec39cab
AC
16870 -d, --debug don't remove temporary files
16871 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16872 --file=FILE[:TEMPLATE]
16873 instantiate the configuration file FILE
16874 --header=FILE[:TEMPLATE]
16875 instantiate the configuration header FILE
234b45d4 16876
bec39cab
AC
16877Configuration files:
16878$config_files
234b45d4 16879
bec39cab
AC
16880Configuration headers:
16881$config_headers
234b45d4 16882
bec39cab
AC
16883Configuration links:
16884$config_links
234b45d4 16885
bec39cab
AC
16886Configuration commands:
16887$config_commands
16888
81ecdfbb 16889Report bugs to the package provider."
b4e70030 16890
81ecdfbb
RW
16891_ACEOF
16892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16893ac_cs_version="\\
16894config.status
81ecdfbb
RW
16895configured by $0, generated by GNU Autoconf 2.64,
16896 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16897
81ecdfbb 16898Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16899This config.status script is free software; the Free Software Foundation
16900gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16901
16902ac_pwd='$ac_pwd'
16903srcdir='$srcdir'
16904INSTALL='$INSTALL'
16905MKDIR_P='$MKDIR_P'
16906AWK='$AWK'
16907test -n "\$AWK" || AWK=awk
bec39cab
AC
16908_ACEOF
16909
81ecdfbb
RW
16910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16911# The default lists apply if the user does not specify any file.
bec39cab
AC
16912ac_need_defaults=:
16913while test $# != 0
16914do
16915 case $1 in
16916 --*=*)
81ecdfbb
RW
16917 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16918 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16919 ac_shift=:
c906108c 16920 ;;
81ecdfbb 16921 *)
bec39cab
AC
16922 ac_option=$1
16923 ac_optarg=$2
16924 ac_shift=shift
c906108c 16925 ;;
bec39cab 16926 esac
c906108c 16927
bec39cab
AC
16928 case $ac_option in
16929 # Handling of the options.
bec39cab
AC
16930 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16931 ac_cs_recheck=: ;;
81ecdfbb
RW
16932 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16933 $as_echo "$ac_cs_version"; exit ;;
16934 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16935 debug=: ;;
16936 --file | --fil | --fi | --f )
16937 $ac_shift
81ecdfbb
RW
16938 case $ac_optarg in
16939 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16940 esac
16941 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16942 ac_need_defaults=false;;
16943 --header | --heade | --head | --hea )
16944 $ac_shift
81ecdfbb
RW
16945 case $ac_optarg in
16946 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16947 esac
16948 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16949 ac_need_defaults=false;;
81ecdfbb
RW
16950 --he | --h)
16951 # Conflict between --help and --header
16952 as_fn_error "ambiguous option: \`$1'
16953Try \`$0 --help' for more information.";;
16954 --help | --hel | -h )
16955 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16956 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16957 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16958 ac_cs_silent=: ;;
c906108c 16959
bec39cab 16960 # This is an error.
81ecdfbb
RW
16961 -*) as_fn_error "unrecognized option: \`$1'
16962Try \`$0 --help' for more information." ;;
c906108c 16963
81ecdfbb
RW
16964 *) as_fn_append ac_config_targets " $1"
16965 ac_need_defaults=false ;;
c906108c 16966
bec39cab
AC
16967 esac
16968 shift
16969done
c906108c 16970
bec39cab 16971ac_configure_extra_args=
c906108c 16972
bec39cab
AC
16973if $ac_cs_silent; then
16974 exec 6>/dev/null
16975 ac_configure_extra_args="$ac_configure_extra_args --silent"
16976fi
c906108c 16977
bec39cab 16978_ACEOF
81ecdfbb 16979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16980if \$ac_cs_recheck; then
81ecdfbb
RW
16981 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16982 shift
16983 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16984 CONFIG_SHELL='$SHELL'
16985 export CONFIG_SHELL
16986 exec "\$@"
bec39cab
AC
16987fi
16988
16989_ACEOF
81ecdfbb
RW
16990cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16991exec 5>>config.log
16992{
16993 echo
16994 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16995## Running $as_me. ##
16996_ASBOX
16997 $as_echo "$ac_log"
16998} >&5
bec39cab 16999
81ecdfbb
RW
17000_ACEOF
17001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17002#
81ecdfbb 17003# INIT-COMMANDS
c906108c 17004#
a417dc56 17005ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 17006AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 17007
bec39cab
AC
17008_ACEOF
17009
81ecdfbb 17010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17011
81ecdfbb 17012# Handling of arguments.
bec39cab 17013for ac_config_target in $ac_config_targets
c906108c 17014do
81ecdfbb
RW
17015 case $ac_config_target in
17016 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17017 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
17018 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
f997c383 17019 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
17020 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
17021 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17022 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 17023 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 17024 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 17025 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17026 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17027
17028 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17029 esac
17030done
17031
81ecdfbb 17032
bec39cab
AC
17033# If the user did not use the arguments to specify the items to instantiate,
17034# then the envvar interface is used. Set only those that are not.
17035# We use the long form for the default assignment because of an extremely
17036# bizarre bug on SunOS 4.1.3.
17037if $ac_need_defaults; then
17038 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17039 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17040 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17041 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17042fi
17043
b4e70030 17044# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17045# simply because there is no reason against having it here, and in addition,
b4e70030 17046# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17047# Hook for its removal unless debugging.
17048# Note that there is a small window in which the directory will not be cleaned:
17049# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17050$debug ||
17051{
81ecdfbb
RW
17052 tmp=
17053 trap 'exit_status=$?
17054 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17055' 0
17056 trap 'as_fn_exit 1' 1 2 13 15
17057}
17058# Create a (secure) tmp directory for tmp files.
17059
17060{
17061 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17062 test -n "$tmp" && test -d "$tmp"
17063} ||
17064{
17065 tmp=./conf$$-$RANDOM
17066 (umask 077 && mkdir "$tmp")
17067} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17068
17069# Set up the scripts for CONFIG_FILES section.
17070# No need to generate them if there are no CONFIG_FILES.
17071# This happens for instance with `./config.status config.h'.
17072if test -n "$CONFIG_FILES"; then
17073
17074if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17075 ac_cs_awk_getline=:
17076 ac_cs_awk_pipe_init=
17077 ac_cs_awk_read_file='
17078 while ((getline aline < (F[key])) > 0)
17079 print(aline)
17080 close(F[key])'
17081 ac_cs_awk_pipe_fini=
17082else
17083 ac_cs_awk_getline=false
17084 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17085 ac_cs_awk_read_file='
17086 print "|#_!!_#|"
17087 print "cat " F[key] " &&"
17088 '$ac_cs_awk_pipe_init
17089 # The final `:' finishes the AND list.
17090 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17091fi
17092ac_cr=`echo X | tr X '\015'`
17093# On cygwin, bash can eat \r inside `` if the user requested igncr.
17094# But we know of no other shell where ac_cr would be empty at this
17095# point, so we can use a bashism as a fallback.
17096if test "x$ac_cr" = x; then
17097 eval ac_cr=\$\'\\r\'
17098fi
17099ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17100if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17101 ac_cs_awk_cr='\r'
17102else
17103 ac_cs_awk_cr=$ac_cr
17104fi
17105
17106echo 'BEGIN {' >"$tmp/subs1.awk" &&
17107_ACEOF
17108
17109# Create commands to substitute file output variables.
17110{
17111 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17112 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17113 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17114 echo "_ACAWK" &&
17115 echo "_ACEOF"
17116} >conf$$files.sh &&
17117. ./conf$$files.sh ||
17118 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17119rm -f conf$$files.sh
17120
17121{
17122 echo "cat >conf$$subs.awk <<_ACEOF" &&
17123 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17124 echo "_ACEOF"
17125} >conf$$subs.sh ||
17126 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17127ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17128ac_delim='%!_!# '
17129for ac_last_try in false false false false false :; do
17130 . ./conf$$subs.sh ||
17131 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17132
17133 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17134 if test $ac_delim_n = $ac_delim_num; then
17135 break
17136 elif $ac_last_try; then
17137 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17138 else
17139 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17140 fi
17141done
17142rm -f conf$$subs.sh
17143
17144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17145cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17146_ACEOF
17147sed -n '
17148h
17149s/^/S["/; s/!.*/"]=/
17150p
17151g
17152s/^[^!]*!//
17153:repl
17154t repl
17155s/'"$ac_delim"'$//
17156t delim
17157:nl
17158h
17159s/\(.\{148\}\).*/\1/
17160t more1
17161s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17162p
17163n
17164b repl
17165:more1
17166s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17167p
17168g
17169s/.\{148\}//
17170t nl
17171:delim
17172h
17173s/\(.\{148\}\).*/\1/
17174t more2
17175s/["\\]/\\&/g; s/^/"/; s/$/"/
17176p
17177b
17178:more2
17179s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17180p
17181g
17182s/.\{148\}//
17183t delim
17184' <conf$$subs.awk | sed '
17185/^[^""]/{
17186 N
17187 s/\n//
17188}
17189' >>$CONFIG_STATUS || ac_write_fail=1
17190rm -f conf$$subs.awk
17191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17192_ACAWK
17193cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17194 for (key in S) S_is_set[key] = 1
17195 FS = "\a"
17196 \$ac_cs_awk_pipe_init
17197}
17198{
17199 line = $ 0
17200 nfields = split(line, field, "@")
17201 substed = 0
17202 len = length(field[1])
17203 for (i = 2; i < nfields; i++) {
17204 key = field[i]
17205 keylen = length(key)
17206 if (S_is_set[key]) {
17207 value = S[key]
17208 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17209 len += length(value) + length(field[++i])
17210 substed = 1
17211 } else
17212 len += 1 + keylen
17213 }
17214 if (nfields == 3 && !substed) {
17215 key = field[2]
17216 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17217 \$ac_cs_awk_read_file
17218 next
17219 }
17220 }
17221 print line
b4e70030 17222}
81ecdfbb
RW
17223\$ac_cs_awk_pipe_fini
17224_ACAWK
17225_ACEOF
17226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17227if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17228 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17229else
17230 cat
17231fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17232 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17233_ACEOF
17234
17235# VPATH may cause trouble with some makes, so we remove $(srcdir),
17236# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17237# trailing colons and then remove the whole line if VPATH becomes empty
17238# (actually we leave an empty line to preserve line numbers).
17239if test "x$srcdir" = x.; then
17240 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17241s/:*\$(srcdir):*/:/
17242s/:*\${srcdir}:*/:/
17243s/:*@srcdir@:*/:/
17244s/^\([^=]*=[ ]*\):*/\1/
17245s/:*$//
17246s/^[^=]*=[ ]*$//
17247}'
17248fi
17249
17250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17251fi # test -n "$CONFIG_FILES"
17252
17253# Set up the scripts for CONFIG_HEADERS section.
17254# No need to generate them if there are no CONFIG_HEADERS.
17255# This happens for instance with `./config.status Makefile'.
17256if test -n "$CONFIG_HEADERS"; then
17257cat >"$tmp/defines.awk" <<\_ACAWK ||
17258BEGIN {
17259_ACEOF
17260
17261# Transform confdefs.h into an awk script `defines.awk', embedded as
17262# here-document in config.status, that substitutes the proper values into
17263# config.h.in to produce config.h.
4e8d927d 17264
81ecdfbb
RW
17265# Create a delimiter string that does not exist in confdefs.h, to ease
17266# handling of long lines.
17267ac_delim='%!_!# '
17268for ac_last_try in false false :; do
17269 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17270 if test -z "$ac_t"; then
17271 break
17272 elif $ac_last_try; then
17273 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17274 else
17275 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17276 fi
17277done
4e8d927d 17278
81ecdfbb
RW
17279# For the awk script, D is an array of macro values keyed by name,
17280# likewise P contains macro parameters if any. Preserve backslash
17281# newline sequences.
17282
17283ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17284sed -n '
17285s/.\{148\}/&'"$ac_delim"'/g
17286t rset
17287:rset
17288s/^[ ]*#[ ]*define[ ][ ]*/ /
17289t def
17290d
17291:def
17292s/\\$//
17293t bsnl
17294s/["\\]/\\&/g
17295s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17296D["\1"]=" \3"/p
17297s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17298d
17299:bsnl
17300s/["\\]/\\&/g
17301s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17302D["\1"]=" \3\\\\\\n"\\/p
17303t cont
17304s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17305t cont
17306d
17307:cont
17308n
17309s/.\{148\}/&'"$ac_delim"'/g
17310t clear
17311:clear
17312s/\\$//
17313t bsnlc
17314s/["\\]/\\&/g; s/^/"/; s/$/"/p
17315d
17316:bsnlc
17317s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17318b cont
17319' <confdefs.h | sed '
17320s/'"$ac_delim"'/"\\\
17321"/g' >>$CONFIG_STATUS || ac_write_fail=1
17322
17323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17324 for (key in D) D_is_set[key] = 1
17325 FS = "\a"
17326}
17327/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17328 line = \$ 0
17329 split(line, arg, " ")
17330 if (arg[1] == "#") {
17331 defundef = arg[2]
17332 mac1 = arg[3]
17333 } else {
17334 defundef = substr(arg[1], 2)
17335 mac1 = arg[2]
17336 }
17337 split(mac1, mac2, "(") #)
17338 macro = mac2[1]
17339 prefix = substr(line, 1, index(line, defundef) - 1)
17340 if (D_is_set[macro]) {
17341 # Preserve the white space surrounding the "#".
17342 print prefix "define", macro P[macro] D[macro]
17343 next
17344 } else {
17345 # Replace #undef with comments. This is necessary, for example,
17346 # in the case of _POSIX_SOURCE, which is predefined and required
17347 # on some systems where configure will not decide to define it.
17348 if (defundef == "undef") {
17349 print "/*", prefix defundef, macro, "*/"
17350 next
17351 }
17352 }
b4e70030 17353}
81ecdfbb
RW
17354{ print }
17355_ACAWK
b4e70030 17356_ACEOF
81ecdfbb
RW
17357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17358 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17359fi # test -n "$CONFIG_HEADERS"
4e8d927d 17360
4e8d927d 17361
81ecdfbb
RW
17362eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17363shift
17364for ac_tag
17365do
17366 case $ac_tag in
17367 :[FHLC]) ac_mode=$ac_tag; continue;;
17368 esac
17369 case $ac_mode$ac_tag in
17370 :[FHL]*:*);;
17371 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17372 :[FH]-) ac_tag=-:-;;
17373 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17374 esac
17375 ac_save_IFS=$IFS
17376 IFS=:
17377 set x $ac_tag
17378 IFS=$ac_save_IFS
17379 shift
17380 ac_file=$1
17381 shift
4e8d927d 17382
81ecdfbb
RW
17383 case $ac_mode in
17384 :L) ac_source=$1;;
17385 :[FH])
17386 ac_file_inputs=
17387 for ac_f
17388 do
17389 case $ac_f in
17390 -) ac_f="$tmp/stdin";;
17391 *) # Look for the file first in the build tree, then in the source tree
17392 # (if the path is not absolute). The absolute path cannot be DOS-style,
17393 # because $ac_f cannot contain `:'.
17394 test -f "$ac_f" ||
17395 case $ac_f in
17396 [\\/$]*) false;;
17397 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17398 esac ||
17399 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17400 esac
17401 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17402 as_fn_append ac_file_inputs " '$ac_f'"
17403 done
17404
17405 # Let's still pretend it is `configure' which instantiates (i.e., don't
17406 # use $as_me), people would be surprised to read:
17407 # /* config.h. Generated by config.status. */
17408 configure_input='Generated from '`
17409 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17410 `' by configure.'
17411 if test x"$ac_file" != x-; then
17412 configure_input="$ac_file. $configure_input"
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17414$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17415 fi
81ecdfbb
RW
17416 # Neutralize special characters interpreted by sed in replacement strings.
17417 case $configure_input in #(
17418 *\&* | *\|* | *\\* )
17419 ac_sed_conf_input=`$as_echo "$configure_input" |
17420 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17421 *) ac_sed_conf_input=$configure_input;;
17422 esac
4e8d927d 17423
81ecdfbb
RW
17424 case $ac_tag in
17425 *:-:* | *:-) cat >"$tmp/stdin" \
17426 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17427 esac
17428 ;;
c906108c
SS
17429 esac
17430
81ecdfbb 17431 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17432$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17433 X"$ac_file" : 'X\(//\)[^/]' \| \
17434 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17435 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17436$as_echo X"$ac_file" |
17437 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17438 s//\1/
17439 q
17440 }
17441 /^X\(\/\/\)[^/].*/{
17442 s//\1/
17443 q
17444 }
17445 /^X\(\/\/\)$/{
17446 s//\1/
17447 q
17448 }
17449 /^X\(\/\).*/{
17450 s//\1/
17451 q
17452 }
17453 s/.*/./; q'`
17454 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17455 ac_builddir=.
17456
81ecdfbb
RW
17457case "$ac_dir" in
17458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17459*)
17460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17461 # A ".." for each directory in $ac_dir_suffix.
17462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17463 case $ac_top_builddir_sub in
17464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17466 esac ;;
17467esac
17468ac_abs_top_builddir=$ac_pwd
17469ac_abs_builddir=$ac_pwd$ac_dir_suffix
17470# for backward compatibility:
17471ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17472
17473case $srcdir in
81ecdfbb 17474 .) # We are building in place.
bec39cab 17475 ac_srcdir=.
81ecdfbb
RW
17476 ac_top_srcdir=$ac_top_builddir_sub
17477 ac_abs_top_srcdir=$ac_pwd ;;
17478 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17479 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17480 ac_top_srcdir=$srcdir
17481 ac_abs_top_srcdir=$srcdir ;;
17482 *) # Relative name.
17483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17484 ac_top_srcdir=$ac_top_build_prefix$srcdir
17485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17486esac
81ecdfbb 17487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17488
c906108c 17489
81ecdfbb
RW
17490 case $ac_mode in
17491 :F)
17492 #
17493 # CONFIG_FILE
17494 #
c906108c 17495
bec39cab
AC
17496 case $INSTALL in
17497 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17498 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17499 esac
81ecdfbb
RW
17500 ac_MKDIR_P=$MKDIR_P
17501 case $MKDIR_P in
17502 [\\/$]* | ?:[\\/]* ) ;;
17503 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17504 esac
17505_ACEOF
121ce6e5 17506
81ecdfbb
RW
17507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17508# If the template does not know about datarootdir, expand it.
17509# FIXME: This hack should be removed a few years after 2.60.
17510ac_datarootdir_hack=; ac_datarootdir_seen=
17511ac_sed_dataroot='
17512/datarootdir/ {
17513 p
17514 q
17515}
17516/@datadir@/p
17517/@docdir@/p
17518/@infodir@/p
17519/@localedir@/p
17520/@mandir@/p'
17521case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17522*datarootdir*) ac_datarootdir_seen=yes;;
17523*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17525$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17526_ACEOF
17527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17528 ac_datarootdir_hack='
17529 s&@datadir@&$datadir&g
17530 s&@docdir@&$docdir&g
17531 s&@infodir@&$infodir&g
17532 s&@localedir@&$localedir&g
17533 s&@mandir@&$mandir&g
17534 s&\\\${datarootdir}&$datarootdir&g' ;;
17535esac
4e8d927d 17536_ACEOF
81ecdfbb
RW
17537
17538# Neutralize VPATH when `$srcdir' = `.'.
17539# Shell code in configure.ac might set extrasub.
17540# FIXME: do we really want to maintain this feature?
17541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17542ac_sed_extra="$ac_vpsub
bec39cab
AC
17543$extrasub
17544_ACEOF
81ecdfbb 17545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17546:t
17547/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17548s|@configure_input@|$ac_sed_conf_input|;t t
17549s&@top_builddir@&$ac_top_builddir_sub&;t t
17550s&@top_build_prefix@&$ac_top_build_prefix&;t t
17551s&@srcdir@&$ac_srcdir&;t t
17552s&@abs_srcdir@&$ac_abs_srcdir&;t t
17553s&@top_srcdir@&$ac_top_srcdir&;t t
17554s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17555s&@builddir@&$ac_builddir&;t t
17556s&@abs_builddir@&$ac_abs_builddir&;t t
17557s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17558s&@INSTALL@&$ac_INSTALL&;t t
17559s&@MKDIR_P@&$ac_MKDIR_P&;t t
17560$ac_datarootdir_hack
17561"
17562eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17563if $ac_cs_awk_getline; then
17564 $AWK -f "$tmp/subs.awk"
17565else
17566 $AWK -f "$tmp/subs.awk" | $SHELL
17567fi >$tmp/out \
17568 || as_fn_error "could not create $ac_file" "$LINENO" 5
17569
17570test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17571 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17572 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17574which seems to be undefined. Please make sure it is defined." >&5
17575$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17576which seems to be undefined. Please make sure it is defined." >&2;}
17577
17578 rm -f "$tmp/stdin"
bec39cab 17579 case $ac_file in
81ecdfbb
RW
17580 -) cat "$tmp/out" && rm -f "$tmp/out";;
17581 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17582 esac \
17583 || as_fn_error "could not create $ac_file" "$LINENO" 5
17584 ;;
17585 :H)
17586 #
17587 # CONFIG_HEADER
17588 #
bec39cab 17589 if test x"$ac_file" != x-; then
81ecdfbb
RW
17590 {
17591 $as_echo "/* $configure_input */" \
17592 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17593 } >"$tmp/config.h" \
17594 || as_fn_error "could not create $ac_file" "$LINENO" 5
17595 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17596 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17597$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17598 else
81ecdfbb
RW
17599 rm -f "$ac_file"
17600 mv "$tmp/config.h" "$ac_file" \
17601 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17602 fi
17603 else
81ecdfbb
RW
17604 $as_echo "/* $configure_input */" \
17605 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17606 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17607 fi
81ecdfbb
RW
17608# Compute "$ac_file"'s index in $config_headers.
17609_am_arg="$ac_file"
e28b3332
DJ
17610_am_stamp_count=1
17611for _am_header in $config_headers :; do
17612 case $_am_header in
81ecdfbb 17613 $_am_arg | $_am_arg:* )
e28b3332
DJ
17614 break ;;
17615 * )
17616 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17617 esac
17618done
81ecdfbb
RW
17619echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17620$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17621 X"$_am_arg" : 'X\(//\)[^/]' \| \
17622 X"$_am_arg" : 'X\(//\)$' \| \
17623 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17624$as_echo X"$_am_arg" |
17625 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17626 s//\1/
17627 q
17628 }
17629 /^X\(\/\/\)[^/].*/{
17630 s//\1/
17631 q
17632 }
17633 /^X\(\/\/\)$/{
17634 s//\1/
17635 q
17636 }
17637 /^X\(\/\).*/{
17638 s//\1/
17639 q
17640 }
17641 s/.*/./; q'`/stamp-h$_am_stamp_count
17642 ;;
17643 :L)
17644 #
17645 # CONFIG_LINK
17646 #
c906108c 17647
81ecdfbb
RW
17648 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17649 :
b4e70030 17650 else
81ecdfbb
RW
17651 # Prefer the file from the source tree if names are identical.
17652 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17653 ac_source=$srcdir/$ac_source
17654 fi
b4e70030 17655
81ecdfbb
RW
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17657$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17658
81ecdfbb
RW
17659 if test ! -r "$ac_source"; then
17660 as_fn_error "$ac_source: file not found" "$LINENO" 5
17661 fi
17662 rm -f "$ac_file"
bec39cab 17663
81ecdfbb
RW
17664 # Try a relative symlink, then a hard link, then a copy.
17665 case $srcdir in
17666 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17667 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17668 esac
17669 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17670 ln "$ac_source" "$ac_file" 2>/dev/null ||
17671 cp -p "$ac_source" "$ac_file" ||
17672 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17673 fi
17674 ;;
17675 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17676$as_echo "$as_me: executing $ac_file commands" >&6;}
17677 ;;
c906108c 17678 esac
b4e70030 17679
bec39cab 17680
81ecdfbb
RW
17681 case $ac_file$ac_mode in
17682 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17683 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17684 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17685 # are listed without --file. Let's play safe and only enable the eval
17686 # if we detect the quoting.
17687 case $CONFIG_FILES in
17688 *\'*) eval set x "$CONFIG_FILES" ;;
17689 *) set x $CONFIG_FILES ;;
17690 esac
17691 shift
17692 for mf
17693 do
17694 # Strip MF so we end up with the name of the file.
17695 mf=`echo "$mf" | sed -e 's/:.*$//'`
17696 # Check whether this is an Automake generated Makefile or not.
17697 # We used to match only the files named `Makefile.in', but
17698 # some people rename them; so instead we look at the file content.
17699 # Grep'ing the first line is not enough: some people post-process
17700 # each Makefile.in and add a new line on top of each file to say so.
17701 # Grep'ing the whole file is not good either: AIX grep has a line
17702 # limit of 2048, but all sed's we know have understand at least 4000.
17703 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17704 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17705$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17706 X"$mf" : 'X\(//\)[^/]' \| \
17707 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17708 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17709$as_echo X"$mf" |
17710 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17711 s//\1/
17712 q
17713 }
17714 /^X\(\/\/\)[^/].*/{
17715 s//\1/
17716 q
17717 }
17718 /^X\(\/\/\)$/{
17719 s//\1/
17720 q
17721 }
17722 /^X\(\/\).*/{
17723 s//\1/
17724 q
17725 }
17726 s/.*/./; q'`
17727 else
17728 continue
17729 fi
17730 # Extract the definition of DEPDIR, am__include, and am__quote
17731 # from the Makefile without running `make'.
17732 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17733 test -z "$DEPDIR" && continue
17734 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17735 test -z "am__include" && continue
17736 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17737 # When using ansi2knr, U may be empty or an underscore; expand it
17738 U=`sed -n 's/^U = //p' < "$mf"`
17739 # Find all dependency output files, they are included files with
17740 # $(DEPDIR) in their names. We invoke sed twice because it is the
17741 # simplest approach to changing $(DEPDIR) to its actual value in the
17742 # expansion.
17743 for file in `sed -n "
17744 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17745 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17746 # Make sure the directory exists.
17747 test -f "$dirpart/$file" && continue
17748 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17749$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17750 X"$file" : 'X\(//\)[^/]' \| \
17751 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17752 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17753$as_echo X"$file" |
17754 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17755 s//\1/
17756 q
17757 }
17758 /^X\(\/\/\)[^/].*/{
17759 s//\1/
17760 q
17761 }
17762 /^X\(\/\/\)$/{
17763 s//\1/
17764 q
17765 }
17766 /^X\(\/\).*/{
17767 s//\1/
17768 q
17769 }
17770 s/.*/./; q'`
17771 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17772 # echo "creating $dirpart/$file"
17773 echo '# dummy' > "$dirpart/$file"
e28b3332 17774 done
e28b3332 17775 done
81ecdfbb 17776}
4e8d927d 17777 ;;
81ecdfbb 17778 "default":C)
c906108c
SS
17779case x$CONFIG_HEADERS in
17780xconfig.h:config.in)
17781echo > stamp-h ;;
17782esac
bec39cab 17783 ;;
81ecdfbb 17784
bec39cab 17785 esac
81ecdfbb 17786done # for ac_tag
c906108c 17787
bec39cab 17788
81ecdfbb 17789as_fn_exit 0
bec39cab 17790_ACEOF
bec39cab
AC
17791ac_clean_files=$ac_clean_files_save
17792
81ecdfbb
RW
17793test $ac_write_fail = 0 ||
17794 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17795
bec39cab
AC
17796
17797# configure is writing to config.log, and then calls config.status.
17798# config.status does its own redirection, appending to config.log.
17799# Unfortunately, on DOS this fails, as config.log is still kept open
17800# by configure, so config.status won't be able to write to it; its
17801# output is simply discarded. So we exec the FD to /dev/null,
17802# effectively closing config.log, so it can be properly (re)opened and
17803# appended to by config.status. When coming back to configure, we
17804# need to make the FD available again.
17805if test "$no_create" != yes; then
17806 ac_cs_success=:
17807 ac_config_status_args=
17808 test "$silent" = yes &&
17809 ac_config_status_args="$ac_config_status_args --quiet"
17810 exec 5>/dev/null
17811 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17812 exec 5>>config.log
17813 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17814 # would make configure fail if this is the last instruction.
81ecdfbb 17815 $ac_cs_success || as_fn_exit $?
bec39cab 17816fi
c906108c 17817
bec39cab 17818#
81ecdfbb 17819# CONFIG_SUBDIRS section.
bec39cab 17820#
c906108c
SS
17821if test "$no_recursion" != yes; then
17822
81ecdfbb
RW
17823 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17824 # so they do not pile up.
c906108c
SS
17825 ac_sub_configure_args=
17826 ac_prev=
fdc59709
PB
17827 eval "set x $ac_configure_args"
17828 shift
17829 for ac_arg
17830 do
c906108c
SS
17831 if test -n "$ac_prev"; then
17832 ac_prev=
17833 continue
17834 fi
bec39cab 17835 case $ac_arg in
c906108c
SS
17836 -cache-file | --cache-file | --cache-fil | --cache-fi \
17837 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17838 ac_prev=cache_file ;;
17839 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17840 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17841 | --c=*)
17842 ;;
17843 --config-cache | -C)
c906108c
SS
17844 ;;
17845 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17846 ac_prev=srcdir ;;
17847 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17848 ;;
bec39cab
AC
17849 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17850 ac_prev=prefix ;;
17851 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17852 ;;
81ecdfbb
RW
17853 --disable-option-checking)
17854 ;;
fdc59709
PB
17855 *)
17856 case $ac_arg in
81ecdfbb 17857 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17858 esac
81ecdfbb 17859 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17860 esac
17861 done
17862
bec39cab
AC
17863 # Always prepend --prefix to ensure using the same prefix
17864 # in subdir configurations.
fdc59709
PB
17865 ac_arg="--prefix=$prefix"
17866 case $ac_arg in
81ecdfbb 17867 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17868 esac
81ecdfbb
RW
17869 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17870
17871 # Pass --silent
17872 if test "$silent" = yes; then
17873 ac_sub_configure_args="--silent $ac_sub_configure_args"
17874 fi
17875
17876 # Always prepend --disable-option-checking to silence warnings, since
17877 # different subdirs can have different --enable and --with options.
17878 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17879
b4e70030 17880 ac_popdir=`pwd`
bec39cab 17881 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17882
17883 # Do not complain, so a configure script can configure whichever
17884 # parts of a large source tree are present.
fdc59709 17885 test -d "$srcdir/$ac_dir" || continue
c906108c 17886
81ecdfbb
RW
17887 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17888 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17889 $as_echo "$ac_msg" >&6
17890 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17891 ac_builddir=.
17892
81ecdfbb
RW
17893case "$ac_dir" in
17894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17895*)
17896 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17897 # A ".." for each directory in $ac_dir_suffix.
17898 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17899 case $ac_top_builddir_sub in
17900 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17901 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17902 esac ;;
17903esac
17904ac_abs_top_builddir=$ac_pwd
17905ac_abs_builddir=$ac_pwd$ac_dir_suffix
17906# for backward compatibility:
17907ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17908
17909case $srcdir in
81ecdfbb 17910 .) # We are building in place.
bec39cab 17911 ac_srcdir=.
81ecdfbb
RW
17912 ac_top_srcdir=$ac_top_builddir_sub
17913 ac_abs_top_srcdir=$ac_pwd ;;
17914 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17915 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17916 ac_top_srcdir=$srcdir
17917 ac_abs_top_srcdir=$srcdir ;;
17918 *) # Relative name.
17919 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17920 ac_top_srcdir=$ac_top_build_prefix$srcdir
17921 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17922esac
81ecdfbb 17923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17924
c906108c 17925
fdc59709 17926 cd "$ac_dir"
c906108c
SS
17927
17928 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17929 if test -f "$ac_srcdir/configure.gnu"; then
17930 ac_sub_configure=$ac_srcdir/configure.gnu
17931 elif test -f "$ac_srcdir/configure"; then
17932 ac_sub_configure=$ac_srcdir/configure
17933 elif test -f "$ac_srcdir/configure.in"; then
17934 # This should be Cygnus configure.
17935 ac_sub_configure=$ac_aux_dir/configure
c906108c 17936 else
81ecdfbb
RW
17937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17938$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17939 ac_sub_configure=
17940 fi
17941
17942 # The recursion is here.
17943 if test -n "$ac_sub_configure"; then
c906108c 17944 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17945 case $cache_file in
17946 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17947 *) # Relative name.
17948 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17949 esac
c906108c 17950
81ecdfbb
RW
17951 { $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
17952$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17953 # The eval makes quoting arguments work.
fdc59709
PB
17954 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17955 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17956 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17957 fi
17958
fdc59709 17959 cd "$ac_popdir"
c906108c
SS
17960 done
17961fi
81ecdfbb
RW
17962if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17964$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17965fi
c906108c
SS
17966
17967
17968exit 0
This page took 2.337458 seconds and 4 git commands to generate.