gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
660ALLOCA
661PYTHON_CFLAGS
ec685c5e 662python_prog_path
81ecdfbb
RW
663LTLIBEXPAT
664LIBEXPAT
665HAVE_LIBEXPAT
666READLINE_CFLAGS
667READLINE_DEPS
668READLINE
669MIG
670WINDRES
671DLLTOOL
672AR
673YFLAGS
674YACC
675LN_S
676REPORT_BUGS_TEXI
677REPORT_BUGS_TO
678PKGVERSION
679TARGET_OBS
680subdirs
681GDB_DATADIR
682DEBUGDIR
683am__fastdepCC_FALSE
684am__fastdepCC_TRUE
685AMDEPBACKSLASH
686AMDEP_FALSE
687AMDEP_TRUE
688am__quote
689am__include
690am__untar
691am__tar
692AMTAR
693AWK
694mkdir_p
695MKDIR_P
696INSTALL_STRIP_PROGRAM
697STRIP
698install_sh
699MAKEINFO
700AUTOHEADER
701AUTOMAKE
702AUTOCONF
703ACLOCAL
704VERSION
705CYGPATH_W
706am__isrc
707INSTALL_DATA
708INSTALL_SCRIPT
709INSTALL_PROGRAM
710PACKAGE
711GNULIB_STDINT_H
712LIBGNU_LTLIBDEPS
713LIBGNU_LIBDEPS
f434ba03
PA
714gltests_WITNESS
715HAVE_WINT_T
81ecdfbb 716HAVE_WCHAR_H
f434ba03
PA
717NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
718NEXT_WCHAR_H
81ecdfbb 719REPLACE_WCWIDTH
f434ba03
PA
720REPLACE_WCSNRTOMBS
721REPLACE_WCSRTOMBS
722REPLACE_WCRTOMB
723REPLACE_MBSNRTOWCS
724REPLACE_MBSRTOWCS
725REPLACE_MBRLEN
726REPLACE_MBRTOWC
727REPLACE_MBSINIT
728REPLACE_WCTOB
729REPLACE_BTOWC
730REPLACE_MBSTATE_T
81ecdfbb 731HAVE_DECL_WCWIDTH
f434ba03
PA
732HAVE_DECL_WCTOB
733HAVE_WCSNRTOMBS
734HAVE_WCSRTOMBS
735HAVE_WCRTOMB
736HAVE_MBSNRTOWCS
737HAVE_MBSRTOWCS
738HAVE_MBRLEN
739HAVE_MBRTOWC
740HAVE_MBSINIT
741HAVE_BTOWC
81ecdfbb 742GNULIB_WCWIDTH
f434ba03
PA
743GNULIB_WCSNRTOMBS
744GNULIB_WCSRTOMBS
745GNULIB_WCRTOMB
746GNULIB_MBSNRTOWCS
747GNULIB_MBSRTOWCS
748GNULIB_MBRLEN
749GNULIB_MBRTOWC
750GNULIB_MBSINIT
751GNULIB_WCTOB
752GNULIB_BTOWC
753NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
754NEXT_STRING_H
755STDINT_H
756WINT_T_SUFFIX
757WCHAR_T_SUFFIX
81ecdfbb 758SIG_ATOMIC_T_SUFFIX
f434ba03 759SIZE_T_SUFFIX
81ecdfbb
RW
760PTRDIFF_T_SUFFIX
761HAVE_SIGNED_WINT_T
762HAVE_SIGNED_WCHAR_T
763HAVE_SIGNED_SIG_ATOMIC_T
764BITSIZEOF_WINT_T
765BITSIZEOF_WCHAR_T
81ecdfbb 766BITSIZEOF_SIG_ATOMIC_T
f434ba03 767BITSIZEOF_SIZE_T
81ecdfbb
RW
768BITSIZEOF_PTRDIFF_T
769HAVE_SYS_BITYPES_H
770HAVE_SYS_INTTYPES_H
771HAVE_STDINT_H
f434ba03 772NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 773NEXT_STDINT_H
81ecdfbb
RW
774HAVE_SYS_TYPES_H
775HAVE_INTTYPES_H
776HAVE_UNSIGNED_LONG_LONG_INT
777HAVE_LONG_LONG_INT
f434ba03
PA
778NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
779NEXT_STDDEF_H
780PRAGMA_SYSTEM_HEADER
781INCLUDE_NEXT_AS_FIRST_DIRECTIVE
782INCLUDE_NEXT
783STDDEF_H
784HAVE_WCHAR_T
785REPLACE_NULL
786APPLE_UNIVERSAL_BUILD
787UNDEFINE_STRTOK_R
788REPLACE_STRTOK_R
81ecdfbb 789REPLACE_STRSIGNAL
f434ba03
PA
790REPLACE_STRNLEN
791REPLACE_STRNDUP
792REPLACE_STRNCAT
81ecdfbb 793REPLACE_STRERROR
f434ba03
PA
794REPLACE_STRCASESTR
795REPLACE_STRSTR
796REPLACE_STRDUP
797REPLACE_STPNCPY
798REPLACE_MEMMEM
799REPLACE_MEMCHR
800HAVE_STRVERSCMP
81ecdfbb 801HAVE_DECL_STRSIGNAL
81ecdfbb
RW
802HAVE_DECL_STRTOK_R
803HAVE_STRCASESTR
804HAVE_STRSEP
805HAVE_STRPBRK
806HAVE_DECL_STRNLEN
807HAVE_DECL_STRNDUP
81ecdfbb
RW
808HAVE_DECL_STRDUP
809HAVE_STRCHRNUL
810HAVE_STPNCPY
811HAVE_STPCPY
f434ba03 812HAVE_RAWMEMCHR
81ecdfbb
RW
813HAVE_DECL_MEMRCHR
814HAVE_MEMPCPY
815HAVE_DECL_MEMMEM
f434ba03
PA
816HAVE_MEMCHR
817HAVE_MBSLEN
818GNULIB_STRVERSCMP
81ecdfbb
RW
819GNULIB_STRSIGNAL
820GNULIB_STRERROR
821GNULIB_MBSTOK_R
822GNULIB_MBSSEP
823GNULIB_MBSSPN
824GNULIB_MBSPBRK
825GNULIB_MBSCSPN
826GNULIB_MBSCASESTR
827GNULIB_MBSPCASECMP
828GNULIB_MBSNCASECMP
829GNULIB_MBSCASECMP
830GNULIB_MBSSTR
831GNULIB_MBSRCHR
832GNULIB_MBSCHR
833GNULIB_MBSNLEN
834GNULIB_MBSLEN
835GNULIB_STRTOK_R
836GNULIB_STRCASESTR
837GNULIB_STRSTR
838GNULIB_STRSEP
839GNULIB_STRPBRK
840GNULIB_STRNLEN
841GNULIB_STRNDUP
f434ba03 842GNULIB_STRNCAT
81ecdfbb
RW
843GNULIB_STRDUP
844GNULIB_STRCHRNUL
845GNULIB_STPNCPY
846GNULIB_STPCPY
f434ba03 847GNULIB_RAWMEMCHR
81ecdfbb
RW
848GNULIB_MEMRCHR
849GNULIB_MEMPCPY
850GNULIB_MEMMEM
f434ba03 851GNULIB_MEMCHR
81ecdfbb
RW
852GL_COND_LIBTOOL_FALSE
853GL_COND_LIBTOOL_TRUE
854CATOBJEXT
855GENCAT
856INSTOBJEXT
857DATADIRNAME
858CATALOGS
859POSUB
860GMSGFMT
861XGETTEXT
862INCINTL
863LIBINTL_DEP
864LIBINTL
865USE_NLS
866SET_MAKE
867GMAKE_FALSE
868GMAKE_TRUE
869MAKE
870CCDEPMODE
871DEPDIR
872am__leading_dot
873target_os
874target_vendor
875target_cpu
876target
f434ba03
PA
877RANLIB
878EGREP
879GREP
880CPP
81ecdfbb
RW
881host_os
882host_vendor
883host_cpu
884host
885build_os
886build_vendor
887build_cpu
888build
81ecdfbb
RW
889OBJEXT
890EXEEXT
891ac_ct_CC
892CPPFLAGS
893LDFLAGS
894CFLAGS
895CC
896MAINT
897MAINTAINER_MODE_FALSE
898MAINTAINER_MODE_TRUE
899target_alias
900host_alias
901build_alias
902LIBS
903ECHO_T
904ECHO_N
905ECHO_C
906DEFS
907mandir
908localedir
909libdir
910psdir
911pdfdir
912dvidir
913htmldir
914infodir
915docdir
916oldincludedir
917includedir
918localstatedir
919sharedstatedir
920sysconfdir
921datadir
922datarootdir
923libexecdir
924sbindir
925bindir
926program_transform_name
927prefix
928exec_prefix
929PACKAGE_URL
930PACKAGE_BUGREPORT
931PACKAGE_STRING
932PACKAGE_VERSION
933PACKAGE_TARNAME
934PACKAGE_NAME
935PATH_SEPARATOR
936SHELL'
a4ce5b0d 937ac_subst_files='host_makefile_frag'
81ecdfbb
RW
938ac_user_opts='
939enable_option_checking
940enable_maintainer_mode
da2f07f1
JK
941enable_plugins
942enable_largefile
81ecdfbb
RW
943enable_dependency_tracking
944with_separate_debug_dir
945with_gdb_datadir
946with_relocated_sources
947enable_targets
948enable_64_bit_bfd
949enable_gdbcli
950enable_gdbmi
951enable_tui
952enable_gdbtk
953with_libunwind
954with_curses
955enable_profiling
956with_pkgversion
957with_bugurl
b040ad30 958with_zlib
81ecdfbb
RW
959with_libiconv_prefix
960with_system_readline
961with_expat
962with_gnu_ld
963enable_rpath
964with_libexpat_prefix
965with_python
966with_included_regex
967with_sysroot
968with_system_gdbinit
969enable_werror
970enable_build_warnings
971enable_gdb_build_warnings
972with_tcl
973with_tk
974with_x
975enable_sim
976enable_multi_ice
81ecdfbb
RW
977'
978 ac_precious_vars='build_alias
979host_alias
980target_alias
981CC
982CFLAGS
983LDFLAGS
984LIBS
985CPPFLAGS
986CPP
987YACC
988YFLAGS
989XMKMF'
990ac_subdirs_all='doc testsuite
991gdbtk
992multi-ice
993gdbserver'
c906108c
SS
994
995# Initialize some variables set by options.
bec39cab
AC
996ac_init_help=
997ac_init_version=false
81ecdfbb
RW
998ac_unrecognized_opts=
999ac_unrecognized_sep=
c906108c
SS
1000# The variables have the same names as the options, with
1001# dashes changed to underlines.
bec39cab 1002cache_file=/dev/null
c906108c 1003exec_prefix=NONE
c906108c 1004no_create=
c906108c
SS
1005no_recursion=
1006prefix=NONE
1007program_prefix=NONE
1008program_suffix=NONE
1009program_transform_name=s,x,x,
1010silent=
1011site=
1012srcdir=
c906108c
SS
1013verbose=
1014x_includes=NONE
1015x_libraries=NONE
bec39cab
AC
1016
1017# Installation directory options.
1018# These are left unexpanded so users can "make install exec_prefix=/foo"
1019# and all the variables that are supposed to be based on exec_prefix
1020# by default will actually change.
1021# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1022# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1023bindir='${exec_prefix}/bin'
1024sbindir='${exec_prefix}/sbin'
1025libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1026datarootdir='${prefix}/share'
1027datadir='${datarootdir}'
c906108c
SS
1028sysconfdir='${prefix}/etc'
1029sharedstatedir='${prefix}/com'
1030localstatedir='${prefix}/var'
c906108c
SS
1031includedir='${prefix}/include'
1032oldincludedir='/usr/include'
81ecdfbb
RW
1033docdir='${datarootdir}/doc/${PACKAGE}'
1034infodir='${datarootdir}/info'
1035htmldir='${docdir}'
1036dvidir='${docdir}'
1037pdfdir='${docdir}'
1038psdir='${docdir}'
1039libdir='${exec_prefix}/lib'
1040localedir='${datarootdir}/locale'
1041mandir='${datarootdir}/man'
c906108c 1042
c906108c 1043ac_prev=
81ecdfbb 1044ac_dashdash=
c906108c
SS
1045for ac_option
1046do
c906108c
SS
1047 # If the previous option needs an argument, assign it.
1048 if test -n "$ac_prev"; then
81ecdfbb 1049 eval $ac_prev=\$ac_option
c906108c
SS
1050 ac_prev=
1051 continue
1052 fi
1053
81ecdfbb
RW
1054 case $ac_option in
1055 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1056 *) ac_optarg=yes ;;
1057 esac
c906108c
SS
1058
1059 # Accept the important Cygnus configure options, so we can diagnose typos.
1060
81ecdfbb
RW
1061 case $ac_dashdash$ac_option in
1062 --)
1063 ac_dashdash=yes ;;
c906108c
SS
1064
1065 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1066 ac_prev=bindir ;;
1067 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1068 bindir=$ac_optarg ;;
c906108c
SS
1069
1070 -build | --build | --buil | --bui | --bu)
bec39cab 1071 ac_prev=build_alias ;;
c906108c 1072 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1073 build_alias=$ac_optarg ;;
c906108c
SS
1074
1075 -cache-file | --cache-file | --cache-fil | --cache-fi \
1076 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1077 ac_prev=cache_file ;;
1078 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1079 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1080 cache_file=$ac_optarg ;;
1081
1082 --config-cache | -C)
1083 cache_file=config.cache ;;
c906108c 1084
81ecdfbb 1085 -datadir | --datadir | --datadi | --datad)
c906108c 1086 ac_prev=datadir ;;
81ecdfbb 1087 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1088 datadir=$ac_optarg ;;
c906108c 1089
81ecdfbb
RW
1090 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1091 | --dataroo | --dataro | --datar)
1092 ac_prev=datarootdir ;;
1093 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1094 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1095 datarootdir=$ac_optarg ;;
1096
c906108c 1097 -disable-* | --disable-*)
81ecdfbb 1098 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1099 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1100 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1101 as_fn_error "invalid feature name: $ac_useropt"
1102 ac_useropt_orig=$ac_useropt
1103 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1104 case $ac_user_opts in
1105 *"
1106"enable_$ac_useropt"
1107"*) ;;
1108 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1109 ac_unrecognized_sep=', ';;
1110 esac
1111 eval enable_$ac_useropt=no ;;
1112
1113 -docdir | --docdir | --docdi | --doc | --do)
1114 ac_prev=docdir ;;
1115 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1116 docdir=$ac_optarg ;;
1117
1118 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1119 ac_prev=dvidir ;;
1120 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1121 dvidir=$ac_optarg ;;
c906108c
SS
1122
1123 -enable-* | --enable-*)
81ecdfbb 1124 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1125 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1126 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1127 as_fn_error "invalid feature name: $ac_useropt"
1128 ac_useropt_orig=$ac_useropt
1129 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130 case $ac_user_opts in
1131 *"
1132"enable_$ac_useropt"
1133"*) ;;
1134 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1135 ac_unrecognized_sep=', ';;
b4e70030 1136 esac
81ecdfbb 1137 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1138
1139 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1140 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1141 | --exec | --exe | --ex)
1142 ac_prev=exec_prefix ;;
1143 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1144 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1145 | --exec=* | --exe=* | --ex=*)
bec39cab 1146 exec_prefix=$ac_optarg ;;
c906108c
SS
1147
1148 -gas | --gas | --ga | --g)
1149 # Obsolete; use --with-gas.
1150 with_gas=yes ;;
1151
bec39cab
AC
1152 -help | --help | --hel | --he | -h)
1153 ac_init_help=long ;;
1154 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1155 ac_init_help=recursive ;;
1156 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1157 ac_init_help=short ;;
c906108c
SS
1158
1159 -host | --host | --hos | --ho)
bec39cab 1160 ac_prev=host_alias ;;
c906108c 1161 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1162 host_alias=$ac_optarg ;;
c906108c 1163
81ecdfbb
RW
1164 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1165 ac_prev=htmldir ;;
1166 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1167 | --ht=*)
1168 htmldir=$ac_optarg ;;
1169
c906108c
SS
1170 -includedir | --includedir | --includedi | --included | --include \
1171 | --includ | --inclu | --incl | --inc)
1172 ac_prev=includedir ;;
1173 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1174 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1175 includedir=$ac_optarg ;;
c906108c
SS
1176
1177 -infodir | --infodir | --infodi | --infod | --info | --inf)
1178 ac_prev=infodir ;;
1179 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1180 infodir=$ac_optarg ;;
c906108c
SS
1181
1182 -libdir | --libdir | --libdi | --libd)
1183 ac_prev=libdir ;;
1184 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1185 libdir=$ac_optarg ;;
c906108c
SS
1186
1187 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1188 | --libexe | --libex | --libe)
1189 ac_prev=libexecdir ;;
1190 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1191 | --libexe=* | --libex=* | --libe=*)
bec39cab 1192 libexecdir=$ac_optarg ;;
c906108c 1193
81ecdfbb
RW
1194 -localedir | --localedir | --localedi | --localed | --locale)
1195 ac_prev=localedir ;;
1196 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1197 localedir=$ac_optarg ;;
1198
c906108c 1199 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1200 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1201 ac_prev=localstatedir ;;
1202 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1203 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1204 localstatedir=$ac_optarg ;;
c906108c
SS
1205
1206 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1207 ac_prev=mandir ;;
1208 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1209 mandir=$ac_optarg ;;
c906108c
SS
1210
1211 -nfp | --nfp | --nf)
1212 # Obsolete; use --without-fp.
1213 with_fp=no ;;
1214
1215 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1216 | --no-cr | --no-c | -n)
c906108c
SS
1217 no_create=yes ;;
1218
1219 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1220 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1221 no_recursion=yes ;;
1222
1223 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1224 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1225 | --oldin | --oldi | --old | --ol | --o)
1226 ac_prev=oldincludedir ;;
1227 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1228 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1229 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1230 oldincludedir=$ac_optarg ;;
c906108c
SS
1231
1232 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1233 ac_prev=prefix ;;
1234 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1235 prefix=$ac_optarg ;;
c906108c
SS
1236
1237 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1238 | --program-pre | --program-pr | --program-p)
1239 ac_prev=program_prefix ;;
1240 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1241 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1242 program_prefix=$ac_optarg ;;
c906108c
SS
1243
1244 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1245 | --program-suf | --program-su | --program-s)
1246 ac_prev=program_suffix ;;
1247 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1248 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1249 program_suffix=$ac_optarg ;;
c906108c
SS
1250
1251 -program-transform-name | --program-transform-name \
1252 | --program-transform-nam | --program-transform-na \
1253 | --program-transform-n | --program-transform- \
1254 | --program-transform | --program-transfor \
1255 | --program-transfo | --program-transf \
1256 | --program-trans | --program-tran \
1257 | --progr-tra | --program-tr | --program-t)
1258 ac_prev=program_transform_name ;;
1259 -program-transform-name=* | --program-transform-name=* \
1260 | --program-transform-nam=* | --program-transform-na=* \
1261 | --program-transform-n=* | --program-transform-=* \
1262 | --program-transform=* | --program-transfor=* \
1263 | --program-transfo=* | --program-transf=* \
1264 | --program-trans=* | --program-tran=* \
1265 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1266 program_transform_name=$ac_optarg ;;
c906108c 1267
81ecdfbb
RW
1268 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1269 ac_prev=pdfdir ;;
1270 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1271 pdfdir=$ac_optarg ;;
1272
1273 -psdir | --psdir | --psdi | --psd | --ps)
1274 ac_prev=psdir ;;
1275 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1276 psdir=$ac_optarg ;;
1277
c906108c
SS
1278 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1279 | -silent | --silent | --silen | --sile | --sil)
1280 silent=yes ;;
1281
1282 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1283 ac_prev=sbindir ;;
1284 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1285 | --sbi=* | --sb=*)
bec39cab 1286 sbindir=$ac_optarg ;;
c906108c
SS
1287
1288 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1289 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1290 | --sharedst | --shareds | --shared | --share | --shar \
1291 | --sha | --sh)
1292 ac_prev=sharedstatedir ;;
1293 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1294 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1295 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1296 | --sha=* | --sh=*)
bec39cab 1297 sharedstatedir=$ac_optarg ;;
c906108c
SS
1298
1299 -site | --site | --sit)
1300 ac_prev=site ;;
1301 -site=* | --site=* | --sit=*)
bec39cab 1302 site=$ac_optarg ;;
3ace7edb 1303
c906108c
SS
1304 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1305 ac_prev=srcdir ;;
1306 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1307 srcdir=$ac_optarg ;;
c906108c
SS
1308
1309 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1310 | --syscon | --sysco | --sysc | --sys | --sy)
1311 ac_prev=sysconfdir ;;
1312 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1313 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1314 sysconfdir=$ac_optarg ;;
c906108c
SS
1315
1316 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1317 ac_prev=target_alias ;;
c906108c 1318 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1319 target_alias=$ac_optarg ;;
c906108c
SS
1320
1321 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1322 verbose=yes ;;
1323
bec39cab
AC
1324 -version | --version | --versio | --versi | --vers | -V)
1325 ac_init_version=: ;;
c906108c
SS
1326
1327 -with-* | --with-*)
81ecdfbb 1328 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1329 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1330 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331 as_fn_error "invalid package name: $ac_useropt"
1332 ac_useropt_orig=$ac_useropt
1333 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334 case $ac_user_opts in
1335 *"
1336"with_$ac_useropt"
1337"*) ;;
1338 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1339 ac_unrecognized_sep=', ';;
b4e70030 1340 esac
81ecdfbb 1341 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1342
1343 -without-* | --without-*)
81ecdfbb 1344 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1345 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1346 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1347 as_fn_error "invalid package name: $ac_useropt"
1348 ac_useropt_orig=$ac_useropt
1349 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1350 case $ac_user_opts in
1351 *"
1352"with_$ac_useropt"
1353"*) ;;
1354 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1355 ac_unrecognized_sep=', ';;
1356 esac
1357 eval with_$ac_useropt=no ;;
c906108c
SS
1358
1359 --x)
1360 # Obsolete; use --with-x.
1361 with_x=yes ;;
1362
1363 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1364 | --x-incl | --x-inc | --x-in | --x-i)
1365 ac_prev=x_includes ;;
1366 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1367 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1368 x_includes=$ac_optarg ;;
c906108c
SS
1369
1370 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1371 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1372 ac_prev=x_libraries ;;
1373 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1374 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1375 x_libraries=$ac_optarg ;;
c906108c 1376
81ecdfbb
RW
1377 -*) as_fn_error "unrecognized option: \`$ac_option'
1378Try \`$0 --help' for more information."
c906108c
SS
1379 ;;
1380
bec39cab
AC
1381 *=*)
1382 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1383 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1384 case $ac_envvar in #(
1385 '' | [0-9]* | *[!_$as_cr_alnum]* )
1386 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1387 esac
1388 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1389 export $ac_envvar ;;
1390
c906108c 1391 *)
bec39cab 1392 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1393 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1394 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1395 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1396 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1397 ;;
1398
1399 esac
1400done
1401
1402if test -n "$ac_prev"; then
bec39cab 1403 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1404 as_fn_error "missing argument to $ac_option"
c906108c 1405fi
c906108c 1406
81ecdfbb
RW
1407if test -n "$ac_unrecognized_opts"; then
1408 case $enable_option_checking in
1409 no) ;;
1410 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1411 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1412 esac
81ecdfbb 1413fi
b4e70030 1414
81ecdfbb
RW
1415# Check all directory arguments for consistency.
1416for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1417 datadir sysconfdir sharedstatedir localstatedir includedir \
1418 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1419 libdir localedir mandir
b4e70030 1420do
81ecdfbb
RW
1421 eval ac_val=\$$ac_var
1422 # Remove trailing slashes.
1423 case $ac_val in
1424 */ )
1425 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1426 eval $ac_var=\$ac_val;;
1427 esac
1428 # Be sure to have absolute directory names.
b4e70030 1429 case $ac_val in
81ecdfbb
RW
1430 [\\/$]* | ?:[\\/]* ) continue;;
1431 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1432 esac
81ecdfbb 1433 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1434done
1435
bec39cab
AC
1436# There might be people who depend on the old broken behavior: `$host'
1437# used to hold the argument of --host etc.
1438# FIXME: To remove some day.
1439build=$build_alias
1440host=$host_alias
1441target=$target_alias
1442
1443# FIXME: To remove some day.
1444if test "x$host_alias" != x; then
1445 if test "x$build_alias" = x; then
1446 cross_compiling=maybe
81ecdfbb 1447 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1448 If a cross compiler is detected then cross compile mode will be used." >&2
1449 elif test "x$build_alias" != "x$host_alias"; then
1450 cross_compiling=yes
1451 fi
1452fi
c906108c 1453
bec39cab
AC
1454ac_tool_prefix=
1455test -n "$host_alias" && ac_tool_prefix=$host_alias-
1456
1457test "$silent" = yes && exec 6>/dev/null
c906108c 1458
c906108c 1459
81ecdfbb
RW
1460ac_pwd=`pwd` && test -n "$ac_pwd" &&
1461ac_ls_di=`ls -di .` &&
1462ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1463 as_fn_error "working directory cannot be determined"
1464test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1465 as_fn_error "pwd does not report name of working directory"
1466
1467
c906108c
SS
1468# Find the source files, if location was not specified.
1469if test -z "$srcdir"; then
1470 ac_srcdir_defaulted=yes
81ecdfbb
RW
1471 # Try the directory containing this script, then the parent directory.
1472 ac_confdir=`$as_dirname -- "$as_myself" ||
1473$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1474 X"$as_myself" : 'X\(//\)[^/]' \| \
1475 X"$as_myself" : 'X\(//\)$' \| \
1476 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1477$as_echo X"$as_myself" |
1478 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1479 s//\1/
1480 q
1481 }
1482 /^X\(\/\/\)[^/].*/{
1483 s//\1/
1484 q
1485 }
1486 /^X\(\/\/\)$/{
1487 s//\1/
1488 q
1489 }
1490 /^X\(\/\).*/{
1491 s//\1/
1492 q
1493 }
1494 s/.*/./; q'`
c906108c 1495 srcdir=$ac_confdir
81ecdfbb 1496 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1497 srcdir=..
1498 fi
1499else
1500 ac_srcdir_defaulted=no
1501fi
81ecdfbb
RW
1502if test ! -r "$srcdir/$ac_unique_file"; then
1503 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1504 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1505fi
1506ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1507ac_abs_confdir=`(
1508 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1509 pwd)`
1510# When building in place, set srcdir=.
1511if test "$ac_abs_confdir" = "$ac_pwd"; then
1512 srcdir=.
1513fi
1514# Remove unnecessary trailing slashes from srcdir.
1515# Double slashes in file names in object file debugging info
1516# mess up M-x gdb in Emacs.
1517case $srcdir in
1518*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1519esac
1520for ac_var in $ac_precious_vars; do
1521 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1522 eval ac_env_${ac_var}_value=\$${ac_var}
1523 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1524 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1525done
c906108c 1526
bec39cab
AC
1527#
1528# Report the --help message.
1529#
1530if test "$ac_init_help" = "long"; then
1531 # Omit some internal or obsolete options to make the list less imposing.
1532 # This message is too long to be a string in the A/UX 3.1 sh.
1533 cat <<_ACEOF
1534\`configure' configures this package to adapt to many kinds of systems.
1535
1536Usage: $0 [OPTION]... [VAR=VALUE]...
1537
1538To assign environment variables (e.g., CC, CFLAGS...), specify them as
1539VAR=VALUE. See below for descriptions of some of the useful variables.
1540
1541Defaults for the options are specified in brackets.
1542
1543Configuration:
1544 -h, --help display this help and exit
1545 --help=short display options specific to this package
1546 --help=recursive display the short help of all the included packages
1547 -V, --version display version information and exit
1548 -q, --quiet, --silent do not print \`checking...' messages
1549 --cache-file=FILE cache test results in FILE [disabled]
1550 -C, --config-cache alias for \`--cache-file=config.cache'
1551 -n, --no-create do not create output files
1552 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1553
bec39cab
AC
1554Installation directories:
1555 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1556 [$ac_default_prefix]
bec39cab 1557 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1558 [PREFIX]
bec39cab
AC
1559
1560By default, \`make install' will install all the files in
1561\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1562an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1563for instance \`--prefix=\$HOME'.
1564
1565For better control, use the options below.
1566
1567Fine tuning of the installation directories:
81ecdfbb
RW
1568 --bindir=DIR user executables [EPREFIX/bin]
1569 --sbindir=DIR system admin executables [EPREFIX/sbin]
1570 --libexecdir=DIR program executables [EPREFIX/libexec]
1571 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1572 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1573 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1574 --libdir=DIR object code libraries [EPREFIX/lib]
1575 --includedir=DIR C header files [PREFIX/include]
1576 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1577 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1578 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1579 --infodir=DIR info documentation [DATAROOTDIR/info]
1580 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1581 --mandir=DIR man documentation [DATAROOTDIR/man]
1582 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1583 --htmldir=DIR html documentation [DOCDIR]
1584 --dvidir=DIR dvi documentation [DOCDIR]
1585 --pdfdir=DIR pdf documentation [DOCDIR]
1586 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1587_ACEOF
1588
1589 cat <<\_ACEOF
1590
1591Program names:
1592 --program-prefix=PREFIX prepend PREFIX to installed program names
1593 --program-suffix=SUFFIX append SUFFIX to installed program names
1594 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1595
1596X features:
1597 --x-includes=DIR X include files are in DIR
1598 --x-libraries=DIR X library files are in DIR
1599
1600System types:
1601 --build=BUILD configure for building on BUILD [guessed]
1602 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1603 --target=TARGET configure for building compilers for TARGET [HOST]
1604_ACEOF
1605fi
1606
1607if test -n "$ac_init_help"; then
1608
1609 cat <<\_ACEOF
1610
1611Optional Features:
81ecdfbb 1612 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1613 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1614 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1615 --enable-maintainer-mode enable make rules and dependencies not useful
1616 (and sometimes confusing) to the casual installer
da2f07f1
JK
1617 --enable-plugins Enable support for plugins (defaults no)
1618 --disable-largefile omit support for large files
e28b3332
DJ
1619 --disable-dependency-tracking speeds up one-time build
1620 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1621 --enable-targets=TARGETS
1622 alternative target configurations
c0993dbe 1623 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1624 --disable-gdbcli disable command-line interface (CLI)
1625 --disable-gdbmi disable machine-interface (MI)
1626 --enable-tui enable full-screen terminal user interface (TUI)
1627 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1628 --enable-profiling enable profiling of GDB
3841debe 1629 --disable-rpath do not hardcode runtime library paths
a1220294 1630 --enable-werror treat compile warnings as errors
32c1c914 1631 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1632 --enable-gdb-build-warnings
32c1c914 1633 enable GDB specific build-time compiler warnings if
a1220294 1634 gcc is used
32c1c914 1635 --enable-sim link gdb with simulator
bec39cab
AC
1636 --enable-multi-ice build the multi-ice-gdb-server
1637
1638Optional Packages:
1639 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1640 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1641 --with-separate-debug-dir=PATH
32c1c914 1642 look for global separate debug info in this path
62e4f60c 1643 [LIBDIR/debug]
b14b1491
TT
1644 --with-gdb-datadir=PATH look for global separate data files in this path
1645 [DATADIR/gdb]
29b0e8a2 1646 --with-relocated-sources=PATH
32c1c914
TT
1647 automatically relocate this path for source files
1648 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1649 --with-curses use the curses library instead of the termcap
1650 library
c16158bc
JM
1651 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1652 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1653 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1654 --with-libiconv-prefix=DIR
1655 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1656 --with-system-readline use installed readline library
5c39566f 1657 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1658 --with-gnu-ld assume the C compiler uses GNU ld default=no
1659 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1660 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1661 --with-python[=PYTHON] include python support
1662 (auto/yes/no/<python-program>)
a1220294
TT
1663 --without-included-regex
1664 don't use included regex; this is the default on
1665 systems with version 2 of the GNU C library (use
1666 with caution on other system)
81ecdfbb 1667 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1668 --with-system-gdbinit=PATH
32c1c914 1669 automatically load a system-wide gdbinit file
5062cc19
KS
1670 --with-tcl directory containing tcl configuration (tclConfig.sh)
1671 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1672 --with-x use the X Window System
bec39cab
AC
1673
1674Some influential environment variables:
1675 CC C compiler command
1676 CFLAGS C compiler flags
1677 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1678 nonstandard directory <lib dir>
81ecdfbb
RW
1679 LIBS libraries to pass to the linker, e.g. -l<library>
1680 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1681 you have headers in a nonstandard directory <include dir>
bec39cab 1682 CPP C preprocessor
81ecdfbb
RW
1683 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1684 the first program found out of: `bison -y', `byacc', `yacc'.
1685 YFLAGS The list of arguments that will be passed by default to $YACC.
1686 This script will default YFLAGS to the empty string to avoid a
1687 default value of `-d' given by some make applications.
1688 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1689
1690Use these variables to override the choices made by `configure' or to help
1691it to find libraries and programs with nonstandard names/locations.
1692
81ecdfbb 1693Report bugs to the package provider.
bec39cab 1694_ACEOF
81ecdfbb 1695ac_status=$?
bec39cab
AC
1696fi
1697
1698if test "$ac_init_help" = "recursive"; then
1699 # If there are subdirs, report their specific --help.
bec39cab 1700 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1701 test -d "$ac_dir" ||
1702 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1703 continue
bec39cab
AC
1704 ac_builddir=.
1705
81ecdfbb
RW
1706case "$ac_dir" in
1707.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1708*)
1709 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1710 # A ".." for each directory in $ac_dir_suffix.
1711 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1712 case $ac_top_builddir_sub in
1713 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1714 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1715 esac ;;
1716esac
1717ac_abs_top_builddir=$ac_pwd
1718ac_abs_builddir=$ac_pwd$ac_dir_suffix
1719# for backward compatibility:
1720ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1721
1722case $srcdir in
81ecdfbb 1723 .) # We are building in place.
bec39cab 1724 ac_srcdir=.
81ecdfbb
RW
1725 ac_top_srcdir=$ac_top_builddir_sub
1726 ac_abs_top_srcdir=$ac_pwd ;;
1727 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1728 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1729 ac_top_srcdir=$srcdir
1730 ac_abs_top_srcdir=$srcdir ;;
1731 *) # Relative name.
1732 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1733 ac_top_srcdir=$ac_top_build_prefix$srcdir
1734 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1735esac
81ecdfbb 1736ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1737
81ecdfbb
RW
1738 cd "$ac_dir" || { ac_status=$?; continue; }
1739 # Check for guested configure.
1740 if test -f "$ac_srcdir/configure.gnu"; then
1741 echo &&
1742 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1743 elif test -f "$ac_srcdir/configure"; then
1744 echo &&
1745 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1746 else
81ecdfbb
RW
1747 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1748 fi || ac_status=$?
1749 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1750 done
1751fi
1752
81ecdfbb 1753test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1754if $ac_init_version; then
1755 cat <<\_ACEOF
81ecdfbb
RW
1756configure
1757generated by GNU Autoconf 2.64
bec39cab 1758
81ecdfbb 1759Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1760This configure script is free software; the Free Software Foundation
1761gives unlimited permission to copy, distribute and modify it.
1762_ACEOF
81ecdfbb 1763 exit
bec39cab 1764fi
bec39cab 1765
81ecdfbb
RW
1766## ------------------------ ##
1767## Autoconf initialization. ##
1768## ------------------------ ##
bec39cab 1769
81ecdfbb
RW
1770# ac_fn_c_try_compile LINENO
1771# --------------------------
1772# Try to compile conftest.$ac_ext, and return whether this succeeded.
1773ac_fn_c_try_compile ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776 rm -f conftest.$ac_objext
1777 if { { ac_try="$ac_compile"
1778case "(($ac_try" in
1779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780 *) ac_try_echo=$ac_try;;
1781esac
1782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783$as_echo "$ac_try_echo"; } >&5
1784 (eval "$ac_compile") 2>conftest.err
1785 ac_status=$?
1786 if test -s conftest.err; then
1787 grep -v '^ *+' conftest.err >conftest.er1
1788 cat conftest.er1 >&5
1789 mv -f conftest.er1 conftest.err
1790 fi
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; } && {
1793 test -z "$ac_c_werror_flag" ||
1794 test ! -s conftest.err
1795 } && test -s conftest.$ac_objext; then :
1796 ac_retval=0
1797else
1798 $as_echo "$as_me: failed program was:" >&5
1799sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1800
81ecdfbb
RW
1801 ac_retval=1
1802fi
1803 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1804 return $ac_retval
1805
1806} # ac_fn_c_try_compile
1807
1808# ac_fn_c_try_cpp LINENO
1809# ----------------------
1810# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1811ac_fn_c_try_cpp ()
bec39cab 1812{
81ecdfbb
RW
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814 if { { ac_try="$ac_cpp conftest.$ac_ext"
1815case "(($ac_try" in
1816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1817 *) ac_try_echo=$ac_try;;
1818esac
1819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1820$as_echo "$ac_try_echo"; } >&5
1821 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1822 ac_status=$?
1823 if test -s conftest.err; then
1824 grep -v '^ *+' conftest.err >conftest.er1
1825 cat conftest.er1 >&5
1826 mv -f conftest.er1 conftest.err
1827 fi
1828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829 test $ac_status = 0; } >/dev/null && {
1830 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1831 test ! -s conftest.err
1832 }; then :
1833 ac_retval=0
1834else
1835 $as_echo "$as_me: failed program was:" >&5
1836sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1837
81ecdfbb
RW
1838 ac_retval=1
1839fi
1840 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1841 return $ac_retval
bec39cab 1842
81ecdfbb 1843} # ac_fn_c_try_cpp
bec39cab 1844
81ecdfbb
RW
1845# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1846# -------------------------------------------------------
1847# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1848# the include files in INCLUDES and setting the cache variable VAR
1849# accordingly.
1850ac_fn_c_check_header_mongrel ()
1851{
1852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
1856if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1857 $as_echo_n "(cached) " >&6
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
1862else
1863 # Is the header compilable?
1864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1865$as_echo_n "checking $2 usability... " >&6; }
1866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867/* end confdefs.h. */
1868$4
1869#include <$2>
1870_ACEOF
1871if ac_fn_c_try_compile "$LINENO"; then :
1872 ac_header_compiler=yes
1873else
1874 ac_header_compiler=no
1875fi
1876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1878$as_echo "$ac_header_compiler" >&6; }
bec39cab 1879
81ecdfbb
RW
1880# Is the header present?
1881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1882$as_echo_n "checking $2 presence... " >&6; }
1883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885#include <$2>
1886_ACEOF
1887if ac_fn_c_try_cpp "$LINENO"; then :
1888 ac_header_preproc=yes
1889else
1890 ac_header_preproc=no
1891fi
1892rm -f conftest.err conftest.$ac_ext
1893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1894$as_echo "$ac_header_preproc" >&6; }
bec39cab 1895
81ecdfbb
RW
1896# So? What about this header?
1897case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1898 yes:no: )
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1900$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1902$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1903 ;;
1904 no:yes:* )
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1906$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1908$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1910$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1912$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1915 ;;
1916esac
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918$as_echo_n "checking for $2... " >&6; }
1919if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1920 $as_echo_n "(cached) " >&6
1921else
1922 eval "$3=\$ac_header_compiler"
1923fi
1924eval ac_res=\$$3
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1926$as_echo "$ac_res" >&6; }
1927fi
1928 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1929
81ecdfbb 1930} # ac_fn_c_check_header_mongrel
bec39cab 1931
81ecdfbb
RW
1932# ac_fn_c_try_run LINENO
1933# ----------------------
1934# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1935# that executables *can* be run.
1936ac_fn_c_try_run ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 if { { ac_try="$ac_link"
1940case "(($ac_try" in
1941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942 *) ac_try_echo=$ac_try;;
1943esac
1944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945$as_echo "$ac_try_echo"; } >&5
1946 (eval "$ac_link") 2>&5
1947 ac_status=$?
1948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1949 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1950 { { case "(($ac_try" in
1951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952 *) ac_try_echo=$ac_try;;
1953esac
1954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955$as_echo "$ac_try_echo"; } >&5
1956 (eval "$ac_try") 2>&5
1957 ac_status=$?
1958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1959 test $ac_status = 0; }; }; then :
1960 ac_retval=0
1961else
1962 $as_echo "$as_me: program exited with status $ac_status" >&5
1963 $as_echo "$as_me: failed program was:" >&5
1964sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1965
81ecdfbb
RW
1966 ac_retval=$ac_status
1967fi
1968 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1969 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1970 return $ac_retval
bec39cab 1971
81ecdfbb 1972} # ac_fn_c_try_run
bec39cab 1973
81ecdfbb
RW
1974# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1975# -------------------------------------------------------
1976# Tests whether HEADER exists and can be compiled using the include files in
1977# INCLUDES, setting the cache variable VAR accordingly.
1978ac_fn_c_check_header_compile ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1982$as_echo_n "checking for $2... " >&6; }
1983if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1984 $as_echo_n "(cached) " >&6
1985else
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989#include <$2>
bec39cab 1990_ACEOF
81ecdfbb
RW
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 eval "$3=yes"
1993else
1994 eval "$3=no"
1995fi
1996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997fi
1998eval ac_res=\$$3
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000$as_echo "$ac_res" >&6; }
2001 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2002
81ecdfbb 2003} # ac_fn_c_check_header_compile
bec39cab 2004
81ecdfbb
RW
2005# ac_fn_c_try_link LINENO
2006# -----------------------
2007# Try to link conftest.$ac_ext, and return whether this succeeded.
2008ac_fn_c_try_link ()
b4e70030 2009{
81ecdfbb
RW
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 rm -f conftest.$ac_objext conftest$ac_exeext
2012 if { { ac_try="$ac_link"
2013case "(($ac_try" in
2014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2015 *) ac_try_echo=$ac_try;;
2016esac
2017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2018$as_echo "$ac_try_echo"; } >&5
2019 (eval "$ac_link") 2>conftest.err
2020 ac_status=$?
2021 if test -s conftest.err; then
2022 grep -v '^ *+' conftest.err >conftest.er1
2023 cat conftest.er1 >&5
2024 mv -f conftest.er1 conftest.err
2025 fi
2026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2027 test $ac_status = 0; } && {
2028 test -z "$ac_c_werror_flag" ||
2029 test ! -s conftest.err
2030 } && test -s conftest$ac_exeext && {
2031 test "$cross_compiling" = yes ||
2032 $as_test_x conftest$ac_exeext
2033 }; then :
2034 ac_retval=0
2035else
2036 $as_echo "$as_me: failed program was:" >&5
2037sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2038
81ecdfbb
RW
2039 ac_retval=1
2040fi
2041 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2042 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2043 # interfere with the next link command; also delete a directory that is
2044 # left behind by Apple's compiler. We do this before executing the actions.
2045 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2046 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2047 return $ac_retval
bec39cab 2048
81ecdfbb 2049} # ac_fn_c_try_link
bec39cab 2050
81ecdfbb
RW
2051# ac_fn_c_check_func LINENO FUNC VAR
2052# ----------------------------------
2053# Tests whether FUNC exists, setting the cache variable VAR accordingly
2054ac_fn_c_check_func ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2058$as_echo_n "checking for $2... " >&6; }
2059if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2060 $as_echo_n "(cached) " >&6
2061else
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2065 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2066#define $2 innocuous_$2
bec39cab 2067
81ecdfbb
RW
2068/* System header to define __stub macros and hopefully few prototypes,
2069 which can conflict with char $2 (); below.
2070 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2071 <limits.h> exists even on freestanding compilers. */
bec39cab 2072
81ecdfbb
RW
2073#ifdef __STDC__
2074# include <limits.h>
2075#else
2076# include <assert.h>
2077#endif
bec39cab 2078
81ecdfbb 2079#undef $2
bec39cab 2080
81ecdfbb
RW
2081/* Override any GCC internal prototype to avoid an error.
2082 Use char because int might match the return type of a GCC
2083 builtin and then its argument prototype would still apply. */
2084#ifdef __cplusplus
2085extern "C"
2086#endif
2087char $2 ();
2088/* The GNU C library defines this for functions which it implements
2089 to always fail with ENOSYS. Some functions are actually named
2090 something starting with __ and the normal name is an alias. */
2091#if defined __stub_$2 || defined __stub___$2
2092choke me
2093#endif
bec39cab 2094
81ecdfbb
RW
2095int
2096main ()
2097{
2098return $2 ();
2099 ;
2100 return 0;
2101}
bec39cab 2102_ACEOF
81ecdfbb
RW
2103if ac_fn_c_try_link "$LINENO"; then :
2104 eval "$3=yes"
2105else
2106 eval "$3=no"
2107fi
2108rm -f core conftest.err conftest.$ac_objext \
2109 conftest$ac_exeext conftest.$ac_ext
2110fi
2111eval ac_res=\$$3
2112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2113$as_echo "$ac_res" >&6; }
2114 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2115
81ecdfbb 2116} # ac_fn_c_check_func
bec39cab 2117
81ecdfbb
RW
2118# ac_fn_c_check_decl LINENO SYMBOL VAR
2119# ------------------------------------
2120# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2121ac_fn_c_check_decl ()
2122{
2123 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2125$as_echo_n "checking whether $2 is declared... " >&6; }
2126if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2127 $as_echo_n "(cached) " >&6
2128else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
2133main ()
2134{
2135#ifndef $2
2136 (void) $2;
2137#endif
bec39cab 2138
81ecdfbb
RW
2139 ;
2140 return 0;
2141}
bec39cab 2142_ACEOF
81ecdfbb
RW
2143if ac_fn_c_try_compile "$LINENO"; then :
2144 eval "$3=yes"
2145else
2146 eval "$3=no"
2147fi
2148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149fi
2150eval ac_res=\$$3
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2152$as_echo "$ac_res" >&6; }
2153 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2154
81ecdfbb 2155} # ac_fn_c_check_decl
bec39cab 2156
81ecdfbb
RW
2157# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2158# --------------------------------------------
2159# Tries to find the compile-time value of EXPR in a program that includes
2160# INCLUDES, setting VAR accordingly. Returns whether the value could be
2161# computed
2162ac_fn_c_compute_int ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 if test "$cross_compiling" = yes; then
2166 # Depending upon the size, compute the lo and hi bounds.
2167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) >= 0)];
2174test_array [0] = 0
bec39cab 2175
81ecdfbb
RW
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_lo=0 ac_mid=0
2182 while :; do
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2190test_array [0] = 0
bec39cab 2191
81ecdfbb
RW
2192 ;
2193 return 0;
2194}
2195_ACEOF
2196if ac_fn_c_try_compile "$LINENO"; then :
2197 ac_hi=$ac_mid; break
2198else
2199 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2200 if test $ac_lo -le $ac_mid; then
2201 ac_lo= ac_hi=
2202 break
2203 fi
2204 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2205fi
81ecdfbb
RW
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207 done
c906108c 2208else
81ecdfbb
RW
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$4
2212int
2213main ()
2214{
2215static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2224 while :; do
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226/* end confdefs.h. */
2227$4
2228int
2229main ()
2230{
2231static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2232test_array [0] = 0
bec39cab 2233
81ecdfbb
RW
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_compile "$LINENO"; then :
2239 ac_lo=$ac_mid; break
2240else
2241 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2242 if test $ac_mid -le $ac_hi; then
2243 ac_lo= ac_hi=
2244 break
2245 fi
2246 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2247fi
2248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2249 done
2250else
2251 ac_lo= ac_hi=
2252fi
2253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254fi
2255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256# Binary search between lo and hi bounds.
2257while test "x$ac_lo" != "x$ac_hi"; do
2258 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$4
2262int
2263main ()
2264{
2265static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2266test_array [0] = 0
bec39cab 2267
81ecdfbb
RW
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 ac_hi=$ac_mid
2274else
2275 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278done
2279case $ac_lo in #((
2280?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2281'') ac_retval=1 ;;
2282esac
2283 else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$4
2287static long int longval () { return $2; }
2288static unsigned long int ulongval () { return $2; }
2289#include <stdio.h>
2290#include <stdlib.h>
2291int
2292main ()
2293{
bec39cab 2294
81ecdfbb
RW
2295 FILE *f = fopen ("conftest.val", "w");
2296 if (! f)
2297 return 1;
2298 if (($2) < 0)
2299 {
2300 long int i = longval ();
2301 if (i != ($2))
2302 return 1;
2303 fprintf (f, "%ld", i);
2304 }
2305 else
2306 {
2307 unsigned long int i = ulongval ();
2308 if (i != ($2))
2309 return 1;
2310 fprintf (f, "%lu", i);
2311 }
2312 /* Do not output a trailing newline, as this causes \r\n confusion
2313 on some platforms. */
2314 return ferror (f) || fclose (f) != 0;
bec39cab 2315
81ecdfbb
RW
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_run "$LINENO"; then :
2321 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2322else
2323 ac_retval=1
2324fi
2325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2326 conftest.$ac_objext conftest.beam conftest.$ac_ext
2327rm -f conftest.val
bec39cab 2328
81ecdfbb
RW
2329 fi
2330 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2331 return $ac_retval
bec39cab 2332
81ecdfbb 2333} # ac_fn_c_compute_int
bec39cab 2334
81ecdfbb
RW
2335# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2336# ----------------------------------------------------
2337# Tries to find if the field MEMBER exists in type AGGR, after including
2338# INCLUDES, setting cache variable VAR accordingly.
2339ac_fn_c_check_member ()
2340{
2341 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2343$as_echo_n "checking for $2.$3... " >&6; }
2344if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$5
2350int
2351main ()
2352{
2353static $2 ac_aggr;
2354if (ac_aggr.$3)
2355return 0;
2356 ;
2357 return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_compile "$LINENO"; then :
2361 eval "$4=yes"
2362else
2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h. */
2365$5
2366int
2367main ()
2368{
2369static $2 ac_aggr;
2370if (sizeof ac_aggr.$3)
2371return 0;
2372 ;
2373 return 0;
2374}
2375_ACEOF
2376if ac_fn_c_try_compile "$LINENO"; then :
2377 eval "$4=yes"
2378else
2379 eval "$4=no"
2380fi
2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$4
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2389
81ecdfbb 2390} # ac_fn_c_check_member
bec39cab 2391
81ecdfbb
RW
2392# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2393# -------------------------------------------
2394# Tests whether TYPE exists after having included INCLUDES, setting cache
2395# variable VAR accordingly.
2396ac_fn_c_check_type ()
2397{
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2400$as_echo_n "checking for $2... " >&6; }
2401if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2402 $as_echo_n "(cached) " >&6
2403else
2404 eval "$3=no"
2405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h. */
2407$4
2408int
2409main ()
2410{
2411if (sizeof ($2))
2412 return 0;
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419/* end confdefs.h. */
2420$4
2421int
2422main ()
2423{
2424if (sizeof (($2)))
2425 return 0;
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2431
81ecdfbb
RW
2432else
2433 eval "$3=yes"
2434fi
2435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438fi
2439eval ac_res=\$$3
2440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2441$as_echo "$ac_res" >&6; }
2442 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2443
81ecdfbb
RW
2444} # ac_fn_c_check_type
2445cat >config.log <<_ACEOF
2446This file contains any messages produced by compilers while
2447running configure, to aid debugging if configure makes a mistake.
d5af19ba 2448
81ecdfbb
RW
2449It was created by $as_me, which was
2450generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2451
81ecdfbb 2452 $ $0 $@
413ccac7 2453
81ecdfbb
RW
2454_ACEOF
2455exec 5>>config.log
2456{
2457cat <<_ASUNAME
2458## --------- ##
2459## Platform. ##
2460## --------- ##
413ccac7 2461
81ecdfbb
RW
2462hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2463uname -m = `(uname -m) 2>/dev/null || echo unknown`
2464uname -r = `(uname -r) 2>/dev/null || echo unknown`
2465uname -s = `(uname -s) 2>/dev/null || echo unknown`
2466uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2467
81ecdfbb
RW
2468/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2469/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2470
81ecdfbb
RW
2471/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2472/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2473/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2474/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2475/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2476/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2477/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2478
81ecdfbb 2479_ASUNAME
bec39cab 2480
bec39cab
AC
2481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2482for as_dir in $PATH
2483do
2484 IFS=$as_save_IFS
2485 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2486 $as_echo "PATH: $as_dir"
2487 done
2488IFS=$as_save_IFS
bec39cab 2489
81ecdfbb 2490} >&5
bec39cab 2491
81ecdfbb 2492cat >&5 <<_ACEOF
bec39cab 2493
bec39cab 2494
81ecdfbb
RW
2495## ----------- ##
2496## Core tests. ##
2497## ----------- ##
2498
2499_ACEOF
2500
2501
2502# Keep a trace of the command line.
2503# Strip out --no-create and --no-recursion so they do not pile up.
2504# Strip out --silent because we don't want to record it for future runs.
2505# Also quote any args containing shell meta-characters.
2506# Make two passes to allow for proper duplicate-argument suppression.
2507ac_configure_args=
2508ac_configure_args0=
2509ac_configure_args1=
2510ac_must_keep_next=false
2511for ac_pass in 1 2
2512do
2513 for ac_arg
2514 do
2515 case $ac_arg in
2516 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2518 | -silent | --silent | --silen | --sile | --sil)
2519 continue ;;
2520 *\'*)
2521 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2522 esac
2523 case $ac_pass in
2524 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2525 2)
2526 as_fn_append ac_configure_args1 " '$ac_arg'"
2527 if test $ac_must_keep_next = true; then
2528 ac_must_keep_next=false # Got value, back to normal.
2529 else
2530 case $ac_arg in
2531 *=* | --config-cache | -C | -disable-* | --disable-* \
2532 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2533 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2534 | -with-* | --with-* | -without-* | --without-* | --x)
2535 case "$ac_configure_args0 " in
2536 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2537 esac
2538 ;;
2539 -* ) ac_must_keep_next=true ;;
2540 esac
2541 fi
2542 as_fn_append ac_configure_args " '$ac_arg'"
2543 ;;
2544 esac
2545 done
2546done
2547{ ac_configure_args0=; unset ac_configure_args0;}
2548{ ac_configure_args1=; unset ac_configure_args1;}
2549
2550# When interrupted or exit'd, cleanup temporary files, and complete
2551# config.log. We remove comments because anyway the quotes in there
2552# would cause problems or look ugly.
2553# WARNING: Use '\'' to represent an apostrophe within the trap.
2554# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2555trap 'exit_status=$?
2556 # Save into config.log some information that might help in debugging.
2557 {
2558 echo
2559
2560 cat <<\_ASBOX
2561## ---------------- ##
2562## Cache variables. ##
2563## ---------------- ##
2564_ASBOX
2565 echo
2566 # The following way of writing the cache mishandles newlines in values,
2567(
2568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in #(
2571 *${as_nl}*)
2572 case $ac_var in #(
2573 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2574$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2575 esac
2576 case $ac_var in #(
2577 _ | IFS | as_nl) ;; #(
2578 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2579 *) { eval $ac_var=; unset $ac_var;} ;;
2580 esac ;;
2581 esac
2582 done
2583 (set) 2>&1 |
2584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2585 *${as_nl}ac_space=\ *)
2586 sed -n \
2587 "s/'\''/'\''\\\\'\'''\''/g;
2588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2589 ;; #(
2590 *)
2591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2592 ;;
2593 esac |
2594 sort
2595)
2596 echo
2597
2598 cat <<\_ASBOX
2599## ----------------- ##
2600## Output variables. ##
2601## ----------------- ##
2602_ASBOX
2603 echo
2604 for ac_var in $ac_subst_vars
2605 do
2606 eval ac_val=\$$ac_var
2607 case $ac_val in
2608 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2609 esac
2610 $as_echo "$ac_var='\''$ac_val'\''"
2611 done | sort
2612 echo
2613
2614 if test -n "$ac_subst_files"; then
2615 cat <<\_ASBOX
2616## ------------------- ##
2617## File substitutions. ##
2618## ------------------- ##
2619_ASBOX
2620 echo
2621 for ac_var in $ac_subst_files
2622 do
2623 eval ac_val=\$$ac_var
2624 case $ac_val in
2625 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2626 esac
2627 $as_echo "$ac_var='\''$ac_val'\''"
2628 done | sort
2629 echo
2630 fi
2631
2632 if test -s confdefs.h; then
2633 cat <<\_ASBOX
2634## ----------- ##
2635## confdefs.h. ##
2636## ----------- ##
2637_ASBOX
2638 echo
2639 cat confdefs.h
2640 echo
2641 fi
2642 test "$ac_signal" != 0 &&
2643 $as_echo "$as_me: caught signal $ac_signal"
2644 $as_echo "$as_me: exit $exit_status"
2645 } >&5
2646 rm -f core *.core core.conftest.* &&
2647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2648 exit $exit_status
2649' 0
2650for ac_signal in 1 2 13 15; do
2651 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2652done
2653ac_signal=0
2654
2655# confdefs.h avoids OS command line length limits that DEFS can exceed.
2656rm -f -r conftest* confdefs.h
2657
2658$as_echo "/* confdefs.h */" > confdefs.h
2659
2660# Predefined preprocessor variables.
2661
2662cat >>confdefs.h <<_ACEOF
2663#define PACKAGE_NAME "$PACKAGE_NAME"
2664_ACEOF
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2668_ACEOF
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_VERSION "$PACKAGE_VERSION"
2672_ACEOF
2673
2674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_STRING "$PACKAGE_STRING"
2676_ACEOF
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2680_ACEOF
2681
2682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_URL "$PACKAGE_URL"
2684_ACEOF
2685
2686
2687# Let the site file select an alternate cache file if it wants to.
2688# Prefer an explicitly selected file to automatically selected ones.
2689ac_site_file1=NONE
2690ac_site_file2=NONE
2691if test -n "$CONFIG_SITE"; then
2692 ac_site_file1=$CONFIG_SITE
2693elif test "x$prefix" != xNONE; then
2694 ac_site_file1=$prefix/share/config.site
2695 ac_site_file2=$prefix/etc/config.site
2696else
2697 ac_site_file1=$ac_default_prefix/share/config.site
2698 ac_site_file2=$ac_default_prefix/etc/config.site
2699fi
2700for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2701do
2702 test "x$ac_site_file" = xNONE && continue
2703 if test -r "$ac_site_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2705$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2706 sed 's/^/| /' "$ac_site_file" >&5
2707 . "$ac_site_file"
2708 fi
2709done
2710
2711if test -r "$cache_file"; then
2712 # Some versions of bash will fail to source /dev/null (special
2713 # files actually), so we avoid doing that.
2714 if test -f "$cache_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2716$as_echo "$as_me: loading cache $cache_file" >&6;}
2717 case $cache_file in
2718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2719 *) . "./$cache_file";;
2720 esac
2721 fi
2722else
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2724$as_echo "$as_me: creating cache $cache_file" >&6;}
2725 >$cache_file
bec39cab
AC
2726fi
2727
f434ba03
PA
2728gl_header_list="$gl_header_list sys/mman.h"
2729gl_func_list="$gl_func_list mprotect"
2730gl_func_list="$gl_func_list memchr"
2731gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2732gl_header_list="$gl_header_list stdint.h"
2733gl_header_list="$gl_header_list wchar.h"
2734gl_header_list="$gl_header_list string.h"
2735# Check that the precious variables saved in the cache have kept the same
2736# value.
2737ac_cache_corrupted=false
2738for ac_var in $ac_precious_vars; do
2739 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2740 eval ac_new_set=\$ac_env_${ac_var}_set
2741 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2742 eval ac_new_val=\$ac_env_${ac_var}_value
2743 case $ac_old_set,$ac_new_set in
2744 set,)
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2747 ac_cache_corrupted=: ;;
2748 ,set)
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2750$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2751 ac_cache_corrupted=: ;;
2752 ,);;
2753 *)
2754 if test "x$ac_old_val" != "x$ac_new_val"; then
2755 # differences in whitespace do not lead to failure.
2756 ac_old_val_w=`echo x $ac_old_val`
2757 ac_new_val_w=`echo x $ac_new_val`
2758 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2760$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2761 ac_cache_corrupted=:
2762 else
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2764$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2765 eval $ac_var=\$ac_old_val
2766 fi
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2768$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2770$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2771 fi;;
2772 esac
2773 # Pass precious variables to config.status.
2774 if test "$ac_new_set" = set; then
2775 case $ac_new_val in
2776 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2777 *) ac_arg=$ac_var=$ac_new_val ;;
2778 esac
2779 case " $ac_configure_args " in
2780 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2781 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2782 esac
2783 fi
2784done
2785if $ac_cache_corrupted; then
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2789$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2790 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2791fi
2792## -------------------- ##
2793## Main body of script. ##
2794## -------------------- ##
2795
2796ac_ext=c
2797ac_cpp='$CPP $CPPFLAGS'
2798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2800ac_compiler_gnu=$ac_cv_c_compiler_gnu
2801
2802
2803
2804
2805
2806ac_config_headers="$ac_config_headers config.h:config.in"
2807
2808
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2810$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2811 # Check whether --enable-maintainer-mode was given.
2812if test "${enable_maintainer_mode+set}" = set; then :
2813 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2814else
2815 USE_MAINTAINER_MODE=no
2816fi
2817
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2819$as_echo "$USE_MAINTAINER_MODE" >&6; }
2820 if test $USE_MAINTAINER_MODE = yes; then
2821 MAINTAINER_MODE_TRUE=
2822 MAINTAINER_MODE_FALSE='#'
2823else
2824 MAINTAINER_MODE_TRUE='#'
2825 MAINTAINER_MODE_FALSE=
2826fi
2827
2828 MAINT=$MAINTAINER_MODE_TRUE
2829
2830
2831
2832ac_ext=c
2833ac_cpp='$CPP $CPPFLAGS'
2834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837if test -n "$ac_tool_prefix"; then
2838 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2839set dummy ${ac_tool_prefix}gcc; ac_word=$2
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2841$as_echo_n "checking for $ac_word... " >&6; }
2842if test "${ac_cv_prog_CC+set}" = set; then :
2843 $as_echo_n "(cached) " >&6
c906108c
SS
2844else
2845 if test -n "$CC"; then
2846 ac_cv_prog_CC="$CC" # Let the user override the test.
2847else
bec39cab
AC
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2855 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2857 break 2
2858 fi
2859done
81ecdfbb
RW
2860 done
2861IFS=$as_save_IFS
bec39cab 2862
c906108c
SS
2863fi
2864fi
bec39cab 2865CC=$ac_cv_prog_CC
c906108c 2866if test -n "$CC"; then
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2868$as_echo "$CC" >&6; }
c906108c 2869else
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2871$as_echo "no" >&6; }
c906108c
SS
2872fi
2873
81ecdfbb 2874
b4e70030
JB
2875fi
2876if test -z "$ac_cv_prog_CC"; then
2877 ac_ct_CC=$CC
81ecdfbb
RW
2878 # Extract the first word of "gcc", so it can be a program name with args.
2879set dummy gcc; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2883 $as_echo_n "(cached) " >&6
b4e70030
JB
2884else
2885 if test -n "$ac_ct_CC"; then
2886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2895 ac_cv_prog_ac_ct_CC="gcc"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2897 break 2
4e8d927d 2898 fi
b4e70030 2899done
81ecdfbb
RW
2900 done
2901IFS=$as_save_IFS
b4e70030
JB
2902
2903fi
2904fi
2905ac_ct_CC=$ac_cv_prog_ac_ct_CC
2906if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2908$as_echo "$ac_ct_CC" >&6; }
b4e70030 2909else
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
b4e70030
JB
2912fi
2913
81ecdfbb
RW
2914 if test "x$ac_ct_CC" = x; then
2915 CC=""
2916 else
2917 case $cross_compiling:$ac_tool_warned in
2918yes:)
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2921ac_tool_warned=yes ;;
2922esac
2923 CC=$ac_ct_CC
2924 fi
b4e70030
JB
2925else
2926 CC="$ac_cv_prog_CC"
2927fi
2928
c906108c 2929if test -z "$CC"; then
81ecdfbb
RW
2930 if test -n "$ac_tool_prefix"; then
2931 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2932set dummy ${ac_tool_prefix}cc; ac_word=$2
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2934$as_echo_n "checking for $ac_word... " >&6; }
2935if test "${ac_cv_prog_CC+set}" = set; then :
2936 $as_echo_n "(cached) " >&6
c906108c
SS
2937else
2938 if test -n "$CC"; then
2939 ac_cv_prog_CC="$CC" # Let the user override the test.
2940else
bec39cab
AC
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944 IFS=$as_save_IFS
2945 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2946 for ac_exec_ext in '' $ac_executable_extensions; do
2947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2948 ac_cv_prog_CC="${ac_tool_prefix}cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2950 break 2
2951 fi
2952done
81ecdfbb
RW
2953 done
2954IFS=$as_save_IFS
2955
2956fi
2957fi
2958CC=$ac_cv_prog_CC
2959if test -n "$CC"; then
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2961$as_echo "$CC" >&6; }
2962else
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2964$as_echo "no" >&6; }
2965fi
2966
2967
2968 fi
2969fi
2970if test -z "$CC"; then
2971 # Extract the first word of "cc", so it can be a program name with args.
2972set dummy cc; ac_word=$2
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2974$as_echo_n "checking for $ac_word... " >&6; }
2975if test "${ac_cv_prog_CC+set}" = set; then :
2976 $as_echo_n "(cached) " >&6
2977else
2978 if test -n "$CC"; then
2979 ac_cv_prog_CC="$CC" # Let the user override the test.
2980else
2981 ac_prog_rejected=no
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2989 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2990 ac_prog_rejected=yes
2991 continue
2992 fi
2993 ac_cv_prog_CC="cc"
2994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995 break 2
2996 fi
2997done
2998 done
2999IFS=$as_save_IFS
bec39cab 3000
c906108c
SS
3001if test $ac_prog_rejected = yes; then
3002 # We found a bogon in the path, so make sure we never use it.
3003 set dummy $ac_cv_prog_CC
3004 shift
bec39cab 3005 if test $# != 0; then
c906108c
SS
3006 # We chose a different compiler from the bogus one.
3007 # However, it has the same basename, so the bogon will be chosen
3008 # first if we set CC to just the basename; use the full file name.
3009 shift
bec39cab 3010 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3011 fi
3012fi
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c
SS
3022fi
3023
81ecdfbb 3024
bec39cab
AC
3025fi
3026if test -z "$CC"; then
3027 if test -n "$ac_tool_prefix"; then
81ecdfbb 3028 for ac_prog in cl.exe
bec39cab
AC
3029 do
3030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
3034if test "${ac_cv_prog_CC+set}" = set; then :
3035 $as_echo_n "(cached) " >&6
c906108c
SS
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
bec39cab
AC
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3047 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3049 break 2
3050 fi
3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055fi
3056fi
bec39cab 3057CC=$ac_cv_prog_CC
c906108c 3058if test -n "$CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060$as_echo "$CC" >&6; }
c906108c 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c 3064fi
bec39cab 3065
81ecdfbb 3066
bec39cab
AC
3067 test -n "$CC" && break
3068 done
3069fi
3070if test -z "$CC"; then
3071 ac_ct_CC=$CC
81ecdfbb 3072 for ac_prog in cl.exe
bec39cab
AC
3073do
3074 # Extract the first word of "$ac_prog", so it can be a program name with args.
3075set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3079 $as_echo_n "(cached) " >&6
bec39cab
AC
3080else
3081 if test -n "$ac_ct_CC"; then
3082 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087 IFS=$as_save_IFS
3088 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3089 for ac_exec_ext in '' $ac_executable_extensions; do
3090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3091 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3093 break 2
c906108c 3094 fi
bec39cab 3095done
81ecdfbb
RW
3096 done
3097IFS=$as_save_IFS
bec39cab
AC
3098
3099fi
3100fi
3101ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104$as_echo "$ac_ct_CC" >&6; }
bec39cab 3105else
81ecdfbb
RW
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
c906108c
SS
3108fi
3109
81ecdfbb 3110
bec39cab
AC
3111 test -n "$ac_ct_CC" && break
3112done
c906108c 3113
81ecdfbb
RW
3114 if test "x$ac_ct_CC" = x; then
3115 CC=""
3116 else
3117 case $cross_compiling:$ac_tool_warned in
3118yes:)
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3121ac_tool_warned=yes ;;
3122esac
3123 CC=$ac_ct_CC
3124 fi
bec39cab
AC
3125fi
3126
3127fi
3128
3129
81ecdfbb
RW
3130test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error "no acceptable C compiler found in \$PATH
3133See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3134
3135# Provide some information about the compiler.
81ecdfbb
RW
3136$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3137set X $ac_compile
3138ac_compiler=$2
3139for ac_option in --version -v -V -qversion; do
3140 { { ac_try="$ac_compiler $ac_option >&5"
3141case "(($ac_try" in
3142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3143 *) ac_try_echo=$ac_try;;
3144esac
3145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3146$as_echo "$ac_try_echo"; } >&5
3147 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3148 ac_status=$?
81ecdfbb
RW
3149 if test -s conftest.err; then
3150 sed '10a\
3151... rest of stderr output deleted ...
3152 10q' conftest.err >conftest.er1
3153 cat conftest.er1 >&5
3154 rm -f conftest.er1 conftest.err
3155 fi
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }
3158done
bec39cab 3159
81ecdfbb 3160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3161/* end confdefs.h. */
3162
3163int
3164main ()
3165{
3166
3167 ;
3168 return 0;
3169}
3170_ACEOF
3171ac_clean_files_save=$ac_clean_files
81ecdfbb 3172ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3173# Try to create an executable without -o first, disregard a.out.
3174# It will help us diagnose broken compilers, and finding out an intuition
3175# of exeext.
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3177$as_echo_n "checking for C compiler default output file name... " >&6; }
3178ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3179
3180# The possible output files:
3181ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3182
3183ac_rmfiles=
3184for ac_file in $ac_files
3185do
3186 case $ac_file in
3187 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3188 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3189 esac
3190done
3191rm -f $ac_rmfiles
3192
3193if { { ac_try="$ac_link_default"
3194case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3199$as_echo "$ac_try_echo"; } >&5
3200 (eval "$ac_link_default") 2>&5
3201 ac_status=$?
3202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3203 test $ac_status = 0; }; then :
3204 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3205# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3206# in a Makefile. We should not override ac_cv_exeext if it was cached,
3207# so that the user can short-circuit this test for compilers unknown to
3208# Autoconf.
3209for ac_file in $ac_files ''
bec39cab
AC
3210do
3211 test -f "$ac_file" || continue
3212 case $ac_file in
81ecdfbb 3213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3214 ;;
3215 [ab].out )
3216 # We found the default executable, but exeext='' is most
3217 # certainly right.
3218 break;;
3219 *.* )
81ecdfbb
RW
3220 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3221 then :; else
3222 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223 fi
3224 # We set ac_cv_exeext here because the later test for it is not
3225 # safe: cross compilers may not add the suffix if given an `-o'
3226 # argument, so we may need to know it at that point already.
3227 # Even if this section looks crufty: it has the advantage of
3228 # actually working.
b4e70030
JB
3229 break;;
3230 * )
3231 break;;
bec39cab
AC
3232 esac
3233done
81ecdfbb
RW
3234test "$ac_cv_exeext" = no && ac_cv_exeext=
3235
bec39cab 3236else
81ecdfbb
RW
3237 ac_file=''
3238fi
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3240$as_echo "$ac_file" >&6; }
3241if test -z "$ac_file"; then :
3242 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
81ecdfbb
RW
3245{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3247{ as_fn_set_status 77
3248as_fn_error "C compiler cannot create executables
3249See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3250fi
b4e70030 3251ac_exeext=$ac_cv_exeext
b4e70030 3252
81ecdfbb 3253# Check that the compiler produces executables we can run. If not, either
bec39cab 3254# the compiler is broken, or we cross compile.
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3256$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3257# If not cross compiling, check that we can run a simple program.
3258if test "$cross_compiling" != yes; then
3259 if { ac_try='./$ac_file'
81ecdfbb
RW
3260 { { case "(($ac_try" in
3261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262 *) ac_try_echo=$ac_try;;
3263esac
3264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265$as_echo "$ac_try_echo"; } >&5
3266 (eval "$ac_try") 2>&5
bec39cab 3267 ac_status=$?
81ecdfbb
RW
3268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269 test $ac_status = 0; }; }; then
bec39cab 3270 cross_compiling=no
c906108c 3271 else
bec39cab
AC
3272 if test "$cross_compiling" = maybe; then
3273 cross_compiling=yes
3274 else
81ecdfbb
RW
3275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3277as_fn_error "cannot run C compiled programs.
bec39cab 3278If you meant to cross compile, use \`--host'.
81ecdfbb 3279See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3280 fi
c906108c 3281 fi
bec39cab 3282fi
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3284$as_echo "yes" >&6; }
bec39cab 3285
81ecdfbb 3286rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3287ac_clean_files=$ac_clean_files_save
81ecdfbb 3288# Check that the compiler produces executables we can run. If not, either
b4e70030 3289# the compiler is broken, or we cross compile.
81ecdfbb
RW
3290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3291$as_echo_n "checking whether we are cross compiling... " >&6; }
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3293$as_echo "$cross_compiling" >&6; }
3294
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3296$as_echo_n "checking for suffix of executables... " >&6; }
3297if { { ac_try="$ac_link"
3298case "(($ac_try" in
3299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3300 *) ac_try_echo=$ac_try;;
3301esac
3302eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3303$as_echo "$ac_try_echo"; } >&5
3304 (eval "$ac_link") 2>&5
bec39cab 3305 ac_status=$?
81ecdfbb
RW
3306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307 test $ac_status = 0; }; then :
b4e70030
JB
3308 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3309# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3310# work properly (i.e., refer to `conftest.exe'), while it won't with
3311# `rm'.
3312for ac_file in conftest.exe conftest conftest.*; do
3313 test -f "$ac_file" || continue
3314 case $ac_file in
81ecdfbb 3315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3316 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3317 break;;
3318 * ) break;;
3319 esac
3320done
c906108c 3321else
81ecdfbb
RW
3322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324as_fn_error "cannot compute suffix of executables: cannot compile and link
3325See \`config.log' for more details." "$LINENO" 5; }
c906108c 3326fi
b4e70030 3327rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3329$as_echo "$ac_cv_exeext" >&6; }
c906108c 3330
b4e70030 3331rm -f conftest.$ac_ext
bec39cab
AC
3332EXEEXT=$ac_cv_exeext
3333ac_exeext=$EXEEXT
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3335$as_echo_n "checking for suffix of object files... " >&6; }
3336if test "${ac_cv_objext+set}" = set; then :
3337 $as_echo_n "(cached) " >&6
bec39cab 3338else
81ecdfbb 3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350rm -f conftest.o conftest.obj
81ecdfbb
RW
3351if { { ac_try="$ac_compile"
3352case "(($ac_try" in
3353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3354 *) ac_try_echo=$ac_try;;
3355esac
3356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3357$as_echo "$ac_try_echo"; } >&5
3358 (eval "$ac_compile") 2>&5
3359 ac_status=$?
3360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3361 test $ac_status = 0; }; then :
3362 for ac_file in conftest.o conftest.obj conftest.*; do
3363 test -f "$ac_file" || continue;
bec39cab 3364 case $ac_file in
81ecdfbb 3365 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3366 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3367 break;;
3368 esac
3369done
c906108c 3370else
81ecdfbb 3371 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3372sed 's/^/| /' conftest.$ac_ext >&5
3373
81ecdfbb
RW
3374{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3376as_fn_error "cannot compute suffix of object files: cannot compile
3377See \`config.log' for more details." "$LINENO" 5; }
c906108c 3378fi
b4e70030 3379rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3380fi
81ecdfbb
RW
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3382$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3383OBJEXT=$ac_cv_objext
3384ac_objext=$OBJEXT
81ecdfbb
RW
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3386$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3387if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
c906108c 3389else
81ecdfbb 3390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3391/* end confdefs.h. */
3392
3393int
3394main ()
3395{
3396#ifndef __GNUC__
3397 choke me
3398#endif
3399
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb 3404if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3405 ac_compiler_gnu=yes
3406else
81ecdfbb 3407 ac_compiler_gnu=no
bec39cab 3408fi
81ecdfbb 3409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3410ac_cv_c_compiler_gnu=$ac_compiler_gnu
3411
3412fi
81ecdfbb
RW
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3414$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3415if test $ac_compiler_gnu = yes; then
3416 GCC=yes
3417else
3418 GCC=
3419fi
bec39cab
AC
3420ac_test_CFLAGS=${CFLAGS+set}
3421ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3423$as_echo_n "checking whether $CC accepts -g... " >&6; }
3424if test "${ac_cv_prog_cc_g+set}" = set; then :
3425 $as_echo_n "(cached) " >&6
bec39cab 3426else
81ecdfbb
RW
3427 ac_save_c_werror_flag=$ac_c_werror_flag
3428 ac_c_werror_flag=yes
3429 ac_cv_prog_cc_g=no
3430 CFLAGS="-g"
3431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3432/* end confdefs.h. */
3433
3434int
3435main ()
3436{
3437
3438 ;
3439 return 0;
3440}
3441_ACEOF
81ecdfbb 3442if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3443 ac_cv_prog_cc_g=yes
3444else
81ecdfbb
RW
3445 CFLAGS=""
3446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3447/* end confdefs.h. */
3448
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
3457if ac_fn_c_try_compile "$LINENO"; then :
3458
3459else
3460 ac_c_werror_flag=$ac_save_c_werror_flag
3461 CFLAGS="-g"
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463/* end confdefs.h. */
3464
3465int
3466main ()
3467{
c906108c 3468
81ecdfbb
RW
3469 ;
3470 return 0;
3471}
3472_ACEOF
3473if ac_fn_c_try_compile "$LINENO"; then :
3474 ac_cv_prog_cc_g=yes
3475fi
3476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3477fi
3478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3479fi
81ecdfbb
RW
3480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3481 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3482fi
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3484$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3485if test "$ac_test_CFLAGS" = set; then
bec39cab 3486 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3487elif test $ac_cv_prog_cc_g = yes; then
3488 if test "$GCC" = yes; then
3489 CFLAGS="-g -O2"
3490 else
3491 CFLAGS="-g"
3492 fi
3493else
3494 if test "$GCC" = yes; then
3495 CFLAGS="-O2"
3496 else
3497 CFLAGS=
3498 fi
3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3501$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3502if test "${ac_cv_prog_cc_c89+set}" = set; then :
3503 $as_echo_n "(cached) " >&6
bec39cab 3504else
81ecdfbb 3505 ac_cv_prog_cc_c89=no
bec39cab 3506ac_save_CC=$CC
81ecdfbb 3507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3508/* end confdefs.h. */
c906108c
SS
3509#include <stdarg.h>
3510#include <stdio.h>
3511#include <sys/types.h>
3512#include <sys/stat.h>
3513/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3514struct buf { int x; };
3515FILE * (*rcsopen) (struct buf *, struct stat *, int);
3516static char *e (p, i)
3517 char **p;
3518 int i;
3519{
3520 return p[i];
3521}
3522static char *f (char * (*g) (char **, int), char **p, ...)
3523{
3524 char *s;
3525 va_list v;
3526 va_start (v,p);
3527 s = g (p, va_arg (v,int));
3528 va_end (v);
3529 return s;
3530}
bec39cab
AC
3531
3532/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3533 function prototypes and stuff, but not '\xHH' hex character constants.
3534 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3535 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3536 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3537 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3538 that's true only with -std. */
bec39cab
AC
3539int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3540
81ecdfbb
RW
3541/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3542 inside strings and character constants. */
3543#define FOO(x) 'x'
3544int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3545
c906108c
SS
3546int test (int i, double x);
3547struct s1 {int (*f) (int a);};
3548struct s2 {int (*f) (double a);};
3549int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3550int argc;
3551char **argv;
bec39cab
AC
3552int
3553main ()
3554{
c906108c 3555return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3556 ;
3557 return 0;
3558}
3559_ACEOF
81ecdfbb
RW
3560for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3561 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3562do
3563 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3564 if ac_fn_c_try_compile "$LINENO"; then :
3565 ac_cv_prog_cc_c89=$ac_arg
c906108c 3566fi
81ecdfbb
RW
3567rm -f core conftest.err conftest.$ac_objext
3568 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3569done
81ecdfbb 3570rm -f conftest.$ac_ext
bec39cab 3571CC=$ac_save_CC
c906108c
SS
3572
3573fi
81ecdfbb
RW
3574# AC_CACHE_VAL
3575case "x$ac_cv_prog_cc_c89" in
3576 x)
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3578$as_echo "none needed" >&6; } ;;
3579 xno)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3581$as_echo "unsupported" >&6; } ;;
bec39cab 3582 *)
81ecdfbb
RW
3583 CC="$CC $ac_cv_prog_cc_c89"
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3585$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3586esac
81ecdfbb 3587if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3588
b4e70030
JB
3589fi
3590
bec39cab
AC
3591ac_ext=c
3592ac_cpp='$CPP $CPPFLAGS'
3593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3595ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3596
f434ba03
PA
3597ac_aux_dir=
3598for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3599 for ac_t in install-sh install.sh shtool; do
3600 if test -f "$ac_dir/$ac_t"; then
3601 ac_aux_dir=$ac_dir
3602 ac_install_sh="$ac_aux_dir/$ac_t -c"
3603 break 2
3604 fi
3605 done
3606done
3607if test -z "$ac_aux_dir"; then
3608 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3609fi
3610
3611# These three variables are undocumented and unsupported,
3612# and are intended to be withdrawn in a future Autoconf release.
3613# They can cause serious problems if a builder's source tree is in a directory
3614# whose full name contains unusual characters.
3615ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3616ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3617ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3618
3619
3620# Make sure we can run config.sub.
3621$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3622 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3623
3624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3625$as_echo_n "checking build system type... " >&6; }
3626if test "${ac_cv_build+set}" = set; then :
3627 $as_echo_n "(cached) " >&6
3628else
3629 ac_build_alias=$build_alias
3630test "x$ac_build_alias" = x &&
3631 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3632test "x$ac_build_alias" = x &&
3633 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3634ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3635 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3636
3637fi
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3639$as_echo "$ac_cv_build" >&6; }
3640case $ac_cv_build in
3641*-*-*) ;;
3642*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3643esac
3644build=$ac_cv_build
3645ac_save_IFS=$IFS; IFS='-'
3646set x $ac_cv_build
3647shift
3648build_cpu=$1
3649build_vendor=$2
3650shift; shift
3651# Remember, the first character of IFS is used to create $*,
3652# except with old shells:
3653build_os=$*
3654IFS=$ac_save_IFS
3655case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3656
3657
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3659$as_echo_n "checking host system type... " >&6; }
3660if test "${ac_cv_host+set}" = set; then :
3661 $as_echo_n "(cached) " >&6
3662else
3663 if test "x$host_alias" = x; then
3664 ac_cv_host=$ac_cv_build
3665else
3666 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3667 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3668fi
3669
3670fi
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3672$as_echo "$ac_cv_host" >&6; }
3673case $ac_cv_host in
3674*-*-*) ;;
3675*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3676esac
3677host=$ac_cv_host
3678ac_save_IFS=$IFS; IFS='-'
3679set x $ac_cv_host
3680shift
3681host_cpu=$1
3682host_vendor=$2
3683shift; shift
3684# Remember, the first character of IFS is used to create $*,
3685# except with old shells:
3686host_os=$*
3687IFS=$ac_save_IFS
3688case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3689
3690
60ca704f 3691
bec39cab
AC
3692ac_ext=c
3693ac_cpp='$CPP $CPPFLAGS'
3694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3696ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3698$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3699# On Suns, sometimes $CPP names a directory.
3700if test -n "$CPP" && test -d "$CPP"; then
3701 CPP=
8bb2c122 3702fi
bec39cab 3703if test -z "$CPP"; then
81ecdfbb
RW
3704 if test "${ac_cv_prog_CPP+set}" = set; then :
3705 $as_echo_n "(cached) " >&6
bec39cab
AC
3706else
3707 # Double quotes because CPP needs to be expanded
3708 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3709 do
3710 ac_preproc_ok=false
3711for ac_c_preproc_warn_flag in '' yes
3712do
3713 # Use a header file that comes with gcc, so configuring glibc
3714 # with a fresh cross-compiler works.
3715 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3716 # <limits.h> exists even on freestanding compilers.
3717 # On the NeXT, cc -E runs the code through the compiler's parser,
3718 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3720/* end confdefs.h. */
3721#ifdef __STDC__
3722# include <limits.h>
3723#else
3724# include <assert.h>
3725#endif
3726 Syntax error
3727_ACEOF
81ecdfbb 3728if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3729
81ecdfbb 3730else
bec39cab
AC
3731 # Broken: fails on valid input.
3732continue
3733fi
3734rm -f conftest.err conftest.$ac_ext
3735
81ecdfbb 3736 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3737 # can be detected and how.
81ecdfbb 3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3739/* end confdefs.h. */
3740#include <ac_nonexistent.h>
3741_ACEOF
81ecdfbb 3742if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3743 # Broken: success on invalid input.
3744continue
8bb2c122 3745else
bec39cab
AC
3746 # Passes both tests.
3747ac_preproc_ok=:
3748break
8bb2c122 3749fi
bec39cab 3750rm -f conftest.err conftest.$ac_ext
8bb2c122 3751
bec39cab
AC
3752done
3753# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3754rm -f conftest.err conftest.$ac_ext
81ecdfbb 3755if $ac_preproc_ok; then :
bec39cab
AC
3756 break
3757fi
8bb2c122 3758
bec39cab
AC
3759 done
3760 ac_cv_prog_CPP=$CPP
ddc9cd0f 3761
c906108c 3762fi
bec39cab
AC
3763 CPP=$ac_cv_prog_CPP
3764else
3765 ac_cv_prog_CPP=$CPP
c906108c 3766fi
81ecdfbb
RW
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3768$as_echo "$CPP" >&6; }
bec39cab
AC
3769ac_preproc_ok=false
3770for ac_c_preproc_warn_flag in '' yes
3771do
3772 # Use a header file that comes with gcc, so configuring glibc
3773 # with a fresh cross-compiler works.
3774 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3775 # <limits.h> exists even on freestanding compilers.
3776 # On the NeXT, cc -E runs the code through the compiler's parser,
3777 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3779/* end confdefs.h. */
3780#ifdef __STDC__
3781# include <limits.h>
3782#else
3783# include <assert.h>
3784#endif
3785 Syntax error
3786_ACEOF
81ecdfbb 3787if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3788
81ecdfbb 3789else
bec39cab
AC
3790 # Broken: fails on valid input.
3791continue
3792fi
3793rm -f conftest.err conftest.$ac_ext
3794
81ecdfbb 3795 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3796 # can be detected and how.
81ecdfbb 3797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3798/* end confdefs.h. */
3799#include <ac_nonexistent.h>
3800_ACEOF
81ecdfbb 3801if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3802 # Broken: success on invalid input.
3803continue
c906108c 3804else
bec39cab
AC
3805 # Passes both tests.
3806ac_preproc_ok=:
3807break
c906108c 3808fi
bec39cab 3809rm -f conftest.err conftest.$ac_ext
c906108c 3810
bec39cab
AC
3811done
3812# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3813rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3814if $ac_preproc_ok; then :
3815
c906108c 3816else
81ecdfbb
RW
3817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3819as_fn_error "C preprocessor \"$CPP\" fails sanity check
3820See \`config.log' for more details." "$LINENO" 5; }
c906108c 3821fi
c906108c 3822
bec39cab
AC
3823ac_ext=c
3824ac_cpp='$CPP $CPPFLAGS'
3825ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3826ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3827ac_compiler_gnu=$ac_cv_c_compiler_gnu
3828
3829
81ecdfbb
RW
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3831$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3832if test "${ac_cv_path_GREP+set}" = set; then :
3833 $as_echo_n "(cached) " >&6
4e8d927d 3834else
81ecdfbb
RW
3835 if test -z "$GREP"; then
3836 ac_path_GREP_found=false
3837 # Loop through the user's path and test for each of PROGNAME-LIST
3838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
3843 for ac_prog in grep ggrep; do
3844 for ac_exec_ext in '' $ac_executable_extensions; do
3845 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3846 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3847# Check for GNU ac_path_GREP and select it if it is found.
3848 # Check for GNU $ac_path_GREP
3849case `"$ac_path_GREP" --version 2>&1` in
3850*GNU*)
3851 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3852*)
3853 ac_count=0
3854 $as_echo_n 0123456789 >"conftest.in"
3855 while :
3856 do
3857 cat "conftest.in" "conftest.in" >"conftest.tmp"
3858 mv "conftest.tmp" "conftest.in"
3859 cp "conftest.in" "conftest.nl"
3860 $as_echo 'GREP' >> "conftest.nl"
3861 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3862 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3863 as_fn_arith $ac_count + 1 && ac_count=$as_val
3864 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3865 # Best one so far, save it but keep looking for a better one
3866 ac_cv_path_GREP="$ac_path_GREP"
3867 ac_path_GREP_max=$ac_count
bec39cab 3868 fi
81ecdfbb
RW
3869 # 10*(2^10) chars as input seems more than enough
3870 test $ac_count -gt 10 && break
3871 done
3872 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3873esac
bec39cab 3874
81ecdfbb
RW
3875 $ac_path_GREP_found && break 3
3876 done
3877 done
3878 done
3879IFS=$as_save_IFS
3880 if test -z "$ac_cv_path_GREP"; then
3881 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3882 fi
c906108c 3883else
81ecdfbb 3884 ac_cv_path_GREP=$GREP
c906108c 3885fi
c906108c 3886
81ecdfbb
RW
3887fi
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3889$as_echo "$ac_cv_path_GREP" >&6; }
3890 GREP="$ac_cv_path_GREP"
c906108c 3891
c906108c 3892
81ecdfbb
RW
3893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3894$as_echo_n "checking for egrep... " >&6; }
3895if test "${ac_cv_path_EGREP+set}" = set; then :
3896 $as_echo_n "(cached) " >&6
783e057b 3897else
81ecdfbb
RW
3898 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3899 then ac_cv_path_EGREP="$GREP -E"
3900 else
3901 if test -z "$EGREP"; then
3902 ac_path_EGREP_found=false
3903 # Loop through the user's path and test for each of PROGNAME-LIST
3904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3905for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3906do
3907 IFS=$as_save_IFS
3908 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3909 for ac_prog in egrep; do
3910 for ac_exec_ext in '' $ac_executable_extensions; do
3911 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3912 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3913# Check for GNU ac_path_EGREP and select it if it is found.
3914 # Check for GNU $ac_path_EGREP
3915case `"$ac_path_EGREP" --version 2>&1` in
3916*GNU*)
3917 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3918*)
3919 ac_count=0
3920 $as_echo_n 0123456789 >"conftest.in"
3921 while :
3922 do
3923 cat "conftest.in" "conftest.in" >"conftest.tmp"
3924 mv "conftest.tmp" "conftest.in"
3925 cp "conftest.in" "conftest.nl"
3926 $as_echo 'EGREP' >> "conftest.nl"
3927 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3928 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3929 as_fn_arith $ac_count + 1 && ac_count=$as_val
3930 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3931 # Best one so far, save it but keep looking for a better one
3932 ac_cv_path_EGREP="$ac_path_EGREP"
3933 ac_path_EGREP_max=$ac_count
3934 fi
3935 # 10*(2^10) chars as input seems more than enough
3936 test $ac_count -gt 10 && break
3937 done
3938 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3939esac
bec39cab 3940
81ecdfbb
RW
3941 $ac_path_EGREP_found && break 3
3942 done
3943 done
3944 done
3945IFS=$as_save_IFS
3946 if test -z "$ac_cv_path_EGREP"; then
3947 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3948 fi
783e057b 3949else
81ecdfbb 3950 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3951fi
3952
81ecdfbb 3953 fi
783e057b 3954fi
81ecdfbb
RW
3955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3956$as_echo "$ac_cv_path_EGREP" >&6; }
3957 EGREP="$ac_cv_path_EGREP"
3958
783e057b 3959
81ecdfbb
RW
3960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3961$as_echo_n "checking for ANSI C header files... " >&6; }
3962if test "${ac_cv_header_stdc+set}" = set; then :
3963 $as_echo_n "(cached) " >&6
783e057b 3964else
81ecdfbb 3965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3966/* end confdefs.h. */
783e057b 3967#include <stdlib.h>
bec39cab 3968#include <stdarg.h>
783e057b
DJ
3969#include <string.h>
3970#include <float.h>
c906108c 3971
bec39cab
AC
3972int
3973main ()
3974{
c906108c 3975
bec39cab
AC
3976 ;
3977 return 0;
3978}
3979_ACEOF
81ecdfbb 3980if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3981 ac_cv_header_stdc=yes
c906108c 3982else
81ecdfbb 3983 ac_cv_header_stdc=no
c906108c 3984fi
81ecdfbb 3985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3986
783e057b
DJ
3987if test $ac_cv_header_stdc = yes; then
3988 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3990/* end confdefs.h. */
3991#include <string.h>
c906108c 3992
783e057b
DJ
3993_ACEOF
3994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3995 $EGREP "memchr" >/dev/null 2>&1; then :
3996
c906108c 3997else
783e057b 3998 ac_cv_header_stdc=no
c906108c 3999fi
783e057b 4000rm -f conftest*
c906108c
SS
4001
4002fi
4003
783e057b
DJ
4004if test $ac_cv_header_stdc = yes; then
4005 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4007/* end confdefs.h. */
4008#include <stdlib.h>
bec39cab 4009
783e057b
DJ
4010_ACEOF
4011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4012 $EGREP "free" >/dev/null 2>&1; then :
4013
bec39cab 4014else
783e057b 4015 ac_cv_header_stdc=no
bec39cab 4016fi
783e057b 4017rm -f conftest*
bec39cab
AC
4018
4019fi
bec39cab 4020
783e057b
DJ
4021if test $ac_cv_header_stdc = yes; then
4022 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4023 if test "$cross_compiling" = yes; then :
783e057b 4024 :
bec39cab 4025else
81ecdfbb 4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4027/* end confdefs.h. */
4028#include <ctype.h>
81ecdfbb 4029#include <stdlib.h>
783e057b
DJ
4030#if ((' ' & 0x0FF) == 0x020)
4031# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4032# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4033#else
4034# define ISLOWER(c) \
4035 (('a' <= (c) && (c) <= 'i') \
4036 || ('j' <= (c) && (c) <= 'r') \
4037 || ('s' <= (c) && (c) <= 'z'))
4038# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4039#endif
4040
4041#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4042int
4043main ()
4044{
4045 int i;
4046 for (i = 0; i < 256; i++)
4047 if (XOR (islower (i), ISLOWER (i))
4048 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4049 return 2;
4050 return 0;
783e057b
DJ
4051}
4052_ACEOF
81ecdfbb 4053if ac_fn_c_try_run "$LINENO"; then :
783e057b 4054
81ecdfbb
RW
4055else
4056 ac_cv_header_stdc=no
783e057b 4057fi
81ecdfbb
RW
4058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4059 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4060fi
81ecdfbb 4061
783e057b
DJ
4062fi
4063fi
81ecdfbb
RW
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4065$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4066if test $ac_cv_header_stdc = yes; then
4067
81ecdfbb 4068$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4069
4070fi
4071
4072# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4073for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4074 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4075do :
4076 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4077ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4078"
4079eval as_val=\$$as_ac_Header
4080 if test "x$as_val" = x""yes; then :
783e057b 4081 cat >>confdefs.h <<_ACEOF
81ecdfbb 4082#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4083_ACEOF
4084
4085fi
4086
4087done
4088
4089
4090
f434ba03
PA
4091
4092
81ecdfbb
RW
4093 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4094if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4095 MINIX=yes
4096else
4097 MINIX=
4098fi
4099
4100
4101 if test "$MINIX" = yes; then
4102
81ecdfbb 4103$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4104
4105
81ecdfbb 4106$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4107
4108
81ecdfbb 4109$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4110
4111 fi
4112
f434ba03
PA
4113 case "$host_os" in
4114 hpux*)
4115
4116$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4117
4118 ;;
4119 esac
4120
783e057b 4121
81ecdfbb
RW
4122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4123$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4124if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4125 $as_echo_n "(cached) " >&6
783e057b 4126else
81ecdfbb 4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4128/* end confdefs.h. */
4129
f434ba03
PA
4130# define __EXTENSIONS__ 1
4131 $ac_includes_default
783e057b
DJ
4132int
4133main ()
4134{
4135
4136 ;
4137 return 0;
4138}
4139_ACEOF
81ecdfbb 4140if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4141 ac_cv_safe_to_define___extensions__=yes
4142else
81ecdfbb 4143 ac_cv_safe_to_define___extensions__=no
783e057b 4144fi
81ecdfbb 4145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4146fi
81ecdfbb
RW
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4148$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4149 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4150 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4151
81ecdfbb 4152 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4153
81ecdfbb 4154 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4155
81ecdfbb 4156 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4157
81ecdfbb 4158 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4159
4160
81ecdfbb
RW
4161if test -n "$ac_tool_prefix"; then
4162 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4163set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4165$as_echo_n "checking for $ac_word... " >&6; }
4166if test "${ac_cv_prog_RANLIB+set}" = set; then :
4167 $as_echo_n "(cached) " >&6
4168else
4169 if test -n "$RANLIB"; then
4170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4171else
4172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4173for as_dir in $PATH
4174do
4175 IFS=$as_save_IFS
4176 test -z "$as_dir" && as_dir=.
4177 for ac_exec_ext in '' $ac_executable_extensions; do
4178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4181 break 2
4182 fi
4183done
4184 done
4185IFS=$as_save_IFS
783e057b 4186
81ecdfbb
RW
4187fi
4188fi
4189RANLIB=$ac_cv_prog_RANLIB
4190if test -n "$RANLIB"; then
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4192$as_echo "$RANLIB" >&6; }
4193else
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4195$as_echo "no" >&6; }
4196fi
783e057b
DJ
4197
4198
81ecdfbb
RW
4199fi
4200if test -z "$ac_cv_prog_RANLIB"; then
4201 ac_ct_RANLIB=$RANLIB
4202 # Extract the first word of "ranlib", so it can be a program name with args.
4203set dummy ranlib; ac_word=$2
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4205$as_echo_n "checking for $ac_word... " >&6; }
4206if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4207 $as_echo_n "(cached) " >&6
783e057b 4208else
81ecdfbb
RW
4209 if test -n "$ac_ct_RANLIB"; then
4210 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_ac_ct_RANLIB="ranlib"
4220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4221 break 2
4222 fi
4223done
4224 done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4230if test -n "$ac_ct_RANLIB"; then
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4232$as_echo "$ac_ct_RANLIB" >&6; }
4233else
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4235$as_echo "no" >&6; }
4236fi
4237
4238 if test "x$ac_ct_RANLIB" = x; then
4239 RANLIB=":"
4240 else
4241 case $cross_compiling:$ac_tool_warned in
4242yes:)
4243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4245ac_tool_warned=yes ;;
4246esac
4247 RANLIB=$ac_ct_RANLIB
4248 fi
4249else
4250 RANLIB="$ac_cv_prog_RANLIB"
4251fi
4252
4253
4254
4255
4256
4257
3388710e
JM
4258
4259
3388710e 4260
f434ba03
PA
4261 # Code from module arg-nonnull:
4262 # Code from module c++defs:
4263 # Code from module extensions:
3388710e 4264
f434ba03
PA
4265 # Code from module include_next:
4266 # Code from module memchr:
4267 # Code from module memmem:
4268 # Code from module memmem-simple:
4269 # Code from module multiarch:
4270 # Code from module stddef:
4271 # Code from module stdint:
4272 # Code from module string:
4273 # Code from module warn-on-use:
4274 # Code from module wchar:
3388710e
JM
4275
4276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4277$as_echo_n "checking target system type... " >&6; }
4278if test "${ac_cv_target+set}" = set; then :
4279 $as_echo_n "(cached) " >&6
4280else
4281 if test "x$target_alias" = x; then
4282 ac_cv_target=$ac_cv_host
4283else
4284 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4285 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4286fi
4287
4288fi
4289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4290$as_echo "$ac_cv_target" >&6; }
4291case $ac_cv_target in
4292*-*-*) ;;
4293*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4294esac
4295target=$ac_cv_target
4296ac_save_IFS=$IFS; IFS='-'
4297set x $ac_cv_target
4298shift
4299target_cpu=$1
4300target_vendor=$2
4301shift; shift
4302# Remember, the first character of IFS is used to create $*,
4303# except with old shells:
4304target_os=$*
4305IFS=$ac_save_IFS
4306case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4307
4308
4309# The aliases save the names the user supplied, while $host etc.
4310# will get canonicalized.
4311test -n "$target_alias" &&
4312 test "$program_prefix$program_suffix$program_transform_name" = \
4313 NONENONEs,x,x, &&
4314 program_prefix=${target_alias}-
4315
4316# The tests for host and target for $enable_largefile require
4317# canonical names.
4318
4319
81ecdfbb 4320
da2f07f1
JK
4321# As the $enable_largefile decision depends on --enable-plugins we must set it
4322# even in directories otherwise not depending on the $plugins option.
4323
4324
4325# Check whether --enable-plugins was given.
4326if test "${enable_plugins+set}" = set; then :
4327 enableval=$enable_plugins; case "${enableval}" in
4328 yes | "") plugins=yes ;;
4329 no) plugins=no ;;
4330 *) plugins=yes ;;
4331 esac
4332else
4333 plugins=no
4334fi
4335
4336
4337
4338case "${host}" in
4339 sparc-*-solaris*|i[3-7]86-*-solaris*)
4340 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4341 # are mutually exclusive; and without procfs support, the bfd/ elf module
4342 # cannot provide certain routines such as elfcore_write_prpsinfo
4343 # or elfcore_write_prstatus. So unless the user explicitly requested
4344 # large-file support through the --enable-largefile switch, disable
4345 # large-file support in favor of procfs support.
4346 test "${target}" = "${host}" -a "x$plugins" = xno \
4347 && : ${enable_largefile="no"}
4348 ;;
4349esac
4350
4351# Check whether --enable-largefile was given.
4352if test "${enable_largefile+set}" = set; then :
4353 enableval=$enable_largefile;
4354fi
4355
4356if test "$enable_largefile" != no; then
4357
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4359$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4360if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4361 $as_echo_n "(cached) " >&6
4362else
4363 ac_cv_sys_largefile_CC=no
4364 if test "$GCC" != yes; then
4365 ac_save_CC=$CC
4366 while :; do
4367 # IRIX 6.2 and later do not support large files by default,
4368 # so use the C compiler's -n32 option if that helps.
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h. */
4371#include <sys/types.h>
4372 /* Check that off_t can represent 2**63 - 1 correctly.
4373 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4374 since some C++ compilers masquerading as C compilers
4375 incorrectly reject 9223372036854775807. */
4376#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4377 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4378 && LARGE_OFF_T % 2147483647 == 1)
4379 ? 1 : -1];
4380int
4381main ()
4382{
4383
4384 ;
4385 return 0;
4386}
4387_ACEOF
4388 if ac_fn_c_try_compile "$LINENO"; then :
4389 break
4390fi
4391rm -f core conftest.err conftest.$ac_objext
4392 CC="$CC -n32"
4393 if ac_fn_c_try_compile "$LINENO"; then :
4394 ac_cv_sys_largefile_CC=' -n32'; break
4395fi
4396rm -f core conftest.err conftest.$ac_objext
4397 break
4398 done
4399 CC=$ac_save_CC
4400 rm -f conftest.$ac_ext
4401 fi
4402fi
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4404$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4405 if test "$ac_cv_sys_largefile_CC" != no; then
4406 CC=$CC$ac_cv_sys_largefile_CC
4407 fi
4408
4409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4410$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4411if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 while :; do
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416/* end confdefs.h. */
4417#include <sys/types.h>
4418 /* Check that off_t can represent 2**63 - 1 correctly.
4419 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4420 since some C++ compilers masquerading as C compilers
4421 incorrectly reject 9223372036854775807. */
4422#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4423 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4424 && LARGE_OFF_T % 2147483647 == 1)
4425 ? 1 : -1];
4426int
4427main ()
4428{
4429
4430 ;
4431 return 0;
4432}
4433_ACEOF
4434if ac_fn_c_try_compile "$LINENO"; then :
4435 ac_cv_sys_file_offset_bits=no; break
4436fi
4437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#define _FILE_OFFSET_BITS 64
4441#include <sys/types.h>
4442 /* Check that off_t can represent 2**63 - 1 correctly.
4443 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4444 since some C++ compilers masquerading as C compilers
4445 incorrectly reject 9223372036854775807. */
4446#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4447 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4448 && LARGE_OFF_T % 2147483647 == 1)
4449 ? 1 : -1];
4450int
4451main ()
4452{
4453
4454 ;
4455 return 0;
4456}
4457_ACEOF
4458if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_sys_file_offset_bits=64; break
4460fi
4461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4462 ac_cv_sys_file_offset_bits=unknown
4463 break
4464done
4465fi
4466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4467$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4468case $ac_cv_sys_file_offset_bits in #(
4469 no | unknown) ;;
4470 *)
4471cat >>confdefs.h <<_ACEOF
4472#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4473_ACEOF
4474;;
4475esac
4476rm -rf conftest*
4477 if test $ac_cv_sys_file_offset_bits = unknown; then
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4479$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4480if test "${ac_cv_sys_large_files+set}" = set; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 while :; do
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <sys/types.h>
4487 /* Check that off_t can represent 2**63 - 1 correctly.
4488 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4489 since some C++ compilers masquerading as C compilers
4490 incorrectly reject 9223372036854775807. */
4491#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4492 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4493 && LARGE_OFF_T % 2147483647 == 1)
4494 ? 1 : -1];
4495int
4496main ()
4497{
4498
4499 ;
4500 return 0;
4501}
4502_ACEOF
4503if ac_fn_c_try_compile "$LINENO"; then :
4504 ac_cv_sys_large_files=no; break
4505fi
4506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#define _LARGE_FILES 1
4510#include <sys/types.h>
4511 /* Check that off_t can represent 2**63 - 1 correctly.
4512 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4513 since some C++ compilers masquerading as C compilers
4514 incorrectly reject 9223372036854775807. */
4515#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4516 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4517 && LARGE_OFF_T % 2147483647 == 1)
4518 ? 1 : -1];
4519int
4520main ()
4521{
4522
4523 ;
4524 return 0;
4525}
4526_ACEOF
4527if ac_fn_c_try_compile "$LINENO"; then :
4528 ac_cv_sys_large_files=1; break
4529fi
4530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4531 ac_cv_sys_large_files=unknown
4532 break
4533done
4534fi
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4536$as_echo "$ac_cv_sys_large_files" >&6; }
4537case $ac_cv_sys_large_files in #(
4538 no | unknown) ;;
4539 *)
4540cat >>confdefs.h <<_ACEOF
4541#define _LARGE_FILES $ac_cv_sys_large_files
4542_ACEOF
4543;;
4544esac
4545rm -rf conftest*
4546 fi
4547fi
4548
4549
4550
81ecdfbb
RW
4551
4552
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4554$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4555if test "${am_cv_prog_cc_stdc+set}" = set; then :
4556 $as_echo_n "(cached) " >&6
4557else
4558 am_cv_prog_cc_stdc=no
4559ac_save_CC="$CC"
4560# Don't try gcc -ansi; that turns off useful extensions and
4561# breaks some systems' header files.
4562# AIX -qlanglvl=ansi
4563# Ultrix and OSF/1 -std1
4564# HP-UX 10.20 and later -Ae
4565# HP-UX older versions -Aa -D_HPUX_SOURCE
4566# SVR4 -Xc -D__EXTENSIONS__
4567for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4568do
783e057b 4569 CC="$ac_save_CC $ac_arg"
81ecdfbb 4570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4571/* end confdefs.h. */
4572#include <stdarg.h>
4573#include <stdio.h>
4574#include <sys/types.h>
4575#include <sys/stat.h>
4576/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4577struct buf { int x; };
4578FILE * (*rcsopen) (struct buf *, struct stat *, int);
4579static char *e (p, i)
4580 char **p;
4581 int i;
4582{
4583 return p[i];
4584}
4585static char *f (char * (*g) (char **, int), char **p, ...)
4586{
4587 char *s;
4588 va_list v;
4589 va_start (v,p);
4590 s = g (p, va_arg (v,int));
4591 va_end (v);
4592 return s;
4593}
4594int test (int i, double x);
4595struct s1 {int (*f) (int a);};
4596struct s2 {int (*f) (double a);};
4597int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4598int argc;
4599char **argv;
4600
4601int
4602main ()
4603{
4604
4605return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4606
4607 ;
4608 return 0;
4609}
4610_ACEOF
81ecdfbb 4611if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4612 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4613fi
81ecdfbb 4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4615done
4616CC="$ac_save_CC"
4617
4618fi
4619
4620if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4622$as_echo "none needed" >&6; }
783e057b 4623else
81ecdfbb
RW
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4625$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4626fi
4627case "x$am_cv_prog_cc_stdc" in
4628 x|xno) ;;
4629 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4630esac
4631
4632
4633ac_aux_dir=
81ecdfbb
RW
4634for ac_dir in .. "$srcdir"/..; do
4635 for ac_t in install-sh install.sh shtool; do
4636 if test -f "$ac_dir/$ac_t"; then
4637 ac_aux_dir=$ac_dir
4638 ac_install_sh="$ac_aux_dir/$ac_t -c"
4639 break 2
4640 fi
4641 done
783e057b
DJ
4642done
4643if test -z "$ac_aux_dir"; then
81ecdfbb 4644 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4645fi
81ecdfbb
RW
4646
4647# These three variables are undocumented and unsupported,
4648# and are intended to be withdrawn in a future Autoconf release.
4649# They can cause serious problems if a builder's source tree is in a directory
4650# whose full name contains unusual characters.
4651ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4652ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4653ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4654
783e057b 4655
783e057b 4656
81ecdfbb 4657
a417dc56
RW
4658# Dependency checking.
4659rm -rf .tst 2>/dev/null
4660mkdir .tst 2>/dev/null
4661if test -d .tst; then
4662 am__leading_dot=.
4663else
4664 am__leading_dot=_
4665fi
4666rmdir .tst 2>/dev/null
4667
4668DEPDIR="${am__leading_dot}deps"
4669
81ecdfbb 4670ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4671
4672
4673depcc="$CC" am_compiler_list=
4674
4675am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4677$as_echo_n "checking dependency style of $depcc... " >&6; }
4678if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4679 $as_echo_n "(cached) " >&6
a417dc56
RW
4680else
4681 if test -f "$am_depcomp"; then
4682 # We make a subdir and do the tests there. Otherwise we can end up
4683 # making bogus files that we don't know about and never remove. For
4684 # instance it was reported that on HP-UX the gcc test will end up
4685 # making a dummy file named `D' -- because `-MD' means `put the output
4686 # in D'.
4687 mkdir conftest.dir
4688 # Copy depcomp to subdir because otherwise we won't find it if we're
4689 # using a relative directory.
4690 cp "$am_depcomp" conftest.dir
4691 cd conftest.dir
4692 # We will build objects and dependencies in a subdirectory because
4693 # it helps to detect inapplicable dependency modes. For instance
4694 # both Tru64's cc and ICC support -MD to output dependencies as a
4695 # side effect of compilation, but ICC will put the dependencies in
4696 # the current directory while Tru64 will put them in the object
4697 # directory.
4698 mkdir sub
4699
4700 am_cv_CC_dependencies_compiler_type=none
4701 if test "$am_compiler_list" = ""; then
4702 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4703 fi
4704 for depmode in $am_compiler_list; do
4705 if test $depmode = none; then break; fi
4706
81ecdfbb 4707 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4708 # Setup a source with many dependencies, because some compilers
4709 # like to wrap large dependency lists on column 80 (with \), and
4710 # we should not choose a depcomp mode which is confused by this.
4711 #
4712 # We need to recreate these files for each test, as the compiler may
4713 # overwrite some of them when testing with obscure command lines.
4714 # This happens at least with the AIX C compiler.
4715 : > sub/conftest.c
4716 for i in 1 2 3 4 5 6; do
4717 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4718 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4719 # Solaris 8's {/usr,}/bin/sh.
4720 touch sub/conftst$i.h
4721 done
4722 echo "include sub/conftest.Po" > confmf
4723
4724 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4725 # mode. It turns out that the SunPro C++ compiler does not properly
4726 # handle `-M -o', and we need to detect this.
4727 depcmd="depmode=$depmode \
4728 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4729 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4730 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4731 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4732 if env $depcmd > conftest.err 2>&1 &&
4733 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4734 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4735 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4736 # icc doesn't choke on unknown options, it will just issue warnings
4737 # or remarks (even with -Werror). So we grep stderr for any message
4738 # that says an option was ignored or not supported.
4739 # When given -MP, icc 7.0 and 7.1 complain thusly:
4740 # icc: Command line warning: ignoring option '-M'; no argument required
4741 # The diagnosis changed in icc 8.0:
4742 # icc: Command line remark: option '-MP' not supported
4743 if (grep 'ignoring option' conftest.err ||
4744 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4745 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4746 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4747 break
4748 fi
4749 fi
81ecdfbb 4750 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4751 sed -e 's/^/| /' < conftest.err >&5
4752 done
4753
4754 cd ..
4755 rm -rf conftest.dir
4756else
4757 am_cv_CC_dependencies_compiler_type=none
4758fi
4759
4760fi
81ecdfbb
RW
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4762$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4763if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4764then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4765else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4766
4767fi
4768
4769
4770# Check for the 'make' the user wants to use.
4771for ac_prog in make
4772do
4773 # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if test "${ac_cv_prog_MAKE+set}" = set; then :
4778 $as_echo_n "(cached) " >&6
a417dc56
RW
4779else
4780 if test -n "$MAKE"; then
4781 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4782else
4783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786 IFS=$as_save_IFS
4787 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4788 for ac_exec_ext in '' $ac_executable_extensions; do
4789 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4790 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4792 break 2
4793 fi
4794done
81ecdfbb
RW
4795 done
4796IFS=$as_save_IFS
a417dc56
RW
4797
4798fi
4799fi
4800MAKE=$ac_cv_prog_MAKE
4801if test -n "$MAKE"; then
81ecdfbb
RW
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4803$as_echo "$MAKE" >&6; }
a417dc56 4804else
81ecdfbb
RW
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
a417dc56
RW
4807fi
4808
81ecdfbb 4809
a417dc56
RW
4810 test -n "$MAKE" && break
4811done
4812
4813MAKE_IS_GNU=
4814case "`$MAKE --version 2>&1 | sed 1q`" in
4815 *GNU*)
4816 MAKE_IS_GNU=yes
4817 ;;
4818esac
81ecdfbb 4819 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4820 GMAKE_TRUE=
4821 GMAKE_FALSE='#'
4822else
4823 GMAKE_TRUE='#'
4824 GMAKE_FALSE=
4825fi
4826
81ecdfbb
RW
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4828$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4829set x ${MAKE-make}
4830ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4831if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4832 $as_echo_n "(cached) " >&6
a417dc56
RW
4833else
4834 cat >conftest.make <<\_ACEOF
81ecdfbb 4835SHELL = /bin/sh
a417dc56 4836all:
81ecdfbb 4837 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4838_ACEOF
4839# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4840case `${MAKE-make} -f conftest.make 2>/dev/null` in
4841 *@@@%%%=?*=@@@%%%*)
4842 eval ac_cv_prog_make_${ac_make}_set=yes;;
4843 *)
4844 eval ac_cv_prog_make_${ac_make}_set=no;;
4845esac
a417dc56
RW
4846rm -f conftest.make
4847fi
81ecdfbb
RW
4848if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4850$as_echo "yes" >&6; }
a417dc56
RW
4851 SET_MAKE=
4852else
81ecdfbb
RW
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854$as_echo "no" >&6; }
a417dc56
RW
4855 SET_MAKE="MAKE=${MAKE-make}"
4856fi
4857
4858
783e057b
DJ
4859
4860CONFIG_OBS=
4861CONFIG_DEPS=
4862CONFIG_SRCS=
4863ENABLE_CFLAGS=
4864
4865CONFIG_ALL=
4866CONFIG_CLEAN=
4867CONFIG_INSTALL=
4868CONFIG_UNINSTALL=
4869
4870# If we haven't got the data from the intl directory,
4871# assume NLS is disabled.
4872USE_NLS=no
4873LIBINTL=
4874LIBINTL_DEP=
4875INCINTL=
4876XGETTEXT=
4877GMSGFMT=
4878POSUB=
4879
4880if test -f ../intl/config.intl; then
4881 . ../intl/config.intl
4882fi
81ecdfbb
RW
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4884$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4885if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
783e057b 4888else
81ecdfbb
RW
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4890$as_echo "yes" >&6; }
783e057b 4891
81ecdfbb 4892$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4893
4894
81ecdfbb
RW
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4896$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4897 # Look for .po and .gmo files in the source directory.
4898 CATALOGS=
4899 XLINGUAS=
4900 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4901 # If there aren't any .gmo files the shell will give us the
4902 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4903 # weeded out.
4904 case "$cat" in *\**)
4905 continue;;
4906 esac
4907 # The quadruple backslash is collapsed to a double backslash
4908 # by the backticks, then collapsed again by the double quotes,
4909 # leaving us with one backslash in the sed expression (right
4910 # before the dot that mustn't act as a wildcard).
4911 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4912 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4913 # The user is allowed to set LINGUAS to a list of languages to
4914 # install catalogs for. If it's empty that means "all of them."
4915 if test "x$LINGUAS" = x; then
4916 CATALOGS="$CATALOGS $cat"
4917 XLINGUAS="$XLINGUAS $lang"
4918 else
4919 case "$LINGUAS" in *$lang*)
4920 CATALOGS="$CATALOGS $cat"
4921 XLINGUAS="$XLINGUAS $lang"
4922 ;;
4923 esac
4924 fi
4925 done
4926 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4928$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4929
4930
4931 DATADIRNAME=share
4932
4933 INSTOBJEXT=.mo
4934
4935 GENCAT=gencat
4936
4937 CATOBJEXT=.gmo
4938
4939fi
4940
4941localedir='${datadir}/locale'
4942
4943
4944if test x"$USE_NLS" = xyes; then
4945 CONFIG_ALL="$CONFIG_ALL all-po"
4946 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4947 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4948 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4949fi
4950
4951
f434ba03
PA
4952
4953
4954
4955 LIBC_FATAL_STDERR_=1
4956 export LIBC_FATAL_STDERR_
4957
4958
4959
4960
4961
4962 for ac_header in $gl_header_list
4963do :
4964 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4965ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4966eval as_val=\$$as_ac_Header
4967 if test "x$as_val" = x""yes; then :
4968 cat >>confdefs.h <<_ACEOF
4969#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4970_ACEOF
4971
4972fi
4973
4974done
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984 for ac_func in $gl_func_list
4985do :
4986 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4987ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4988eval as_val=\$$as_ac_var
4989 if test "x$as_val" = x""yes; then :
4990 cat >>confdefs.h <<_ACEOF
4991#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
4992_ACEOF
4993
4994fi
4995done
4996
4997
4998
4999
5000
5001
5002 GNULIB_MEMCHR=0;
5003 GNULIB_MEMMEM=0;
5004 GNULIB_MEMPCPY=0;
5005 GNULIB_MEMRCHR=0;
5006 GNULIB_RAWMEMCHR=0;
5007 GNULIB_STPCPY=0;
5008 GNULIB_STPNCPY=0;
5009 GNULIB_STRCHRNUL=0;
5010 GNULIB_STRDUP=0;
5011 GNULIB_STRNCAT=0;
5012 GNULIB_STRNDUP=0;
5013 GNULIB_STRNLEN=0;
5014 GNULIB_STRPBRK=0;
5015 GNULIB_STRSEP=0;
5016 GNULIB_STRSTR=0;
5017 GNULIB_STRCASESTR=0;
5018 GNULIB_STRTOK_R=0;
5019 GNULIB_MBSLEN=0;
5020 GNULIB_MBSNLEN=0;
5021 GNULIB_MBSCHR=0;
5022 GNULIB_MBSRCHR=0;
5023 GNULIB_MBSSTR=0;
5024 GNULIB_MBSCASECMP=0;
5025 GNULIB_MBSNCASECMP=0;
5026 GNULIB_MBSPCASECMP=0;
5027 GNULIB_MBSCASESTR=0;
5028 GNULIB_MBSCSPN=0;
5029 GNULIB_MBSPBRK=0;
5030 GNULIB_MBSSPN=0;
5031 GNULIB_MBSSEP=0;
5032 GNULIB_MBSTOK_R=0;
5033 GNULIB_STRERROR=0;
5034 GNULIB_STRSIGNAL=0;
5035 GNULIB_STRVERSCMP=0;
5036 HAVE_MBSLEN=0;
5037 HAVE_MEMCHR=1;
5038 HAVE_DECL_MEMMEM=1;
5039 HAVE_MEMPCPY=1;
5040 HAVE_DECL_MEMRCHR=1;
5041 HAVE_RAWMEMCHR=1;
5042 HAVE_STPCPY=1;
5043 HAVE_STPNCPY=1;
5044 HAVE_STRCHRNUL=1;
5045 HAVE_DECL_STRDUP=1;
5046 HAVE_DECL_STRNDUP=1;
5047 HAVE_DECL_STRNLEN=1;
5048 HAVE_STRPBRK=1;
5049 HAVE_STRSEP=1;
5050 HAVE_STRCASESTR=1;
5051 HAVE_DECL_STRTOK_R=1;
5052 HAVE_DECL_STRSIGNAL=1;
5053 HAVE_STRVERSCMP=1;
5054 REPLACE_MEMCHR=0;
783e057b 5055 REPLACE_MEMMEM=0;
f434ba03
PA
5056 REPLACE_STPNCPY=0;
5057 REPLACE_STRDUP=0;
783e057b 5058 REPLACE_STRSTR=0;
f434ba03
PA
5059 REPLACE_STRCASESTR=0;
5060 REPLACE_STRERROR=0;
5061 REPLACE_STRNCAT=0;
5062 REPLACE_STRNDUP=0;
5063 REPLACE_STRNLEN=0;
5064 REPLACE_STRSIGNAL=0;
5065 REPLACE_STRTOK_R=0;
5066 UNDEFINE_STRTOK_R=0;
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5081 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5082 # irrelevant for anonymous mappings.
5083 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5084if test "x$ac_cv_func_mmap" = x""yes; then :
5085 gl_have_mmap=yes
5086else
5087 gl_have_mmap=no
5088fi
5089
5090
5091 # Try to allow MAP_ANONYMOUS.
5092 gl_have_mmap_anonymous=no
5093 if test $gl_have_mmap = yes; then
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5095$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5097/* end confdefs.h. */
5098
5099#include <sys/mman.h>
5100#ifdef MAP_ANONYMOUS
5101 I cant identify this map.
5102#endif
5103
5104_ACEOF
5105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5106 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5107 gl_have_mmap_anonymous=yes
5108fi
5109rm -f conftest*
5110
5111 if test $gl_have_mmap_anonymous != yes; then
5112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5113/* end confdefs.h. */
5114
5115#include <sys/mman.h>
5116#ifdef MAP_ANON
5117 I cant identify this map.
5118#endif
5119
5120_ACEOF
5121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5122 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5123
5124$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5125
5126 gl_have_mmap_anonymous=yes
5127fi
5128rm -f conftest*
5129
5130 fi
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5132$as_echo "$gl_have_mmap_anonymous" >&6; }
5133 if test $gl_have_mmap_anonymous = yes; then
5134
5135$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5136
5137 fi
5138 fi
5139
5140
5141 :
5142
5143
5144
5145
5146
5147
5148 :
5149
5150
5151
5152
5153
5154
5155
5156
5157 :
5158
5159
5160
5161
5162
5163 if test $ac_cv_func_memchr = yes; then
5164 # Detect platform-specific bugs in some versions of glibc:
5165 # memchr should not dereference anything with length 0
5166 # http://bugzilla.redhat.com/499689
5167 # memchr should not dereference overestimated length after a match
5168 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5169 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5170 # Assume that memchr works on platforms that lack mprotect.
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5172$as_echo_n "checking whether memchr works... " >&6; }
5173if test "${gl_cv_func_memchr_works+set}" = set; then :
5174 $as_echo_n "(cached) " >&6
5175else
5176 if test "$cross_compiling" = yes; then :
5177 gl_cv_func_memchr_works="guessing no"
5178else
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180/* end confdefs.h. */
5181
5182#include <string.h>
5183#if HAVE_SYS_MMAN_H
5184# include <fcntl.h>
5185# include <unistd.h>
5186# include <sys/types.h>
5187# include <sys/mman.h>
5188# ifndef MAP_FILE
5189# define MAP_FILE 0
5190# endif
5191#endif
5192
5193int
5194main ()
5195{
5196
5197 char *fence = NULL;
5198#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5199# if HAVE_MAP_ANONYMOUS
5200 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5201 const int fd = -1;
5202# else /* !HAVE_MAP_ANONYMOUS */
5203 const int flags = MAP_FILE | MAP_PRIVATE;
5204 int fd = open ("/dev/zero", O_RDONLY, 0666);
5205 if (fd >= 0)
5206# endif
5207 {
5208 int pagesize = getpagesize ();
5209 char *two_pages =
5210 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5211 flags, fd, 0);
5212 if (two_pages != (char *)(-1)
5213 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5214 fence = two_pages + pagesize;
5215 }
5216#endif
5217 if (fence)
5218 {
5219 if (memchr (fence, 0, 0))
5220 return 1;
5221 strcpy (fence - 9, "12345678");
5222 if (memchr (fence - 9, 0, 79) != fence - 1)
5223 return 2;
5224 }
5225 return 0;
5226
5227 ;
5228 return 0;
5229}
5230_ACEOF
5231if ac_fn_c_try_run "$LINENO"; then :
5232 gl_cv_func_memchr_works=yes
5233else
5234 gl_cv_func_memchr_works=no
5235fi
5236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5237 conftest.$ac_objext conftest.beam conftest.$ac_ext
5238fi
5239
5240fi
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5242$as_echo "$gl_cv_func_memchr_works" >&6; }
5243 if test "$gl_cv_func_memchr_works" != yes; then
5244 REPLACE_MEMCHR=1
5245 fi
5246 else
5247 HAVE_MEMCHR=0
5248 fi
5249 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5250
5251
5252
5253
5254
5255
5256
5257
5258 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5259
5260
5261 for ac_header in bp-sym.h
5262do :
5263 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5264if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5265 cat >>confdefs.h <<_ACEOF
5266#define HAVE_BP_SYM_H 1
5267_ACEOF
5268
5269fi
5270
5271done
5272
5273
5274 fi
783e057b
DJ
5275
5276
81ecdfbb
RW
5277 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5278if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5279 ac_have_decl=1
783e057b 5280else
81ecdfbb 5281 ac_have_decl=0
783e057b 5282fi
783e057b
DJ
5283
5284cat >>confdefs.h <<_ACEOF
81ecdfbb 5285#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5286_ACEOF
5287
5288
783e057b
DJ
5289
5290
5291
5292
5293
5294
5295
5296
783e057b 5297
783e057b 5298
783e057b 5299
f434ba03 5300
81ecdfbb
RW
5301 for ac_func in memmem
5302do :
5303 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5304if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5305 cat >>confdefs.h <<_ACEOF
81ecdfbb 5306#define HAVE_MEMMEM 1
783e057b
DJ
5307_ACEOF
5308
5309else
5310
5311 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5312
5313fi
5314done
5315
5316
5317
5318 :
5319
5320
5321
5322
5323
5324 if test $ac_cv_have_decl_memmem = no; then
5325 HAVE_DECL_MEMMEM=0
5326 fi
5327 :
5328
5329
f434ba03
PA
5330 gl_cv_c_multiarch=no
5331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5332/* end confdefs.h. */
5333#ifndef __APPLE_CC__
5334 not a universal capable compiler
5335 #endif
5336 typedef int dummy;
5337
5338_ACEOF
5339if ac_fn_c_try_compile "$LINENO"; then :
5340
5341 arch=
5342 prev=
5343 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5344 if test -n "$prev"; then
5345 case $word in
5346 i?86 | x86_64 | ppc | ppc64)
5347 if test -z "$arch" || test "$arch" = "$word"; then
5348 arch="$word"
5349 else
5350 gl_cv_c_multiarch=yes
5351 fi
5352 ;;
5353 esac
5354 prev=
5355 else
5356 if test "x$word" = "x-arch"; then
5357 prev=arch
5358 fi
5359 fi
5360 done
5361
5362fi
5363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5364 if test $gl_cv_c_multiarch = yes; then
5365
5366$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5367
5368 APPLE_UNIVERSAL_BUILD=1
5369 else
5370 APPLE_UNIVERSAL_BUILD=0
5371 fi
5372
5373
5374
5375 REPLACE_NULL=0;
5376 HAVE_WCHAR_T=1;
5377 STDDEF_H='';
5378
5379
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5381$as_echo_n "checking for wchar_t... " >&6; }
5382if test "${gt_cv_c_wchar_t+set}" = set; then :
5383 $as_echo_n "(cached) " >&6
5384else
5385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5386/* end confdefs.h. */
5387#include <stddef.h>
5388 wchar_t foo = (wchar_t)'\0';
5389int
5390main ()
5391{
5392
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397if ac_fn_c_try_compile "$LINENO"; then :
5398 gt_cv_c_wchar_t=yes
5399else
5400 gt_cv_c_wchar_t=no
5401fi
5402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5403fi
5404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5405$as_echo "$gt_cv_c_wchar_t" >&6; }
5406 if test $gt_cv_c_wchar_t = yes; then
5407
5408$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5409
5410 fi
5411
5412
5413
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5415$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5416if test "${gl_cv_have_include_next+set}" = set; then :
5417 $as_echo_n "(cached) " >&6
5418else
5419 rm -rf conftestd1a conftestd1b conftestd2
5420 mkdir conftestd1a conftestd1b conftestd2
5421 cat <<EOF > conftestd1a/conftest.h
5422#define DEFINED_IN_CONFTESTD1
5423#include_next <conftest.h>
5424#ifdef DEFINED_IN_CONFTESTD2
5425int foo;
5426#else
5427#error "include_next doesn't work"
5428#endif
5429EOF
5430 cat <<EOF > conftestd1b/conftest.h
5431#define DEFINED_IN_CONFTESTD1
5432#include <stdio.h>
5433#include_next <conftest.h>
5434#ifdef DEFINED_IN_CONFTESTD2
5435int foo;
5436#else
5437#error "include_next doesn't work"
5438#endif
5439EOF
5440 cat <<EOF > conftestd2/conftest.h
5441#ifndef DEFINED_IN_CONFTESTD1
5442#error "include_next test doesn't work"
5443#endif
5444#define DEFINED_IN_CONFTESTD2
5445EOF
5446 gl_save_CPPFLAGS="$CPPFLAGS"
5447 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449/* end confdefs.h. */
5450#include <conftest.h>
5451_ACEOF
5452if ac_fn_c_try_compile "$LINENO"; then :
5453 gl_cv_have_include_next=yes
5454else
5455 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <conftest.h>
5459_ACEOF
5460if ac_fn_c_try_compile "$LINENO"; then :
5461 gl_cv_have_include_next=buggy
5462else
5463 gl_cv_have_include_next=no
5464fi
5465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5466
5467fi
5468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5469 CPPFLAGS="$gl_save_CPPFLAGS"
5470 rm -rf conftestd1a conftestd1b conftestd2
5471
5472fi
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5474$as_echo "$gl_cv_have_include_next" >&6; }
5475 PRAGMA_SYSTEM_HEADER=
5476 if test $gl_cv_have_include_next = yes; then
5477 INCLUDE_NEXT=include_next
5478 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5479 if test -n "$GCC"; then
5480 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5481 fi
5482 else
5483 if test $gl_cv_have_include_next = buggy; then
5484 INCLUDE_NEXT=include
5485 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5486 else
5487 INCLUDE_NEXT=include
5488 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5489 fi
5490 fi
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
81ecdfbb
RW
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5502$as_echo_n "checking for long long int... " >&6; }
5503if test "${ac_cv_type_long_long_int+set}" = set; then :
5504 $as_echo_n "(cached) " >&6
783e057b 5505else
81ecdfbb 5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5507/* end confdefs.h. */
81ecdfbb
RW
5508
5509 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5510 implementations with broken preprocessors. Perhaps this can
5511 be revisited in 2012. In the meantime, code should not expect
5512 #if to work with literals wider than 32 bits. */
783e057b
DJ
5513 /* Test literals. */
5514 long long int ll = 9223372036854775807ll;
5515 long long int nll = -9223372036854775807LL;
5516 unsigned long long int ull = 18446744073709551615ULL;
5517 /* Test constant expressions. */
5518 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5519 ? 1 : -1)];
783e057b 5520 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5521 ? 1 : -1)];
783e057b
DJ
5522 int i = 63;
5523int
5524main ()
5525{
5526/* Test availability of runtime routines for shift and division. */
5527 long long int llmax = 9223372036854775807ll;
5528 unsigned long long int ullmax = 18446744073709551615ull;
5529 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5530 | (llmax / ll) | (llmax % ll)
5531 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5532 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5533 ;
5534 return 0;
5535}
5536
5537_ACEOF
81ecdfbb 5538if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5539 if test "$cross_compiling" = yes; then :
783e057b
DJ
5540 ac_cv_type_long_long_int=yes
5541else
81ecdfbb 5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5543/* end confdefs.h. */
5544#include <limits.h>
f434ba03
PA
5545 #ifndef LLONG_MAX
5546 # define HALF \
5547 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5548 # define LLONG_MAX (HALF - 1 + HALF)
5549 #endif
783e057b
DJ
5550int
5551main ()
5552{
5553long long int n = 1;
f434ba03
PA
5554 int i;
5555 for (i = 0; ; i++)
5556 {
5557 long long int m = n << i;
5558 if (m >> i != n)
5559 return 1;
5560 if (LLONG_MAX / 2 < m)
5561 break;
5562 }
5563 return 0;
783e057b
DJ
5564 ;
5565 return 0;
5566}
5567_ACEOF
81ecdfbb 5568if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5569 ac_cv_type_long_long_int=yes
5570else
81ecdfbb 5571 ac_cv_type_long_long_int=no
783e057b 5572fi
81ecdfbb
RW
5573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5574 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5575fi
783e057b 5576
81ecdfbb
RW
5577else
5578 ac_cv_type_long_long_int=no
783e057b 5579fi
81ecdfbb
RW
5580rm -f core conftest.err conftest.$ac_objext \
5581 conftest$ac_exeext conftest.$ac_ext
783e057b 5582fi
81ecdfbb
RW
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5584$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5585 if test $ac_cv_type_long_long_int = yes; then
5586
81ecdfbb 5587$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5588
5589 fi
5590
5591
81ecdfbb
RW
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5593$as_echo_n "checking for unsigned long long int... " >&6; }
5594if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5595 $as_echo_n "(cached) " >&6
783e057b 5596else
81ecdfbb 5597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5598/* end confdefs.h. */
81ecdfbb
RW
5599
5600 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5601 implementations with broken preprocessors. Perhaps this can
5602 be revisited in 2012. In the meantime, code should not expect
5603 #if to work with literals wider than 32 bits. */
783e057b
DJ
5604 /* Test literals. */
5605 long long int ll = 9223372036854775807ll;
5606 long long int nll = -9223372036854775807LL;
5607 unsigned long long int ull = 18446744073709551615ULL;
5608 /* Test constant expressions. */
5609 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5610 ? 1 : -1)];
783e057b 5611 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5612 ? 1 : -1)];
783e057b
DJ
5613 int i = 63;
5614int
5615main ()
5616{
5617/* Test availability of runtime routines for shift and division. */
5618 long long int llmax = 9223372036854775807ll;
5619 unsigned long long int ullmax = 18446744073709551615ull;
5620 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5621 | (llmax / ll) | (llmax % ll)
5622 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5623 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5624 ;
5625 return 0;
5626}
5627
5628_ACEOF
81ecdfbb 5629if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5630 ac_cv_type_unsigned_long_long_int=yes
5631else
81ecdfbb 5632 ac_cv_type_unsigned_long_long_int=no
783e057b 5633fi
81ecdfbb
RW
5634rm -f core conftest.err conftest.$ac_objext \
5635 conftest$ac_exeext conftest.$ac_ext
783e057b 5636fi
81ecdfbb
RW
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5638$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5639 if test $ac_cv_type_unsigned_long_long_int = yes; then
5640
81ecdfbb 5641$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5642
5643 fi
5644
5645
5646
783e057b
DJ
5647
5648
5649
5650
5651
5652
5653
5654
81ecdfbb
RW
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5656$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5657if test "${ac_cv_c_restrict+set}" = set; then :
5658 $as_echo_n "(cached) " >&6
783e057b
DJ
5659else
5660 ac_cv_c_restrict=no
5661 # The order here caters to the fact that C++ does not require restrict.
5662 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5664/* end confdefs.h. */
5665typedef int * int_ptr;
5666 int foo (int_ptr $ac_kw ip) {
5667 return ip[0];
5668 }
5669int
5670main ()
5671{
5672int s[1];
5673 int * $ac_kw t = s;
5674 t[0] = 0;
5675 return foo(t)
5676 ;
5677 return 0;
5678}
5679_ACEOF
81ecdfbb 5680if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5681 ac_cv_c_restrict=$ac_kw
783e057b 5682fi
81ecdfbb 5683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5684 test "$ac_cv_c_restrict" != no && break
5685 done
5686
5687fi
81ecdfbb
RW
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5689$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5690
5691 case $ac_cv_c_restrict in
5692 restrict) ;;
81ecdfbb 5693 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5694 ;;
5695 *) cat >>confdefs.h <<_ACEOF
5696#define restrict $ac_cv_c_restrict
5697_ACEOF
5698 ;;
5699 esac
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
f434ba03 5712
783e057b
DJ
5713 :
5714
5715
5716
5717
5718
5719
5720
f434ba03
PA
5721 if test $gl_cv_have_include_next = yes; then
5722 gl_cv_next_string_h='<'string.h'>'
5723 else
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5725$as_echo_n "checking absolute name of <string.h>... " >&6; }
5726if test "${gl_cv_next_string_h+set}" = set; then :
5727 $as_echo_n "(cached) " >&6
5728else
5729
5730 if test $ac_cv_header_string_h = yes; then
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732/* end confdefs.h. */
5733#include <string.h>
5734
5735_ACEOF
5736 case "$host_os" in
5737 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5738 *) gl_absname_cpp="$ac_cpp" ;;
5739 esac
5740 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5741 sed -n '\#/string.h#{
5742 s#.*"\(.*/string.h\)".*#\1#
5743 s#^/[^/]#//&#
5744 p
5745 q
5746 }'`'"'
5747 else
5748 gl_cv_next_string_h='<'string.h'>'
5749 fi
5750
5751fi
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5753$as_echo "$gl_cv_next_string_h" >&6; }
5754 fi
5755 NEXT_STRING_H=$gl_cv_next_string_h
5756
5757 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5758 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5759 gl_next_as_first_directive='<'string.h'>'
5760 else
5761 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5762 gl_next_as_first_directive=$gl_cv_next_string_h
5763 fi
5764 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5765
5766
5767
5768
5769
5770 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5771 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5773$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5774if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5775 $as_echo_n "(cached) " >&6
5776else
5777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5778/* end confdefs.h. */
5779#include <string.h>
5780
5781int
5782main ()
5783{
5784#undef $gl_func
5785 (void) $gl_func;
5786 ;
5787 return 0;
5788}
5789_ACEOF
5790if ac_fn_c_try_compile "$LINENO"; then :
5791 eval "$as_gl_Symbol=yes"
5792else
5793 eval "$as_gl_Symbol=no"
5794fi
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796fi
5797eval ac_res=\$$as_gl_Symbol
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5799$as_echo "$ac_res" >&6; }
5800 eval as_val=\$$as_gl_Symbol
5801 if test "x$as_val" = x""yes; then :
5802 cat >>confdefs.h <<_ACEOF
5803#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5804_ACEOF
5805
5806 eval ac_cv_have_decl_$gl_func=yes
5807fi
5808 done
5809
5810
5811
5812 GNULIB_BTOWC=0;
5813 GNULIB_WCTOB=0;
5814 GNULIB_MBSINIT=0;
5815 GNULIB_MBRTOWC=0;
5816 GNULIB_MBRLEN=0;
5817 GNULIB_MBSRTOWCS=0;
5818 GNULIB_MBSNRTOWCS=0;
5819 GNULIB_WCRTOMB=0;
5820 GNULIB_WCSRTOMBS=0;
5821 GNULIB_WCSNRTOMBS=0;
5822 GNULIB_WCWIDTH=0;
5823 HAVE_BTOWC=1;
5824 HAVE_MBSINIT=1;
5825 HAVE_MBRTOWC=1;
5826 HAVE_MBRLEN=1;
5827 HAVE_MBSRTOWCS=1;
5828 HAVE_MBSNRTOWCS=1;
5829 HAVE_WCRTOMB=1;
5830 HAVE_WCSRTOMBS=1;
5831 HAVE_WCSNRTOMBS=1;
5832 HAVE_DECL_WCTOB=1;
5833 HAVE_DECL_WCWIDTH=1;
5834 REPLACE_MBSTATE_T=0;
5835 REPLACE_BTOWC=0;
5836 REPLACE_WCTOB=0;
5837 REPLACE_MBSINIT=0;
5838 REPLACE_MBRTOWC=0;
5839 REPLACE_MBRLEN=0;
5840 REPLACE_MBSRTOWCS=0;
5841 REPLACE_MBSNRTOWCS=0;
5842 REPLACE_WCRTOMB=0;
5843 REPLACE_WCSRTOMBS=0;
5844 REPLACE_WCSNRTOMBS=0;
5845 REPLACE_WCWIDTH=0;
5846
5847
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5849$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5850if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5851 $as_echo_n "(cached) " >&6
783e057b 5852else
f434ba03
PA
5853 gl_cv_header_wchar_h_correct_inline=yes
5854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855/* end confdefs.h. */
783e057b 5856
f434ba03
PA
5857 #define wcstod renamed_wcstod
5858#include <wchar.h>
5859extern int zero (void);
5860int main () { return zero(); }
5861
5862_ACEOF
5863 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5864 (eval $ac_compile) 2>&5
5865 ac_status=$?
5866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5867 test $ac_status = 0; }; then
5868 mv conftest.$ac_objext conftest1.$ac_objext
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5870/* end confdefs.h. */
f434ba03
PA
5871
5872 #define wcstod renamed_wcstod
5873#include <wchar.h>
5874int zero (void) { return 0; }
783e057b
DJ
5875
5876_ACEOF
f434ba03
PA
5877 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5878 (eval $ac_compile) 2>&5
5879 ac_status=$?
5880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5881 test $ac_status = 0; }; then
5882 mv conftest.$ac_objext conftest2.$ac_objext
5883 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5884 :
5885 else
5886 gl_cv_header_wchar_h_correct_inline=no
5887 fi
5888 fi
5889 fi
5890 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5891
5892fi
f434ba03
PA
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5894$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5895 if test $gl_cv_header_wchar_h_correct_inline = no; then
5896 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5897This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5898C99 mode. You have four options:
5899 - Add the flag -fgnu89-inline to CC and reconfigure, or
5900 - Fix your include files, using parts of
5901 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5902 - Use a gcc version older than 4.3, or
5903 - Don't use the flags -std=c99 or -std=gnu99.
5904Configuration aborted." "$LINENO" 5
5905 fi
783e057b
DJ
5906
5907
f434ba03
PA
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5909$as_echo_n "checking for wint_t... " >&6; }
5910if test "${gt_cv_c_wint_t+set}" = set; then :
5911 $as_echo_n "(cached) " >&6
5912else
5913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5914/* end confdefs.h. */
783e057b 5915
f434ba03
PA
5916/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5917 <wchar.h>.
5918 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5919 before <wchar.h>. */
5920#include <stddef.h>
5921#include <stdio.h>
5922#include <time.h>
5923#include <wchar.h>
5924 wint_t foo = (wchar_t)'\0';
5925int
5926main ()
5927{
783e057b 5928
f434ba03
PA
5929 ;
5930 return 0;
5931}
5932_ACEOF
5933if ac_fn_c_try_compile "$LINENO"; then :
5934 gt_cv_c_wint_t=yes
5935else
5936 gt_cv_c_wint_t=no
5937fi
5938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5939fi
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5941$as_echo "$gt_cv_c_wint_t" >&6; }
5942 if test $gt_cv_c_wint_t = yes; then
783e057b 5943
f434ba03 5944$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5945
f434ba03 5946 fi
783e057b
DJ
5947
5948
81ecdfbb 5949 if false; then
783e057b
DJ
5950 GL_COND_LIBTOOL_TRUE=
5951 GL_COND_LIBTOOL_FALSE='#'
5952else
5953 GL_COND_LIBTOOL_TRUE='#'
5954 GL_COND_LIBTOOL_FALSE=
5955fi
5956
5957 gl_cond_libtool=false
5958 gl_libdeps=
5959 gl_ltlibdeps=
f434ba03 5960 gl_m4_base='gnulib/m4'
783e057b
DJ
5961
5962
5963
783e057b
DJ
5964
5965
5966
5967
5968
5969
f434ba03
PA
5970 gl_source_base='gnulib'
5971 # Code from module arg-nonnull:
5972 # Code from module c++defs:
5973 # Code from module extensions:
5974 # Code from module include_next:
5975 # Code from module memchr:
783e057b 5976
783e057b 5977
783e057b 5978
783e057b 5979
f434ba03 5980 GNULIB_MEMCHR=1
783e057b 5981
783e057b 5982
783e057b 5983
f434ba03 5984$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 5985
783e057b
DJ
5986
5987
f434ba03 5988 # Code from module memmem:
783e057b
DJ
5989
5990
f434ba03
PA
5991 if test $ac_cv_have_decl_memmem = yes; then
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
5993$as_echo_n "checking whether memmem works in linear time... " >&6; }
5994if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 5995 $as_echo_n "(cached) " >&6
783e057b 5996else
81ecdfbb 5997 if test "$cross_compiling" = yes; then :
f434ba03 5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5999/* end confdefs.h. */
783e057b 6000
f434ba03
PA
6001#include <features.h>
6002#ifdef __GNU_LIBRARY__
6003 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6004 Lucky user
6005 #endif
6006#endif
6007#ifdef __CYGWIN__
6008 #include <cygwin/version.h>
6009 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6010 Lucky user
6011 #endif
6012#endif
783e057b 6013
783e057b 6014_ACEOF
f434ba03
PA
6015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6016 $EGREP "Lucky user" >/dev/null 2>&1; then :
6017 gl_cv_func_memmem_works=yes
783e057b 6018else
f434ba03 6019 gl_cv_func_memmem_works="guessing no"
783e057b 6020fi
f434ba03 6021rm -f conftest*
783e057b
DJ
6022
6023
783e057b 6024else
81ecdfbb 6025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6026/* end confdefs.h. */
6027
f434ba03 6028#include <signal.h> /* for signal */
783e057b
DJ
6029#include <string.h> /* for memmem */
6030#include <stdlib.h> /* for malloc */
6031#include <unistd.h> /* for alarm */
6032
6033int
6034main ()
6035{
6036size_t m = 1000000;
6037 char *haystack = (char *) malloc (2 * m + 1);
6038 char *needle = (char *) malloc (m + 1);
6039 void *result = 0;
6040 /* Failure to compile this test due to missing alarm is okay,
6041 since all such platforms (mingw) also lack memmem. */
f434ba03 6042 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6043 alarm (5);
6044 /* Check for quadratic performance. */
6045 if (haystack && needle)
6046 {
f434ba03
PA
6047 memset (haystack, 'A', 2 * m);
6048 haystack[2 * m] = 'B';
6049 memset (needle, 'A', m);
6050 needle[m] = 'B';
6051 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6052 }
6053 /* Check for empty needle behavior. */
6054 return !result || !memmem ("a", 1, 0, 0);
6055 ;
6056 return 0;
6057}
6058_ACEOF
81ecdfbb 6059if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6060 gl_cv_func_memmem_works=yes
6061else
81ecdfbb 6062 gl_cv_func_memmem_works=no
783e057b 6063fi
81ecdfbb
RW
6064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6065 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6066fi
81ecdfbb 6067
f434ba03 6068
783e057b 6069fi
81ecdfbb
RW
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6071$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6072 if test "$gl_cv_func_memmem_works" != yes; then
6073 REPLACE_MEMMEM=1
6074
6075
6076
6077
6078
6079
6080
f434ba03 6081
783e057b
DJ
6082 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6083
6084 fi
6085 fi
6086
f434ba03
PA
6087 # Code from module memmem-simple:
6088
783e057b
DJ
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
81ecdfbb
RW
6100 for ac_func in memmem
6101do :
6102 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6103if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6104 cat >>confdefs.h <<_ACEOF
81ecdfbb 6105#define HAVE_MEMMEM 1
783e057b
DJ
6106_ACEOF
6107
6108else
6109
6110 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6111
6112fi
6113done
6114
6115
6116
6117 :
6118
6119
6120
6121
6122
6123 if test $ac_cv_have_decl_memmem = no; then
6124 HAVE_DECL_MEMMEM=0
6125 fi
6126 :
6127
6128
6129
f434ba03 6130
783e057b
DJ
6131 GNULIB_MEMMEM=1
6132
6133
6134
f434ba03
PA
6135$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6136
6137
6138
6139 # Code from module multiarch:
6140
6141 # Code from module stddef:
6142
6143
6144
6145 if test $gt_cv_c_wchar_t = no; then
6146 HAVE_WCHAR_T=0
6147 STDDEF_H=stddef.h
6148 fi
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6150$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6151if test "${gl_cv_decl_null_works+set}" = set; then :
6152 $as_echo_n "(cached) " >&6
6153else
6154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6155/* end confdefs.h. */
6156#include <stddef.h>
6157 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6158
6159int
6160main ()
6161{
6162
6163 ;
6164 return 0;
6165}
6166_ACEOF
6167if ac_fn_c_try_compile "$LINENO"; then :
6168 gl_cv_decl_null_works=yes
6169else
6170 gl_cv_decl_null_works=no
6171fi
6172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6173fi
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6175$as_echo "$gl_cv_decl_null_works" >&6; }
6176 if test $gl_cv_decl_null_works = no; then
6177 REPLACE_NULL=1
6178 STDDEF_H=stddef.h
6179 fi
6180 if test -n "$STDDEF_H"; then
6181
6182
6183
6184
6185 :
6186
6187
6188
6189
6190
6191
6192
6193 if test $gl_cv_have_include_next = yes; then
6194 gl_cv_next_stddef_h='<'stddef.h'>'
6195 else
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6197$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6198if test "${gl_cv_next_stddef_h+set}" = set; then :
6199 $as_echo_n "(cached) " >&6
6200else
6201
6202 if test $ac_cv_header_stddef_h = yes; then
6203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6204/* end confdefs.h. */
6205#include <stddef.h>
6206
6207_ACEOF
6208 case "$host_os" in
6209 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6210 *) gl_absname_cpp="$ac_cpp" ;;
6211 esac
6212 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6213 sed -n '\#/stddef.h#{
6214 s#.*"\(.*/stddef.h\)".*#\1#
6215 s#^/[^/]#//&#
6216 p
6217 q
6218 }'`'"'
6219 else
6220 gl_cv_next_stddef_h='<'stddef.h'>'
6221 fi
6222
6223fi
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6225$as_echo "$gl_cv_next_stddef_h" >&6; }
6226 fi
6227 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6228
6229 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6230 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6231 gl_next_as_first_directive='<'stddef.h'>'
6232 else
6233 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6234 gl_next_as_first_directive=$gl_cv_next_stddef_h
6235 fi
6236 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6237
6238
6239
6240 fi
6241
6242 # Code from module stdint:
6243
6244
783e057b
DJ
6245
6246 if test $ac_cv_type_long_long_int = yes; then
6247 HAVE_LONG_LONG_INT=1
6248 else
6249 HAVE_LONG_LONG_INT=0
6250 fi
6251
6252
6253 if test $ac_cv_type_unsigned_long_long_int = yes; then
6254 HAVE_UNSIGNED_LONG_LONG_INT=1
6255 else
6256 HAVE_UNSIGNED_LONG_LONG_INT=0
6257 fi
6258
6259
6260 if test $ac_cv_header_inttypes_h = yes; then
6261 HAVE_INTTYPES_H=1
6262 else
6263 HAVE_INTTYPES_H=0
6264 fi
6265
6266
6267 if test $ac_cv_header_sys_types_h = yes; then
6268 HAVE_SYS_TYPES_H=1
6269 else
6270 HAVE_SYS_TYPES_H=0
6271 fi
6272
6273
6274
6275
6276
f434ba03 6277
783e057b
DJ
6278 :
6279
6280
6281
6282
6283
6284
6285
6286 if test $gl_cv_have_include_next = yes; then
6287 gl_cv_next_stdint_h='<'stdint.h'>'
6288 else
81ecdfbb
RW
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6290$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6291if test "${gl_cv_next_stdint_h+set}" = set; then :
6292 $as_echo_n "(cached) " >&6
783e057b
DJ
6293else
6294
f434ba03
PA
6295 if test $ac_cv_header_stdint_h = yes; then
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6297/* end confdefs.h. */
6298#include <stdint.h>
6299
6300_ACEOF
f434ba03
PA
6301 case "$host_os" in
6302 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6303 *) gl_absname_cpp="$ac_cpp" ;;
6304 esac
6305 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6306 sed -n '\#/stdint.h#{
6307 s#.*"\(.*/stdint.h\)".*#\1#
6308 s#^/[^/]#//&#
6309 p
6310 q
6311 }'`'"'
6312 else
6313 gl_cv_next_stdint_h='<'stdint.h'>'
6314 fi
783e057b
DJ
6315
6316fi
81ecdfbb
RW
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6318$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6319 fi
6320 NEXT_STDINT_H=$gl_cv_next_stdint_h
6321
f434ba03
PA
6322 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6323 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6324 gl_next_as_first_directive='<'stdint.h'>'
6325 else
6326 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6327 gl_next_as_first_directive=$gl_cv_next_stdint_h
6328 fi
6329 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6330
783e057b
DJ
6331
6332
6333 if test $ac_cv_header_stdint_h = yes; then
6334 HAVE_STDINT_H=1
6335 else
6336 HAVE_STDINT_H=0
6337 fi
6338
6339
6340 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6342$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6343if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6344 $as_echo_n "(cached) " >&6
783e057b
DJ
6345else
6346 gl_cv_header_working_stdint_h=no
81ecdfbb 6347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6348/* end confdefs.h. */
6349
81ecdfbb 6350
783e057b
DJ
6351#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6352#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6353#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6354#include <stdint.h>
6355/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6356#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6357#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6358#endif
6359
6360
6361 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6362 included before <wchar.h>. */
6363 #include <stddef.h>
6364 #include <signal.h>
6365 #if HAVE_WCHAR_H
6366 # include <stdio.h>
6367 # include <time.h>
6368 # include <wchar.h>
6369 #endif
6370
6371
6372#ifdef INT8_MAX
6373int8_t a1 = INT8_MAX;
6374int8_t a1min = INT8_MIN;
6375#endif
6376#ifdef INT16_MAX
6377int16_t a2 = INT16_MAX;
6378int16_t a2min = INT16_MIN;
6379#endif
6380#ifdef INT32_MAX
6381int32_t a3 = INT32_MAX;
6382int32_t a3min = INT32_MIN;
6383#endif
6384#ifdef INT64_MAX
6385int64_t a4 = INT64_MAX;
6386int64_t a4min = INT64_MIN;
6387#endif
6388#ifdef UINT8_MAX
6389uint8_t b1 = UINT8_MAX;
6390#else
6391typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6392#endif
6393#ifdef UINT16_MAX
6394uint16_t b2 = UINT16_MAX;
6395#endif
6396#ifdef UINT32_MAX
6397uint32_t b3 = UINT32_MAX;
6398#endif
6399#ifdef UINT64_MAX
6400uint64_t b4 = UINT64_MAX;
6401#endif
6402int_least8_t c1 = INT8_C (0x7f);
6403int_least8_t c1max = INT_LEAST8_MAX;
6404int_least8_t c1min = INT_LEAST8_MIN;
6405int_least16_t c2 = INT16_C (0x7fff);
6406int_least16_t c2max = INT_LEAST16_MAX;
6407int_least16_t c2min = INT_LEAST16_MIN;
6408int_least32_t c3 = INT32_C (0x7fffffff);
6409int_least32_t c3max = INT_LEAST32_MAX;
6410int_least32_t c3min = INT_LEAST32_MIN;
6411int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6412int_least64_t c4max = INT_LEAST64_MAX;
6413int_least64_t c4min = INT_LEAST64_MIN;
6414uint_least8_t d1 = UINT8_C (0xff);
6415uint_least8_t d1max = UINT_LEAST8_MAX;
6416uint_least16_t d2 = UINT16_C (0xffff);
6417uint_least16_t d2max = UINT_LEAST16_MAX;
6418uint_least32_t d3 = UINT32_C (0xffffffff);
6419uint_least32_t d3max = UINT_LEAST32_MAX;
6420uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6421uint_least64_t d4max = UINT_LEAST64_MAX;
6422int_fast8_t e1 = INT_FAST8_MAX;
6423int_fast8_t e1min = INT_FAST8_MIN;
6424int_fast16_t e2 = INT_FAST16_MAX;
6425int_fast16_t e2min = INT_FAST16_MIN;
6426int_fast32_t e3 = INT_FAST32_MAX;
6427int_fast32_t e3min = INT_FAST32_MIN;
6428int_fast64_t e4 = INT_FAST64_MAX;
6429int_fast64_t e4min = INT_FAST64_MIN;
6430uint_fast8_t f1 = UINT_FAST8_MAX;
6431uint_fast16_t f2 = UINT_FAST16_MAX;
6432uint_fast32_t f3 = UINT_FAST32_MAX;
6433uint_fast64_t f4 = UINT_FAST64_MAX;
6434#ifdef INTPTR_MAX
6435intptr_t g = INTPTR_MAX;
6436intptr_t gmin = INTPTR_MIN;
6437#endif
6438#ifdef UINTPTR_MAX
6439uintptr_t h = UINTPTR_MAX;
6440#endif
6441intmax_t i = INTMAX_MAX;
6442uintmax_t j = UINTMAX_MAX;
6443
6444#include <limits.h> /* for CHAR_BIT */
6445#define TYPE_MINIMUM(t) \
6446 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6447#define TYPE_MAXIMUM(t) \
6448 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6449struct s {
6450 int check_PTRDIFF:
6451 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6452 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6453 ? 1 : -1;
6454 /* Detect bug in FreeBSD 6.0 / ia64. */
6455 int check_SIG_ATOMIC:
6456 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6457 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6458 ? 1 : -1;
6459 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6460 int check_WCHAR:
6461 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6462 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6463 ? 1 : -1;
6464 /* Detect bug in mingw. */
6465 int check_WINT:
6466 WINT_MIN == TYPE_MINIMUM (wint_t)
6467 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6468 ? 1 : -1;
6469
f434ba03
PA
6470 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6471 int check_UINT8_C:
6472 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6473 int check_UINT16_C:
6474 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6475
6476 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6477#ifdef UINT8_MAX
6478 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6479#endif
6480#ifdef UINT16_MAX
6481 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6482#endif
6483#ifdef UINT32_MAX
6484 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6485#endif
6486#ifdef UINT64_MAX
6487 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6488#endif
6489 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6490 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6491 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6492 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6493 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6494 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6495 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6496 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6497 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6498 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6499 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6500};
6501
6502int
6503main ()
6504{
6505
6506 ;
6507 return 0;
6508}
6509_ACEOF
6510if ac_fn_c_try_compile "$LINENO"; then :
6511 if test "$cross_compiling" = yes; then :
6512 gl_cv_header_working_stdint_h=yes
6513
6514else
6515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6516/* end confdefs.h. */
6517
6518
6519#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6520#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6521#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6522#include <stdint.h>
6523
783e057b 6524
f434ba03
PA
6525 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6526 included before <wchar.h>. */
6527 #include <stddef.h>
6528 #include <signal.h>
6529 #if HAVE_WCHAR_H
6530 # include <stdio.h>
6531 # include <time.h>
6532 # include <wchar.h>
6533 #endif
6534
6535
6536#include <stdio.h>
6537#include <string.h>
6538#define MVAL(macro) MVAL1(macro)
6539#define MVAL1(expression) #expression
6540static const char *macro_values[] =
6541 {
6542#ifdef INT8_MAX
6543 MVAL (INT8_MAX),
6544#endif
6545#ifdef INT16_MAX
6546 MVAL (INT16_MAX),
6547#endif
6548#ifdef INT32_MAX
6549 MVAL (INT32_MAX),
6550#endif
6551#ifdef INT64_MAX
6552 MVAL (INT64_MAX),
6553#endif
783e057b 6554#ifdef UINT8_MAX
f434ba03 6555 MVAL (UINT8_MAX),
783e057b
DJ
6556#endif
6557#ifdef UINT16_MAX
f434ba03 6558 MVAL (UINT16_MAX),
783e057b
DJ
6559#endif
6560#ifdef UINT32_MAX
f434ba03 6561 MVAL (UINT32_MAX),
783e057b
DJ
6562#endif
6563#ifdef UINT64_MAX
f434ba03 6564 MVAL (UINT64_MAX),
783e057b 6565#endif
f434ba03
PA
6566 NULL
6567 };
783e057b
DJ
6568
6569int
6570main ()
6571{
6572
f434ba03
PA
6573 const char **mv;
6574 for (mv = macro_values; *mv != NULL; mv++)
6575 {
6576 const char *value = *mv;
6577 /* Test whether it looks like a cast expression. */
6578 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6579 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6580 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6581 || strncmp (value, "((int)"/*)*/, 6) == 0
6582 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6583 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6584 return 1;
6585 }
6586 return 0;
6587
783e057b
DJ
6588 ;
6589 return 0;
6590}
6591_ACEOF
f434ba03 6592if ac_fn_c_try_run "$LINENO"; then :
783e057b 6593 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6594fi
6595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6596 conftest.$ac_objext conftest.beam conftest.$ac_ext
6597fi
6598
6599
783e057b 6600fi
81ecdfbb 6601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6602
783e057b 6603fi
81ecdfbb
RW
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6605$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6606 fi
6607 if test "$gl_cv_header_working_stdint_h" = yes; then
6608 STDINT_H=
6609 else
81ecdfbb
RW
6610 for ac_header in sys/inttypes.h sys/bitypes.h
6611do :
6612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6613ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6614eval as_val=\$$as_ac_Header
6615 if test "x$as_val" = x""yes; then :
783e057b 6616 cat >>confdefs.h <<_ACEOF
81ecdfbb 6617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6618_ACEOF
6619
6620fi
6621
6622done
6623
6624 if test $ac_cv_header_sys_inttypes_h = yes; then
6625 HAVE_SYS_INTTYPES_H=1
6626 else
6627 HAVE_SYS_INTTYPES_H=0
6628 fi
6629
6630 if test $ac_cv_header_sys_bitypes_h = yes; then
6631 HAVE_SYS_BITYPES_H=1
6632 else
6633 HAVE_SYS_BITYPES_H=0
6634 fi
6635
6636
6637
6638 :
6639
6640
6641
6642
6643
6644
6645
6646
f434ba03
PA
6647 if test $APPLE_UNIVERSAL_BUILD = 0; then
6648
6649
6650 for gltype in ptrdiff_t size_t ; do
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6652$as_echo_n "checking for bit size of $gltype... " >&6; }
6653if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6654 $as_echo_n "(cached) " >&6
6655else
6656 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6657 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6658 included before <wchar.h>. */
6659 #include <stddef.h>
6660 #include <signal.h>
6661 #if HAVE_WCHAR_H
6662 # include <stdio.h>
6663 # include <time.h>
6664 # include <wchar.h>
6665 #endif
6666
6667#include <limits.h>"; then :
6668
6669else
6670 result=unknown
6671fi
6672
6673 eval gl_cv_bitsizeof_${gltype}=\$result
6674
6675fi
6676eval ac_res=\$gl_cv_bitsizeof_${gltype}
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6678$as_echo "$ac_res" >&6; }
6679 eval result=\$gl_cv_bitsizeof_${gltype}
6680 if test $result = unknown; then
6681 result=0
6682 fi
6683 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6684 cat >>confdefs.h <<_ACEOF
6685#define BITSIZEOF_${GLTYPE} $result
6686_ACEOF
6687
6688 eval BITSIZEOF_${GLTYPE}=\$result
6689 done
6690
6691
6692 fi
6693
783e057b 6694
f434ba03 6695 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6697$as_echo_n "checking for bit size of $gltype... " >&6; }
6698if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6699 $as_echo_n "(cached) " >&6
6700else
6701 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6702 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6703 included before <wchar.h>. */
6704 #include <stddef.h>
6705 #include <signal.h>
6706 #if HAVE_WCHAR_H
6707 # include <stdio.h>
6708 # include <time.h>
6709 # include <wchar.h>
6710 #endif
6711
6712#include <limits.h>"; then :
6713
6714else
6715 result=unknown
6716fi
6717
6718 eval gl_cv_bitsizeof_${gltype}=\$result
6719
6720fi
6721eval ac_res=\$gl_cv_bitsizeof_${gltype}
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6723$as_echo "$ac_res" >&6; }
6724 eval result=\$gl_cv_bitsizeof_${gltype}
6725 if test $result = unknown; then
6726 result=0
6727 fi
6728 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6729 cat >>confdefs.h <<_ACEOF
6730#define BITSIZEOF_${GLTYPE} $result
6731_ACEOF
783e057b 6732
81ecdfbb
RW
6733 eval BITSIZEOF_${GLTYPE}=\$result
6734 done
783e057b
DJ
6735
6736
6737
6738
81ecdfbb
RW
6739 for gltype in sig_atomic_t wchar_t wint_t ; do
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6741$as_echo_n "checking whether $gltype is signed... " >&6; }
6742if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6743 $as_echo_n "(cached) " >&6
783e057b 6744else
81ecdfbb 6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6746/* end confdefs.h. */
6747
6748 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6749 included before <wchar.h>. */
6750 #include <stddef.h>
6751 #include <signal.h>
6752 #if HAVE_WCHAR_H
6753 # include <stdio.h>
6754 # include <time.h>
6755 # include <wchar.h>
6756 #endif
6757
6758 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6759int
6760main ()
6761{
6762
6763 ;
6764 return 0;
6765}
6766_ACEOF
81ecdfbb 6767if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6768 result=yes
6769else
81ecdfbb 6770 result=no
20e95c23 6771fi
81ecdfbb 6772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6773 eval gl_cv_type_${gltype}_signed=\$result
6774
6775fi
81ecdfbb
RW
6776eval ac_res=\$gl_cv_type_${gltype}_signed
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6778$as_echo "$ac_res" >&6; }
783e057b
DJ
6779 eval result=\$gl_cv_type_${gltype}_signed
6780 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6781 if test "$result" = yes; then
6782 cat >>confdefs.h <<_ACEOF
6783#define HAVE_SIGNED_${GLTYPE} 1
6784_ACEOF
6785
6786 eval HAVE_SIGNED_${GLTYPE}=1
6787 else
6788 eval HAVE_SIGNED_${GLTYPE}=0
6789 fi
6790 done
6791
6792
6793 gl_cv_type_ptrdiff_t_signed=yes
6794 gl_cv_type_size_t_signed=no
f434ba03 6795 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6796
6797
f434ba03 6798 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6800$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6801if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6802 $as_echo_n "(cached) " >&6
c906108c 6803else
783e057b
DJ
6804 eval gl_cv_type_${gltype}_suffix=no
6805 eval result=\$gl_cv_type_${gltype}_signed
6806 if test "$result" = yes; then
6807 glsufu=
6808 else
6809 glsufu=u
6810 fi
6811 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6812 case $glsuf in
6813 '') gltype1='int';;
f434ba03
PA
6814 l) gltype1='long int';;
6815 ll) gltype1='long long int';;
6816 i64) gltype1='__int64';;
6817 u) gltype1='unsigned int';;
6818 ul) gltype1='unsigned long int';;
6819 ull) gltype1='unsigned long long int';;
783e057b
DJ
6820 ui64)gltype1='unsigned __int64';;
6821 esac
81ecdfbb 6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6823/* end confdefs.h. */
6824
6825 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6826 included before <wchar.h>. */
6827 #include <stddef.h>
6828 #include <signal.h>
6829 #if HAVE_WCHAR_H
6830 # include <stdio.h>
6831 # include <time.h>
6832 # include <wchar.h>
6833 #endif
6834
6835 extern $gltype foo;
6836 extern $gltype1 foo;
6837int
6838main ()
6839{
6840
6841 ;
6842 return 0;
6843}
6844_ACEOF
81ecdfbb 6845if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6846 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6847fi
81ecdfbb 6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6849 eval result=\$gl_cv_type_${gltype}_suffix
6850 test "$result" != no && break
6851 done
6852fi
81ecdfbb
RW
6853eval ac_res=\$gl_cv_type_${gltype}_suffix
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6855$as_echo "$ac_res" >&6; }
783e057b
DJ
6856 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6857 eval result=\$gl_cv_type_${gltype}_suffix
6858 test "$result" = no && result=
6859 eval ${GLTYPE}_SUFFIX=\$result
6860 cat >>confdefs.h <<_ACEOF
6861#define ${GLTYPE}_SUFFIX $result
6862_ACEOF
6863
6864 done
6865
6866
783e057b
DJ
6867 fi
6868
6869
f434ba03
PA
6870 for gltype in sig_atomic_t wchar_t wint_t ; do
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6872$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6873if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6874 $as_echo_n "(cached) " >&6
783e057b 6875else
f434ba03
PA
6876 eval gl_cv_type_${gltype}_suffix=no
6877 eval result=\$gl_cv_type_${gltype}_signed
6878 if test "$result" = yes; then
6879 glsufu=
6880 else
6881 glsufu=u
6882 fi
6883 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6884 case $glsuf in
6885 '') gltype1='int';;
6886 l) gltype1='long int';;
6887 ll) gltype1='long long int';;
6888 i64) gltype1='__int64';;
6889 u) gltype1='unsigned int';;
6890 ul) gltype1='unsigned long int';;
6891 ull) gltype1='unsigned long long int';;
6892 ui64)gltype1='unsigned __int64';;
6893 esac
6894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6895/* end confdefs.h. */
f434ba03
PA
6896
6897 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6898 included before <wchar.h>. */
6899 #include <stddef.h>
6900 #include <signal.h>
6901 #if HAVE_WCHAR_H
6902 # include <stdio.h>
6903 # include <time.h>
6904 # include <wchar.h>
6905 #endif
6906
6907 extern $gltype foo;
6908 extern $gltype1 foo;
6909int
6910main ()
6911{
6912
6913 ;
6914 return 0;
6915}
783e057b 6916_ACEOF
81ecdfbb 6917if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6918 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6919fi
81ecdfbb 6920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6921 eval result=\$gl_cv_type_${gltype}_suffix
6922 test "$result" != no && break
6923 done
783e057b 6924fi
f434ba03
PA
6925eval ac_res=\$gl_cv_type_${gltype}_suffix
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6927$as_echo "$ac_res" >&6; }
6928 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6929 eval result=\$gl_cv_type_${gltype}_suffix
6930 test "$result" = no && result=
6931 eval ${GLTYPE}_SUFFIX=\$result
6932 cat >>confdefs.h <<_ACEOF
6933#define ${GLTYPE}_SUFFIX $result
6934_ACEOF
6935
6936 done
6937
6938
6939
6940 STDINT_H=stdint.h
783e057b
DJ
6941 fi
6942
6943
f434ba03
PA
6944 # Code from module string:
6945
6946
6947
6948 # Code from module warn-on-use:
6949 # Code from module wchar:
6950
6951
6952
6953
783e057b
DJ
6954 :
6955
6956
6957
6958
6959
783e057b
DJ
6960
6961
6962
6963
6964 :
6965
6966
6967
6968
6969
6970
6971
6972 if test $gl_cv_have_include_next = yes; then
6973 gl_cv_next_wchar_h='<'wchar.h'>'
6974 else
81ecdfbb
RW
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6976$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6977if test "${gl_cv_next_wchar_h+set}" = set; then :
6978 $as_echo_n "(cached) " >&6
783e057b
DJ
6979else
6980
f434ba03
PA
6981 if test $ac_cv_header_wchar_h = yes; then
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6983/* end confdefs.h. */
6984#include <wchar.h>
6985
6986_ACEOF
f434ba03
PA
6987 case "$host_os" in
6988 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6989 *) gl_absname_cpp="$ac_cpp" ;;
6990 esac
6991 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6992 sed -n '\#/wchar.h#{
6993 s#.*"\(.*/wchar.h\)".*#\1#
6994 s#^/[^/]#//&#
6995 p
6996 q
6997 }'`'"'
6998 else
6999 gl_cv_next_wchar_h='<'wchar.h'>'
7000 fi
783e057b
DJ
7001
7002fi
81ecdfbb
RW
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7004$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7005 fi
7006 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7007
f434ba03
PA
7008 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7009 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7010 gl_next_as_first_directive='<'wchar.h'>'
7011 else
7012 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7013 gl_next_as_first_directive=$gl_cv_next_wchar_h
7014 fi
7015 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7016
7017
7018
7019 if test $ac_cv_header_wchar_h = yes; then
7020 HAVE_WCHAR_H=1
7021 else
7022 HAVE_WCHAR_H=0
7023 fi
7024
7025
7026
7027 if test $gt_cv_c_wint_t = yes; then
7028 HAVE_WINT_T=1
7029 else
7030 HAVE_WINT_T=0
7031 fi
7032
7033
7034
7035 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7036 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7038$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7039if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7040 $as_echo_n "(cached) " >&6
7041else
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043/* end confdefs.h. */
7044
7045/* Some systems require additional headers. */
7046#ifndef __GLIBC__
7047# include <stddef.h>
7048# include <stdio.h>
7049# include <time.h>
7050#endif
7051#include <wchar.h>
7052
7053int
7054main ()
7055{
7056#undef $gl_func
7057 (void) $gl_func;
7058 ;
7059 return 0;
7060}
7061_ACEOF
7062if ac_fn_c_try_compile "$LINENO"; then :
7063 eval "$as_gl_Symbol=yes"
7064else
7065 eval "$as_gl_Symbol=no"
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069eval ac_res=\$$as_gl_Symbol
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7071$as_echo "$ac_res" >&6; }
7072 eval as_val=\$$as_gl_Symbol
7073 if test "x$as_val" = x""yes; then :
7074 cat >>confdefs.h <<_ACEOF
7075#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7076_ACEOF
7077
7078 eval ac_cv_have_decl_$gl_func=yes
7079fi
7080 done
7081
7082
7083 # Code from module dummy:
7084 # End of code from modules
7085
7086
c906108c 7087
c906108c 7088
c906108c 7089
c906108c 7090
c906108c 7091
c906108c 7092
c906108c 7093
783e057b
DJ
7094 gltests_libdeps=
7095 gltests_ltlibdeps=
20e95c23 7096
20e95c23 7097
20e95c23 7098
f434ba03
PA
7099
7100
7101
7102
7103
7104
783e057b 7105 gl_source_base='tests'
f434ba03
PA
7106 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
7107
7108 gl_module_indicator_condition=$gltests_WITNESS
7109
7110
7111
7112
7113
c906108c 7114
bec39cab 7115
bec39cab 7116
783e057b
DJ
7117
7118 LIBGNU_LIBDEPS="$gl_libdeps"
7119
7120 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7121
7122
e28b3332 7123
d5af19ba
DJ
7124# For Makefile dependencies.
7125GNULIB_STDINT_H=
7126if test x"$STDINT_H" != x; then
7127 GNULIB_STDINT_H=gnulib/$STDINT_H
7128fi
7129
7130
bec39cab
AC
7131PACKAGE=gdb
7132
7133cat >>confdefs.h <<_ACEOF
7134#define PACKAGE "$PACKAGE"
7135_ACEOF
7136
7137
7138
e28b3332
DJ
7139# GDB does not use automake, but gnulib does. This line lets us
7140# generate its Makefile.in.
81ecdfbb
RW
7141am__api_version='1.11'
7142
e28b3332
DJ
7143# Find a good install program. We prefer a C program (faster),
7144# so one script is as good as another. But avoid the broken or
7145# incompatible versions:
7146# SysV /etc/install, /usr/sbin/install
7147# SunOS /usr/etc/install
7148# IRIX /sbin/install
7149# AIX /bin/install
7150# AmigaOS /C/install, which installs bootblocks on floppy discs
7151# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7152# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7153# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7154# OS/2's system install, which has a completely different semantic
7155# ./install, which can be erroneously created by make from ./install.sh.
85541719 7156# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7158$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7159if test -z "$INSTALL"; then
81ecdfbb
RW
7160if test "${ac_cv_path_install+set}" = set; then :
7161 $as_echo_n "(cached) " >&6
e28b3332
DJ
7162else
7163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164for as_dir in $PATH
7165do
7166 IFS=$as_save_IFS
7167 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7168 # Account for people who put trailing slashes in PATH elements.
7169case $as_dir/ in #((
7170 ./ | .// | /[cC]/* | \
e28b3332 7171 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7172 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7173 /usr/ucb/* ) ;;
7174 *)
7175 # OSF1 and SCO ODT 3.0 have their own names for install.
7176 # Don't use installbsd from OSF since it installs stuff as root
7177 # by default.
7178 for ac_prog in ginstall scoinst install; do
7179 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7180 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7181 if test $ac_prog = install &&
7182 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7183 # AIX install. It has an incompatible calling convention.
7184 :
7185 elif test $ac_prog = install &&
7186 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7187 # program-specific install script used by HP pwplus--don't use.
7188 :
7189 else
85541719
DE
7190 rm -rf conftest.one conftest.two conftest.dir
7191 echo one > conftest.one
7192 echo two > conftest.two
7193 mkdir conftest.dir
7194 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7195 test -s conftest.one && test -s conftest.two &&
7196 test -s conftest.dir/conftest.one &&
7197 test -s conftest.dir/conftest.two
7198 then
7199 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7200 break 3
7201 fi
e28b3332
DJ
7202 fi
7203 fi
7204 done
7205 done
7206 ;;
7207esac
81ecdfbb
RW
7208
7209 done
7210IFS=$as_save_IFS
e28b3332 7211
85541719 7212rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7213
7214fi
7215 if test "${ac_cv_path_install+set}" = set; then
7216 INSTALL=$ac_cv_path_install
7217 else
85541719
DE
7218 # As a last resort, use the slow shell script. Don't cache a
7219 # value for INSTALL within a source directory, because that will
e28b3332 7220 # break other packages using the cache if that directory is
85541719 7221 # removed, or if the value is a relative name.
e28b3332
DJ
7222 INSTALL=$ac_install_sh
7223 fi
7224fi
81ecdfbb
RW
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7226$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7227
7228# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7229# It thinks the first close brace ends the variable substitution.
7230test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7231
7232test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7233
7234test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7235
81ecdfbb
RW
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7237$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7238# Just in case
7239sleep 1
7240echo timestamp > conftest.file
81ecdfbb
RW
7241# Reject unsafe characters in $srcdir or the absolute working directory
7242# name. Accept space and tab only in the latter.
7243am_lf='
7244'
7245case `pwd` in
7246 *[\\\"\#\$\&\'\`$am_lf]*)
7247 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7248esac
7249case $srcdir in
7250 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7251 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7252esac
7253
e28b3332
DJ
7254# Do `set' in a subshell so we don't clobber the current shell's
7255# arguments. Must try -L first in case configure is actually a
7256# symlink; some systems play weird games with the mod time of symlinks
7257# (eg FreeBSD returns the mod time of the symlink's containing
7258# directory).
7259if (
81ecdfbb 7260 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7261 if test "$*" = "X"; then
7262 # -L didn't work.
81ecdfbb 7263 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7264 fi
7265 rm -f conftest.file
7266 if test "$*" != "X $srcdir/configure conftest.file" \
7267 && test "$*" != "X conftest.file $srcdir/configure"; then
7268
7269 # If neither matched, then we have a broken ls. This can happen
7270 # if, for instance, CONFIG_SHELL is bash and it inherits a
7271 # broken ls alias from the environment. This has actually
7272 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7273 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7274alias in your environment" "$LINENO" 5
e28b3332
DJ
7275 fi
7276
7277 test "$2" = conftest.file
7278 )
7279then
7280 # Ok.
7281 :
7282else
81ecdfbb
RW
7283 as_fn_error "newly created file is older than distributed files!
7284Check your system clock" "$LINENO" 5
e28b3332 7285fi
81ecdfbb
RW
7286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7287$as_echo "yes" >&6; }
e28b3332 7288test "$program_prefix" != NONE &&
81ecdfbb 7289 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7290# Use a double $ so make ignores it.
7291test "$program_suffix" != NONE &&
81ecdfbb
RW
7292 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7293# Double any \ or $.
e28b3332 7294# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7295ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7296program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7297
7298# expand $ac_aux_dir to an absolute path
7299am_aux_dir=`cd $ac_aux_dir && pwd`
7300
81ecdfbb
RW
7301if test x"${MISSING+set}" != xset; then
7302 case $am_aux_dir in
7303 *\ * | *\ *)
7304 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7305 *)
7306 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7307 esac
7308fi
e28b3332
DJ
7309# Use eval to expand $SHELL
7310if eval "$MISSING --run true"; then
7311 am_missing_run="$MISSING --run "
7312else
7313 am_missing_run=
81ecdfbb
RW
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7315$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7316fi
7317
7318if test x"${install_sh}" != xset; then
7319 case $am_aux_dir in
7320 *\ * | *\ *)
7321 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7322 *)
7323 install_sh="\${SHELL} $am_aux_dir/install-sh"
7324 esac
7325fi
7326
7327# Installed binaries are usually stripped using `strip' when the user
7328# run `make install-strip'. However `strip' might not be the right
7329# tool to use in cross-compilation environments, therefore Automake
7330# will honor the `STRIP' environment variable to overrule this program.
7331if test "$cross_compiling" != no; then
7332 if test -n "$ac_tool_prefix"; then
7333 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7334set dummy ${ac_tool_prefix}strip; ac_word=$2
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336$as_echo_n "checking for $ac_word... " >&6; }
7337if test "${ac_cv_prog_STRIP+set}" = set; then :
7338 $as_echo_n "(cached) " >&6
7339else
7340 if test -n "$STRIP"; then
7341 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7342else
7343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346 IFS=$as_save_IFS
7347 test -z "$as_dir" && as_dir=.
7348 for ac_exec_ext in '' $ac_executable_extensions; do
7349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7350 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352 break 2
7353 fi
7354done
7355 done
7356IFS=$as_save_IFS
7357
7358fi
7359fi
7360STRIP=$ac_cv_prog_STRIP
7361if test -n "$STRIP"; then
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7363$as_echo "$STRIP" >&6; }
7364else
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370fi
7371if test -z "$ac_cv_prog_STRIP"; then
7372 ac_ct_STRIP=$STRIP
7373 # Extract the first word of "strip", so it can be a program name with args.
7374set dummy strip; ac_word=$2
7375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7376$as_echo_n "checking for $ac_word... " >&6; }
7377if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7378 $as_echo_n "(cached) " >&6
7379else
7380 if test -n "$ac_ct_STRIP"; then
7381 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7382else
7383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in $PATH
7385do
7386 IFS=$as_save_IFS
7387 test -z "$as_dir" && as_dir=.
7388 for ac_exec_ext in '' $ac_executable_extensions; do
7389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7390 ac_cv_prog_ac_ct_STRIP="strip"
7391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392 break 2
7393 fi
7394done
7395 done
7396IFS=$as_save_IFS
7397
7398fi
7399fi
7400ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7401if test -n "$ac_ct_STRIP"; then
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7403$as_echo "$ac_ct_STRIP" >&6; }
7404else
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
7407fi
7408
7409 if test "x$ac_ct_STRIP" = x; then
7410 STRIP=":"
7411 else
7412 case $cross_compiling:$ac_tool_warned in
7413yes:)
7414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7416ac_tool_warned=yes ;;
7417esac
7418 STRIP=$ac_ct_STRIP
7419 fi
7420else
7421 STRIP="$ac_cv_prog_STRIP"
7422fi
7423
7424fi
7425INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7426
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7428$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7429if test -z "$MKDIR_P"; then
7430 if test "${ac_cv_path_mkdir+set}" = set; then :
7431 $as_echo_n "(cached) " >&6
7432else
7433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7435do
7436 IFS=$as_save_IFS
7437 test -z "$as_dir" && as_dir=.
7438 for ac_prog in mkdir gmkdir; do
7439 for ac_exec_ext in '' $ac_executable_extensions; do
7440 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7441 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7442 'mkdir (GNU coreutils) '* | \
7443 'mkdir (coreutils) '* | \
7444 'mkdir (fileutils) '4.1*)
7445 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7446 break 3;;
7447 esac
7448 done
7449 done
e28b3332 7450 done
81ecdfbb
RW
7451IFS=$as_save_IFS
7452
7453fi
7454
7455 if test "${ac_cv_path_mkdir+set}" = set; then
7456 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7457 else
81ecdfbb
RW
7458 # As a last resort, use the slow shell script. Don't cache a
7459 # value for MKDIR_P within a source directory, because that will
7460 # break other packages using the cache if that directory is
7461 # removed, or if the value is a relative name.
7462 test -d ./--version && rmdir ./--version
7463 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7464 fi
7465fi
81ecdfbb
RW
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7467$as_echo "$MKDIR_P" >&6; }
7468
f434ba03 7469
81ecdfbb
RW
7470mkdir_p="$MKDIR_P"
7471case $mkdir_p in
7472 [\\/$]* | ?:[\\/]*) ;;
7473 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7474esac
e28b3332
DJ
7475
7476for ac_prog in gawk mawk nawk awk
7477do
7478 # Extract the first word of "$ac_prog", so it can be a program name with args.
7479set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481$as_echo_n "checking for $ac_word... " >&6; }
7482if test "${ac_cv_prog_AWK+set}" = set; then :
7483 $as_echo_n "(cached) " >&6
e28b3332
DJ
7484else
7485 if test -n "$AWK"; then
7486 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7487else
7488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491 IFS=$as_save_IFS
7492 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7493 for ac_exec_ext in '' $ac_executable_extensions; do
7494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7495 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7497 break 2
7498 fi
7499done
81ecdfbb
RW
7500 done
7501IFS=$as_save_IFS
e28b3332
DJ
7502
7503fi
7504fi
7505AWK=$ac_cv_prog_AWK
7506if test -n "$AWK"; then
81ecdfbb
RW
7507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7508$as_echo "$AWK" >&6; }
e28b3332 7509else
81ecdfbb
RW
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7511$as_echo "no" >&6; }
e28b3332
DJ
7512fi
7513
81ecdfbb 7514
e28b3332
DJ
7515 test -n "$AWK" && break
7516done
7517
81ecdfbb 7518ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7519
7520
7521am_make=${MAKE-make}
7522cat > confinc << 'END'
7523am__doit:
81ecdfbb 7524 @echo this is the am__doit target
e28b3332
DJ
7525.PHONY: am__doit
7526END
7527# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7529$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7530am__include="#"
7531am__quote=
7532_am_result=none
7533# First try GNU make style include.
7534echo "include confinc" > confmf
81ecdfbb
RW
7535# Ignore all kinds of additional output from `make'.
7536case `$am_make -s -f confmf 2> /dev/null` in #(
7537*the\ am__doit\ target*)
7538 am__include=include
7539 am__quote=
7540 _am_result=GNU
7541 ;;
7542esac
e28b3332
DJ
7543# Now try BSD make style include.
7544if test "$am__include" = "#"; then
7545 echo '.include "confinc"' > confmf
81ecdfbb
RW
7546 case `$am_make -s -f confmf 2> /dev/null` in #(
7547 *the\ am__doit\ target*)
7548 am__include=.include
7549 am__quote="\""
7550 _am_result=BSD
7551 ;;
7552 esac
e28b3332
DJ
7553fi
7554
7555
81ecdfbb
RW
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7557$as_echo "$_am_result" >&6; }
e28b3332
DJ
7558rm -f confinc confmf
7559
81ecdfbb
RW
7560# Check whether --enable-dependency-tracking was given.
7561if test "${enable_dependency_tracking+set}" = set; then :
7562 enableval=$enable_dependency_tracking;
7563fi
e28b3332 7564
e28b3332
DJ
7565if test "x$enable_dependency_tracking" != xno; then
7566 am_depcomp="$ac_aux_dir/depcomp"
7567 AMDEPBACKSLASH='\'
7568fi
81ecdfbb 7569 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7570 AMDEP_TRUE=
7571 AMDEP_FALSE='#'
7572else
7573 AMDEP_TRUE='#'
7574 AMDEP_FALSE=
7575fi
7576
7577
81ecdfbb
RW
7578if test "`cd $srcdir && pwd`" != "`pwd`"; then
7579 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7580 # is not polluted with repeated "-I."
7581 am__isrc=' -I$(srcdir)'
7582 # test to see if srcdir already configured
7583 if test -f $srcdir/config.status; then
7584 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7585 fi
e28b3332
DJ
7586fi
7587
7588# test whether we have cygpath
7589if test -z "$CYGPATH_W"; then
7590 if (cygpath --version) >/dev/null 2>/dev/null; then
7591 CYGPATH_W='cygpath -w'
7592 else
7593 CYGPATH_W=echo
7594 fi
7595fi
7596
7597
7598# Define the identity of the package.
7599 PACKAGE=gdb
7600 VERSION=UNUSED-VERSION
7601
7602
7603# Some tools Automake needs.
7604
7605ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7606
7607
7608AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7609
7610
7611AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7612
7613
7614AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7615
7616
7617MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7618
e28b3332
DJ
7619# We need awk for the "check" target. The system "awk" is bad on
7620# some platforms.
7621# Always define AMTAR for backward compatibility.
7622
7623AMTAR=${AMTAR-"${am_missing_run}tar"}
7624
7625am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7626
7627
7628
7629
7630depcc="$CC" am_compiler_list=
7631
81ecdfbb
RW
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7633$as_echo_n "checking dependency style of $depcc... " >&6; }
7634if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7635 $as_echo_n "(cached) " >&6
e28b3332
DJ
7636else
7637 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7638 # We make a subdir and do the tests there. Otherwise we can end up
7639 # making bogus files that we don't know about and never remove. For
7640 # instance it was reported that on HP-UX the gcc test will end up
7641 # making a dummy file named `D' -- because `-MD' means `put the output
7642 # in D'.
7643 mkdir conftest.dir
7644 # Copy depcomp to subdir because otherwise we won't find it if we're
7645 # using a relative directory.
7646 cp "$am_depcomp" conftest.dir
7647 cd conftest.dir
7648 # We will build objects and dependencies in a subdirectory because
7649 # it helps to detect inapplicable dependency modes. For instance
7650 # both Tru64's cc and ICC support -MD to output dependencies as a
7651 # side effect of compilation, but ICC will put the dependencies in
7652 # the current directory while Tru64 will put them in the object
7653 # directory.
7654 mkdir sub
7655
7656 am_cv_CC_dependencies_compiler_type=none
7657 if test "$am_compiler_list" = ""; then
7658 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7659 fi
81ecdfbb
RW
7660 am__universal=false
7661 case " $depcc " in #(
7662 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7663 esac
7664
e28b3332
DJ
7665 for depmode in $am_compiler_list; do
7666 # Setup a source with many dependencies, because some compilers
7667 # like to wrap large dependency lists on column 80 (with \), and
7668 # we should not choose a depcomp mode which is confused by this.
7669 #
7670 # We need to recreate these files for each test, as the compiler may
7671 # overwrite some of them when testing with obscure command lines.
7672 # This happens at least with the AIX C compiler.
7673 : > sub/conftest.c
7674 for i in 1 2 3 4 5 6; do
7675 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7676 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7677 # Solaris 8's {/usr,}/bin/sh.
7678 touch sub/conftst$i.h
7679 done
7680 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7681
81ecdfbb
RW
7682 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7683 # mode. It turns out that the SunPro C++ compiler does not properly
7684 # handle `-M -o', and we need to detect this. Also, some Intel
7685 # versions had trouble with output in subdirs
7686 am__obj=sub/conftest.${OBJEXT-o}
7687 am__minus_obj="-o $am__obj"
e28b3332 7688 case $depmode in
81ecdfbb
RW
7689 gcc)
7690 # This depmode causes a compiler race in universal mode.
7691 test "$am__universal" = false || continue
7692 ;;
e28b3332
DJ
7693 nosideeffect)
7694 # after this tag, mechanisms are not by side-effect, so they'll
7695 # only be used when explicitly requested
7696 if test "x$enable_dependency_tracking" = xyes; then
7697 continue
7698 else
7699 break
7700 fi
7701 ;;
81ecdfbb
RW
7702 msvisualcpp | msvcmsys)
7703 # This compiler won't grok `-c -o', but also, the minuso test has
7704 # not run yet. These depmodes are late enough in the game, and
7705 # so weak that their functioning should not be impacted.
7706 am__obj=conftest.${OBJEXT-o}
7707 am__minus_obj=
7708 ;;
e28b3332
DJ
7709 none) break ;;
7710 esac
e28b3332 7711 if depmode=$depmode \
81ecdfbb 7712 source=sub/conftest.c object=$am__obj \
e28b3332 7713 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7714 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7715 >/dev/null 2>conftest.err &&
81ecdfbb 7716 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7717 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7718 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7719 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7720 # icc doesn't choke on unknown options, it will just issue warnings
7721 # or remarks (even with -Werror). So we grep stderr for any message
7722 # that says an option was ignored or not supported.
7723 # When given -MP, icc 7.0 and 7.1 complain thusly:
7724 # icc: Command line warning: ignoring option '-M'; no argument required
7725 # The diagnosis changed in icc 8.0:
7726 # icc: Command line remark: option '-MP' not supported
7727 if (grep 'ignoring option' conftest.err ||
7728 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7729 am_cv_CC_dependencies_compiler_type=$depmode
7730 break
7731 fi
7732 fi
7733 done
7734
7735 cd ..
7736 rm -rf conftest.dir
7737else
7738 am_cv_CC_dependencies_compiler_type=none
7739fi
7740
7741fi
81ecdfbb
RW
7742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7743$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7744CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7745
81ecdfbb 7746 if
e28b3332
DJ
7747 test "x$enable_dependency_tracking" != xno \
7748 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7749 am__fastdepCC_TRUE=
7750 am__fastdepCC_FALSE='#'
7751else
7752 am__fastdepCC_TRUE='#'
7753 am__fastdepCC_FALSE=
7754fi
7755
7756
7757
7758
bec39cab
AC
7759
7760
81ecdfbb
RW
7761# Check whether --with-separate-debug-dir was given.
7762if test "${with_separate_debug_dir+set}" = set; then :
7763 withval=$with_separate_debug_dir;
b14b1491
TT
7764 DEBUGDIR=$withval
7765else
7766 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7767fi
7768
20e95c23 7769
783e057b
DJ
7770 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7771 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7772 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7773 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7774
783e057b
DJ
7775cat >>confdefs.h <<_ACEOF
7776#define DEBUGDIR "$ac_define_dir"
20e95c23 7777_ACEOF
20e95c23 7778
20e95c23 7779
20e95c23 7780
0c4a4063 7781
b14b1491
TT
7782 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7783 if test "x$prefix" = xNONE; then
7784 test_prefix=/usr/local
7785 else
7786 test_prefix=$prefix
7787 fi
783e057b 7788 else
b14b1491 7789 test_prefix=$exec_prefix
783e057b 7790 fi
b14b1491
TT
7791 value=0
7792 case ${ac_define_dir} in
7793 "${test_prefix}"|"${test_prefix}/"*|\
7794 '${exec_prefix}'|'${exec_prefix}/'*)
7795 value=1
7796 ;;
7797 esac
7798
7799cat >>confdefs.h <<_ACEOF
7800#define DEBUGDIR_RELOCATABLE $value
7801_ACEOF
7802
7803
7804
0c4a4063 7805
b14b1491
TT
7806# GDB's datadir relocation
7807
7808
7809
81ecdfbb
RW
7810# Check whether --with-gdb-datadir was given.
7811if test "${with_gdb_datadir+set}" = set; then :
7812 withval=$with_gdb_datadir;
b14b1491 7813 GDB_DATADIR=$withval
20e95c23 7814else
b14b1491 7815 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7816fi
7817
20e95c23 7818
b14b1491
TT
7819 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7820 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7821 ac_define_dir=`eval echo $GDB_DATADIR`
7822 ac_define_dir=`eval echo $ac_define_dir`
7823
7824cat >>confdefs.h <<_ACEOF
7825#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7826_ACEOF
7827
b14b1491
TT
7828
7829
0c4a4063 7830
b14b1491
TT
7831 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7832 if test "x$prefix" = xNONE; then
7833 test_prefix=/usr/local
7834 else
7835 test_prefix=$prefix
7836 fi
7837 else
7838 test_prefix=$exec_prefix
7839 fi
7840 value=0
7841 case ${ac_define_dir} in
7842 "${test_prefix}"|"${test_prefix}/"*|\
7843 '${exec_prefix}'|'${exec_prefix}/'*)
7844 value=1
7845 ;;
7846 esac
7847
7848cat >>confdefs.h <<_ACEOF
7849#define GDB_DATADIR_RELOCATABLE $value
7850_ACEOF
7851
7852
783e057b 7853
20e95c23 7854
0c4a4063 7855
81ecdfbb
RW
7856# Check whether --with-relocated-sources was given.
7857if test "${with_relocated_sources+set}" = set; then :
7858 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7859
7860 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7861 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7862 ac_define_dir=`eval echo $reloc_srcdir`
7863 ac_define_dir=`eval echo $ac_define_dir`
7864
7865cat >>confdefs.h <<_ACEOF
7866#define RELOC_SRCDIR "$ac_define_dir"
7867_ACEOF
7868
7869
7870
81ecdfbb
RW
7871fi
7872
29b0e8a2
JM
7873
7874
20e95c23 7875
783e057b 7876subdirs="$subdirs doc testsuite"
20e95c23
DJ
7877
7878
783e057b 7879# Check whether to support alternative target configurations
81ecdfbb
RW
7880# Check whether --enable-targets was given.
7881if test "${enable_targets+set}" = set; then :
7882 enableval=$enable_targets; case "${enableval}" in
7883 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7884 ;;
7885 no) enable_targets= ;;
7886 *) enable_targets=$enableval ;;
7887esac
81ecdfbb
RW
7888fi
7889
20e95c23 7890
783e057b 7891# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7892# Check whether --enable-64-bit-bfd was given.
7893if test "${enable_64_bit_bfd+set}" = set; then :
7894 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7895 yes) want64=true ;;
7896 no) want64=false ;;
81ecdfbb 7897 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7898esac
7899else
7900 want64=false
81ecdfbb
RW
7901fi
7902
783e057b
DJ
7903# Provide defaults for some variables set by the per-host and per-target
7904# configuration.
7905gdb_host_obs=posix-hdep.o
20e95c23 7906
783e057b
DJ
7907if test "${target}" = "${host}"; then
7908 gdb_native=yes
7909else
7910 gdb_native=no
7911fi
20e95c23 7912
783e057b 7913. $srcdir/configure.host
20e95c23 7914
783e057b 7915# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7916
783e057b
DJ
7917TARGET_OBS=
7918all_targets=
20e95c23 7919
783e057b 7920for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7921do
783e057b
DJ
7922 if test "$targ_alias" = "all"; then
7923 all_targets=true
7924 else
7925 # Canonicalize the secondary target names.
7926 result=`$ac_config_sub $targ_alias 2>/dev/null`
7927 if test -n "$result"; then
7928 targ=$result
7929 else
7930 targ=$targ_alias
7931 fi
20e95c23 7932
783e057b 7933 . ${srcdir}/configure.tgt
20e95c23 7934
bf307134
JB
7935 if test -z "${gdb_target_obs}"; then :
7936 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
7937fi
7938
783e057b
DJ
7939 # Target-specific object files
7940 for i in ${gdb_target_obs}; do
7941 case " $TARGET_OBS " in
7942 *" ${i} "*) ;;
7943 *)
7944 TARGET_OBS="$TARGET_OBS ${i}"
7945 ;;
7946 esac
7947 done
20e95c23 7948
783e057b
DJ
7949 # Check whether this target needs 64-bit CORE_ADDR
7950 if test x${want64} = xfalse; then
7951 . ${srcdir}/../bfd/config.bfd
7952 fi
7953 fi
20e95c23
DJ
7954done
7955
783e057b
DJ
7956if test x${all_targets} = xtrue; then
7957
7958 # We want all 64-bit targets if we either:
7959 # - run on a 64-bit host or
7960 # - already require 64-bit support for some other target or
7961 # - the --enable-64-bit-bfd option was supplied
7962 # Otherwise we only support all 32-bit targets.
7963 #
7964 # NOTE: This test must be in sync with the corresponding
7965 # tests in BFD!
20e95c23 7966
783e057b 7967 if test x${want64} = xfalse; then
81ecdfbb
RW
7968 # The cast to long int works around a bug in the HP C Compiler
7969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7971# This bug is HP SR number 8606223364.
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7973$as_echo_n "checking size of long... " >&6; }
7974if test "${ac_cv_sizeof_long+set}" = set; then :
7975 $as_echo_n "(cached) " >&6
c0993dbe 7976else
81ecdfbb 7977 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 7978
81ecdfbb
RW
7979else
7980 if test "$ac_cv_type_long" = yes; then
7981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7983{ as_fn_set_status 77
7984as_fn_error "cannot compute sizeof (long)
7985See \`config.log' for more details." "$LINENO" 5; }; }
7986 else
7987 ac_cv_sizeof_long=0
7988 fi
c0993dbe 7989fi
81ecdfbb 7990
c0993dbe 7991fi
81ecdfbb
RW
7992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7993$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 7994
c0993dbe 7995
c0993dbe 7996
c0993dbe
UW
7997cat >>confdefs.h <<_ACEOF
7998#define SIZEOF_LONG $ac_cv_sizeof_long
7999_ACEOF
8000
8001
8002 if test "x${ac_cv_sizeof_long}" = "x8"; then
8003 want64=true
8004 fi
8005 fi
8006 if test x${want64} = xtrue; then
8007 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8008 else
8009 TARGET_OBS='$(ALL_TARGET_OBS)'
8010 fi
8011fi
8012
8013
8014
8015# For other settings, only the main target counts.
8016gdb_sim=
8017gdb_osabi=
8018build_gdbserver=
8019targ=$target; . ${srcdir}/configure.tgt
8020
8021# Fetch the default architecture and default target vector from BFD.
8022targ=$target; . $srcdir/../bfd/config.bfd
8023
8024# We only want the first architecture, so strip off the others if
8025# there is more than one.
8026targ_archs=`echo $targ_archs | sed 's/ .*//'`
8027
8028if test "x$targ_archs" != x; then
8029
8030cat >>confdefs.h <<_ACEOF
8031#define DEFAULT_BFD_ARCH $targ_archs
8032_ACEOF
8033
8034fi
8035if test "x$targ_defvec" != x; then
8036
8037cat >>confdefs.h <<_ACEOF
8038#define DEFAULT_BFD_VEC $targ_defvec
8039_ACEOF
8040
8041fi
8042
c0993dbe
UW
8043# The CLI cannot be disabled yet, but may be in the future.
8044
8045# Enable CLI.
81ecdfbb
RW
8046# Check whether --enable-gdbcli was given.
8047if test "${enable_gdbcli+set}" = set; then :
8048 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8049 yes)
8050 ;;
8051 no)
81ecdfbb 8052 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8053 *)
81ecdfbb 8054 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8055 esac
8056else
8057 enable_gdbcli=yes
81ecdfbb
RW
8058fi
8059
c0993dbe
UW
8060if test x"$enable_gdbcli" = xyes; then
8061 if test -d $srcdir/cli; then
8062 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8063 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8064 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8065 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8066 fi
8067fi
8068
8069# Enable MI.
81ecdfbb
RW
8070# Check whether --enable-gdbmi was given.
8071if test "${enable_gdbmi+set}" = set; then :
8072 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8073 yes | no)
8074 ;;
8075 *)
81ecdfbb 8076 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8077 esac
8078else
8079 enable_gdbmi=yes
81ecdfbb
RW
8080fi
8081
c0993dbe
UW
8082if test x"$enable_gdbmi" = xyes; then
8083 if test -d $srcdir/mi; then
8084 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8085 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8086 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8087 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8088 fi
8089fi
8090
8091# Enable TUI.
81ecdfbb
RW
8092# Check whether --enable-tui was given.
8093if test "${enable_tui+set}" = set; then :
8094 enableval=$enable_tui; case $enableval in
3ca64bd3 8095 yes | no | auto)
c0993dbe
UW
8096 ;;
8097 *)
81ecdfbb 8098 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8099 esac
8100else
3ca64bd3 8101 enable_tui=auto
81ecdfbb
RW
8102fi
8103
c0993dbe
UW
8104
8105# Enable gdbtk.
81ecdfbb
RW
8106# Check whether --enable-gdbtk was given.
8107if test "${enable_gdbtk+set}" = set; then :
8108 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8109 yes | no)
8110 ;;
8111 *)
81ecdfbb 8112 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8113 esac
8114else
5062cc19 8115 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8116 enable_gdbtk=yes
8117 else
8118 enable_gdbtk=no
8119 fi
81ecdfbb
RW
8120fi
8121
c0993dbe
UW
8122# We unconditionally disable gdbtk tests on selected platforms.
8123case $host_os in
8124 go32* | windows*)
81ecdfbb
RW
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8126$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8127 enable_gdbtk=no ;;
8128esac
8129
8130# Libunwind support.
bec39cab 8131
81ecdfbb
RW
8132# Check whether --with-libunwind was given.
8133if test "${with_libunwind+set}" = set; then :
8134 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8135 yes) enable_libunwind=yes ;;
8136 no) enable_libunwind=no ;;
81ecdfbb 8137 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8138esac
bec39cab 8139else
bec39cab 8140
81ecdfbb
RW
8141 for ac_header in libunwind.h libunwind-ia64.h
8142do :
8143 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8144ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8145eval as_val=\$$as_ac_Header
8146 if test "x$as_val" = x""yes; then :
bec39cab 8147 cat >>confdefs.h <<_ACEOF
81ecdfbb 8148#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8149_ACEOF
8150
8151fi
8152
8153done
8154
a9322a30
TT
8155 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8156 enable_libunwind=yes;
8157 fi
8158
bec39cab 8159fi
bec39cab 8160
bec39cab 8161
81ecdfbb
RW
8162if test x"$enable_libunwind" = xyes; then
8163 for ac_header in libunwind.h libunwind-ia64.h
8164do :
8165 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8166ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8167eval as_val=\$$as_ac_Header
8168 if test "x$as_val" = x""yes; then :
bec39cab 8169 cat >>confdefs.h <<_ACEOF
81ecdfbb 8170#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8171_ACEOF
8172
8173fi
8174
8175done
8176
bec39cab 8177
81ecdfbb 8178$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8179
8180 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8181 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8182 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8183fi
8184
cb01cfba
JB
8185opt_curses=no
8186
81ecdfbb
RW
8187# Check whether --with-curses was given.
8188if test "${with_curses+set}" = set; then :
8189 withval=$with_curses; opt_curses=$withval
8190fi
8191
cb01cfba 8192
76a39ba7 8193prefer_curses=no
cb01cfba 8194if test "$opt_curses" = "yes"; then
76a39ba7 8195 prefer_curses=yes
cb01cfba
JB
8196fi
8197
a9322a30 8198# Profiling support.
81ecdfbb
RW
8199# Check whether --enable-profiling was given.
8200if test "${enable_profiling+set}" = set; then :
8201 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8202 yes | no)
8203 ;;
8204 *)
81ecdfbb 8205 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8206 esac
8207else
8208 enable_profiling=no
81ecdfbb 8209fi
bec39cab 8210
a9322a30
TT
8211
8212for ac_func in monstartup _mcleanup
81ecdfbb
RW
8213do :
8214 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8215ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8216eval as_val=\$$as_ac_var
8217 if test "x$as_val" = x""yes; then :
8218 cat >>confdefs.h <<_ACEOF
8219#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8220_ACEOF
a9322a30 8221
81ecdfbb
RW
8222fi
8223done
a9322a30 8224
81ecdfbb
RW
8225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8226$as_echo_n "checking for _etext... " >&6; }
8227if test "${ac_cv_var__etext+set}" = set; then :
8228 $as_echo_n "(cached) " >&6
8229else
8230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8231/* end confdefs.h. */
8232#include <stdlib.h>
8233extern char _etext;
a9322a30
TT
8234
8235int
8236main ()
8237{
8238free (&_etext);
8239 ;
8240 return 0;
8241}
bec39cab 8242_ACEOF
81ecdfbb 8243if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8244 ac_cv_var__etext=yes
bec39cab 8245else
81ecdfbb 8246 ac_cv_var__etext=no
bec39cab 8247fi
81ecdfbb
RW
8248rm -f core conftest.err conftest.$ac_objext \
8249 conftest$ac_exeext conftest.$ac_ext
bec39cab 8250fi
81ecdfbb
RW
8251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8252$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8253if test $ac_cv_var__etext = yes; then
60ca704f 8254
81ecdfbb 8255$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8256
bec39cab 8257fi
81ecdfbb
RW
8258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8259$as_echo_n "checking for etext... " >&6; }
8260if test "${ac_cv_var_etext+set}" = set; then :
8261 $as_echo_n "(cached) " >&6
bec39cab 8262else
81ecdfbb 8263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8264/* end confdefs.h. */
a9322a30
TT
8265#include <stdlib.h>
8266extern char etext;
bec39cab
AC
8267
8268int
8269main ()
8270{
a9322a30 8271free (&etext);
bec39cab
AC
8272 ;
8273 return 0;
8274}
8275_ACEOF
81ecdfbb 8276if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8277 ac_cv_var_etext=yes
bec39cab 8278else
81ecdfbb 8279 ac_cv_var_etext=no
bec39cab 8280fi
81ecdfbb
RW
8281rm -f core conftest.err conftest.$ac_objext \
8282 conftest$ac_exeext conftest.$ac_ext
bec39cab 8283fi
81ecdfbb
RW
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8285$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8286if test $ac_cv_var_etext = yes; then
8287
81ecdfbb 8288$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8289
8290fi
a9322a30
TT
8291if test "$enable_profiling" = yes ; then
8292 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8293 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8294 fi
8295 PROFILE_CFLAGS=-pg
8296 OLD_CFLAGS="$CFLAGS"
8297 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8298
81ecdfbb
RW
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8300$as_echo_n "checking whether $CC supports -pg... " >&6; }
8301if test "${ac_cv_cc_supports_pg+set}" = set; then :
8302 $as_echo_n "(cached) " >&6
bec39cab 8303else
81ecdfbb 8304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8305/* end confdefs.h. */
bec39cab
AC
8306
8307int
8308main ()
8309{
a9322a30 8310int x;
bec39cab
AC
8311 ;
8312 return 0;
8313}
8314_ACEOF
81ecdfbb 8315if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8316 ac_cv_cc_supports_pg=yes
bec39cab 8317else
81ecdfbb 8318 ac_cv_cc_supports_pg=no
bec39cab 8319fi
81ecdfbb 8320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8321fi
81ecdfbb
RW
8322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8323$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8324
a9322a30 8325 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8326 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8327 fi
bec39cab 8328
a9322a30 8329 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8330fi
8331
c16158bc
JM
8332
8333
81ecdfbb
RW
8334# Check whether --with-pkgversion was given.
8335if test "${with_pkgversion+set}" = set; then :
8336 withval=$with_pkgversion; case "$withval" in
8337 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8338 no) PKGVERSION= ;;
8339 *) PKGVERSION="($withval) " ;;
8340 esac
8341else
8342 PKGVERSION="(GDB) "
8343
81ecdfbb 8344fi
c16158bc
JM
8345
8346
8347
8348
81ecdfbb
RW
8349
8350# Check whether --with-bugurl was given.
8351if test "${with_bugurl+set}" = set; then :
8352 withval=$with_bugurl; case "$withval" in
8353 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8354 no) BUGURL=
8355 ;;
8356 *) BUGURL="$withval"
8357 ;;
8358 esac
8359else
8360 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8361
81ecdfbb
RW
8362fi
8363
c16158bc
JM
8364 case ${BUGURL} in
8365 "")
8366 REPORT_BUGS_TO=
8367 REPORT_BUGS_TEXI=
8368 ;;
8369 *)
8370 REPORT_BUGS_TO="<$BUGURL>"
8371 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8372 ;;
8373 esac;
8374
8375
8376
8377
8378cat >>confdefs.h <<_ACEOF
8379#define PKGVERSION "$PKGVERSION"
8380_ACEOF
8381
8382
8383cat >>confdefs.h <<_ACEOF
8384#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8385_ACEOF
8386
8387
bec39cab
AC
8388# --------------------- #
8389# Checks for programs. #
8390# --------------------- #
8391
8392for ac_prog in gawk mawk nawk awk
8393do
8394 # Extract the first word of "$ac_prog", so it can be a program name with args.
8395set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8397$as_echo_n "checking for $ac_word... " >&6; }
8398if test "${ac_cv_prog_AWK+set}" = set; then :
8399 $as_echo_n "(cached) " >&6
bec39cab
AC
8400else
8401 if test -n "$AWK"; then
8402 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8403else
8404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405for as_dir in $PATH
8406do
8407 IFS=$as_save_IFS
8408 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8409 for ac_exec_ext in '' $ac_executable_extensions; do
8410 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8411 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8413 break 2
8414 fi
8415done
81ecdfbb
RW
8416 done
8417IFS=$as_save_IFS
bec39cab
AC
8418
8419fi
8420fi
8421AWK=$ac_cv_prog_AWK
8422if test -n "$AWK"; then
81ecdfbb
RW
8423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8424$as_echo "$AWK" >&6; }
bec39cab 8425else
81ecdfbb
RW
8426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
bec39cab
AC
8428fi
8429
bec39cab 8430
81ecdfbb 8431 test -n "$AWK" && break
bec39cab
AC
8432done
8433
bec39cab 8434
81ecdfbb
RW
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8436$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8437LN_S=$as_ln_s
8438if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8440$as_echo "yes" >&6; }
bec39cab 8441else
81ecdfbb
RW
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8443$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8444fi
8445
8446if test -n "$ac_tool_prefix"; then
8447 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8448set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8450$as_echo_n "checking for $ac_word... " >&6; }
8451if test "${ac_cv_prog_RANLIB+set}" = set; then :
8452 $as_echo_n "(cached) " >&6
bec39cab
AC
8453else
8454 if test -n "$RANLIB"; then
8455 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8456else
8457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8458for as_dir in $PATH
8459do
8460 IFS=$as_save_IFS
8461 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8462 for ac_exec_ext in '' $ac_executable_extensions; do
8463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8464 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8466 break 2
8467 fi
8468done
81ecdfbb
RW
8469 done
8470IFS=$as_save_IFS
bec39cab
AC
8471
8472fi
8473fi
8474RANLIB=$ac_cv_prog_RANLIB
8475if test -n "$RANLIB"; then
81ecdfbb
RW
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8477$as_echo "$RANLIB" >&6; }
bec39cab 8478else
81ecdfbb
RW
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8480$as_echo "no" >&6; }
bec39cab
AC
8481fi
8482
81ecdfbb 8483
bec39cab
AC
8484fi
8485if test -z "$ac_cv_prog_RANLIB"; then
8486 ac_ct_RANLIB=$RANLIB
8487 # Extract the first word of "ranlib", so it can be a program name with args.
8488set dummy ranlib; ac_word=$2
81ecdfbb
RW
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8492 $as_echo_n "(cached) " >&6
bec39cab
AC
8493else
8494 if test -n "$ac_ct_RANLIB"; then
8495 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8496else
8497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500 IFS=$as_save_IFS
8501 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8502 for ac_exec_ext in '' $ac_executable_extensions; do
8503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8504 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8506 break 2
8507 fi
8508done
81ecdfbb
RW
8509 done
8510IFS=$as_save_IFS
bec39cab 8511
bec39cab
AC
8512fi
8513fi
8514ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8515if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8517$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8518else
81ecdfbb
RW
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520$as_echo "no" >&6; }
bec39cab
AC
8521fi
8522
81ecdfbb
RW
8523 if test "x$ac_ct_RANLIB" = x; then
8524 RANLIB=":"
8525 else
8526 case $cross_compiling:$ac_tool_warned in
8527yes:)
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8530ac_tool_warned=yes ;;
8531esac
8532 RANLIB=$ac_ct_RANLIB
8533 fi
bec39cab
AC
8534else
8535 RANLIB="$ac_cv_prog_RANLIB"
8536fi
8537
8538for ac_prog in 'bison -y' byacc
8539do
8540 # Extract the first word of "$ac_prog", so it can be a program name with args.
8541set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543$as_echo_n "checking for $ac_word... " >&6; }
8544if test "${ac_cv_prog_YACC+set}" = set; then :
8545 $as_echo_n "(cached) " >&6
bec39cab
AC
8546else
8547 if test -n "$YACC"; then
8548 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8549else
8550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553 IFS=$as_save_IFS
8554 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8555 for ac_exec_ext in '' $ac_executable_extensions; do
8556 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8557 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8559 break 2
8560 fi
8561done
81ecdfbb
RW
8562 done
8563IFS=$as_save_IFS
bec39cab
AC
8564
8565fi
8566fi
8567YACC=$ac_cv_prog_YACC
8568if test -n "$YACC"; then
81ecdfbb
RW
8569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8570$as_echo "$YACC" >&6; }
bec39cab 8571else
81ecdfbb
RW
8572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
bec39cab
AC
8574fi
8575
81ecdfbb 8576
bec39cab
AC
8577 test -n "$YACC" && break
8578done
8579test -n "$YACC" || YACC="yacc"
8580
8581
8582if test -n "$ac_tool_prefix"; then
8583 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8584set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8586$as_echo_n "checking for $ac_word... " >&6; }
8587if test "${ac_cv_prog_AR+set}" = set; then :
8588 $as_echo_n "(cached) " >&6
bec39cab
AC
8589else
8590 if test -n "$AR"; then
8591 ac_cv_prog_AR="$AR" # Let the user override the test.
8592else
8593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8594for as_dir in $PATH
8595do
8596 IFS=$as_save_IFS
8597 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8598 for ac_exec_ext in '' $ac_executable_extensions; do
8599 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8600 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8602 break 2
8603 fi
8604done
81ecdfbb
RW
8605 done
8606IFS=$as_save_IFS
bec39cab
AC
8607
8608fi
8609fi
8610AR=$ac_cv_prog_AR
8611if test -n "$AR"; then
81ecdfbb
RW
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8613$as_echo "$AR" >&6; }
bec39cab 8614else
81ecdfbb
RW
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8616$as_echo "no" >&6; }
bec39cab
AC
8617fi
8618
81ecdfbb 8619
bec39cab
AC
8620fi
8621if test -z "$ac_cv_prog_AR"; then
8622 ac_ct_AR=$AR
8623 # Extract the first word of "ar", so it can be a program name with args.
8624set dummy ar; ac_word=$2
81ecdfbb
RW
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626$as_echo_n "checking for $ac_word... " >&6; }
8627if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
bec39cab
AC
8629else
8630 if test -n "$ac_ct_AR"; then
8631 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8632else
8633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636 IFS=$as_save_IFS
8637 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8638 for ac_exec_ext in '' $ac_executable_extensions; do
8639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8640 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8642 break 2
8643 fi
8644done
81ecdfbb
RW
8645 done
8646IFS=$as_save_IFS
bec39cab
AC
8647
8648fi
8649fi
8650ac_ct_AR=$ac_cv_prog_ac_ct_AR
8651if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8653$as_echo "$ac_ct_AR" >&6; }
bec39cab 8654else
81ecdfbb
RW
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656$as_echo "no" >&6; }
bec39cab
AC
8657fi
8658
81ecdfbb
RW
8659 if test "x$ac_ct_AR" = x; then
8660 AR=""
8661 else
8662 case $cross_compiling:$ac_tool_warned in
8663yes:)
8664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8666ac_tool_warned=yes ;;
8667esac
8668 AR=$ac_ct_AR
8669 fi
bec39cab
AC
8670else
8671 AR="$ac_cv_prog_AR"
8672fi
8673
8674if test -n "$ac_tool_prefix"; then
8675 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8676set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8680 $as_echo_n "(cached) " >&6
bec39cab
AC
8681else
8682 if test -n "$DLLTOOL"; then
8683 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8684else
8685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688 IFS=$as_save_IFS
8689 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8690 for ac_exec_ext in '' $ac_executable_extensions; do
8691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8692 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8694 break 2
8695 fi
8696done
81ecdfbb
RW
8697 done
8698IFS=$as_save_IFS
bec39cab
AC
8699
8700fi
8701fi
8702DLLTOOL=$ac_cv_prog_DLLTOOL
8703if test -n "$DLLTOOL"; then
81ecdfbb
RW
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8705$as_echo "$DLLTOOL" >&6; }
bec39cab 8706else
81ecdfbb
RW
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
bec39cab
AC
8709fi
8710
81ecdfbb 8711
bec39cab
AC
8712fi
8713if test -z "$ac_cv_prog_DLLTOOL"; then
8714 ac_ct_DLLTOOL=$DLLTOOL
8715 # Extract the first word of "dlltool", so it can be a program name with args.
8716set dummy dlltool; ac_word=$2
81ecdfbb
RW
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718$as_echo_n "checking for $ac_word... " >&6; }
8719if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8720 $as_echo_n "(cached) " >&6
bec39cab
AC
8721else
8722 if test -n "$ac_ct_DLLTOOL"; then
8723 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8724else
8725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8726for as_dir in $PATH
8727do
8728 IFS=$as_save_IFS
8729 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8730 for ac_exec_ext in '' $ac_executable_extensions; do
8731 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8732 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8734 break 2
8735 fi
8736done
81ecdfbb
RW
8737 done
8738IFS=$as_save_IFS
bec39cab
AC
8739
8740fi
8741fi
8742ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8743if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8745$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8746else
81ecdfbb
RW
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748$as_echo "no" >&6; }
bec39cab
AC
8749fi
8750
81ecdfbb
RW
8751 if test "x$ac_ct_DLLTOOL" = x; then
8752 DLLTOOL=""
8753 else
8754 case $cross_compiling:$ac_tool_warned in
8755yes:)
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8758ac_tool_warned=yes ;;
8759esac
8760 DLLTOOL=$ac_ct_DLLTOOL
8761 fi
bec39cab
AC
8762else
8763 DLLTOOL="$ac_cv_prog_DLLTOOL"
8764fi
8765
8766if test -n "$ac_tool_prefix"; then
8767 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8768set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if test "${ac_cv_prog_WINDRES+set}" = set; then :
8772 $as_echo_n "(cached) " >&6
bec39cab
AC
8773else
8774 if test -n "$WINDRES"; then
8775 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8776else
8777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8778for as_dir in $PATH
8779do
8780 IFS=$as_save_IFS
8781 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8782 for ac_exec_ext in '' $ac_executable_extensions; do
8783 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8784 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8786 break 2
8787 fi
8788done
81ecdfbb
RW
8789 done
8790IFS=$as_save_IFS
bec39cab
AC
8791
8792fi
8793fi
8794WINDRES=$ac_cv_prog_WINDRES
8795if test -n "$WINDRES"; then
81ecdfbb
RW
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8797$as_echo "$WINDRES" >&6; }
bec39cab 8798else
81ecdfbb
RW
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800$as_echo "no" >&6; }
bec39cab
AC
8801fi
8802
81ecdfbb 8803
bec39cab
AC
8804fi
8805if test -z "$ac_cv_prog_WINDRES"; then
8806 ac_ct_WINDRES=$WINDRES
8807 # Extract the first word of "windres", so it can be a program name with args.
8808set dummy windres; ac_word=$2
81ecdfbb
RW
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8810$as_echo_n "checking for $ac_word... " >&6; }
8811if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8812 $as_echo_n "(cached) " >&6
bec39cab
AC
8813else
8814 if test -n "$ac_ct_WINDRES"; then
8815 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8816else
8817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8818for as_dir in $PATH
8819do
8820 IFS=$as_save_IFS
8821 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8822 for ac_exec_ext in '' $ac_executable_extensions; do
8823 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8824 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8826 break 2
8827 fi
8828done
81ecdfbb
RW
8829 done
8830IFS=$as_save_IFS
bec39cab
AC
8831
8832fi
8833fi
8834ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8835if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8837$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8838else
81ecdfbb
RW
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8840$as_echo "no" >&6; }
c906108c 8841fi
bec39cab 8842
81ecdfbb
RW
8843 if test "x$ac_ct_WINDRES" = x; then
8844 WINDRES=""
8845 else
8846 case $cross_compiling:$ac_tool_warned in
8847yes:)
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8850ac_tool_warned=yes ;;
8851esac
8852 WINDRES=$ac_ct_WINDRES
8853 fi
c906108c 8854else
bec39cab 8855 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8856fi
8857
bec39cab
AC
8858
8859# Needed for GNU/Hurd.
8860if test -n "$ac_tool_prefix"; then
8861 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8862set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8864$as_echo_n "checking for $ac_word... " >&6; }
8865if test "${ac_cv_prog_MIG+set}" = set; then :
8866 $as_echo_n "(cached) " >&6
c906108c 8867else
bec39cab
AC
8868 if test -n "$MIG"; then
8869 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8870else
8871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872for as_dir in $PATH
8873do
8874 IFS=$as_save_IFS
8875 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8876 for ac_exec_ext in '' $ac_executable_extensions; do
8877 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8878 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8880 break 2
8881 fi
8882done
81ecdfbb
RW
8883 done
8884IFS=$as_save_IFS
bec39cab 8885
c906108c 8886fi
bec39cab
AC
8887fi
8888MIG=$ac_cv_prog_MIG
8889if test -n "$MIG"; then
81ecdfbb
RW
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8891$as_echo "$MIG" >&6; }
c906108c 8892else
81ecdfbb
RW
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8894$as_echo "no" >&6; }
c906108c
SS
8895fi
8896
81ecdfbb 8897
bec39cab
AC
8898fi
8899if test -z "$ac_cv_prog_MIG"; then
8900 ac_ct_MIG=$MIG
8901 # Extract the first word of "mig", so it can be a program name with args.
8902set dummy mig; ac_word=$2
81ecdfbb
RW
8903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8904$as_echo_n "checking for $ac_word... " >&6; }
8905if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8906 $as_echo_n "(cached) " >&6
bec39cab
AC
8907else
8908 if test -n "$ac_ct_MIG"; then
8909 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8910else
8911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8912for as_dir in $PATH
8913do
8914 IFS=$as_save_IFS
8915 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8916 for ac_exec_ext in '' $ac_executable_extensions; do
8917 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8918 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8920 break 2
8921 fi
8922done
81ecdfbb
RW
8923 done
8924IFS=$as_save_IFS
c906108c 8925
bec39cab
AC
8926fi
8927fi
8928ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8929if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8931$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8932else
81ecdfbb
RW
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934$as_echo "no" >&6; }
bec39cab 8935fi
c906108c 8936
81ecdfbb
RW
8937 if test "x$ac_ct_MIG" = x; then
8938 MIG=""
8939 else
8940 case $cross_compiling:$ac_tool_warned in
8941yes:)
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8944ac_tool_warned=yes ;;
8945esac
8946 MIG=$ac_ct_MIG
8947 fi
bec39cab
AC
8948else
8949 MIG="$ac_cv_prog_MIG"
8950fi
c906108c 8951
c906108c 8952
bec39cab
AC
8953# ---------------------- #
8954# Checks for libraries. #
8955# ---------------------- #
c906108c 8956
bec39cab 8957# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8959$as_echo_n "checking for main in -lm... " >&6; }
8960if test "${ac_cv_lib_m_main+set}" = set; then :
8961 $as_echo_n "(cached) " >&6
bec39cab
AC
8962else
8963 ac_check_lib_save_LIBS=$LIBS
8964LIBS="-lm $LIBS"
81ecdfbb 8965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8966/* end confdefs.h. */
c906108c 8967
c906108c 8968
bec39cab
AC
8969int
8970main ()
8971{
81ecdfbb 8972return main ();
bec39cab
AC
8973 ;
8974 return 0;
8975}
8976_ACEOF
81ecdfbb 8977if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8978 ac_cv_lib_m_main=yes
8979else
81ecdfbb 8980 ac_cv_lib_m_main=no
bec39cab 8981fi
81ecdfbb
RW
8982rm -f core conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8984LIBS=$ac_check_lib_save_LIBS
8985fi
81ecdfbb
RW
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8987$as_echo "$ac_cv_lib_m_main" >&6; }
8988if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
8989 cat >>confdefs.h <<_ACEOF
8990#define HAVE_LIBM 1
8991_ACEOF
8992
8993 LIBS="-lm $LIBS"
c906108c 8994
c906108c 8995fi
bec39cab
AC
8996
8997
8998# We need to link with -lw to get `wctype' on Solaris before Solaris
8999# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9000# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9001# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9002ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9003if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9004
c906108c 9005else
81ecdfbb
RW
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9007$as_echo_n "checking for wctype in -lw... " >&6; }
9008if test "${ac_cv_lib_w_wctype+set}" = set; then :
9009 $as_echo_n "(cached) " >&6
bec39cab
AC
9010else
9011 ac_check_lib_save_LIBS=$LIBS
9012LIBS="-lw $LIBS"
81ecdfbb 9013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9014/* end confdefs.h. */
c906108c 9015
81ecdfbb
RW
9016/* Override any GCC internal prototype to avoid an error.
9017 Use char because int might match the return type of a GCC
9018 builtin and then its argument prototype would still apply. */
bec39cab
AC
9019#ifdef __cplusplus
9020extern "C"
9021#endif
bec39cab
AC
9022char wctype ();
9023int
9024main ()
9025{
81ecdfbb 9026return wctype ();
bec39cab
AC
9027 ;
9028 return 0;
9029}
9030_ACEOF
81ecdfbb 9031if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9032 ac_cv_lib_w_wctype=yes
9033else
81ecdfbb 9034 ac_cv_lib_w_wctype=no
bec39cab 9035fi
81ecdfbb
RW
9036rm -f core conftest.err conftest.$ac_objext \
9037 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9038LIBS=$ac_check_lib_save_LIBS
9039fi
81ecdfbb
RW
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9041$as_echo "$ac_cv_lib_w_wctype" >&6; }
9042if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9043 cat >>confdefs.h <<_ACEOF
9044#define HAVE_LIBW 1
9045_ACEOF
c906108c 9046
bec39cab 9047 LIBS="-lw $LIBS"
c906108c 9048
bec39cab 9049fi
c906108c 9050
bec39cab 9051fi
c906108c 9052
ddc9cd0f 9053
bec39cab 9054# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9056$as_echo_n "checking for library containing gethostbyname... " >&6; }
9057if test "${ac_cv_search_gethostbyname+set}" = set; then :
9058 $as_echo_n "(cached) " >&6
bec39cab
AC
9059else
9060 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9062/* end confdefs.h. */
ddc9cd0f 9063
81ecdfbb
RW
9064/* Override any GCC internal prototype to avoid an error.
9065 Use char because int might match the return type of a GCC
9066 builtin and then its argument prototype would still apply. */
bec39cab
AC
9067#ifdef __cplusplus
9068extern "C"
9069#endif
bec39cab
AC
9070char gethostbyname ();
9071int
9072main ()
9073{
81ecdfbb 9074return gethostbyname ();
bec39cab
AC
9075 ;
9076 return 0;
9077}
9078_ACEOF
81ecdfbb
RW
9079for ac_lib in '' nsl; do
9080 if test -z "$ac_lib"; then
9081 ac_res="none required"
9082 else
9083 ac_res=-l$ac_lib
b4e70030 9084 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9085 fi
9086 if ac_fn_c_try_link "$LINENO"; then :
9087 ac_cv_search_gethostbyname=$ac_res
9088fi
9089rm -f core conftest.err conftest.$ac_objext \
9090 conftest$ac_exeext
9091 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9092 break
9093fi
9094done
9095if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9096
bec39cab 9097else
81ecdfbb 9098 ac_cv_search_gethostbyname=no
bec39cab 9099fi
81ecdfbb 9100rm conftest.$ac_ext
bec39cab
AC
9101LIBS=$ac_func_search_save_LIBS
9102fi
81ecdfbb
RW
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9104$as_echo "$ac_cv_search_gethostbyname" >&6; }
9105ac_res=$ac_cv_search_gethostbyname
9106if test "$ac_res" != no; then :
9107 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9108
bec39cab 9109fi
96baa820 9110
c906108c 9111
b4e70030 9112# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9114$as_echo_n "checking for library containing socketpair... " >&6; }
9115if test "${ac_cv_search_socketpair+set}" = set; then :
9116 $as_echo_n "(cached) " >&6
b4e70030
JB
9117else
9118 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9120/* end confdefs.h. */
9121
81ecdfbb
RW
9122/* Override any GCC internal prototype to avoid an error.
9123 Use char because int might match the return type of a GCC
9124 builtin and then its argument prototype would still apply. */
b4e70030
JB
9125#ifdef __cplusplus
9126extern "C"
9127#endif
b4e70030
JB
9128char socketpair ();
9129int
9130main ()
9131{
81ecdfbb 9132return socketpair ();
b4e70030
JB
9133 ;
9134 return 0;
9135}
9136_ACEOF
81ecdfbb
RW
9137for ac_lib in '' socket; do
9138 if test -z "$ac_lib"; then
9139 ac_res="none required"
9140 else
9141 ac_res=-l$ac_lib
b4e70030 9142 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9143 fi
9144 if ac_fn_c_try_link "$LINENO"; then :
9145 ac_cv_search_socketpair=$ac_res
9146fi
9147rm -f core conftest.err conftest.$ac_objext \
9148 conftest$ac_exeext
9149 if test "${ac_cv_search_socketpair+set}" = set; then :
9150 break
9151fi
9152done
9153if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9154
b4e70030 9155else
81ecdfbb 9156 ac_cv_search_socketpair=no
b4e70030 9157fi
81ecdfbb 9158rm conftest.$ac_ext
b4e70030
JB
9159LIBS=$ac_func_search_save_LIBS
9160fi
81ecdfbb
RW
9161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9162$as_echo "$ac_cv_search_socketpair" >&6; }
9163ac_res=$ac_cv_search_socketpair
9164if test "$ac_res" != no; then :
9165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9166
9167fi
9168
9169
233a11ab 9170# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9171
9172 # See if the user specified whether he wants zlib support or not.
9173
9174# Check whether --with-zlib was given.
9175if test "${with_zlib+set}" = set; then :
9176 withval=$with_zlib;
9177else
9178 with_zlib=auto
9179fi
9180
9181
9182 if test "$with_zlib" != "no"; then
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9184$as_echo_n "checking for library containing zlibVersion... " >&6; }
9185if test "${ac_cv_search_zlibVersion+set}" = set; then :
9186 $as_echo_n "(cached) " >&6
233a11ab
CS
9187else
9188 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9190/* end confdefs.h. */
9191
81ecdfbb
RW
9192/* Override any GCC internal prototype to avoid an error.
9193 Use char because int might match the return type of a GCC
233a11ab 9194 builtin and then its argument prototype would still apply. */
233a11ab
CS
9195#ifdef __cplusplus
9196extern "C"
9197#endif
233a11ab
CS
9198char zlibVersion ();
9199int
9200main ()
9201{
81ecdfbb 9202return zlibVersion ();
233a11ab
CS
9203 ;
9204 return 0;
9205}
9206_ACEOF
81ecdfbb
RW
9207for ac_lib in '' z; do
9208 if test -z "$ac_lib"; then
9209 ac_res="none required"
233a11ab 9210 else
81ecdfbb
RW
9211 ac_res=-l$ac_lib
9212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9213 fi
81ecdfbb
RW
9214 if ac_fn_c_try_link "$LINENO"; then :
9215 ac_cv_search_zlibVersion=$ac_res
233a11ab 9216fi
81ecdfbb
RW
9217rm -f core conftest.err conftest.$ac_objext \
9218 conftest$ac_exeext
9219 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9220 break
233a11ab 9221fi
81ecdfbb
RW
9222done
9223if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9224
233a11ab 9225else
81ecdfbb 9226 ac_cv_search_zlibVersion=no
233a11ab 9227fi
81ecdfbb
RW
9228rm conftest.$ac_ext
9229LIBS=$ac_func_search_save_LIBS
233a11ab 9230fi
81ecdfbb
RW
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9232$as_echo "$ac_cv_search_zlibVersion" >&6; }
9233ac_res=$ac_cv_search_zlibVersion
9234if test "$ac_res" != no; then :
9235 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9236 for ac_header in zlib.h
9237do :
9238 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9239if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9240 cat >>confdefs.h <<_ACEOF
81ecdfbb 9241#define HAVE_ZLIB_H 1
233a11ab
CS
9242_ACEOF
9243
9244fi
9245
9246done
9247
9248fi
9249
b040ad30
JB
9250 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9251 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9252 fi
9253 fi
9254
233a11ab 9255
77f120bf 9256# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9258$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9259if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9260 $as_echo_n "(cached) " >&6
bec39cab
AC
9261else
9262 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9264/* end confdefs.h. */
c906108c 9265
81ecdfbb
RW
9266/* Override any GCC internal prototype to avoid an error.
9267 Use char because int might match the return type of a GCC
9268 builtin and then its argument prototype would still apply. */
bec39cab
AC
9269#ifdef __cplusplus
9270extern "C"
9271#endif
77f120bf 9272char dlgetmodinfo ();
bec39cab
AC
9273int
9274main ()
9275{
81ecdfbb 9276return dlgetmodinfo ();
bec39cab
AC
9277 ;
9278 return 0;
9279}
9280_ACEOF
81ecdfbb
RW
9281for ac_lib in '' dl xpdl; do
9282 if test -z "$ac_lib"; then
9283 ac_res="none required"
9284 else
9285 ac_res=-l$ac_lib
b4e70030 9286 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9287 fi
9288 if ac_fn_c_try_link "$LINENO"; then :
9289 ac_cv_search_dlgetmodinfo=$ac_res
9290fi
9291rm -f core conftest.err conftest.$ac_objext \
9292 conftest$ac_exeext
9293 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9294 break
9295fi
9296done
9297if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9298
4e8d927d 9299else
81ecdfbb 9300 ac_cv_search_dlgetmodinfo=no
1ba607ad 9301fi
81ecdfbb 9302rm conftest.$ac_ext
bec39cab
AC
9303LIBS=$ac_func_search_save_LIBS
9304fi
81ecdfbb
RW
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9306$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9307ac_res=$ac_cv_search_dlgetmodinfo
9308if test "$ac_res" != no; then :
9309 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9310
8bb2c122 9311fi
8bb2c122 9312
8bb2c122 9313
77f120bf 9314
77f120bf 9315
6c7a06a3 9316
81ecdfbb
RW
9317# Check whether --with-libiconv-prefix was given.
9318if test "${with_libiconv_prefix+set}" = set; then :
9319 withval=$with_libiconv_prefix;
6c7a06a3 9320 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9321 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9322 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9323 done
9324
81ecdfbb
RW
9325fi
9326
6c7a06a3 9327
f18c4681 9328 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9329 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9330
81ecdfbb
RW
9331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9332$as_echo_n "checking for iconv... " >&6; }
9333if test "${am_cv_func_iconv+set}" = set; then :
9334 $as_echo_n "(cached) " >&6
d542061a 9335else
6c7a06a3
TT
9336
9337 am_cv_func_iconv="no, consider installing GNU libiconv"
9338 am_cv_lib_iconv=no
9339 am_cv_use_build_libiconv=no
f0f20949 9340 am_cv_build_libiconv_path=
4edb1e84
JB
9341
9342 # If libiconv is part of the build tree, then try using it over
9343 # any system iconv.
9344 if test -d ../libiconv; then
f18c4681
JB
9345 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9346 am_save_LIBS="$LIBS"
9347 am_save_CPPFLAGS="$CPPFLAGS"
9348 LIBS="$LIBS $lib_dir/libiconv.a"
9349 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9351/* end confdefs.h. */
6c7a06a3
TT
9352#include <stdlib.h>
9353#include <iconv.h>
d542061a
UW
9354int
9355main ()
9356{
6c7a06a3 9357iconv_t cd = iconv_open("","");
f18c4681
JB
9358 iconv(cd,NULL,NULL,NULL,NULL);
9359 iconv_close(cd);
d542061a
UW
9360 ;
9361 return 0;
9362}
9363_ACEOF
81ecdfbb 9364if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9365 am_cv_use_build_libiconv=yes
f0f20949 9366 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9367 am_cv_lib_iconv=yes
9368 am_cv_func_iconv=yes
d542061a 9369fi
81ecdfbb
RW
9370rm -f core conftest.err conftest.$ac_objext \
9371 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9372 LIBS="$am_save_LIBS"
9373 CPPFLAGS="$am_save_CPPFLAGS"
9374 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9375 break
9376 fi
9377 done
4edb1e84 9378 fi
94ae1714 9379
4edb1e84 9380 # Next, try to find iconv in libc.
6c7a06a3 9381 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9383/* end confdefs.h. */
6c7a06a3
TT
9384#include <stdlib.h>
9385#include <iconv.h>
d542061a
UW
9386int
9387main ()
9388{
6c7a06a3
TT
9389iconv_t cd = iconv_open("","");
9390 iconv(cd,NULL,NULL,NULL,NULL);
9391 iconv_close(cd);
d542061a
UW
9392 ;
9393 return 0;
9394}
9395_ACEOF
81ecdfbb 9396if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9397 am_cv_func_iconv=yes
d542061a 9398fi
81ecdfbb
RW
9399rm -f core conftest.err conftest.$ac_objext \
9400 conftest$ac_exeext conftest.$ac_ext
77f120bf 9401 fi
94ae1714 9402
4edb1e84
JB
9403 # If iconv was not in libc, try -liconv. In this case, arrange to
9404 # look in the libiconv prefix, if it was specified by the user.
9405 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9406 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9407 am_save_LIBS="$LIBS"
9408 if test -n "$LIBICONV_INCLUDE"; then
9409 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9410 LIBS="$LIBS $LIBICONV_LIBDIR"
9411 fi
9412 LIBS="$LIBS -liconv"
81ecdfbb 9413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9414/* end confdefs.h. */
6c7a06a3
TT
9415#include <stdlib.h>
9416#include <iconv.h>
bec39cab
AC
9417int
9418main ()
9419{
6c7a06a3
TT
9420iconv_t cd = iconv_open("","");
9421 iconv(cd,NULL,NULL,NULL,NULL);
9422 iconv_close(cd);
bec39cab
AC
9423 ;
9424 return 0;
9425}
9426_ACEOF
81ecdfbb 9427if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9428 am_cv_lib_iconv=yes
6c7a06a3 9429 am_cv_func_iconv=yes
627af7ea 9430fi
81ecdfbb
RW
9431rm -f core conftest.err conftest.$ac_objext \
9432 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9433 LIBS="$am_save_LIBS"
fc3b640d 9434 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9435 fi
9436
9437fi
81ecdfbb
RW
9438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9439$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9440
9441 # Set the various flags based on the cache variables. We can't rely
9442 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9443 LIBICONV=
9444 if test "$am_cv_lib_iconv" = yes; then
9445 LIBICONV="-liconv"
94ae1714
TT
9446 else
9447 LIBICONV_LIBDIR=
9448 LIBICONV_INCLUDE=
fc3b640d
TT
9449 fi
9450 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9451 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9452 LIBICONV_LIBDIR=""
fc3b640d
TT
9453 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9454 fi
9455 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9456 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9457
6c7a06a3
TT
9458 if test "$am_cv_func_iconv" = yes; then
9459
81ecdfbb 9460$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9461
81ecdfbb
RW
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9463$as_echo_n "checking for iconv declaration... " >&6; }
9464 if test "${am_cv_proto_iconv+set}" = set; then :
9465 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9466else
9467
81ecdfbb 9468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9469/* end confdefs.h. */
9470
6c7a06a3
TT
9471#include <stdlib.h>
9472#include <iconv.h>
9473extern
b4e70030 9474#ifdef __cplusplus
6c7a06a3 9475"C"
b4e70030 9476#endif
6c7a06a3
TT
9477#if defined(__STDC__) || defined(__cplusplus)
9478size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9479#else
9480size_t iconv();
9481#endif
9482
b4e70030
JB
9483int
9484main ()
9485{
6c7a06a3 9486
b4e70030
JB
9487 ;
9488 return 0;
9489}
9490_ACEOF
81ecdfbb 9491if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9492 am_cv_proto_iconv_arg1=""
4e8d927d 9493else
81ecdfbb 9494 am_cv_proto_iconv_arg1="const"
b4e70030 9495fi
81ecdfbb 9496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9497 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);"
9498fi
9499
9500 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9502 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9503$as_echo "${ac_t:-
9504 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9505
9506cat >>confdefs.h <<_ACEOF
9507#define ICONV_CONST $am_cv_proto_iconv_arg1
9508_ACEOF
9509
9510 fi
6c7a06a3
TT
9511
9512
9513# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9514# There is a very specific comment in /usr/include/curses.h explaining that
9515# termcap routines built into libcurses must not be used.
9516#
9517# The symptoms we observed so far is GDB unexpectedly changing
9518# the terminal settings when tgetent is called - this is particularly
9519# visible as the output is missing carriage returns, and so rapidly
9520# becomes very hard to read.
9521#
9522# The readline configure script has already decided that libtermcap
9523# was enough for its purposes, and so decided to build readline using
9524# libtermcap. Since the TUI mode requires curses, building GDB with
9525# TUI enabled results in both libraries to be used at the same time,
9526# which is not allowed. This basically means that GDB with TUI is
9527# broken on alpha-osf.
9528
9529case $host_os in
6bcc772d
RO
9530 osf* )
9531 if test x"$enable_tui" = xyes; then
81ecdfbb 9532 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9533 fi
6bcc772d 9534 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9535 enable_tui=no
9536 fi
9537 ;;
9538esac
9539
cb01cfba 9540# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9541if test x"$enable_tui" != xno; then
cb01cfba
JB
9542 prefer_curses=yes
9543fi
9544
9545curses_found=no
9546if test x"$prefer_curses" = xyes; then
9547 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9548 # curses library because the latter might not provide all the
9549 # functionality we need. However, this leads to problems on systems
9550 # where the linker searches /usr/local/lib, but the compiler doesn't
9551 # search /usr/local/include, if ncurses is installed in /usr/local. A
9552 # default installation of ncurses on alpha*-dec-osf* will lead to such
9553 # a situation.
81ecdfbb
RW
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9555$as_echo_n "checking for library containing waddstr... " >&6; }
9556if test "${ac_cv_search_waddstr+set}" = set; then :
9557 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9558else
9559 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9561/* end confdefs.h. */
9562
81ecdfbb
RW
9563/* Override any GCC internal prototype to avoid an error.
9564 Use char because int might match the return type of a GCC
9565 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9566#ifdef __cplusplus
9567extern "C"
9568#endif
6c7a06a3
TT
9569char waddstr ();
9570int
9571main ()
9572{
81ecdfbb 9573return waddstr ();
6c7a06a3
TT
9574 ;
9575 return 0;
9576}
9577_ACEOF
81ecdfbb
RW
9578for ac_lib in '' ncurses cursesX curses; do
9579 if test -z "$ac_lib"; then
9580 ac_res="none required"
9581 else
9582 ac_res=-l$ac_lib
9583 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9584 fi
9585 if ac_fn_c_try_link "$LINENO"; then :
9586 ac_cv_search_waddstr=$ac_res
9587fi
9588rm -f core conftest.err conftest.$ac_objext \
9589 conftest$ac_exeext
9590 if test "${ac_cv_search_waddstr+set}" = set; then :
9591 break
9592fi
9593done
9594if test "${ac_cv_search_waddstr+set}" = set; then :
9595
6c7a06a3 9596else
81ecdfbb
RW
9597 ac_cv_search_waddstr=no
9598fi
9599rm conftest.$ac_ext
9600LIBS=$ac_func_search_save_LIBS
9601fi
9602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9603$as_echo "$ac_cv_search_waddstr" >&6; }
9604ac_res=$ac_cv_search_waddstr
9605if test "$ac_res" != no; then :
9606 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9607
9608fi
9609
9610
cb01cfba
JB
9611 if test "$ac_cv_search_waddstr" != no; then
9612 curses_found=yes
9613 fi
9614fi
9615
9616# Check whether we should enable the TUI, but only do so if we really
9617# can.
9618if test x"$enable_tui" != xno; then
9619 if test -d $srcdir/tui; then
9620 if test "$curses_found" != no; then
6c7a06a3
TT
9621 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9622 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9623 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9624 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9625 CONFIG_ALL="${CONFIG_ALL} all-tui"
9626 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9627 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9628 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9629 else
9630 if test x"$enable_tui" = xyes; then
81ecdfbb 9631 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9632 else
81ecdfbb
RW
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9634$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9635 fi
9636 fi
9637 fi
9638fi
9639
9640# Since GDB uses Readline, we need termcap functionality. In many
9641# cases this will be provided by the curses library, but some systems
9642# have a seperate termcap library, or no curses library at all.
9643
9644case $host_os in
9645 cygwin*)
9646 if test -d $srcdir/libtermcap; then
9647 LIBS="../libtermcap/libtermcap.a $LIBS"
9648 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9649 fi ;;
9650 go32* | *djgpp*)
9651 ac_cv_search_tgetent="none required"
9652 ;;
9653 *mingw32*)
9654 ac_cv_search_tgetent="none required"
9655 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9656 ;;
9657esac
9658
9659# These are the libraries checked by Readline.
81ecdfbb
RW
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9661$as_echo_n "checking for library containing tgetent... " >&6; }
9662if test "${ac_cv_search_tgetent+set}" = set; then :
9663 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9664else
9665 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9667/* end confdefs.h. */
9668
81ecdfbb
RW
9669/* Override any GCC internal prototype to avoid an error.
9670 Use char because int might match the return type of a GCC
9671 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9672#ifdef __cplusplus
9673extern "C"
9674#endif
6c7a06a3
TT
9675char tgetent ();
9676int
9677main ()
9678{
81ecdfbb 9679return tgetent ();
6c7a06a3
TT
9680 ;
9681 return 0;
9682}
9683_ACEOF
81ecdfbb
RW
9684for ac_lib in '' termcap tinfo curses ncurses; do
9685 if test -z "$ac_lib"; then
9686 ac_res="none required"
9687 else
9688 ac_res=-l$ac_lib
6c7a06a3 9689 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9690 fi
9691 if ac_fn_c_try_link "$LINENO"; then :
9692 ac_cv_search_tgetent=$ac_res
9693fi
9694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext
9696 if test "${ac_cv_search_tgetent+set}" = set; then :
9697 break
9698fi
9699done
9700if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9701
6c7a06a3 9702else
81ecdfbb 9703 ac_cv_search_tgetent=no
6c7a06a3 9704fi
81ecdfbb 9705rm conftest.$ac_ext
6c7a06a3
TT
9706LIBS=$ac_func_search_save_LIBS
9707fi
81ecdfbb
RW
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9709$as_echo "$ac_cv_search_tgetent" >&6; }
9710ac_res=$ac_cv_search_tgetent
9711if test "$ac_res" != no; then :
9712 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9713
06825bd1
MK
9714fi
9715
06825bd1 9716
bec39cab 9717if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9718 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9719fi
9720
3841debe 9721
81ecdfbb
RW
9722# Check whether --with-system-readline was given.
9723if test "${with_system_readline+set}" = set; then :
9724 withval=$with_system_readline;
9725fi
6a30b0a5 9726
6a30b0a5
AS
9727
9728if test "$with_system_readline" = yes; then
9729 READLINE=-lreadline
9730 READLINE_DEPS=
9731 READLINE_CFLAGS=
a71e0887
JK
9732
9733 # readline-6.0 started to use the name `_rl_echoing_p'.
9734 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
9735
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
9737$as_echo_n "checking for readline_echoing_p... " >&6; }
9738 save_LIBS=$LIBS
9739 LIBS="$LIBS $READLINE"
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741/* end confdefs.h. */
9742
9743int
9744main ()
9745{
9746extern int readline_echoing_p;
9747 return readline_echoing_p;
9748 ;
9749 return 0;
9750}
9751_ACEOF
9752if ac_fn_c_try_link "$LINENO"; then :
9753 READLINE_ECHOING_P=yes
9754else
9755 READLINE_ECHOING_P=no
9756
9757$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
9758
9759fi
9760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
9762 LIBS="$save_LIBS"
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
9764$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
9765else
9766 READLINE='$(READLINE_DIR)/libreadline.a'
9767 READLINE_DEPS='$(READLINE)'
9768 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9769fi
9770
9771
9772
9773
9774
81ecdfbb
RW
9775# Check whether --with-expat was given.
9776if test "${with_expat+set}" = set; then :
9777 withval=$with_expat;
5c39566f
DJ
9778else
9779 with_expat=auto
81ecdfbb
RW
9780fi
9781
9782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9783$as_echo_n "checking whether to use expat... " >&6; }
9784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9785$as_echo "$with_expat" >&6; }
5c39566f
DJ
9786
9787if test "${with_expat}" = no; then
81ecdfbb
RW
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9789$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9790 HAVE_LIBEXPAT=no
9791else
9792
3841debe
DJ
9793 if test "X$prefix" = "XNONE"; then
9794 acl_final_prefix="$ac_default_prefix"
9795 else
9796 acl_final_prefix="$prefix"
9797 fi
9798 if test "X$exec_prefix" = "XNONE"; then
9799 acl_final_exec_prefix='${prefix}'
9800 else
9801 acl_final_exec_prefix="$exec_prefix"
9802 fi
9803 acl_save_prefix="$prefix"
9804 prefix="$acl_final_prefix"
9805 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9806 prefix="$acl_save_prefix"
9807
9808
81ecdfbb
RW
9809# Check whether --with-gnu-ld was given.
9810if test "${with_gnu_ld+set}" = set; then :
9811 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9812else
9813 with_gnu_ld=no
81ecdfbb
RW
9814fi
9815
3841debe
DJ
9816# Prepare PATH_SEPARATOR.
9817# The user is always right.
9818if test "${PATH_SEPARATOR+set}" != set; then
9819 echo "#! /bin/sh" >conf$$.sh
9820 echo "exit 0" >>conf$$.sh
9821 chmod +x conf$$.sh
9822 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9823 PATH_SEPARATOR=';'
9824 else
9825 PATH_SEPARATOR=:
9826 fi
9827 rm -f conf$$.sh
9828fi
9829ac_prog=ld
9830if test "$GCC" = yes; then
9831 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9833$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9834 case $host in
9835 *-*-mingw*)
9836 # gcc leaves a trailing carriage return which upsets mingw
9837 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9838 *)
9839 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9840 esac
9841 case $ac_prog in
9842 # Accept absolute paths.
9843 [\\/]* | [A-Za-z]:[\\/]*)
9844 re_direlt='/[^/][^/]*/\.\./'
9845 # Canonicalize the path of ld
9846 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9847 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9848 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9849 done
9850 test -z "$LD" && LD="$ac_prog"
9851 ;;
9852 "")
9853 # If it fails, then pretend we aren't using GCC.
9854 ac_prog=ld
9855 ;;
9856 *)
9857 # If it is relative, then search for the first ld in PATH.
9858 with_gnu_ld=unknown
9859 ;;
9860 esac
9861elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9863$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9864else
81ecdfbb
RW
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9866$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9867fi
81ecdfbb
RW
9868if test "${acl_cv_path_LD+set}" = set; then :
9869 $as_echo_n "(cached) " >&6
3841debe
DJ
9870else
9871 if test -z "$LD"; then
9872 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9873 for ac_dir in $PATH; do
9874 test -z "$ac_dir" && ac_dir=.
9875 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9876 acl_cv_path_LD="$ac_dir/$ac_prog"
9877 # Check to see if the program is GNU ld. I'd rather use --version,
9878 # but apparently some GNU ld's only accept -v.
9879 # Break only if it was the GNU/non-GNU ld that we prefer.
9880 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9881 test "$with_gnu_ld" != no && break
9882 else
9883 test "$with_gnu_ld" != yes && break
9884 fi
9885 fi
9886 done
9887 IFS="$ac_save_ifs"
9888else
9889 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9890fi
9891fi
9892
9893LD="$acl_cv_path_LD"
9894if test -n "$LD"; then
81ecdfbb
RW
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9896$as_echo "$LD" >&6; }
3841debe 9897else
81ecdfbb
RW
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
3841debe 9900fi
81ecdfbb
RW
9901test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9903$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9904if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9905 $as_echo_n "(cached) " >&6
3841debe
DJ
9906else
9907 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9908if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9909 acl_cv_prog_gnu_ld=yes
9910else
9911 acl_cv_prog_gnu_ld=no
9912fi
9913fi
81ecdfbb
RW
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9915$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
9916with_gnu_ld=$acl_cv_prog_gnu_ld
9917
9918
9919
81ecdfbb
RW
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9921$as_echo_n "checking for shared library run path origin... " >&6; }
9922if test "${acl_cv_rpath+set}" = set; then :
9923 $as_echo_n "(cached) " >&6
3841debe
DJ
9924else
9925
9926 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9927 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9928 . ./conftest.sh
9929 rm -f ./conftest.sh
9930 acl_cv_rpath=done
9931
9932fi
81ecdfbb
RW
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9934$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
9935 wl="$acl_cv_wl"
9936 libext="$acl_cv_libext"
9937 shlibext="$acl_cv_shlibext"
9938 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9939 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9940 hardcode_direct="$acl_cv_hardcode_direct"
9941 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
9942 # Check whether --enable-rpath was given.
9943if test "${enable_rpath+set}" = set; then :
9944 enableval=$enable_rpath; :
3841debe
DJ
9945else
9946 enable_rpath=yes
81ecdfbb
RW
9947fi
9948
3841debe
DJ
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958 use_additional=yes
9959
9960 acl_save_prefix="$prefix"
9961 prefix="$acl_final_prefix"
9962 acl_save_exec_prefix="$exec_prefix"
9963 exec_prefix="$acl_final_exec_prefix"
9964
9965 eval additional_includedir=\"$includedir\"
9966 eval additional_libdir=\"$libdir\"
9967
9968 exec_prefix="$acl_save_exec_prefix"
9969 prefix="$acl_save_prefix"
9970
9971
81ecdfbb
RW
9972# Check whether --with-libexpat-prefix was given.
9973if test "${with_libexpat_prefix+set}" = set; then :
9974 withval=$with_libexpat_prefix;
3841debe
DJ
9975 if test "X$withval" = "Xno"; then
9976 use_additional=no
9977 else
9978 if test "X$withval" = "X"; then
9979
9980 acl_save_prefix="$prefix"
9981 prefix="$acl_final_prefix"
9982 acl_save_exec_prefix="$exec_prefix"
9983 exec_prefix="$acl_final_exec_prefix"
9984
9985 eval additional_includedir=\"$includedir\"
9986 eval additional_libdir=\"$libdir\"
9987
9988 exec_prefix="$acl_save_exec_prefix"
9989 prefix="$acl_save_prefix"
9990
9991 else
9992 additional_includedir="$withval/include"
9993 additional_libdir="$withval/lib"
9994 fi
9995 fi
9996
81ecdfbb
RW
9997fi
9998
3841debe
DJ
9999 LIBEXPAT=
10000 LTLIBEXPAT=
10001 INCEXPAT=
10002 rpathdirs=
10003 ltrpathdirs=
10004 names_already_handled=
10005 names_next_round='expat '
10006 while test -n "$names_next_round"; do
10007 names_this_round="$names_next_round"
10008 names_next_round=
10009 for name in $names_this_round; do
10010 already_handled=
10011 for n in $names_already_handled; do
10012 if test "$n" = "$name"; then
10013 already_handled=yes
10014 break
10015 fi
10016 done
10017 if test -z "$already_handled"; then
10018 names_already_handled="$names_already_handled $name"
10019 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10020 eval value=\"\$HAVE_LIB$uppername\"
10021 if test -n "$value"; then
10022 if test "$value" = yes; then
10023 eval value=\"\$LIB$uppername\"
10024 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10025 eval value=\"\$LTLIB$uppername\"
10026 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10027 else
10028 :
10029 fi
10030 else
10031 found_dir=
10032 found_la=
10033 found_so=
10034 found_a=
10035 if test $use_additional = yes; then
10036 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10037 found_dir="$additional_libdir"
10038 found_so="$additional_libdir/lib$name.$shlibext"
10039 if test -f "$additional_libdir/lib$name.la"; then
10040 found_la="$additional_libdir/lib$name.la"
10041 fi
10042 else
10043 if test -f "$additional_libdir/lib$name.$libext"; then
10044 found_dir="$additional_libdir"
10045 found_a="$additional_libdir/lib$name.$libext"
10046 if test -f "$additional_libdir/lib$name.la"; then
10047 found_la="$additional_libdir/lib$name.la"
10048 fi
10049 fi
10050 fi
10051 fi
10052 if test "X$found_dir" = "X"; then
10053 for x in $LDFLAGS $LTLIBEXPAT; do
10054
10055 acl_save_prefix="$prefix"
10056 prefix="$acl_final_prefix"
10057 acl_save_exec_prefix="$exec_prefix"
10058 exec_prefix="$acl_final_exec_prefix"
10059 eval x=\"$x\"
10060 exec_prefix="$acl_save_exec_prefix"
10061 prefix="$acl_save_prefix"
10062
10063 case "$x" in
10064 -L*)
10065 dir=`echo "X$x" | sed -e 's/^X-L//'`
10066 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10067 found_dir="$dir"
10068 found_so="$dir/lib$name.$shlibext"
10069 if test -f "$dir/lib$name.la"; then
10070 found_la="$dir/lib$name.la"
10071 fi
10072 else
10073 if test -f "$dir/lib$name.$libext"; then
10074 found_dir="$dir"
10075 found_a="$dir/lib$name.$libext"
10076 if test -f "$dir/lib$name.la"; then
10077 found_la="$dir/lib$name.la"
10078 fi
10079 fi
10080 fi
10081 ;;
10082 esac
10083 if test "X$found_dir" != "X"; then
10084 break
10085 fi
10086 done
10087 fi
10088 if test "X$found_dir" != "X"; then
10089 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10090 if test "X$found_so" != "X"; then
10091 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10092 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10093 else
10094 haveit=
10095 for x in $ltrpathdirs; do
10096 if test "X$x" = "X$found_dir"; then
10097 haveit=yes
10098 break
10099 fi
10100 done
10101 if test -z "$haveit"; then
10102 ltrpathdirs="$ltrpathdirs $found_dir"
10103 fi
10104 if test "$hardcode_direct" = yes; then
10105 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10106 else
10107 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10108 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10109 haveit=
10110 for x in $rpathdirs; do
10111 if test "X$x" = "X$found_dir"; then
10112 haveit=yes
10113 break
10114 fi
10115 done
10116 if test -z "$haveit"; then
10117 rpathdirs="$rpathdirs $found_dir"
10118 fi
10119 else
10120 haveit=
10121 for x in $LDFLAGS $LIBEXPAT; do
10122
10123 acl_save_prefix="$prefix"
10124 prefix="$acl_final_prefix"
10125 acl_save_exec_prefix="$exec_prefix"
10126 exec_prefix="$acl_final_exec_prefix"
10127 eval x=\"$x\"
10128 exec_prefix="$acl_save_exec_prefix"
10129 prefix="$acl_save_prefix"
10130
10131 if test "X$x" = "X-L$found_dir"; then
10132 haveit=yes
10133 break
10134 fi
10135 done
10136 if test -z "$haveit"; then
10137 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10138 fi
10139 if test "$hardcode_minus_L" != no; then
10140 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10141 else
10142 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10143 fi
10144 fi
10145 fi
10146 fi
10147 else
10148 if test "X$found_a" != "X"; then
10149 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10150 else
10151 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10152 fi
10153 fi
10154 additional_includedir=
10155 case "$found_dir" in
10156 */lib | */lib/)
10157 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10158 additional_includedir="$basedir/include"
10159 ;;
10160 esac
10161 if test "X$additional_includedir" != "X"; then
10162 if test "X$additional_includedir" != "X/usr/include"; then
10163 haveit=
10164 if test "X$additional_includedir" = "X/usr/local/include"; then
10165 if test -n "$GCC"; then
10166 case $host_os in
10167 linux*) haveit=yes;;
10168 esac
10169 fi
10170 fi
10171 if test -z "$haveit"; then
10172 for x in $CPPFLAGS $INCEXPAT; do
10173
10174 acl_save_prefix="$prefix"
10175 prefix="$acl_final_prefix"
10176 acl_save_exec_prefix="$exec_prefix"
10177 exec_prefix="$acl_final_exec_prefix"
10178 eval x=\"$x\"
10179 exec_prefix="$acl_save_exec_prefix"
10180 prefix="$acl_save_prefix"
10181
10182 if test "X$x" = "X-I$additional_includedir"; then
10183 haveit=yes
10184 break
10185 fi
10186 done
10187 if test -z "$haveit"; then
10188 if test -d "$additional_includedir"; then
10189 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10190 fi
10191 fi
10192 fi
10193 fi
10194 fi
10195 if test -n "$found_la"; then
10196 save_libdir="$libdir"
10197 case "$found_la" in
10198 */* | *\\*) . "$found_la" ;;
10199 *) . "./$found_la" ;;
10200 esac
10201 libdir="$save_libdir"
10202 for dep in $dependency_libs; do
10203 case "$dep" in
10204 -L*)
10205 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10206 if test "X$additional_libdir" != "X/usr/lib"; then
10207 haveit=
10208 if test "X$additional_libdir" = "X/usr/local/lib"; then
10209 if test -n "$GCC"; then
10210 case $host_os in
10211 linux*) haveit=yes;;
10212 esac
10213 fi
10214 fi
10215 if test -z "$haveit"; then
10216 haveit=
10217 for x in $LDFLAGS $LIBEXPAT; do
10218
10219 acl_save_prefix="$prefix"
10220 prefix="$acl_final_prefix"
10221 acl_save_exec_prefix="$exec_prefix"
10222 exec_prefix="$acl_final_exec_prefix"
10223 eval x=\"$x\"
10224 exec_prefix="$acl_save_exec_prefix"
10225 prefix="$acl_save_prefix"
10226
10227 if test "X$x" = "X-L$additional_libdir"; then
10228 haveit=yes
10229 break
10230 fi
10231 done
10232 if test -z "$haveit"; then
10233 if test -d "$additional_libdir"; then
10234 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10235 fi
10236 fi
10237 haveit=
10238 for x in $LDFLAGS $LTLIBEXPAT; do
10239
10240 acl_save_prefix="$prefix"
10241 prefix="$acl_final_prefix"
10242 acl_save_exec_prefix="$exec_prefix"
10243 exec_prefix="$acl_final_exec_prefix"
10244 eval x=\"$x\"
10245 exec_prefix="$acl_save_exec_prefix"
10246 prefix="$acl_save_prefix"
10247
10248 if test "X$x" = "X-L$additional_libdir"; then
10249 haveit=yes
10250 break
10251 fi
10252 done
10253 if test -z "$haveit"; then
10254 if test -d "$additional_libdir"; then
10255 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10256 fi
10257 fi
10258 fi
10259 fi
10260 ;;
10261 -R*)
10262 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10263 if test "$enable_rpath" != no; then
10264 haveit=
10265 for x in $rpathdirs; do
10266 if test "X$x" = "X$dir"; then
10267 haveit=yes
10268 break
10269 fi
10270 done
10271 if test -z "$haveit"; then
10272 rpathdirs="$rpathdirs $dir"
10273 fi
10274 haveit=
10275 for x in $ltrpathdirs; do
10276 if test "X$x" = "X$dir"; then
10277 haveit=yes
10278 break
10279 fi
10280 done
10281 if test -z "$haveit"; then
10282 ltrpathdirs="$ltrpathdirs $dir"
10283 fi
10284 fi
10285 ;;
10286 -l*)
10287 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10288 ;;
10289 *.la)
10290 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10291 ;;
10292 *)
10293 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10294 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10295 ;;
81ecdfbb
RW
10296 esac
10297 done
10298 fi
10299 else
10300 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10301 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10302 fi
10303 fi
10304 fi
10305 done
10306 done
10307 if test "X$rpathdirs" != "X"; then
10308 if test -n "$hardcode_libdir_separator"; then
10309 alldirs=
10310 for found_dir in $rpathdirs; do
10311 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10312 done
10313 acl_save_libdir="$libdir"
10314 libdir="$alldirs"
10315 eval flag=\"$hardcode_libdir_flag_spec\"
10316 libdir="$acl_save_libdir"
10317 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10318 else
10319 for found_dir in $rpathdirs; do
10320 acl_save_libdir="$libdir"
10321 libdir="$found_dir"
10322 eval flag=\"$hardcode_libdir_flag_spec\"
10323 libdir="$acl_save_libdir"
10324 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10325 done
10326 fi
10327 fi
10328 if test "X$ltrpathdirs" != "X"; then
10329 for found_dir in $ltrpathdirs; do
10330 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10331 done
10332 fi
a9322a30
TT
10333
10334
81ecdfbb 10335 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10336
81ecdfbb
RW
10337 for element in $INCEXPAT; do
10338 haveit=
10339 for x in $CPPFLAGS; do
a9322a30 10340
81ecdfbb
RW
10341 acl_save_prefix="$prefix"
10342 prefix="$acl_final_prefix"
10343 acl_save_exec_prefix="$exec_prefix"
10344 exec_prefix="$acl_final_exec_prefix"
10345 eval x=\"$x\"
10346 exec_prefix="$acl_save_exec_prefix"
10347 prefix="$acl_save_prefix"
a8111142 10348
81ecdfbb
RW
10349 if test "X$x" = "X$element"; then
10350 haveit=yes
10351 break
10352 fi
10353 done
10354 if test -z "$haveit"; then
10355 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10356 fi
10357 done
a9322a30
TT
10358
10359
81ecdfbb
RW
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10361$as_echo_n "checking for libexpat... " >&6; }
10362if test "${ac_cv_libexpat+set}" = set; then :
10363 $as_echo_n "(cached) " >&6
bec39cab 10364else
bec39cab 10365
81ecdfbb
RW
10366 ac_save_LIBS="$LIBS"
10367 LIBS="$LIBS $LIBEXPAT"
10368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10369/* end confdefs.h. */
81ecdfbb
RW
10370#include "expat.h"
10371int
10372main ()
10373{
10374XML_Parser p = XML_ParserCreate (0);
10375 ;
10376 return 0;
10377}
bec39cab 10378_ACEOF
81ecdfbb
RW
10379if ac_fn_c_try_link "$LINENO"; then :
10380 ac_cv_libexpat=yes
c906108c 10381else
81ecdfbb 10382 ac_cv_libexpat=no
bec39cab 10383fi
81ecdfbb
RW
10384rm -f core conftest.err conftest.$ac_objext \
10385 conftest$ac_exeext conftest.$ac_ext
10386 LIBS="$ac_save_LIBS"
c906108c 10387
95ca63c4 10388fi
81ecdfbb
RW
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10390$as_echo "$ac_cv_libexpat" >&6; }
10391 if test "$ac_cv_libexpat" = yes; then
10392 HAVE_LIBEXPAT=yes
bec39cab 10393
81ecdfbb 10394$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10395
81ecdfbb
RW
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10397$as_echo_n "checking how to link with libexpat... " >&6; }
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10399$as_echo "$LIBEXPAT" >&6; }
10400 else
10401 HAVE_LIBEXPAT=no
10402 CPPFLAGS="$ac_save_CPPFLAGS"
10403 LIBEXPAT=
10404 LTLIBEXPAT=
10405 fi
95ca63c4
CF
10406
10407
10408
7cb9022a
MK
10409
10410
bec39cab 10411
81ecdfbb
RW
10412 if test "$HAVE_LIBEXPAT" != yes; then
10413 if test "$with_expat" = yes; then
10414 as_fn_error "expat is missing or unusable" "$LINENO" 5
10415 else
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10417$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10418 fi
10419 else
10420 save_LIBS=$LIBS
10421 LIBS="$LIBS $LIBEXPAT"
10422 for ac_func in XML_StopParser
10423do :
10424 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10425if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10426 cat >>confdefs.h <<_ACEOF
81ecdfbb 10427#define HAVE_XML_STOPPARSER 1
bec39cab 10428_ACEOF
95ca63c4 10429
bec39cab 10430fi
bec39cab 10431done
95ca63c4 10432
81ecdfbb
RW
10433 LIBS=$save_LIBS
10434 fi
a9322a30
TT
10435fi
10436
a9322a30 10437
a9322a30
TT
10438
10439
ec685c5e 10440
0c4a4063 10441
81ecdfbb
RW
10442# Check whether --with-python was given.
10443if test "${with_python+set}" = set; then :
10444 withval=$with_python;
bec39cab 10445else
81ecdfbb 10446 with_python=auto
bec39cab 10447fi
bec39cab 10448
81ecdfbb
RW
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10450$as_echo_n "checking whether to use python... " >&6; }
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10452$as_echo "$with_python" >&6; }
9a156167 10453
81ecdfbb
RW
10454if test "${with_python}" = no; then
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10456$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10457 have_libpython=no
bec39cab 10458else
81ecdfbb 10459 case "${with_python}" in
81ecdfbb 10460 /*)
ec685c5e
DE
10461 if test -d ${with_python}; then
10462 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10463 python_prog="${with_python}/bin/python"
0c4a4063 10464 python_prefix=
ec685c5e
DE
10465 if test ! -x ${python_prog}; then
10466 # Fall back to gdb 7.0/7.1 behaviour.
10467 python_prog=missing
0c4a4063 10468 python_prefix=${with_python}
ec685c5e
DE
10469 fi
10470 elif test -x ${with_python}; then
10471 # While we can't run python compiled for $host (unless host == build),
10472 # the user could write a script that provides the needed information,
10473 # so we support that.
ec685c5e 10474 python_prog=${with_python}
0c4a4063 10475 python_prefix=
ec685c5e
DE
10476 else
10477 as_fn_error "invalid value for --with-python" "$LINENO" 5
10478 fi
81ecdfbb 10479 ;;
ec685c5e
DE
10480 */*)
10481 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10482 as_fn_error "invalid value for --with-python" "$LINENO" 5
10483 ;;
ec685c5e
DE
10484 *)
10485 # The user has either specified auto, yes, or the name of the python
10486 # program assumed to be in $PATH.
10487 python_prefix=
10488 case "${with_python}" in
10489 yes | auto)
10490 if test ${build} = ${host}; then
10491 # Extract the first word of "python", so it can be a program name with args.
10492set dummy python; ac_word=$2
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10494$as_echo_n "checking for $ac_word... " >&6; }
10495if test "${ac_cv_path_python_prog_path+set}" = set; then :
10496 $as_echo_n "(cached) " >&6
10497else
10498 case $python_prog_path in
10499 [\\/]* | ?:[\\/]*)
10500 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10501 ;;
10502 *)
10503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10504for as_dir in $PATH
10505do
10506 IFS=$as_save_IFS
10507 test -z "$as_dir" && as_dir=.
10508 for ac_exec_ext in '' $ac_executable_extensions; do
10509 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10510 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10512 break 2
10513 fi
10514done
10515 done
10516IFS=$as_save_IFS
10517
10518 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10519 ;;
10520esac
10521fi
10522python_prog_path=$ac_cv_path_python_prog_path
10523if test -n "$python_prog_path"; then
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10525$as_echo "$python_prog_path" >&6; }
10526else
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528$as_echo "no" >&6; }
10529fi
10530
10531
10532 if test "${python_prog_path}" = missing; then
10533 python_prog=missing
10534 else
10535 python_prog=${python_prog_path}
10536 fi
10537 else
10538 # Not much we can do except assume the cross-compiler will find the
10539 # right files.
10540 python_prog=missing
10541 fi
10542 ;;
10543 *)
10544 # While we can't run python compiled for $host (unless host == build),
10545 # the user could write a script that provides the needed information,
10546 # so we support that.
10547 python_prog="${with_python}"
10548 # Extract the first word of "${python_prog}", so it can be a program name with args.
10549set dummy ${python_prog}; ac_word=$2
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10551$as_echo_n "checking for $ac_word... " >&6; }
10552if test "${ac_cv_path_python_prog_path+set}" = set; then :
10553 $as_echo_n "(cached) " >&6
10554else
10555 case $python_prog_path in
10556 [\\/]* | ?:[\\/]*)
10557 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10558 ;;
10559 *)
10560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10561for as_dir in $PATH
10562do
10563 IFS=$as_save_IFS
10564 test -z "$as_dir" && as_dir=.
10565 for ac_exec_ext in '' $ac_executable_extensions; do
10566 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10567 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10569 break 2
10570 fi
10571done
10572 done
10573IFS=$as_save_IFS
10574
10575 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10576 ;;
10577esac
10578fi
10579python_prog_path=$ac_cv_path_python_prog_path
10580if test -n "$python_prog_path"; then
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10582$as_echo "$python_prog_path" >&6; }
10583else
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10585$as_echo "no" >&6; }
10586fi
10587
10588
10589 if test "${python_prog_path}" = missing; then
10590 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10591 fi
10592 ;;
10593 esac
81ecdfbb
RW
10594 esac
10595
ec685c5e
DE
10596 if test "${python_prog}" != missing; then
10597 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10598 if test $? != 0; then
10599 as_fn_error "failure running python-config --includes" "$LINENO" 5
10600 fi
10601 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10602 if test $? != 0; then
10603 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10604 fi
0c4a4063
DE
10605 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10606 if test $? != 0; then
10607 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10608 fi
ec685c5e
DE
10609 have_python_config=yes
10610 else
10611 # Fall back to gdb 7.0/7.1 behaviour.
10612 if test -z ${python_prefix}; then
10613 python_includes=
10614 python_libs=
10615 else
10616 python_includes="-I${python_prefix}/include"
10617 python_libs="-L${python_prefix}/lib"
10618 fi
0c4a4063 10619 have_python_config=no
ec685c5e 10620 fi
bec39cab 10621
ec685c5e
DE
10622 # Having "/pythonX.Y" in the include path is awkward.
10623 # All those python headers get bubbled up to the top inviting lots
10624 # of random collisions. GDB originally didn't use python-config to
10625 # find the compilation parameters and includes "pythonX.Y/" in the
10626 # path of the, umm, include file. So strip away this part of the
10627 # output of python-config --includes.
10628 python_includes=`echo "${python_includes} " \
0c4a4063 10629 | sed -e 's,/python[0-9]*[.][0-9]* , ,g'`
bec39cab 10630
ec685c5e
DE
10631 # If we have python-config, only try the configuration it provides.
10632 # Otherwise fallback on the old way of trying different versions of
10633 # python in turn.
81ecdfbb 10634
ec685c5e
DE
10635 have_libpython=no
10636 if test "${have_python_config}" = yes; then
10637 python_version=`echo " ${python_libs} " \
0c4a4063
DE
10638 | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'`
10639 case "${python_version}" in
10640 python*)
ec685c5e
DE
10641
10642 version=${python_version}
10643
10644 new_CPPFLAGS=${python_includes}
10645 new_LIBS=${python_libs}
81ecdfbb
RW
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10647$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10648 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10649 save_LIBS=$LIBS
ec685c5e
DE
10650 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10651 LIBS="$LIBS $new_LIBS"
10652 found_usable_python=no
81ecdfbb 10653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10654/* end confdefs.h. */
81ecdfbb
RW
10655#include "${version}/Python.h"
10656int
10657main ()
10658{
10659Py_Initialize ();
10660 ;
10661 return 0;
10662}
bec39cab 10663_ACEOF
81ecdfbb 10664if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10665 have_libpython=${version}
10666 found_usable_python=yes
bec39cab 10667else
ec685c5e
DE
10668 CPPFLAGS=$save_CPPFLAGS
10669 LIBS=$save_LIBS
9a156167 10670fi
81ecdfbb
RW
10671rm -f core conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10674$as_echo "${found_usable_python}" >&6; }
9a156167 10675
0c4a4063
DE
10676 ;;
10677 *)
ec685c5e 10678 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10679 ;;
10680 esac
ec685c5e
DE
10681 else
10682 if test "${have_libpython}" = no; then
9a156167 10683
ec685c5e
DE
10684 version=python2.6
10685
10686 new_CPPFLAGS=${python_includes}
10687 new_LIBS="${python_libs} -lpython2.6"
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10689$as_echo_n "checking for ${version}... " >&6; }
10690 save_CPPFLAGS=$CPPFLAGS
10691 save_LIBS=$LIBS
10692 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10693 LIBS="$LIBS $new_LIBS"
10694 found_usable_python=no
10695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10696/* end confdefs.h. */
10697#include "${version}/Python.h"
10698int
10699main ()
10700{
10701Py_Initialize ();
10702 ;
10703 return 0;
10704}
10705_ACEOF
10706if ac_fn_c_try_link "$LINENO"; then :
10707 have_libpython=${version}
10708 found_usable_python=yes
10709else
10710 CPPFLAGS=$save_CPPFLAGS
10711 LIBS=$save_LIBS
10712fi
10713rm -f core conftest.err conftest.$ac_objext \
10714 conftest$ac_exeext conftest.$ac_ext
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10716$as_echo "${found_usable_python}" >&6; }
9a156167 10717
81ecdfbb 10718 fi
ec685c5e 10719 if test ${have_libpython} = no; then
9a156167 10720
81ecdfbb 10721 version=python2.5
9a156167 10722
ec685c5e
DE
10723 new_CPPFLAGS=${python_includes}
10724 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10726$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10727 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10728 save_LIBS=$LIBS
ec685c5e
DE
10729 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10730 LIBS="$LIBS $new_LIBS"
10731 found_usable_python=no
81ecdfbb 10732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10733/* end confdefs.h. */
81ecdfbb
RW
10734#include "${version}/Python.h"
10735int
10736main ()
10737{
10738Py_Initialize ();
10739 ;
10740 return 0;
10741}
436868fb 10742_ACEOF
81ecdfbb 10743if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10744 have_libpython=${version}
10745 found_usable_python=yes
436868fb 10746else
ec685c5e
DE
10747 CPPFLAGS=$save_CPPFLAGS
10748 LIBS=$save_LIBS
436868fb 10749fi
81ecdfbb
RW
10750rm -f core conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10753$as_echo "${found_usable_python}" >&6; }
a9322a30 10754
81ecdfbb 10755 fi
ec685c5e 10756 if test ${have_libpython} = no; then
a9322a30 10757
81ecdfbb 10758 version=python2.4
a9322a30 10759
ec685c5e
DE
10760 new_CPPFLAGS=${python_includes}
10761 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10763$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10764 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10765 save_LIBS=$LIBS
ec685c5e
DE
10766 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10767 LIBS="$LIBS $new_LIBS"
10768 found_usable_python=no
81ecdfbb 10769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10770/* end confdefs.h. */
81ecdfbb 10771#include "${version}/Python.h"
a9322a30
TT
10772int
10773main ()
10774{
81ecdfbb 10775Py_Initialize ();
a9322a30
TT
10776 ;
10777 return 0;
10778}
436868fb 10779_ACEOF
81ecdfbb 10780if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10781 have_libpython=${version}
10782 found_usable_python=yes
436868fb 10783else
ec685c5e
DE
10784 CPPFLAGS=$save_CPPFLAGS
10785 LIBS=$save_LIBS
436868fb 10786fi
81ecdfbb
RW
10787rm -f core conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
ec685c5e
DE
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10790$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10791
ec685c5e
DE
10792 fi
10793 fi
10794 if test "${have_libpython}" = python2.6; then
10795
10796$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10797
10798 elif test "${have_libpython}" = python2.5; then
10799
10800$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10801
10802 elif test "${have_libpython}" = python2.4; then
81ecdfbb
RW
10803
10804$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10805
81ecdfbb 10806 fi
ec685c5e
DE
10807
10808 if test "${have_libpython}" = no; then
81ecdfbb
RW
10809 case "${with_python}" in
10810 yes)
10811 as_fn_error "python is missing or unusable" "$LINENO" 5
10812 ;;
10813 auto)
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10815$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10816 ;;
10817 *)
10818 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10819 ;;
10820 esac
0c4a4063
DE
10821 else
10822 if test -n "${python_prefix}"; then
10823
10824cat >>confdefs.h <<_ACEOF
10825#define WITH_PYTHON_PATH "${python_prefix}"
10826_ACEOF
10827
10828
10829 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10830 if test "x$prefix" = xNONE; then
10831 test_prefix=/usr/local
10832 else
10833 test_prefix=$prefix
10834 fi
10835 else
10836 test_prefix=$exec_prefix
10837 fi
10838 value=0
10839 case ${python_prefix} in
10840 "${test_prefix}"|"${test_prefix}/"*|\
10841 '${exec_prefix}'|'${exec_prefix}/'*)
10842 value=1
10843 ;;
10844 esac
10845
10846cat >>confdefs.h <<_ACEOF
10847#define PYTHON_PATH_RELOCATABLE $value
10848_ACEOF
10849
10850
10851 fi
81ecdfbb 10852 fi
436868fb 10853fi
436868fb 10854
ec685c5e 10855if test "${have_libpython}" != no; then
436868fb 10856
81ecdfbb 10857$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10858
81ecdfbb
RW
10859 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10860 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10861 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10862 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10863
81ecdfbb
RW
10864 # Flags needed to compile Python code (taken from python-config --cflags).
10865 # We cannot call python-config directly because it will output whatever was
10866 # used when compiling the Python interpreter itself, including flags which
10867 # would make the python-related objects be compiled differently from the
10868 # rest of GDB (e.g., -O2 and -fPIC).
10869 if test "${GCC}" = yes; then
10870 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10871 fi
436868fb 10872
81ecdfbb
RW
10873 if test "x${tentative_python_cflags}" != x; then
10874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10875$as_echo_n "checking compiler flags for python code... " >&6; }
10876 for flag in ${tentative_python_cflags}; do
10877 # Check that the compiler accepts it
10878 saved_CFLAGS="$CFLAGS"
10879 CFLAGS="$CFLAGS $flag"
10880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10881/* end confdefs.h. */
81ecdfbb 10882
a9322a30
TT
10883int
10884main ()
10885{
a9322a30
TT
10886
10887 ;
10888 return 0;
10889}
bec39cab 10890_ACEOF
81ecdfbb
RW
10891if ac_fn_c_try_compile "$LINENO"; then :
10892 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10893fi
81ecdfbb
RW
10894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10895 CFLAGS="$saved_CFLAGS"
10896 done
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10898$as_echo "${PYTHON_CFLAGS}" >&6; }
10899 fi
10900else
10901 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
10902 # included.
10903 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
10904 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
10905 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 10906fi
9a156167 10907
9a156167 10908
81ecdfbb
RW
10909# ------------------------- #
10910# Checks for header files. #
10911# ------------------------- #
c890192f 10912
81ecdfbb
RW
10913ac_header_dirent=no
10914for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10915 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10917$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10918if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
10919 $as_echo_n "(cached) " >&6
bec39cab 10920else
81ecdfbb 10921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10922/* end confdefs.h. */
81ecdfbb
RW
10923#include <sys/types.h>
10924#include <$ac_hdr>
10925
a9322a30
TT
10926int
10927main ()
10928{
81ecdfbb
RW
10929if ((DIR *) 0)
10930return 0;
a9322a30
TT
10931 ;
10932 return 0;
10933}
bec39cab 10934_ACEOF
81ecdfbb
RW
10935if ac_fn_c_try_compile "$LINENO"; then :
10936 eval "$as_ac_Header=yes"
bec39cab 10937else
81ecdfbb 10938 eval "$as_ac_Header=no"
bec39cab 10939fi
81ecdfbb 10940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10941fi
81ecdfbb
RW
10942eval ac_res=\$$as_ac_Header
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10944$as_echo "$ac_res" >&6; }
10945eval as_val=\$$as_ac_Header
10946 if test "x$as_val" = x""yes; then :
10947 cat >>confdefs.h <<_ACEOF
10948#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 10949_ACEOF
bec39cab 10950
81ecdfbb
RW
10951ac_header_dirent=$ac_hdr; break
10952fi
bec39cab 10953
81ecdfbb
RW
10954done
10955# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10956if test $ac_header_dirent = dirent.h; then
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10958$as_echo_n "checking for library containing opendir... " >&6; }
10959if test "${ac_cv_search_opendir+set}" = set; then :
10960 $as_echo_n "(cached) " >&6
c890192f 10961else
81ecdfbb
RW
10962 ac_func_search_save_LIBS=$LIBS
10963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10964/* end confdefs.h. */
10965
10966/* Override any GCC internal prototype to avoid an error.
10967 Use char because int might match the return type of a GCC
10968 builtin and then its argument prototype would still apply. */
10969#ifdef __cplusplus
10970extern "C"
10971#endif
10972char opendir ();
10973int
10974main ()
10975{
10976return opendir ();
10977 ;
10978 return 0;
10979}
bec39cab 10980_ACEOF
81ecdfbb
RW
10981for ac_lib in '' dir; do
10982 if test -z "$ac_lib"; then
10983 ac_res="none required"
10984 else
10985 ac_res=-l$ac_lib
10986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10987 fi
10988 if ac_fn_c_try_link "$LINENO"; then :
10989 ac_cv_search_opendir=$ac_res
10990fi
10991rm -f core conftest.err conftest.$ac_objext \
10992 conftest$ac_exeext
10993 if test "${ac_cv_search_opendir+set}" = set; then :
10994 break
10995fi
10996done
10997if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 10998
81ecdfbb
RW
10999else
11000 ac_cv_search_opendir=no
11001fi
11002rm conftest.$ac_ext
11003LIBS=$ac_func_search_save_LIBS
11004fi
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11006$as_echo "$ac_cv_search_opendir" >&6; }
11007ac_res=$ac_cv_search_opendir
11008if test "$ac_res" != no; then :
11009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11010
bec39cab 11011fi
81ecdfbb 11012
bec39cab 11013else
81ecdfbb
RW
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11015$as_echo_n "checking for library containing opendir... " >&6; }
11016if test "${ac_cv_search_opendir+set}" = set; then :
11017 $as_echo_n "(cached) " >&6
11018else
11019 ac_func_search_save_LIBS=$LIBS
11020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11021/* end confdefs.h. */
81ecdfbb
RW
11022
11023/* Override any GCC internal prototype to avoid an error.
11024 Use char because int might match the return type of a GCC
11025 builtin and then its argument prototype would still apply. */
11026#ifdef __cplusplus
11027extern "C"
11028#endif
11029char opendir ();
a9322a30
TT
11030int
11031main ()
11032{
81ecdfbb 11033return opendir ();
a9322a30
TT
11034 ;
11035 return 0;
11036}
bec39cab 11037_ACEOF
81ecdfbb
RW
11038for ac_lib in '' x; do
11039 if test -z "$ac_lib"; then
11040 ac_res="none required"
11041 else
11042 ac_res=-l$ac_lib
11043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11044 fi
11045 if ac_fn_c_try_link "$LINENO"; then :
11046 ac_cv_search_opendir=$ac_res
11047fi
11048rm -f core conftest.err conftest.$ac_objext \
11049 conftest$ac_exeext
11050 if test "${ac_cv_search_opendir+set}" = set; then :
11051 break
11052fi
11053done
11054if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11055
81ecdfbb
RW
11056else
11057 ac_cv_search_opendir=no
bec39cab 11058fi
81ecdfbb
RW
11059rm conftest.$ac_ext
11060LIBS=$ac_func_search_save_LIBS
a9322a30 11061fi
81ecdfbb
RW
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11063$as_echo "$ac_cv_search_opendir" >&6; }
11064ac_res=$ac_cv_search_opendir
11065if test "$ac_res" != no; then :
11066 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11067
81ecdfbb 11068fi
bec39cab 11069
81ecdfbb 11070fi
bec39cab 11071
81ecdfbb
RW
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11073$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11074if test "${ac_cv_header_stat_broken+set}" = set; then :
11075 $as_echo_n "(cached) " >&6
9a156167 11076else
81ecdfbb
RW
11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078/* end confdefs.h. */
11079#include <sys/types.h>
11080#include <sys/stat.h>
11081
11082#if defined S_ISBLK && defined S_IFDIR
11083extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11084#endif
11085
11086#if defined S_ISBLK && defined S_IFCHR
11087extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11088#endif
11089
11090#if defined S_ISLNK && defined S_IFREG
11091extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11092#endif
11093
11094#if defined S_ISSOCK && defined S_IFREG
11095extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11096#endif
11097
bec39cab 11098_ACEOF
81ecdfbb
RW
11099if ac_fn_c_try_compile "$LINENO"; then :
11100 ac_cv_header_stat_broken=no
11101else
11102 ac_cv_header_stat_broken=yes
11103fi
11104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11105fi
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11107$as_echo "$ac_cv_header_stat_broken" >&6; }
11108if test $ac_cv_header_stat_broken = yes; then
9a156167 11109
81ecdfbb 11110$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11111
bec39cab 11112fi
81ecdfbb
RW
11113
11114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11115$as_echo_n "checking for ANSI C header files... " >&6; }
11116if test "${ac_cv_header_stdc+set}" = set; then :
11117 $as_echo_n "(cached) " >&6
bec39cab 11118else
81ecdfbb 11119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11120/* end confdefs.h. */
81ecdfbb
RW
11121#include <stdlib.h>
11122#include <stdarg.h>
11123#include <string.h>
11124#include <float.h>
11125
a9322a30
TT
11126int
11127main ()
11128{
a9322a30
TT
11129
11130 ;
11131 return 0;
11132}
bec39cab 11133_ACEOF
81ecdfbb
RW
11134if ac_fn_c_try_compile "$LINENO"; then :
11135 ac_cv_header_stdc=yes
bec39cab 11136else
81ecdfbb 11137 ac_cv_header_stdc=no
a9322a30 11138fi
81ecdfbb 11139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11140
81ecdfbb
RW
11141if test $ac_cv_header_stdc = yes; then
11142 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144/* end confdefs.h. */
11145#include <string.h>
bec39cab 11146
81ecdfbb
RW
11147_ACEOF
11148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11149 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11150
bec39cab 11151else
81ecdfbb
RW
11152 ac_cv_header_stdc=no
11153fi
11154rm -f conftest*
11155
11156fi
11157
11158if test $ac_cv_header_stdc = yes; then
11159 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161/* end confdefs.h. */
11162#include <stdlib.h>
11163
bec39cab 11164_ACEOF
81ecdfbb
RW
11165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11166 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11167
81ecdfbb
RW
11168else
11169 ac_cv_header_stdc=no
11170fi
11171rm -f conftest*
bec39cab 11172
bec39cab 11173fi
81ecdfbb
RW
11174
11175if test $ac_cv_header_stdc = yes; then
11176 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11177 if test "$cross_compiling" = yes; then :
11178 :
bec39cab 11179else
81ecdfbb 11180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11181/* end confdefs.h. */
81ecdfbb
RW
11182#include <ctype.h>
11183#include <stdlib.h>
11184#if ((' ' & 0x0FF) == 0x020)
11185# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11186# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11187#else
11188# define ISLOWER(c) \
11189 (('a' <= (c) && (c) <= 'i') \
11190 || ('j' <= (c) && (c) <= 'r') \
11191 || ('s' <= (c) && (c) <= 'z'))
11192# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11193#endif
11194
11195#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11196int
11197main ()
11198{
81ecdfbb
RW
11199 int i;
11200 for (i = 0; i < 256; i++)
11201 if (XOR (islower (i), ISLOWER (i))
11202 || toupper (i) != TOUPPER (i))
11203 return 2;
a9322a30
TT
11204 return 0;
11205}
bec39cab 11206_ACEOF
81ecdfbb
RW
11207if ac_fn_c_try_run "$LINENO"; then :
11208
bec39cab 11209else
81ecdfbb
RW
11210 ac_cv_header_stdc=no
11211fi
11212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11213 conftest.$ac_objext conftest.beam conftest.$ac_ext
11214fi
bec39cab 11215
bec39cab 11216fi
a9322a30 11217fi
81ecdfbb
RW
11218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11219$as_echo "$ac_cv_header_stdc" >&6; }
11220if test $ac_cv_header_stdc = yes; then
bec39cab 11221
81ecdfbb 11222$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11223
81ecdfbb 11224fi
bec39cab 11225
81ecdfbb
RW
11226# elf_hp.h is for HP/UX 64-bit shared library support.
11227# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11228# unconditionally, so what's the point in checking these?
11229for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11230 thread_db.h gnu/libc-version.h signal.h stddef.h \
11231 stdlib.h string.h memory.h strings.h sys/fault.h \
11232 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11233 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11234 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11235 sys/types.h sys/wait.h wait.h termios.h termio.h \
11236 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11237do :
11238 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11239ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11240eval as_val=\$$as_ac_Header
11241 if test "x$as_val" = x""yes; then :
bec39cab 11242 cat >>confdefs.h <<_ACEOF
81ecdfbb 11243#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11244_ACEOF
c906108c 11245
bec39cab 11246fi
81ecdfbb
RW
11247
11248done
11249
11250for ac_header in link.h
11251do :
11252 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11253# include <sys/types.h>
11254#endif
11255#if HAVE_NLIST_H
11256# include <nlist.h>
a9322a30
TT
11257#endif
11258
81ecdfbb
RW
11259"
11260if test "x$ac_cv_header_link_h" = x""yes; then :
11261 cat >>confdefs.h <<_ACEOF
11262#define HAVE_LINK_H 1
bec39cab 11263_ACEOF
bec39cab 11264
a9322a30 11265fi
bec39cab 11266
81ecdfbb 11267done
c906108c 11268
81ecdfbb
RW
11269for ac_header in sys/proc.h
11270do :
11271 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11272# include <sys/param.h>
11273#endif
c906108c 11274
81ecdfbb
RW
11275"
11276if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11277 cat >>confdefs.h <<_ACEOF
81ecdfbb 11278#define HAVE_SYS_PROC_H 1
bec39cab 11279_ACEOF
5ee754fc 11280
bec39cab 11281fi
81ecdfbb
RW
11282
11283done
11284
11285for ac_header in sys/user.h
11286do :
11287 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11288# include <sys/param.h>
a9322a30
TT
11289#endif
11290
81ecdfbb
RW
11291"
11292if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11293 cat >>confdefs.h <<_ACEOF
11294#define HAVE_SYS_USER_H 1
bec39cab 11295_ACEOF
bec39cab 11296
a9322a30 11297fi
bec39cab 11298
81ecdfbb 11299done
5ee754fc 11300
5ee754fc 11301
81ecdfbb
RW
11302# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11303# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11304# think that we don't have <curses.h> if we're using GCC.
11305case $host_os in
11306 solaris2.[789])
11307 if test "$GCC" = yes; then
11308
11309$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11310
11311 fi ;;
11312esac
11313for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11314do :
11315 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11316ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11317eval as_val=\$$as_ac_Header
11318 if test "x$as_val" = x""yes; then :
bec39cab 11319 cat >>confdefs.h <<_ACEOF
81ecdfbb 11320#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11321_ACEOF
5ee754fc
MK
11322
11323fi
11324
81ecdfbb 11325done
bec39cab 11326
81ecdfbb
RW
11327for ac_header in term.h
11328do :
11329 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11330# include <curses.h>
11331#endif
bec39cab 11332
81ecdfbb
RW
11333"
11334if test "x$ac_cv_header_term_h" = x""yes; then :
11335 cat >>confdefs.h <<_ACEOF
11336#define HAVE_TERM_H 1
a8111142 11337_ACEOF
a8111142 11338
a8111142 11339fi
a8111142 11340
81ecdfbb 11341done
a8111142
TT
11342
11343
81ecdfbb
RW
11344# ------------------------- #
11345# Checks for declarations. #
11346# ------------------------- #
a9322a30 11347
81ecdfbb
RW
11348ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11349if test "x$ac_cv_have_decl_free" = x""yes; then :
11350 ac_have_decl=1
bec39cab 11351else
81ecdfbb
RW
11352 ac_have_decl=0
11353fi
11354
11355cat >>confdefs.h <<_ACEOF
11356#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11357_ACEOF
81ecdfbb
RW
11358ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11359if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11360 ac_have_decl=1
11361else
11362 ac_have_decl=0
11363fi
11364
11365cat >>confdefs.h <<_ACEOF
11366#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11367_ACEOF
81ecdfbb
RW
11368ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11369if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11370 ac_have_decl=1
bec39cab 11371else
81ecdfbb
RW
11372 ac_have_decl=0
11373fi
bec39cab 11374
81ecdfbb
RW
11375cat >>confdefs.h <<_ACEOF
11376#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11377_ACEOF
81ecdfbb
RW
11378ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11379if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11380 ac_have_decl=1
11381else
11382 ac_have_decl=0
11383fi
11384
11385cat >>confdefs.h <<_ACEOF
11386#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11387_ACEOF
81ecdfbb
RW
11388ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11389if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11390 ac_have_decl=1
bec39cab 11391else
81ecdfbb
RW
11392 ac_have_decl=0
11393fi
5ee754fc 11394
81ecdfbb
RW
11395cat >>confdefs.h <<_ACEOF
11396#define HAVE_DECL_STRSTR $ac_have_decl
11397_ACEOF
11398ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11399if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11400 ac_have_decl=1
11401else
11402 ac_have_decl=0
5ee754fc 11403fi
81ecdfbb
RW
11404
11405cat >>confdefs.h <<_ACEOF
11406#define HAVE_DECL_GETOPT $ac_have_decl
11407_ACEOF
11408ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11409if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11410 ac_have_decl=1
11411else
11412 ac_have_decl=0
5ee754fc 11413fi
81ecdfbb
RW
11414
11415cat >>confdefs.h <<_ACEOF
11416#define HAVE_DECL_SNPRINTF $ac_have_decl
11417_ACEOF
11418ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11419if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11420 ac_have_decl=1
11421else
11422 ac_have_decl=0
5ee754fc
MK
11423fi
11424
a9322a30 11425cat >>confdefs.h <<_ACEOF
81ecdfbb 11426#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11427_ACEOF
5ee754fc 11428
5ee754fc 11429
81ecdfbb
RW
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11431$as_echo_n "checking for LC_MESSAGES... " >&6; }
11432if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11433 $as_echo_n "(cached) " >&6
bec39cab 11434else
81ecdfbb 11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11436/* end confdefs.h. */
81ecdfbb 11437#include <locale.h>
a9322a30
TT
11438int
11439main ()
11440{
81ecdfbb 11441return LC_MESSAGES
a9322a30
TT
11442 ;
11443 return 0;
11444}
bec39cab 11445_ACEOF
81ecdfbb
RW
11446if ac_fn_c_try_link "$LINENO"; then :
11447 am_cv_val_LC_MESSAGES=yes
bec39cab 11448else
81ecdfbb
RW
11449 am_cv_val_LC_MESSAGES=no
11450fi
11451rm -f core conftest.err conftest.$ac_objext \
11452 conftest$ac_exeext conftest.$ac_ext
11453fi
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11455$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11456 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11457
81ecdfbb
RW
11458$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11459
11460 fi
11461
11462
11463# ----------------------- #
11464# Checks for structures. #
11465# ----------------------- #
11466
11467ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11468if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11469
11470cat >>confdefs.h <<_ACEOF
11471#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11472_ACEOF
7eb368b3 11473
81ecdfbb 11474
7eb368b3 11475fi
81ecdfbb
RW
11476ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11477if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11478
a9322a30
TT
11479cat >>confdefs.h <<_ACEOF
11480#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11481_ACEOF
11482
a9322a30 11483
7eb368b3
NR
11484fi
11485
7eb368b3 11486
a9322a30
TT
11487# ------------------ #
11488# Checks for types. #
11489# ------------------ #
7eb368b3 11490
81ecdfbb
RW
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11492$as_echo_n "checking return type of signal handlers... " >&6; }
11493if test "${ac_cv_type_signal+set}" = set; then :
11494 $as_echo_n "(cached) " >&6
bec39cab 11495else
81ecdfbb 11496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11497/* end confdefs.h. */
a9322a30
TT
11498#include <sys/types.h>
11499#include <signal.h>
7cb9022a 11500
a9322a30
TT
11501int
11502main ()
11503{
81ecdfbb 11504return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11505 ;
11506 return 0;
11507}
bec39cab 11508_ACEOF
81ecdfbb
RW
11509if ac_fn_c_try_compile "$LINENO"; then :
11510 ac_cv_type_signal=int
bec39cab 11511else
81ecdfbb 11512 ac_cv_type_signal=void
bec39cab 11513fi
81ecdfbb 11514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11515fi
81ecdfbb
RW
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11517$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11518
a9322a30
TT
11519cat >>confdefs.h <<_ACEOF
11520#define RETSIGTYPE $ac_cv_type_signal
11521_ACEOF
5ee754fc 11522
bec39cab 11523
81ecdfbb 11524ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11525#include <sys/socket.h>
11526
81ecdfbb
RW
11527"
11528if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11529
a9322a30
TT
11530cat >>confdefs.h <<_ACEOF
11531#define HAVE_SOCKLEN_T 1
11532_ACEOF
11533
11534
11535fi
11536
11537
11538# ------------------------------------- #
11539# Checks for compiler characteristics. #
11540# ------------------------------------- #
11541
81ecdfbb
RW
11542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11543$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11544if test "${ac_cv_c_const+set}" = set; then :
11545 $as_echo_n "(cached) " >&6
a9322a30 11546else
81ecdfbb 11547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11548/* end confdefs.h. */
a9322a30
TT
11549
11550int
11551main ()
11552{
11553/* FIXME: Include the comments suggested by Paul. */
11554#ifndef __cplusplus
11555 /* Ultrix mips cc rejects this. */
11556 typedef int charset[2];
81ecdfbb 11557 const charset cs;
a9322a30 11558 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11559 char const *const *pcpcc;
11560 char **ppc;
a9322a30
TT
11561 /* NEC SVR4.0.2 mips cc rejects this. */
11562 struct point {int x, y;};
11563 static struct point const zero = {0,0};
11564 /* AIX XL C 1.02.0.0 rejects this.
11565 It does not let you subtract one const X* pointer from another in
11566 an arm of an if-expression whose if-part is not a constant
11567 expression */
11568 const char *g = "string";
81ecdfbb 11569 pcpcc = &g + (g ? g-g : 0);
a9322a30 11570 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11571 ++pcpcc;
11572 ppc = (char**) pcpcc;
11573 pcpcc = (char const *const *) ppc;
a9322a30
TT
11574 { /* SCO 3.2v4 cc rejects this. */
11575 char *t;
11576 char const *s = 0 ? (char *) 0 : (char const *) 0;
11577
11578 *t++ = 0;
81ecdfbb 11579 if (s) return 0;
a9322a30
TT
11580 }
11581 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11582 int x[] = {25, 17};
11583 const int *foo = &x[0];
11584 ++foo;
11585 }
11586 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11587 typedef const int *iptr;
11588 iptr p = 0;
11589 ++p;
11590 }
11591 { /* AIX XL C 1.02.0.0 rejects this saying
11592 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11593 struct s { int j; const int *ap[3]; };
11594 struct s *b; b->j = 5;
11595 }
11596 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11597 const int foo = 10;
81ecdfbb 11598 if (!foo) return 0;
a9322a30 11599 }
81ecdfbb 11600 return !cs[0] && !zero.x;
a9322a30
TT
11601#endif
11602
11603 ;
11604 return 0;
11605}
bec39cab 11606_ACEOF
81ecdfbb 11607if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11608 ac_cv_c_const=yes
5ee754fc 11609else
81ecdfbb 11610 ac_cv_c_const=no
5ee754fc 11611fi
81ecdfbb 11612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11613fi
81ecdfbb
RW
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11615$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11616if test $ac_cv_c_const = no; then
bec39cab 11617
81ecdfbb 11618$as_echo "#define const /**/" >>confdefs.h
bec39cab 11619
5ee754fc 11620fi
bec39cab 11621
81ecdfbb
RW
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11623$as_echo_n "checking for inline... " >&6; }
11624if test "${ac_cv_c_inline+set}" = set; then :
11625 $as_echo_n "(cached) " >&6
bec39cab 11626else
a9322a30
TT
11627 ac_cv_c_inline=no
11628for ac_kw in inline __inline__ __inline; do
81ecdfbb 11629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11630/* end confdefs.h. */
a9322a30
TT
11631#ifndef __cplusplus
11632typedef int foo_t;
11633static $ac_kw foo_t static_foo () {return 0; }
11634$ac_kw foo_t foo () {return 0; }
11635#endif
11636
bec39cab 11637_ACEOF
81ecdfbb
RW
11638if ac_fn_c_try_compile "$LINENO"; then :
11639 ac_cv_c_inline=$ac_kw
bec39cab 11640fi
81ecdfbb
RW
11641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11642 test "$ac_cv_c_inline" != no && break
a9322a30 11643done
bec39cab 11644
5ee754fc 11645fi
81ecdfbb
RW
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11647$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11648
a9322a30
TT
11649case $ac_cv_c_inline in
11650 inline | yes) ;;
11651 *)
11652 case $ac_cv_c_inline in
11653 no) ac_val=;;
11654 *) ac_val=$ac_cv_c_inline;;
11655 esac
11656 cat >>confdefs.h <<_ACEOF
11657#ifndef __cplusplus
11658#define inline $ac_val
11659#endif
11660_ACEOF
bec39cab
AC
11661 ;;
11662esac
bec39cab 11663
81ecdfbb
RW
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11665$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11666if test "${ac_cv_c_bigendian+set}" = set; then :
11667 $as_echo_n "(cached) " >&6
bec39cab 11668else
81ecdfbb
RW
11669 ac_cv_c_bigendian=unknown
11670 # See if we're dealing with a universal compiler.
11671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11672/* end confdefs.h. */
11673#ifndef __APPLE_CC__
11674 not a universal capable compiler
11675 #endif
11676 typedef int dummy;
11677
11678_ACEOF
11679if ac_fn_c_try_compile "$LINENO"; then :
11680
11681 # Check for potential -arch flags. It is not universal unless
11682 # there are at least two -arch flags with different values.
11683 ac_arch=
11684 ac_prev=
11685 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11686 if test -n "$ac_prev"; then
11687 case $ac_word in
11688 i?86 | x86_64 | ppc | ppc64)
11689 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11690 ac_arch=$ac_word
11691 else
11692 ac_cv_c_bigendian=universal
11693 break
11694 fi
11695 ;;
11696 esac
11697 ac_prev=
11698 elif test "x$ac_word" = "x-arch"; then
11699 ac_prev=arch
11700 fi
11701 done
11702fi
11703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11704 if test $ac_cv_c_bigendian = unknown; then
11705 # See if sys/param.h defines the BYTE_ORDER macro.
11706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11707/* end confdefs.h. */
a9322a30 11708#include <sys/types.h>
81ecdfbb 11709 #include <sys/param.h>
a9322a30
TT
11710
11711int
11712main ()
11713{
81ecdfbb
RW
11714#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11715 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11716 && LITTLE_ENDIAN)
11717 bogus endian macros
11718 #endif
a9322a30
TT
11719
11720 ;
11721 return 0;
11722}
bec39cab 11723_ACEOF
81ecdfbb 11724if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11725 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11727/* end confdefs.h. */
a9322a30 11728#include <sys/types.h>
81ecdfbb 11729 #include <sys/param.h>
a9322a30
TT
11730
11731int
11732main ()
11733{
11734#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11735 not big endian
11736 #endif
a9322a30
TT
11737
11738 ;
11739 return 0;
11740}
bec39cab 11741_ACEOF
81ecdfbb 11742if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11743 ac_cv_c_bigendian=yes
5ee754fc 11744else
81ecdfbb 11745 ac_cv_c_bigendian=no
5ee754fc 11746fi
81ecdfbb
RW
11747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11748fi
11749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11750 fi
11751 if test $ac_cv_c_bigendian = unknown; then
11752 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11754/* end confdefs.h. */
11755#include <limits.h>
bec39cab 11756
81ecdfbb
RW
11757int
11758main ()
11759{
11760#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11761 bogus endian macros
11762 #endif
11763
11764 ;
11765 return 0;
11766}
7eb368b3 11767_ACEOF
81ecdfbb
RW
11768if ac_fn_c_try_compile "$LINENO"; then :
11769 # It does; now see whether it defined to _BIG_ENDIAN or not.
11770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11771/* end confdefs.h. */
81ecdfbb
RW
11772#include <limits.h>
11773
7eb368b3
NR
11774int
11775main ()
11776{
81ecdfbb
RW
11777#ifndef _BIG_ENDIAN
11778 not big endian
11779 #endif
11780
7eb368b3
NR
11781 ;
11782 return 0;
11783}
11784_ACEOF
81ecdfbb 11785if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11786 ac_cv_c_bigendian=yes
81ecdfbb
RW
11787else
11788 ac_cv_c_bigendian=no
a9322a30 11789fi
81ecdfbb 11790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11791fi
81ecdfbb
RW
11792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11793 fi
11794 if test $ac_cv_c_bigendian = unknown; then
11795 # Compile a test program.
11796 if test "$cross_compiling" = yes; then :
11797 # Try to guess by grepping values from an object file.
11798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800short int ascii_mm[] =
11801 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11802 short int ascii_ii[] =
11803 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11804 int use_ascii (int i) {
11805 return ascii_mm[i] + ascii_ii[i];
11806 }
11807 short int ebcdic_ii[] =
11808 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11809 short int ebcdic_mm[] =
11810 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11811 int use_ebcdic (int i) {
11812 return ebcdic_mm[i] + ebcdic_ii[i];
11813 }
11814 extern int foo;
7eb368b3 11815
81ecdfbb
RW
11816int
11817main ()
11818{
11819return use_ascii (foo) == use_ebcdic (foo);
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824if ac_fn_c_try_compile "$LINENO"; then :
11825 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11826 ac_cv_c_bigendian=yes
11827 fi
11828 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11829 if test "$ac_cv_c_bigendian" = unknown; then
11830 ac_cv_c_bigendian=no
11831 else
11832 # finding both strings is unlikely to happen, but who knows?
11833 ac_cv_c_bigendian=unknown
11834 fi
11835 fi
7eb368b3 11836fi
81ecdfbb 11837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11838else
81ecdfbb 11839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11840/* end confdefs.h. */
81ecdfbb 11841$ac_includes_default
d3ea6809
MM
11842int
11843main ()
11844{
81ecdfbb
RW
11845
11846 /* Are we little or big endian? From Harbison&Steele. */
11847 union
11848 {
11849 long int l;
11850 char c[sizeof (long int)];
11851 } u;
11852 u.l = 1;
11853 return u.c[sizeof (long int) - 1] == 1;
11854
11855 ;
11856 return 0;
d3ea6809
MM
11857}
11858_ACEOF
81ecdfbb 11859if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11860 ac_cv_c_bigendian=no
d3ea6809 11861else
81ecdfbb 11862 ac_cv_c_bigendian=yes
d3ea6809 11863fi
81ecdfbb
RW
11864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11865 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11866fi
a9322a30 11867
81ecdfbb
RW
11868 fi
11869fi
11870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11871$as_echo "$ac_cv_c_bigendian" >&6; }
11872 case $ac_cv_c_bigendian in #(
11873 yes)
11874 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11875;; #(
11876 no)
11877 ;; #(
11878 universal)
11879
11880$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11881
11882 ;; #(
11883 *)
11884 as_fn_error "unknown endianness
11885 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11886 esac
d3ea6809
MM
11887
11888
a9322a30
TT
11889# ------------------------------ #
11890# Checks for library functions. #
11891# ------------------------------ #
d3ea6809 11892
a9322a30
TT
11893# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11894# for constant arguments. Useless!
81ecdfbb
RW
11895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11896$as_echo_n "checking for working alloca.h... " >&6; }
11897if test "${ac_cv_working_alloca_h+set}" = set; then :
11898 $as_echo_n "(cached) " >&6
d3ea6809 11899else
81ecdfbb 11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 11901/* end confdefs.h. */
a9322a30 11902#include <alloca.h>
bec39cab
AC
11903int
11904main ()
11905{
a9322a30 11906char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 11907 if (p) return 0;
bec39cab
AC
11908 ;
11909 return 0;
11910}
11911_ACEOF
81ecdfbb 11912if ac_fn_c_try_link "$LINENO"; then :
a9322a30 11913 ac_cv_working_alloca_h=yes
bec39cab 11914else
81ecdfbb 11915 ac_cv_working_alloca_h=no
bec39cab 11916fi
81ecdfbb
RW
11917rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext conftest.$ac_ext
bec39cab 11919fi
81ecdfbb
RW
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11921$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
11922if test $ac_cv_working_alloca_h = yes; then
11923
81ecdfbb 11924$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 11925
c906108c 11926fi
bec39cab 11927
81ecdfbb
RW
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11929$as_echo_n "checking for alloca... " >&6; }
11930if test "${ac_cv_func_alloca_works+set}" = set; then :
11931 $as_echo_n "(cached) " >&6
bec39cab 11932else
81ecdfbb 11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11934/* end confdefs.h. */
a9322a30
TT
11935#ifdef __GNUC__
11936# define alloca __builtin_alloca
b4e70030 11937#else
a9322a30
TT
11938# ifdef _MSC_VER
11939# include <malloc.h>
11940# define alloca _alloca
11941# else
81ecdfbb 11942# ifdef HAVE_ALLOCA_H
a9322a30
TT
11943# include <alloca.h>
11944# else
11945# ifdef _AIX
11946 #pragma alloca
11947# else
11948# ifndef alloca /* predefined by HP cc +Olibcalls */
11949char *alloca ();
11950# endif
11951# endif
11952# endif
11953# endif
c906108c 11954#endif
97bf5e38 11955
bec39cab
AC
11956int
11957main ()
11958{
a9322a30 11959char *p = (char *) alloca (1);
81ecdfbb 11960 if (p) return 0;
bec39cab
AC
11961 ;
11962 return 0;
11963}
11964_ACEOF
81ecdfbb 11965if ac_fn_c_try_link "$LINENO"; then :
a9322a30 11966 ac_cv_func_alloca_works=yes
bec39cab 11967else
81ecdfbb 11968 ac_cv_func_alloca_works=no
bec39cab 11969fi
81ecdfbb
RW
11970rm -f core conftest.err conftest.$ac_objext \
11971 conftest$ac_exeext conftest.$ac_ext
bec39cab 11972fi
81ecdfbb
RW
11973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11974$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
11975
11976if test $ac_cv_func_alloca_works = yes; then
11977
81ecdfbb 11978$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 11979
a9322a30
TT
11980else
11981 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11982# that cause trouble. Some versions do not even contain alloca or
11983# contain a buggy version. If you still want to use their alloca,
11984# use ar to extract alloca.o from them instead of compiling alloca.c.
11985
81ecdfbb 11986ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 11987
81ecdfbb 11988$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 11989
bec39cab 11990
81ecdfbb
RW
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11992$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11993if test "${ac_cv_os_cray+set}" = set; then :
11994 $as_echo_n "(cached) " >&6
a9322a30 11995else
81ecdfbb 11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 11997/* end confdefs.h. */
81ecdfbb 11998#if defined CRAY && ! defined CRAY2
a9322a30
TT
11999webecray
12000#else
12001wenotbecray
12002#endif
12003
12004_ACEOF
12005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12006 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12007 ac_cv_os_cray=yes
12008else
81ecdfbb 12009 ac_cv_os_cray=no
bec39cab 12010fi
81ecdfbb
RW
12011rm -f conftest*
12012
bec39cab 12013fi
81ecdfbb
RW
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12015$as_echo "$ac_cv_os_cray" >&6; }
12016if test $ac_cv_os_cray = yes; then
12017 for ac_func in _getb67 GETB67 getb67; do
12018 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12019ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12020eval as_val=\$$as_ac_var
12021 if test "x$as_val" = x""yes; then :
a9322a30
TT
12022
12023cat >>confdefs.h <<_ACEOF
12024#define CRAY_STACKSEG_END $ac_func
bec39cab 12025_ACEOF
c906108c 12026
a9322a30 12027 break
c906108c
SS
12028fi
12029
a9322a30
TT
12030 done
12031fi
bec39cab 12032
81ecdfbb
RW
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12034$as_echo_n "checking stack direction for C alloca... " >&6; }
12035if test "${ac_cv_c_stack_direction+set}" = set; then :
12036 $as_echo_n "(cached) " >&6
a9322a30 12037else
81ecdfbb 12038 if test "$cross_compiling" = yes; then :
a9322a30 12039 ac_cv_c_stack_direction=0
bec39cab 12040else
81ecdfbb 12041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12042/* end confdefs.h. */
81ecdfbb 12043$ac_includes_default
a9322a30
TT
12044int
12045find_stack_direction ()
b4e70030 12046{
a9322a30
TT
12047 static char *addr = 0;
12048 auto char dummy;
12049 if (addr == 0)
12050 {
12051 addr = &dummy;
12052 return find_stack_direction ();
12053 }
12054 else
12055 return (&dummy > addr) ? 1 : -1;
b4e70030 12056}
b757528f 12057
bec39cab
AC
12058int
12059main ()
12060{
81ecdfbb 12061 return find_stack_direction () < 0;
bec39cab
AC
12062}
12063_ACEOF
81ecdfbb 12064if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12065 ac_cv_c_stack_direction=1
12066else
81ecdfbb 12067 ac_cv_c_stack_direction=-1
a9322a30 12068fi
81ecdfbb
RW
12069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12070 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12071fi
a9322a30 12072
81ecdfbb
RW
12073fi
12074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12075$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12076cat >>confdefs.h <<_ACEOF
12077#define STACK_DIRECTION $ac_cv_c_stack_direction
12078_ACEOF
12079
12080
12081fi
12082
a9322a30 12083for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12084do :
12085 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12086ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12087eval as_val=\$$as_ac_Header
12088 if test "x$as_val" = x""yes; then :
bec39cab 12089 cat >>confdefs.h <<_ACEOF
81ecdfbb 12090#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12091_ACEOF
b757528f 12092
b757528f 12093fi
bec39cab 12094
a9322a30 12095done
a3828db0 12096
a9322a30 12097for ac_func in getpagesize
81ecdfbb
RW
12098do :
12099 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12100if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12101 cat >>confdefs.h <<_ACEOF
81ecdfbb 12102#define HAVE_GETPAGESIZE 1
bec39cab 12103_ACEOF
bcb3dc3d 12104
bcb3dc3d
MK
12105fi
12106done
12107
81ecdfbb
RW
12108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12109$as_echo_n "checking for working mmap... " >&6; }
12110if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12111 $as_echo_n "(cached) " >&6
a9322a30 12112else
81ecdfbb 12113 if test "$cross_compiling" = yes; then :
a9322a30 12114 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12115else
81ecdfbb 12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12117/* end confdefs.h. */
a9322a30
TT
12118$ac_includes_default
12119/* malloc might have been renamed as rpl_malloc. */
12120#undef malloc
bec39cab 12121
a9322a30
TT
12122/* Thanks to Mike Haertel and Jim Avera for this test.
12123 Here is a matrix of mmap possibilities:
12124 mmap private not fixed
12125 mmap private fixed at somewhere currently unmapped
12126 mmap private fixed at somewhere already mapped
12127 mmap shared not fixed
12128 mmap shared fixed at somewhere currently unmapped
12129 mmap shared fixed at somewhere already mapped
12130 For private mappings, we should verify that changes cannot be read()
12131 back from the file, nor mmap's back from the file at a different
12132 address. (There have been systems where private was not correctly
12133 implemented like the infamous i386 svr4.0, and systems where the
12134 VM page cache was not coherent with the file system buffer cache
12135 like early versions of FreeBSD and possibly contemporary NetBSD.)
12136 For shared mappings, we should conversely verify that changes get
12137 propagated back to all the places they're supposed to be.
bec39cab 12138
a9322a30
TT
12139 Grep wants private fixed already mapped.
12140 The main things grep needs to know about mmap are:
12141 * does it exist and is it safe to write into the mmap'd area
12142 * how to use it (BSD variants) */
8b9cf735 12143
a9322a30
TT
12144#include <fcntl.h>
12145#include <sys/mman.h>
8b9cf735 12146
81ecdfbb 12147#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12148char *malloc ();
a3828db0
MK
12149#endif
12150
a9322a30 12151/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12152#ifndef HAVE_GETPAGESIZE
a9322a30 12153/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12154# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12155# define HAVE_SYS_PARAM_H 1
12156# endif
12157
12158# ifdef _SC_PAGESIZE
12159# define getpagesize() sysconf(_SC_PAGESIZE)
12160# else /* no _SC_PAGESIZE */
81ecdfbb 12161# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12162# include <sys/param.h>
12163# ifdef EXEC_PAGESIZE
12164# define getpagesize() EXEC_PAGESIZE
12165# else /* no EXEC_PAGESIZE */
12166# ifdef NBPG
12167# define getpagesize() NBPG * CLSIZE
12168# ifndef CLSIZE
12169# define CLSIZE 1
12170# endif /* no CLSIZE */
12171# else /* no NBPG */
12172# ifdef NBPC
12173# define getpagesize() NBPC
12174# else /* no NBPC */
12175# ifdef PAGESIZE
12176# define getpagesize() PAGESIZE
12177# endif /* PAGESIZE */
12178# endif /* no NBPC */
12179# endif /* no NBPG */
12180# endif /* no EXEC_PAGESIZE */
12181# else /* no HAVE_SYS_PARAM_H */
12182# define getpagesize() 8192 /* punt totally */
12183# endif /* no HAVE_SYS_PARAM_H */
12184# endif /* no _SC_PAGESIZE */
12185
12186#endif /* no HAVE_GETPAGESIZE */
12187
bec39cab
AC
12188int
12189main ()
12190{
a9322a30
TT
12191 char *data, *data2, *data3;
12192 int i, pagesize;
12193 int fd;
12194
12195 pagesize = getpagesize ();
12196
12197 /* First, make a file with some known garbage in it. */
12198 data = (char *) malloc (pagesize);
12199 if (!data)
81ecdfbb 12200 return 1;
a9322a30
TT
12201 for (i = 0; i < pagesize; ++i)
12202 *(data + i) = rand ();
12203 umask (0);
12204 fd = creat ("conftest.mmap", 0600);
12205 if (fd < 0)
81ecdfbb 12206 return 1;
a9322a30 12207 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12208 return 1;
a9322a30
TT
12209 close (fd);
12210
12211 /* Next, try to mmap the file at a fixed address which already has
12212 something else allocated at it. If we can, also make sure that
12213 we see the same garbage. */
12214 fd = open ("conftest.mmap", O_RDWR);
12215 if (fd < 0)
81ecdfbb 12216 return 1;
a9322a30
TT
12217 data2 = (char *) malloc (2 * pagesize);
12218 if (!data2)
81ecdfbb
RW
12219 return 1;
12220 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12221 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12222 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12223 return 1;
a9322a30
TT
12224 for (i = 0; i < pagesize; ++i)
12225 if (*(data + i) != *(data2 + i))
81ecdfbb 12226 return 1;
a9322a30
TT
12227
12228 /* Finally, make sure that changes to the mapped area do not
12229 percolate back to the file as seen by read(). (This is a bug on
12230 some variants of i386 svr4.0.) */
12231 for (i = 0; i < pagesize; ++i)
12232 *(data2 + i) = *(data2 + i) + 1;
12233 data3 = (char *) malloc (pagesize);
12234 if (!data3)
81ecdfbb 12235 return 1;
a9322a30 12236 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12237 return 1;
a9322a30
TT
12238 for (i = 0; i < pagesize; ++i)
12239 if (*(data + i) != *(data3 + i))
81ecdfbb 12240 return 1;
a9322a30 12241 close (fd);
81ecdfbb 12242 return 0;
bec39cab
AC
12243}
12244_ACEOF
81ecdfbb 12245if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12246 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12247else
81ecdfbb 12248 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12249fi
81ecdfbb
RW
12250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12252fi
81ecdfbb 12253
a9322a30 12254fi
81ecdfbb
RW
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12256$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12257if test $ac_cv_func_mmap_fixed_mapped = yes; then
12258
81ecdfbb 12259$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12260
086ec9eb 12261fi
a9322a30 12262rm -f conftest.mmap
a3828db0 12263
81ecdfbb
RW
12264ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12265if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12266
a9322a30
TT
12267else
12268
12269cat >>confdefs.h <<_ACEOF
12270#define pid_t int
bec39cab 12271_ACEOF
086ec9eb
MK
12272
12273fi
12274
81ecdfbb
RW
12275for ac_header in vfork.h
12276do :
12277 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12278if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12279 cat >>confdefs.h <<_ACEOF
81ecdfbb 12280#define HAVE_VFORK_H 1
bec39cab 12281_ACEOF
c906108c
SS
12282
12283fi
a9322a30 12284
a3828db0 12285done
c906108c 12286
a9322a30 12287for ac_func in fork vfork
81ecdfbb
RW
12288do :
12289 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12290ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12291eval as_val=\$$as_ac_var
12292 if test "x$as_val" = x""yes; then :
a3828db0 12293 cat >>confdefs.h <<_ACEOF
81ecdfbb 12294#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12295_ACEOF
b83266a0 12296
97bf5e38 12297fi
a3828db0 12298done
b83266a0 12299
a9322a30 12300if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12302$as_echo_n "checking for working fork... " >&6; }
12303if test "${ac_cv_func_fork_works+set}" = set; then :
12304 $as_echo_n "(cached) " >&6
a9322a30 12305else
81ecdfbb 12306 if test "$cross_compiling" = yes; then :
a9322a30
TT
12307 ac_cv_func_fork_works=cross
12308else
81ecdfbb
RW
12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310/* end confdefs.h. */
12311$ac_includes_default
12312int
12313main ()
12314{
12315
12316 /* By Ruediger Kuhlmann. */
12317 return fork () < 0;
12318
12319 ;
12320 return 0;
12321}
a9322a30 12322_ACEOF
81ecdfbb 12323if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12324 ac_cv_func_fork_works=yes
12325else
81ecdfbb 12326 ac_cv_func_fork_works=no
a9322a30 12327fi
81ecdfbb
RW
12328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12329 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12330fi
81ecdfbb 12331
a9322a30 12332fi
81ecdfbb
RW
12333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12334$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12335
12336else
12337 ac_cv_func_fork_works=$ac_cv_func_fork
12338fi
12339if test "x$ac_cv_func_fork_works" = xcross; then
12340 case $host in
12341 *-*-amigaos* | *-*-msdosdjgpp*)
12342 # Override, as these systems have only a dummy fork() stub
12343 ac_cv_func_fork_works=no
12344 ;;
12345 *)
12346 ac_cv_func_fork_works=yes
12347 ;;
12348 esac
81ecdfbb
RW
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12350$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12351fi
12352ac_cv_func_vfork_works=$ac_cv_func_vfork
12353if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12355$as_echo_n "checking for working vfork... " >&6; }
12356if test "${ac_cv_func_vfork_works+set}" = set; then :
12357 $as_echo_n "(cached) " >&6
a9322a30 12358else
81ecdfbb 12359 if test "$cross_compiling" = yes; then :
a9322a30
TT
12360 ac_cv_func_vfork_works=cross
12361else
81ecdfbb 12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12363/* end confdefs.h. */
12364/* Thanks to Paul Eggert for this test. */
81ecdfbb 12365$ac_includes_default
a9322a30 12366#include <sys/wait.h>
81ecdfbb 12367#ifdef HAVE_VFORK_H
a9322a30
TT
12368# include <vfork.h>
12369#endif
12370/* On some sparc systems, changes by the child to local and incoming
12371 argument registers are propagated back to the parent. The compiler
12372 is told about this with #include <vfork.h>, but some compilers
12373 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12374 static variable whose address is put into a register that is
12375 clobbered by the vfork. */
12376static void
12377#ifdef __cplusplus
12378sparc_address_test (int arg)
12379# else
12380sparc_address_test (arg) int arg;
12381#endif
12382{
12383 static pid_t child;
12384 if (!child) {
12385 child = vfork ();
12386 if (child < 0) {
12387 perror ("vfork");
12388 _exit(2);
12389 }
12390 if (!child) {
12391 arg = getpid();
12392 write(-1, "", 0);
12393 _exit (arg);
12394 }
12395 }
12396}
12397
12398int
12399main ()
12400{
12401 pid_t parent = getpid ();
12402 pid_t child;
12403
12404 sparc_address_test (0);
12405
12406 child = vfork ();
12407
12408 if (child == 0) {
12409 /* Here is another test for sparc vfork register problems. This
12410 test uses lots of local variables, at least as many local
12411 variables as main has allocated so far including compiler
12412 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12413 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12414 reuse the register of parent for one of the local variables,
12415 since it will think that parent can't possibly be used any more
12416 in this routine. Assigning to the local variable will thus
12417 munge parent in the parent process. */
12418 pid_t
12419 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12420 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12421 /* Convince the compiler that p..p7 are live; otherwise, it might
12422 use the same hardware register for all 8 local variables. */
12423 if (p != p1 || p != p2 || p != p3 || p != p4
12424 || p != p5 || p != p6 || p != p7)
12425 _exit(1);
12426
12427 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12428 from child file descriptors. If the child closes a descriptor
12429 before it execs or exits, this munges the parent's descriptor
12430 as well. Test for this by closing stdout in the child. */
12431 _exit(close(fileno(stdout)) != 0);
12432 } else {
12433 int status;
12434 struct stat st;
12435
12436 while (wait(&status) != child)
12437 ;
81ecdfbb 12438 return (
a9322a30
TT
12439 /* Was there some problem with vforking? */
12440 child < 0
12441
12442 /* Did the child fail? (This shouldn't happen.) */
12443 || status
12444
12445 /* Did the vfork/compiler bug occur? */
12446 || parent != getpid()
12447
12448 /* Did the file descriptor bug occur? */
12449 || fstat(fileno(stdout), &st) != 0
12450 );
12451 }
12452}
12453_ACEOF
81ecdfbb 12454if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12455 ac_cv_func_vfork_works=yes
12456else
81ecdfbb 12457 ac_cv_func_vfork_works=no
a9322a30 12458fi
81ecdfbb
RW
12459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12460 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12461fi
81ecdfbb 12462
a9322a30 12463fi
81ecdfbb
RW
12464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12465$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12466
12467fi;
12468if test "x$ac_cv_func_fork_works" = xcross; then
12469 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12471$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12472fi
12473
12474if test "x$ac_cv_func_vfork_works" = xyes; then
12475
81ecdfbb 12476$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12477
12478else
12479
81ecdfbb 12480$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12481
12482fi
12483if test "x$ac_cv_func_fork_works" = xyes; then
12484
81ecdfbb 12485$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12486
12487fi
12488
a9322a30 12489for ac_func in canonicalize_file_name realpath getrusage getuid \
a156a290 12490 getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
a9322a30 12491 sigaction sigprocmask sigsetmask socketpair syscall \
7991dee7 12492 ttrace wborder setlocale iconvlist libiconvlist btowc \
be391dca 12493 setrlimit getrlimit posix_madvise
81ecdfbb
RW
12494do :
12495 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12496ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12497eval as_val=\$$as_ac_var
12498 if test "x$as_val" = x""yes; then :
6c7a06a3 12499 cat >>confdefs.h <<_ACEOF
81ecdfbb 12500#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12501_ACEOF
12502
12503fi
12504done
12505
12506
81ecdfbb
RW
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12508$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12509if test "${am_cv_langinfo_codeset+set}" = set; then :
12510 $as_echo_n "(cached) " >&6
6c7a06a3 12511else
81ecdfbb 12512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12513/* end confdefs.h. */
12514#include <langinfo.h>
12515int
12516main ()
12517{
12518char* cs = nl_langinfo(CODESET);
bec39cab
AC
12519 ;
12520 return 0;
12521}
12522_ACEOF
81ecdfbb 12523if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12524 am_cv_langinfo_codeset=yes
a4db0f07 12525else
81ecdfbb 12526 am_cv_langinfo_codeset=no
a4db0f07 12527fi
81ecdfbb
RW
12528rm -f core conftest.err conftest.$ac_objext \
12529 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12530
a4db0f07 12531fi
81ecdfbb
RW
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12533$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12534 if test $am_cv_langinfo_codeset = yes; then
12535
81ecdfbb 12536$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12537
6c7a06a3 12538 fi
c906108c 12539
06825bd1 12540
a3828db0
MK
12541# Check the return and argument types of ptrace. No canned test for
12542# this, so roll our own.
12543gdb_ptrace_headers='
12544#if HAVE_SYS_TYPES_H
12545# include <sys/types.h>
12546#endif
12547#if HAVE_SYS_PTRACE_H
12548# include <sys/ptrace.h>
12549#endif
12550#if HAVE_UNISTD_H
12551# include <unistd.h>
12552#endif
12553'
12554# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12555ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12556"
12557if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12558 ac_have_decl=1
06825bd1 12559else
81ecdfbb 12560 ac_have_decl=0
06825bd1 12561fi
06825bd1 12562
a3828db0 12563cat >>confdefs.h <<_ACEOF
81ecdfbb 12564#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12565_ACEOF
81ecdfbb 12566if test $ac_have_decl = 1; then :
bec39cab 12567
a3828db0 12568else
a3828db0
MK
12569
12570 : ${gdb_cv_func_ptrace_ret='int'}
12571 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12572
06825bd1
MK
12573fi
12574
064ef605
DJ
12575# Check return type. Varargs (used on GNU/Linux) conflict with the
12576# empty argument list, so check for that explicitly.
81ecdfbb
RW
12577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12578$as_echo_n "checking return type of ptrace... " >&6; }
12579if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12580 $as_echo_n "(cached) " >&6
bec39cab 12581else
81ecdfbb 12582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12583/* end confdefs.h. */
a3828db0 12584$gdb_ptrace_headers
bec39cab
AC
12585int
12586main ()
12587{
064ef605
DJ
12588extern long ptrace (enum __ptrace_request, ...);
12589 ;
12590 return 0;
12591}
12592_ACEOF
81ecdfbb 12593if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12594 gdb_cv_func_ptrace_ret='long'
12595else
81ecdfbb 12596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12597/* end confdefs.h. */
12598$gdb_ptrace_headers
12599int
12600main ()
12601{
a3828db0 12602extern int ptrace ();
bec39cab
AC
12603 ;
12604 return 0;
12605}
12606_ACEOF
81ecdfbb 12607if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12608 gdb_cv_func_ptrace_ret='int'
70f9f479 12609else
81ecdfbb 12610 gdb_cv_func_ptrace_ret='long'
70f9f479 12611fi
81ecdfbb 12612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12613fi
81ecdfbb 12614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12615fi
81ecdfbb
RW
12616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12617$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12618
a3828db0
MK
12619cat >>confdefs.h <<_ACEOF
12620#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12621_ACEOF
70f9f479 12622
a3828db0 12623# Check argument types.
81ecdfbb
RW
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12625$as_echo_n "checking types of arguments for ptrace... " >&6; }
12626if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12627 $as_echo_n "(cached) " >&6
bec39cab 12628else
a3828db0 12629
81ecdfbb 12630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12631/* end confdefs.h. */
12632$gdb_ptrace_headers
12633int
12634main ()
12635{
12636extern long ptrace (enum __ptrace_request, ...);
12637 ;
12638 return 0;
12639}
12640_ACEOF
81ecdfbb 12641if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12642 gdb_cv_func_ptrace_args='int,int,long,long'
12643else
064ef605 12644
a3828db0
MK
12645for gdb_arg1 in 'int' 'long'; do
12646 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12647 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12648 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12650/* end confdefs.h. */
a3828db0 12651$gdb_ptrace_headers
bec39cab
AC
12652int
12653main ()
12654{
a3828db0
MK
12655
12656extern $gdb_cv_func_ptrace_ret
12657 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12658
bec39cab
AC
12659 ;
12660 return 0;
12661}
12662_ACEOF
81ecdfbb 12663if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12664 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12665 break 4;
5c7f2947 12666fi
81ecdfbb 12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12668 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12670/* end confdefs.h. */
a3828db0 12671$gdb_ptrace_headers
bec39cab
AC
12672int
12673main ()
12674{
a3828db0
MK
12675
12676extern $gdb_cv_func_ptrace_ret
12677 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12678
bec39cab
AC
12679 ;
12680 return 0;
12681}
12682_ACEOF
81ecdfbb 12683if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12684
12685gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12686 break 5;
78434e59 12687fi
81ecdfbb 12688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12689 done
12690 done
12691 done
12692 done
12693done
12694# Provide a safe default value.
12695: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12696
064ef605 12697fi
81ecdfbb 12698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12699fi
81ecdfbb
RW
12700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12701$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12702ac_save_IFS=$IFS; IFS=','
12703set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12704IFS=$ac_save_IFS
12705shift
bec39cab 12706
a3828db0
MK
12707cat >>confdefs.h <<_ACEOF
12708#define PTRACE_TYPE_ARG3 $3
12709_ACEOF
12710
12711if test -n "$5"; then
12712
12713cat >>confdefs.h <<_ACEOF
12714#define PTRACE_TYPE_ARG5 $5
bec39cab 12715_ACEOF
78434e59
MK
12716
12717fi
12718
a3828db0 12719if test "$cross_compiling" = no; then
81ecdfbb
RW
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12721$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12722if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12723 $as_echo_n "(cached) " >&6
a3828db0 12724else
81ecdfbb
RW
12725 if test "$cross_compiling" = yes; then :
12726 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12727else
81ecdfbb 12728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12729/* end confdefs.h. */
81ecdfbb 12730$ac_includes_default
bec39cab
AC
12731int
12732main ()
12733{
a3828db0
MK
12734/* If this system has a BSD-style setpgrp which takes arguments,
12735 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12736 exit successfully. */
81ecdfbb 12737 return setpgrp (1,1) != -1;
bec39cab
AC
12738 ;
12739 return 0;
12740}
12741_ACEOF
81ecdfbb 12742if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12743 ac_cv_func_setpgrp_void=no
c906108c 12744else
81ecdfbb 12745 ac_cv_func_setpgrp_void=yes
c906108c 12746fi
81ecdfbb
RW
12747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12748 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12749fi
81ecdfbb 12750
a3828db0 12751fi
81ecdfbb
RW
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12753$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12754if test $ac_cv_func_setpgrp_void = yes; then
12755
81ecdfbb 12756$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12757
12758fi
a3828db0
MK
12759
12760else
81ecdfbb
RW
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12762$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12763if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12764 $as_echo_n "(cached) " >&6
97bf5e38 12765else
81ecdfbb 12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12767/* end confdefs.h. */
a3828db0
MK
12768
12769#include <unistd.h>
12770
bec39cab
AC
12771int
12772main ()
12773{
a3828db0
MK
12774
12775 if (setpgrp(1,1) == -1)
12776 exit (0);
12777 else
12778 exit (1);
12779
bec39cab
AC
12780 ;
12781 return 0;
12782}
12783_ACEOF
81ecdfbb 12784if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12785 ac_cv_func_setpgrp_void=no
c906108c 12786else
81ecdfbb 12787 ac_cv_func_setpgrp_void=yes
c906108c 12788fi
81ecdfbb 12789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12790fi
81ecdfbb
RW
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12792$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12793if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12794 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12795
a3828db0 12796fi
c906108c
SS
12797fi
12798
a3828db0
MK
12799# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
12800# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
12801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12802$as_echo_n "checking for sigsetjmp... " >&6; }
12803if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12804 $as_echo_n "(cached) " >&6
bec39cab 12805else
81ecdfbb 12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12807/* end confdefs.h. */
a3828db0
MK
12808
12809#include <setjmp.h>
12810
bec39cab
AC
12811int
12812main ()
12813{
a3828db0 12814sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
12815 ;
12816 return 0;
12817}
12818_ACEOF
81ecdfbb 12819if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12820 gdb_cv_func_sigsetjmp=yes
c906108c 12821else
81ecdfbb 12822 gdb_cv_func_sigsetjmp=no
c906108c 12823fi
81ecdfbb 12824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12825fi
81ecdfbb
RW
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12827$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 12828if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 12829
81ecdfbb 12830$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 12831
97bf5e38 12832fi
c906108c 12833
a3828db0
MK
12834# Assume we'll default to using the included libiberty regex.
12835gdb_use_included_regex=yes
12836
12837# However, if the system regex is GNU regex, then default to *not*
12838# using the included regex.
81ecdfbb
RW
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12840$as_echo_n "checking for GNU regex... " >&6; }
12841if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12842 $as_echo_n "(cached) " >&6
bec39cab 12843else
81ecdfbb 12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12845/* end confdefs.h. */
a3828db0 12846#include <gnu-versions.h>
bec39cab
AC
12847int
12848main ()
12849{
81ecdfbb
RW
12850#define REGEX_INTERFACE_VERSION 1
12851#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12852# error "Version mismatch"
12853#endif
5c45e068
MK
12854 ;
12855 return 0;
12856}
12857_ACEOF
81ecdfbb
RW
12858if ac_fn_c_try_compile "$LINENO"; then :
12859 gdb_cv_have_gnu_regex=yes
5c45e068 12860else
81ecdfbb
RW
12861 gdb_cv_have_gnu_regex=no
12862fi
12863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12864fi
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12866$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12867if test $gdb_cv_have_gnu_regex = yes; then
12868 gdb_use_included_regex=no
5c45e068 12869fi
81ecdfbb
RW
12870
12871
12872# Check whether --with-included-regex was given.
12873if test "${with_included_regex+set}" = set; then :
12874 withval=$with_included_regex; gdb_with_regex=$withval
12875else
12876 gdb_with_regex=$gdb_use_included_regex
c906108c 12877fi
81ecdfbb
RW
12878
12879if test "$gdb_with_regex" = yes; then
12880
12881$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12882
c906108c 12883fi
81ecdfbb
RW
12884
12885# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12886ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12887#include <sys/proc.h>
12888
12889"
12890if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12891
5c45e068 12892cat >>confdefs.h <<_ACEOF
a3828db0 12893#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12894_ACEOF
c906108c 12895
5c45e068 12896
97bf5e38 12897fi
c906108c 12898
5c45e068 12899
a3828db0 12900# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12902$as_echo_n "checking for struct lwp... " >&6; }
12903if test "${gdb_cv_struct_lwp+set}" = set; then :
12904 $as_echo_n "(cached) " >&6
bec39cab 12905else
81ecdfbb 12906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12907/* end confdefs.h. */
a3828db0
MK
12908#include <sys/param.h>
12909#include <sys/lwp.h>
bec39cab
AC
12910int
12911main ()
12912{
a3828db0 12913struct lwp l;
bec39cab
AC
12914 ;
12915 return 0;
12916}
12917_ACEOF
81ecdfbb 12918if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12919 gdb_cv_struct_lwp=yes
c906108c 12920else
81ecdfbb 12921 gdb_cv_struct_lwp=no
c906108c 12922fi
81ecdfbb 12923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12924fi
81ecdfbb
RW
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12926$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12927if test $gdb_cv_struct_lwp = yes; then
c906108c 12928
81ecdfbb 12929$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12930
97bf5e38 12931fi
c906108c 12932
a3828db0 12933# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12935$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12936if test "${gdb_cv_struct_reg+set}" = set; then :
12937 $as_echo_n "(cached) " >&6
bec39cab 12938else
81ecdfbb 12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12940/* end confdefs.h. */
a3828db0
MK
12941#include <sys/types.h>
12942#include <machine/reg.h>
bec39cab
AC
12943int
12944main ()
12945{
a3828db0 12946struct reg r;
bec39cab
AC
12947 ;
12948 return 0;
12949}
12950_ACEOF
81ecdfbb 12951if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12952 gdb_cv_struct_reg=yes
27ca5dad 12953else
81ecdfbb 12954 gdb_cv_struct_reg=no
27ca5dad 12955fi
81ecdfbb 12956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12957fi
81ecdfbb
RW
12958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12959$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12960if test $gdb_cv_struct_reg = yes; then
bec39cab 12961
81ecdfbb 12962$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12963
12964fi
97bf5e38 12965
a3828db0
MK
12966# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12967# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
12968ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
12969"
12970if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12971
12972cat >>confdefs.h <<_ACEOF
a3828db0 12973#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12974_ACEOF
3862412b 12975
5c45e068 12976
97bf5e38 12977fi
81ecdfbb
RW
12978ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
12979"
12980if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12981
12982cat >>confdefs.h <<_ACEOF
a3828db0 12983#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12984_ACEOF
3862412b 12985
5c45e068 12986
97bf5e38 12987fi
3862412b 12988
5c45e068 12989
a3828db0 12990# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12992$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12993if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12994 $as_echo_n "(cached) " >&6
451928c5 12995else
81ecdfbb 12996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12997/* end confdefs.h. */
a3828db0 12998#include <sys/ptrace.h>
bec39cab
AC
12999int
13000main ()
13001{
a3828db0 13002PTRACE_GETREGS;
bec39cab
AC
13003 ;
13004 return 0;
13005}
13006_ACEOF
81ecdfbb 13007if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13008 gdb_cv_have_ptrace_getregs=yes
451928c5 13009else
81ecdfbb 13010 gdb_cv_have_ptrace_getregs=no
451928c5 13011fi
81ecdfbb 13012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13013fi
13014
81ecdfbb
RW
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13016$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13017if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13018
81ecdfbb 13019$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13020
97bf5e38 13021fi
451928c5 13022
a3828db0 13023# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13025$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13026if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13027 $as_echo_n "(cached) " >&6
451928c5 13028else
81ecdfbb 13029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13030/* end confdefs.h. */
a3828db0 13031#include <sys/ptrace.h>
bec39cab
AC
13032int
13033main ()
13034{
a3828db0 13035PTRACE_GETFPXREGS;
bec39cab
AC
13036 ;
13037 return 0;
13038}
13039_ACEOF
81ecdfbb 13040if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13041 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13042else
81ecdfbb 13043 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13044fi
81ecdfbb 13045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13046fi
13047
81ecdfbb
RW
13048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13049$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13050if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13051
81ecdfbb 13052$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13053
97bf5e38 13054fi
451928c5 13055
a3828db0 13056# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13058$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13059if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13060 $as_echo_n "(cached) " >&6
3862412b 13061else
81ecdfbb 13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13063/* end confdefs.h. */
a3828db0
MK
13064#include <sys/types.h>
13065#include <sys/ptrace.h>
bec39cab
AC
13066int
13067main ()
13068{
a3828db0 13069PT_GETDBREGS;
bec39cab
AC
13070 ;
13071 return 0;
13072}
13073_ACEOF
81ecdfbb 13074if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13075 gdb_cv_have_pt_getdbregs=yes
3862412b 13076else
81ecdfbb 13077 gdb_cv_have_pt_getdbregs=no
3862412b 13078fi
81ecdfbb 13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13080fi
13081
81ecdfbb
RW
13082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13083$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13084if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13085
81ecdfbb 13086$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13087
97bf5e38 13088fi
3862412b 13089
a3828db0 13090# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13092$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13093if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13094 $as_echo_n "(cached) " >&6
3862412b 13095else
81ecdfbb 13096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13097/* end confdefs.h. */
a3828db0
MK
13098#include <sys/types.h>
13099#include <sys/ptrace.h>
bec39cab
AC
13100int
13101main ()
13102{
a3828db0 13103PT_GETXMMREGS;
bec39cab
AC
13104 ;
13105 return 0;
13106}
13107_ACEOF
81ecdfbb 13108if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13109 gdb_cv_have_pt_getxmmregs=yes
3862412b 13110else
81ecdfbb 13111 gdb_cv_have_pt_getxmmregs=no
3862412b 13112fi
81ecdfbb 13113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13114fi
13115
81ecdfbb
RW
13116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13117$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13118if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13119
81ecdfbb 13120$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13121
97bf5e38 13122fi
3862412b 13123
eb368090 13124# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13125
13126if test "${target}" = "${host}"; then
13127 case "${host}" in
97bf5e38 13128 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13129
81ecdfbb 13130$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13131
13132 ;;
c162e8c9 13133 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13134
81ecdfbb 13135$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13136
13137 ;;
13138 mips-sgi-irix5*)
13139 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13140
81ecdfbb 13141$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13142
13143 ;;
13144 esac
13145fi
13146
13147if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13149$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13150 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13151 $as_echo_n "(cached) " >&6
bec39cab 13152else
81ecdfbb 13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13154/* end confdefs.h. */
596c9d4b
KB
13155
13156#define _SYSCALL32
d30c5336
JK
13157/* Needed for new procfs interface on sparc-solaris. */
13158#define _STRUCTURED_PROC 1
596c9d4b 13159#include <sys/procfs.h>
bec39cab
AC
13160int
13161main ()
13162{
97bf5e38 13163pstatus_t avar
bec39cab
AC
13164 ;
13165 return 0;
13166}
13167_ACEOF
81ecdfbb 13168if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13169 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13170else
81ecdfbb 13171 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13172
596c9d4b 13173fi
81ecdfbb 13174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13175fi
13176
97bf5e38 13177 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13178
81ecdfbb 13179$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13180
13181 fi
81ecdfbb
RW
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13183$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13184
81ecdfbb
RW
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13186$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13187 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13188 $as_echo_n "(cached) " >&6
596c9d4b 13189else
81ecdfbb 13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13191/* end confdefs.h. */
596c9d4b
KB
13192
13193#define _SYSCALL32
d30c5336
JK
13194/* Needed for new procfs interface on sparc-solaris. */
13195#define _STRUCTURED_PROC 1
596c9d4b 13196#include <sys/procfs.h>
bec39cab
AC
13197int
13198main ()
13199{
97bf5e38 13200prrun_t avar
bec39cab
AC
13201 ;
13202 return 0;
13203}
13204_ACEOF
81ecdfbb 13205if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13206 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13207else
81ecdfbb 13208 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13209
596c9d4b 13210fi
81ecdfbb 13211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13212fi
13213
97bf5e38 13214 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13215
81ecdfbb 13216$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13217
13218 fi
81ecdfbb
RW
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13220$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13221
81ecdfbb
RW
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13223$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13224 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13225 $as_echo_n "(cached) " >&6
596c9d4b 13226else
81ecdfbb 13227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13228/* end confdefs.h. */
596c9d4b
KB
13229
13230#define _SYSCALL32
d30c5336
JK
13231/* Needed for new procfs interface on sparc-solaris. */
13232#define _STRUCTURED_PROC 1
596c9d4b 13233#include <sys/procfs.h>
bec39cab
AC
13234int
13235main ()
13236{
97bf5e38 13237gregset_t avar
bec39cab
AC
13238 ;
13239 return 0;
13240}
13241_ACEOF
81ecdfbb 13242if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13243 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13244else
81ecdfbb 13245 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13246
596c9d4b 13247fi
81ecdfbb 13248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13249fi
13250
97bf5e38 13251 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13252
81ecdfbb 13253$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13254
13255 fi
81ecdfbb
RW
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13257$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13258
81ecdfbb
RW
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13260$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13261 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13262 $as_echo_n "(cached) " >&6
d84dd0c5 13263else
81ecdfbb 13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13265/* end confdefs.h. */
97bf5e38
MK
13266
13267#define _SYSCALL32
d30c5336
JK
13268/* Needed for new procfs interface on sparc-solaris. */
13269#define _STRUCTURED_PROC 1
d84dd0c5 13270#include <sys/procfs.h>
bec39cab
AC
13271int
13272main ()
13273{
97bf5e38 13274fpregset_t avar
bec39cab
AC
13275 ;
13276 return 0;
13277}
13278_ACEOF
81ecdfbb 13279if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13280 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13281else
81ecdfbb 13282 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13283
d84dd0c5 13284fi
81ecdfbb 13285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13286fi
13287
97bf5e38 13288 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13289
81ecdfbb 13290$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13291
97bf5e38 13292 fi
81ecdfbb
RW
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13294$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13295
81ecdfbb
RW
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13297$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13298 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13299 $as_echo_n "(cached) " >&6
c906108c 13300else
81ecdfbb 13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13302/* end confdefs.h. */
c906108c 13303
97bf5e38 13304#define _SYSCALL32
d30c5336
JK
13305/* Needed for new procfs interface on sparc-solaris. */
13306#define _STRUCTURED_PROC 1
97bf5e38 13307#include <sys/procfs.h>
bec39cab
AC
13308int
13309main ()
13310{
97bf5e38 13311prgregset_t avar
bec39cab
AC
13312 ;
13313 return 0;
13314}
13315_ACEOF
81ecdfbb 13316if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13317 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13318else
81ecdfbb 13319 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13320
c906108c 13321fi
81ecdfbb 13322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13323fi
13324
97bf5e38 13325 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13326
81ecdfbb 13327$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13328
97bf5e38 13329 fi
81ecdfbb
RW
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13331$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13332
81ecdfbb
RW
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13334$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13335 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13336 $as_echo_n "(cached) " >&6
d45fe813 13337else
81ecdfbb 13338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13339/* end confdefs.h. */
97bf5e38
MK
13340
13341#define _SYSCALL32
d30c5336
JK
13342/* Needed for new procfs interface on sparc-solaris. */
13343#define _STRUCTURED_PROC 1
97bf5e38 13344#include <sys/procfs.h>
bec39cab
AC
13345int
13346main ()
13347{
97bf5e38 13348prfpregset_t avar
bec39cab
AC
13349 ;
13350 return 0;
13351}
13352_ACEOF
81ecdfbb 13353if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13354 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13355else
81ecdfbb 13356 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13357
d45fe813 13358fi
81ecdfbb 13359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13360fi
13361
97bf5e38 13362 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13363
81ecdfbb 13364$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13365
97bf5e38 13366 fi
81ecdfbb
RW
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13368$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13369
81ecdfbb
RW
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13371$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13372 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13373 $as_echo_n "(cached) " >&6
d45fe813 13374else
81ecdfbb 13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13376/* end confdefs.h. */
97bf5e38
MK
13377
13378#define _SYSCALL32
d30c5336
JK
13379/* Needed for new procfs interface on sparc-solaris. */
13380#define _STRUCTURED_PROC 1
97bf5e38 13381#include <sys/procfs.h>
bec39cab
AC
13382int
13383main ()
13384{
97bf5e38 13385prgregset32_t avar
bec39cab
AC
13386 ;
13387 return 0;
13388}
13389_ACEOF
81ecdfbb 13390if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13391 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13392else
81ecdfbb 13393 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13394
d45fe813 13395fi
81ecdfbb 13396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13397fi
13398
97bf5e38 13399 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13400
81ecdfbb 13401$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13402
97bf5e38 13403 fi
81ecdfbb
RW
13404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13405$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13406
81ecdfbb
RW
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13408$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13409 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13410 $as_echo_n "(cached) " >&6
d45fe813 13411else
81ecdfbb 13412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13413/* end confdefs.h. */
97bf5e38
MK
13414
13415#define _SYSCALL32
d30c5336
JK
13416/* Needed for new procfs interface on sparc-solaris. */
13417#define _STRUCTURED_PROC 1
97bf5e38 13418#include <sys/procfs.h>
bec39cab
AC
13419int
13420main ()
13421{
97bf5e38 13422prfpregset32_t avar
bec39cab
AC
13423 ;
13424 return 0;
13425}
13426_ACEOF
81ecdfbb 13427if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13428 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13429else
81ecdfbb 13430 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13431
d45fe813 13432fi
81ecdfbb 13433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13434fi
13435
97bf5e38 13436 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13437
81ecdfbb 13438$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13439
97bf5e38 13440 fi
81ecdfbb
RW
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13442$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13443
81ecdfbb
RW
13444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13445$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13446 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13447 $as_echo_n "(cached) " >&6
d45fe813 13448else
81ecdfbb 13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13450/* end confdefs.h. */
97bf5e38 13451
d45fe813 13452#define _SYSCALL32
d30c5336
JK
13453/* Needed for new procfs interface on sparc-solaris. */
13454#define _STRUCTURED_PROC 1
97bf5e38 13455#include <sys/procfs.h>
bec39cab
AC
13456int
13457main ()
13458{
97bf5e38 13459lwpid_t avar
bec39cab
AC
13460 ;
13461 return 0;
13462}
13463_ACEOF
81ecdfbb 13464if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13465 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13466else
81ecdfbb 13467 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13468
d45fe813 13469fi
81ecdfbb 13470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13471fi
13472
97bf5e38 13473 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13474
81ecdfbb 13475$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13476
97bf5e38 13477 fi
81ecdfbb
RW
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13479$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13480
81ecdfbb
RW
13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13482$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13483 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13484 $as_echo_n "(cached) " >&6
c906108c 13485else
81ecdfbb 13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13487/* end confdefs.h. */
c906108c 13488
97bf5e38 13489#define _SYSCALL32
d30c5336
JK
13490/* Needed for new procfs interface on sparc-solaris. */
13491#define _STRUCTURED_PROC 1
97bf5e38 13492#include <sys/procfs.h>
bec39cab
AC
13493int
13494main ()
13495{
97bf5e38 13496psaddr_t avar
bec39cab
AC
13497 ;
13498 return 0;
13499}
13500_ACEOF
81ecdfbb 13501if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13502 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13503else
81ecdfbb 13504 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13505
c906108c 13506fi
81ecdfbb 13507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13508fi
13509
97bf5e38 13510 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13511
81ecdfbb 13512$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13513
97bf5e38 13514 fi
81ecdfbb
RW
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13516$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13517
81ecdfbb
RW
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13519$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13520 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13521 $as_echo_n "(cached) " >&6
c906108c 13522else
81ecdfbb 13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13524/* end confdefs.h. */
c906108c 13525
97bf5e38 13526#define _SYSCALL32
d30c5336
JK
13527/* Needed for new procfs interface on sparc-solaris. */
13528#define _STRUCTURED_PROC 1
97bf5e38 13529#include <sys/procfs.h>
bec39cab
AC
13530int
13531main ()
13532{
97bf5e38 13533prsysent_t avar
bec39cab
AC
13534 ;
13535 return 0;
13536}
13537_ACEOF
81ecdfbb 13538if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13539 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13540else
81ecdfbb 13541 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13542
c906108c 13543fi
81ecdfbb 13544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13545fi
13546
97bf5e38 13547 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13548
81ecdfbb 13549$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13550
97bf5e38 13551 fi
81ecdfbb
RW
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13553$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13554
81ecdfbb
RW
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13556$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13557 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13558 $as_echo_n "(cached) " >&6
c906108c 13559else
81ecdfbb 13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13561/* end confdefs.h. */
c906108c 13562
97bf5e38 13563#define _SYSCALL32
d30c5336
JK
13564/* Needed for new procfs interface on sparc-solaris. */
13565#define _STRUCTURED_PROC 1
97bf5e38 13566#include <sys/procfs.h>
bec39cab
AC
13567int
13568main ()
13569{
97bf5e38 13570pr_sigset_t avar
bec39cab
AC
13571 ;
13572 return 0;
13573}
13574_ACEOF
81ecdfbb 13575if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13576 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13577else
81ecdfbb 13578 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13579
c906108c 13580fi
81ecdfbb 13581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13582fi
13583
97bf5e38 13584 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13585
81ecdfbb 13586$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13587
97bf5e38 13588 fi
81ecdfbb
RW
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13590$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13591
81ecdfbb
RW
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13593$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13594 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13595 $as_echo_n "(cached) " >&6
c906108c 13596else
81ecdfbb 13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13598/* end confdefs.h. */
c906108c 13599
97bf5e38 13600#define _SYSCALL32
d30c5336
JK
13601/* Needed for new procfs interface on sparc-solaris. */
13602#define _STRUCTURED_PROC 1
97bf5e38 13603#include <sys/procfs.h>
bec39cab
AC
13604int
13605main ()
13606{
97bf5e38 13607pr_sigaction64_t avar
bec39cab
AC
13608 ;
13609 return 0;
13610}
13611_ACEOF
81ecdfbb 13612if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13613 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13614else
81ecdfbb 13615 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13616
c906108c 13617fi
81ecdfbb 13618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13619fi
13620
97bf5e38 13621 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13622
81ecdfbb 13623$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13624
97bf5e38 13625 fi
81ecdfbb
RW
13626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13627$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13628
81ecdfbb
RW
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13630$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13631 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13632 $as_echo_n "(cached) " >&6
97bf5e38 13633else
81ecdfbb 13634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13635/* end confdefs.h. */
97bf5e38
MK
13636
13637#define _SYSCALL32
d30c5336
JK
13638/* Needed for new procfs interface on sparc-solaris. */
13639#define _STRUCTURED_PROC 1
97bf5e38 13640#include <sys/procfs.h>
bec39cab
AC
13641int
13642main ()
13643{
97bf5e38 13644pr_siginfo64_t avar
bec39cab
AC
13645 ;
13646 return 0;
13647}
13648_ACEOF
81ecdfbb 13649if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13650 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13651else
81ecdfbb 13652 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13653
97bf5e38 13654fi
81ecdfbb 13655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13656fi
c906108c 13657
97bf5e38 13658 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13659
81ecdfbb 13660$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13661
97bf5e38 13662 fi
81ecdfbb
RW
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13664$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13665
13666
97bf5e38
MK
13667
13668
13669
97bf5e38 13670 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13672$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13673 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13674 $as_echo_n "(cached) " >&6
c906108c 13675else
81ecdfbb 13676 if test "$cross_compiling" = yes; then :
97bf5e38 13677 gdb_cv_prfpregset_t_broken=yes
c906108c 13678else
81ecdfbb 13679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13680/* end confdefs.h. */
97bf5e38
MK
13681#include <sys/procfs.h>
13682 int main ()
13683 {
13684 if (sizeof (prfpregset_t) == sizeof (void *))
13685 return 1;
13686 return 0;
13687 }
bec39cab 13688_ACEOF
81ecdfbb 13689if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13690 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13691else
13692 gdb_cv_prfpregset_t_broken=yes
c906108c 13693fi
81ecdfbb
RW
13694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13695 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13696fi
81ecdfbb 13697
c906108c
SS
13698fi
13699
81ecdfbb
RW
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13701$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13702 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13703
81ecdfbb 13704$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13705
97bf5e38
MK
13706 fi
13707 fi
c906108c 13708
bec39cab 13709
81ecdfbb
RW
13710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13711$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13712 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
13713 $as_echo_n "(cached) " >&6
c906108c 13714else
81ecdfbb 13715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13716/* end confdefs.h. */
97bf5e38
MK
13717#include <unistd.h>
13718#include <sys/types.h>
13719#include <sys/procfs.h>
13720
bec39cab
AC
13721int
13722main ()
13723{
97bf5e38
MK
13724
13725 int dummy;;
13726 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
81ecdfbb 13732if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13733 gdb_cv_have_procfs_piocset=yes
c906108c 13734else
81ecdfbb 13735 gdb_cv_have_procfs_piocset=no
c906108c 13736fi
81ecdfbb 13737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13738fi
97bf5e38 13739
81ecdfbb
RW
13740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13741$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13742 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13743
81ecdfbb 13744$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13745
13746 fi
c906108c 13747fi
c906108c 13748
97bf5e38 13749if test ${host} = ${target} ; then
bec39cab 13750
81ecdfbb
RW
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13752$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13753 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13754 $as_echo_n "(cached) " >&6
bec39cab 13755else
81ecdfbb 13756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13757/* end confdefs.h. */
97bf5e38 13758#include <link.h>
bec39cab
AC
13759int
13760main ()
13761{
97bf5e38 13762struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13763 ;
13764 return 0;
13765}
13766_ACEOF
81ecdfbb 13767if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13768 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13769else
81ecdfbb 13770 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13771fi
81ecdfbb 13772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13773fi
13774
81ecdfbb
RW
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13776$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13777 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13778
81ecdfbb 13779$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13780
13781 fi
13782
bec39cab 13783
81ecdfbb
RW
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13785$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13786 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13787 $as_echo_n "(cached) " >&6
c906108c 13788else
81ecdfbb 13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13790/* end confdefs.h. */
97bf5e38
MK
13791#include <sys/types.h>
13792#include <link.h>
bec39cab
AC
13793int
13794main ()
13795{
97bf5e38 13796struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13797 ;
13798 return 0;
13799}
13800_ACEOF
81ecdfbb 13801if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13802 gdb_cv_have_struct_link_map_with_lm_members=yes
13803else
81ecdfbb 13804 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 13805fi
81ecdfbb 13806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13807fi
c906108c 13808
81ecdfbb
RW
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
13810$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 13811 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 13812
81ecdfbb 13813$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13814
13815 fi
13816
bec39cab 13817
81ecdfbb
RW
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
13819$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
13820 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
13821 $as_echo_n "(cached) " >&6
c906108c 13822else
81ecdfbb 13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13824/* end confdefs.h. */
97bf5e38
MK
13825#include <sys/types.h>
13826#ifdef HAVE_NLIST_H
13827#include <nlist.h>
13828#endif
13829#include <link.h>
bec39cab
AC
13830int
13831main ()
13832{
97bf5e38 13833struct so_map lm; (void) lm.som_addr;
bec39cab
AC
13834 ;
13835 return 0;
13836}
13837_ACEOF
81ecdfbb 13838if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13839 gdb_cv_have_struct_so_map_with_som_members=yes
13840else
81ecdfbb 13841 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 13842fi
81ecdfbb 13843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13844fi
c906108c 13845
81ecdfbb
RW
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
13847$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 13848 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 13849
81ecdfbb 13850$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 13851
97bf5e38 13852 fi
c906108c 13853
bec39cab 13854
81ecdfbb
RW
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
13856$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
13857 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
13858 $as_echo_n "(cached) " >&6
97bf5e38 13859else
81ecdfbb 13860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13861/* end confdefs.h. */
97bf5e38
MK
13862#define _SYSCALL32
13863#include <sys/link.h>
bec39cab
AC
13864int
13865main ()
13866{
97bf5e38 13867struct link_map32 l;
bec39cab
AC
13868 ;
13869 return 0;
13870}
13871_ACEOF
81ecdfbb 13872if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13873 gdb_cv_have_struct_link_map32=yes
13874else
81ecdfbb 13875 gdb_cv_have_struct_link_map32=no
97bf5e38 13876fi
81ecdfbb 13877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13878fi
c906108c 13879
81ecdfbb
RW
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
13881$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 13882 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 13883
81ecdfbb 13884$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 13885
60ca704f 13886
81ecdfbb 13887$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 13888
97bf5e38
MK
13889 fi
13890fi
c906108c 13891
bc8bcb4b 13892# Check if the compiler supports the `long long' type.
c906108c 13893
81ecdfbb
RW
13894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13895$as_echo_n "checking for long long support in compiler... " >&6; }
13896if test "${gdb_cv_c_long_long+set}" = set; then :
13897 $as_echo_n "(cached) " >&6
97bf5e38 13898else
81ecdfbb 13899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13900/* end confdefs.h. */
bc8bcb4b 13901extern long long foo;
bec39cab
AC
13902int
13903main ()
13904{
bc8bcb4b 13905switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13906 ;
13907 return 0;
13908}
13909_ACEOF
81ecdfbb 13910if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13911 gdb_cv_c_long_long=yes
13912else
81ecdfbb 13913 gdb_cv_c_long_long=no
97bf5e38 13914fi
81ecdfbb 13915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13916fi
81ecdfbb
RW
13917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13918$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 13919if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 13920
81ecdfbb 13921$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13922
13923fi
13924
bc8bcb4b 13925# Check if the compiler and runtime support printing long longs.
97bf5e38 13926
81ecdfbb
RW
13927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13928$as_echo_n "checking for long long support in printf... " >&6; }
13929if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13930 $as_echo_n "(cached) " >&6
97bf5e38 13931else
81ecdfbb 13932 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13933 gdb_cv_printf_has_long_long=no
13934else
81ecdfbb 13935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13936/* end confdefs.h. */
bc8bcb4b
MK
13937$ac_includes_default
13938int
13939main ()
13940{
13941char buf[32];
97bf5e38
MK
13942 long long l = 0;
13943 l = (l << 16) + 0x0123;
13944 l = (l << 16) + 0x4567;
13945 l = (l << 16) + 0x89ab;
13946 l = (l << 16) + 0xcdef;
13947 sprintf (buf, "0x%016llx", l);
13948 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13949 ;
13950 return 0;
c906108c 13951}
bec39cab 13952_ACEOF
81ecdfbb 13953if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13954 gdb_cv_printf_has_long_long=yes
13955else
81ecdfbb 13956 gdb_cv_printf_has_long_long=no
97bf5e38 13957fi
81ecdfbb
RW
13958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13959 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13960fi
81ecdfbb 13961
97bf5e38 13962fi
81ecdfbb
RW
13963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13964$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13965if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13966
81ecdfbb 13967$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13968
13969fi
97bf5e38 13970
1a619819
LM
13971# Check if the compiler and runtime support printing decfloats.
13972
81ecdfbb
RW
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13974$as_echo_n "checking for decfloat support in printf... " >&6; }
13975if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13976 $as_echo_n "(cached) " >&6
1a619819 13977else
81ecdfbb 13978 if test "$cross_compiling" = yes; then :
1a619819
LM
13979 gdb_cv_printf_has_decfloat=no
13980else
81ecdfbb 13981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13982/* end confdefs.h. */
13983$ac_includes_default
13984int
13985main ()
13986{
13987char buf[64];
13988 _Decimal32 d32 = 1.2345df;
13989 _Decimal64 d64 = 1.2345dd;
13990 _Decimal128 d128 = 1.2345dl;
13991 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13992 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13993 ;
13994 return 0;
13995}
13996_ACEOF
81ecdfbb 13997if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13998 gdb_cv_printf_has_decfloat=yes
13999else
81ecdfbb 14000 gdb_cv_printf_has_decfloat=no
1a619819 14001fi
81ecdfbb
RW
14002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14003 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14004fi
81ecdfbb 14005
1a619819 14006fi
81ecdfbb
RW
14007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14008$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14009if test $gdb_cv_printf_has_decfloat = yes; then
14010
81ecdfbb 14011$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14012
14013fi
14014
bc8bcb4b
MK
14015# Check if the compiler supports the `long double' type. We can't use
14016# AC_C_LONG_DOUBLE because that one does additional checks on the
14017# constants defined in <float.h> that fail on some systems,
14018# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14019
81ecdfbb
RW
14020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14021$as_echo_n "checking for long double support in compiler... " >&6; }
14022if test "${gdb_cv_c_long_double+set}" = set; then :
14023 $as_echo_n "(cached) " >&6
97bf5e38 14024else
81ecdfbb 14025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14026/* end confdefs.h. */
97bf5e38 14027long double foo;
bec39cab 14028_ACEOF
81ecdfbb 14029if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14030 gdb_cv_c_long_double=yes
97bf5e38 14031else
81ecdfbb 14032 gdb_cv_c_long_double=no
97bf5e38 14033fi
81ecdfbb 14034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14035fi
81ecdfbb
RW
14036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14037$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14038if test $gdb_cv_c_long_double = yes; then
c906108c 14039
81ecdfbb 14040$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14041
14042fi
14043
bc8bcb4b 14044# Check if the compiler and runtime support printing long doubles.
97bf5e38 14045
81ecdfbb
RW
14046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14047$as_echo_n "checking for long double support in printf... " >&6; }
14048if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14049 $as_echo_n "(cached) " >&6
97bf5e38 14050else
81ecdfbb 14051 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14052 gdb_cv_printf_has_long_double=no
14053else
81ecdfbb 14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14055/* end confdefs.h. */
bc8bcb4b
MK
14056$ac_includes_default
14057int
14058main ()
14059{
14060char buf[16];
97bf5e38
MK
14061 long double f = 3.141592653;
14062 sprintf (buf, "%Lg", f);
14063 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14064 ;
14065 return 0;
97bf5e38 14066}
bec39cab 14067_ACEOF
81ecdfbb 14068if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14069 gdb_cv_printf_has_long_double=yes
c906108c 14070else
81ecdfbb 14071 gdb_cv_printf_has_long_double=no
c906108c 14072fi
81ecdfbb
RW
14073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14074 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14075fi
81ecdfbb 14076
c906108c 14077fi
81ecdfbb
RW
14078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14079$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14080if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14081
81ecdfbb 14082$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14083
14084fi
97bf5e38 14085
bc8bcb4b 14086# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14087
81ecdfbb
RW
14088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14089$as_echo_n "checking for long double support in scanf... " >&6; }
14090if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14091 $as_echo_n "(cached) " >&6
97bf5e38 14092else
81ecdfbb 14093 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14094 gdb_cv_scanf_has_long_double=no
14095else
81ecdfbb 14096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14097/* end confdefs.h. */
bc8bcb4b
MK
14098#include <stdio.h>
14099int
14100main ()
14101{
14102char *buf = "3.141592653";
97bf5e38
MK
14103 long double f = 0;
14104 sscanf (buf, "%Lg", &f);
14105 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14106 ;
14107 return 0;
97bf5e38 14108}
bec39cab 14109_ACEOF
81ecdfbb 14110if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14111 gdb_cv_scanf_has_long_double=yes
14112else
81ecdfbb 14113 gdb_cv_scanf_has_long_double=no
97bf5e38 14114fi
81ecdfbb
RW
14115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14116 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14117fi
81ecdfbb 14118
c906108c 14119fi
81ecdfbb
RW
14120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14121$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14122if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14123
81ecdfbb 14124$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14125
14126fi
c906108c 14127
438013df
AO
14128case ${host_os} in
14129aix*)
81ecdfbb
RW
14130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14131$as_echo_n "checking for -bbigtoc option... " >&6; }
14132if test "${gdb_cv_bigtoc+set}" = set; then :
14133 $as_echo_n "(cached) " >&6
438013df 14134else
bec39cab 14135
438013df
AO
14136 SAVE_LDFLAGS=$LDFLAGS
14137
14138 case $GCC in
14139 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14140 *) gdb_cv_bigtoc=-bbigtoc ;;
14141 esac
14142
14143 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14145/* end confdefs.h. */
438013df 14146
bec39cab
AC
14147int
14148main ()
14149{
438013df 14150int i;
bec39cab
AC
14151 ;
14152 return 0;
14153}
14154_ACEOF
81ecdfbb 14155if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14156
81ecdfbb
RW
14157else
14158 gdb_cv_bigtoc=
438013df 14159fi
81ecdfbb
RW
14160rm -f core conftest.err conftest.$ac_objext \
14161 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14162 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14163
bec39cab 14164fi
81ecdfbb
RW
14165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14166$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14167 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14168 ;;
14169esac
14170
c906108c
SS
14171
14172
14173if test ${build} = ${host} -a ${host} = ${target} ; then
14174 case ${host_os} in
14175 hpux*)
81ecdfbb
RW
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
14177$as_echo_n "checking for HPUX/OSF thread support... " >&6; }
c906108c
SS
14178 if test -f /usr/include/dce/cma_config.h ; then
14179 if test "$GCC" = "yes" ; then
81ecdfbb
RW
14180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14181$as_echo "yes" >&6; }
60ca704f 14182
81ecdfbb 14183$as_echo "#define HAVE_HPUX_THREAD_SUPPORT 1" >>confdefs.h
c906108c 14184
3483b318 14185 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
14186 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
14187 else
81ecdfbb
RW
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (suppressed because you are not using GCC)" >&5
14189$as_echo "no (suppressed because you are not using GCC)" >&6; }
c906108c
SS
14190 fi
14191 else
81ecdfbb
RW
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14193$as_echo "no" >&6; }
c906108c
SS
14194 fi
14195 ;;
14196 solaris*)
d92419e5
JB
14197 # See if thread_db library is around for Solaris thread debugging.
14198 # Note that we must explicitly test for version 1 of the library
14199 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14200 # the same API.
81ecdfbb
RW
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14202$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14203 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14205$as_echo "yes" >&6; }
60ca704f 14206
81ecdfbb 14207$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14208
3483b318 14209 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14210 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14212$as_echo_n "checking for dlopen in -ldl... " >&6; }
14213if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14214 $as_echo_n "(cached) " >&6
c906108c 14215else
bec39cab 14216 ac_check_lib_save_LIBS=$LIBS
c906108c 14217LIBS="-ldl $LIBS"
81ecdfbb 14218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14219/* end confdefs.h. */
14220
81ecdfbb
RW
14221/* Override any GCC internal prototype to avoid an error.
14222 Use char because int might match the return type of a GCC
14223 builtin and then its argument prototype would still apply. */
bec39cab
AC
14224#ifdef __cplusplus
14225extern "C"
14226#endif
bec39cab
AC
14227char dlopen ();
14228int
14229main ()
14230{
81ecdfbb 14231return dlopen ();
bec39cab
AC
14232 ;
14233 return 0;
14234}
14235_ACEOF
81ecdfbb 14236if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14237 ac_cv_lib_dl_dlopen=yes
14238else
81ecdfbb 14239 ac_cv_lib_dl_dlopen=no
bec39cab 14240fi
81ecdfbb
RW
14241rm -f core conftest.err conftest.$ac_objext \
14242 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14243LIBS=$ac_check_lib_save_LIBS
14244fi
81ecdfbb
RW
14245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14246$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14247if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14248 cat >>confdefs.h <<_ACEOF
14249#define HAVE_LIBDL 1
14250_ACEOF
c906108c
SS
14251
14252 LIBS="-ldl $LIBS"
14253
c906108c
SS
14254fi
14255
14256 if test "$GCC" = "yes" ; then
14257 # The GNU linker requires the -export-dynamic option to make
14258 # all symbols visible in the dynamic symbol table.
14259 hold_ldflags=$LDFLAGS
81ecdfbb
RW
14260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5
14261$as_echo_n "checking for the ld -export-dynamic flag... " >&6; }
c906108c 14262 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
81ecdfbb 14263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14264/* end confdefs.h. */
c906108c 14265
bec39cab
AC
14266int
14267main ()
14268{
c906108c 14269int i;
bec39cab
AC
14270 ;
14271 return 0;
14272}
14273_ACEOF
81ecdfbb 14274if ac_fn_c_try_link "$LINENO"; then :
c906108c
SS
14275 found=yes
14276else
81ecdfbb 14277 found=no
c906108c 14278fi
81ecdfbb
RW
14279rm -f core conftest.err conftest.$ac_objext \
14280 conftest$ac_exeext conftest.$ac_ext
c906108c 14281 LDFLAGS=$hold_ldflags
81ecdfbb
RW
14282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14283$as_echo "$found" >&6; }
c906108c
SS
14284 if test $found = yes; then
14285 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
14286 fi
14287 fi
14288 # Sun randomly tweaked the prototypes in <proc_service.h>
14289 # at one point.
81ecdfbb
RW
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14291$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14292 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14293 $as_echo_n "(cached) " >&6
c906108c 14294else
bec39cab 14295
81ecdfbb 14296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14297/* end confdefs.h. */
c906108c
SS
14298
14299 #include <proc_service.h>
14300 ps_err_e ps_pdwrite
14301 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14302
bec39cab
AC
14303int
14304main ()
14305{
14306
14307 ;
14308 return 0;
14309}
14310_ACEOF
81ecdfbb 14311if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14312 gdb_cv_proc_service_is_old=no
14313else
81ecdfbb 14314 gdb_cv_proc_service_is_old=yes
c906108c 14315fi
81ecdfbb 14316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14317
c906108c
SS
14318fi
14319
81ecdfbb
RW
14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14321$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14322 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14323
81ecdfbb 14324$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14325
14326 fi
14327 else
81ecdfbb
RW
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329$as_echo "no" >&6; }
c906108c
SS
14330 fi
14331 ;;
d92419e5 14332 aix*)
81ecdfbb
RW
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14334$as_echo_n "checking for AiX thread debugging library... " >&6; }
14335 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14336 $as_echo_n "(cached) " >&6
bec39cab 14337else
81ecdfbb 14338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14339/* end confdefs.h. */
d92419e5 14340#include <sys/pthdebug.h>
bec39cab
AC
14341int
14342main ()
14343{
d92419e5
JB
14344#ifndef PTHDB_VERSION_3
14345 #error
14346 #endif
bec39cab
AC
14347 ;
14348 return 0;
14349}
14350_ACEOF
81ecdfbb 14351if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14352 gdb_cv_have_aix_thread_debug=yes
14353else
81ecdfbb 14354 gdb_cv_have_aix_thread_debug=no
d92419e5 14355fi
81ecdfbb 14356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14357fi
14358
81ecdfbb
RW
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14360$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14361 if test $gdb_cv_have_aix_thread_debug = yes; then
14362 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14363 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
14364 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
14365 fi
14366 ;;
c906108c 14367 esac
bec39cab 14368
c906108c
SS
14369fi
14370
3f47be5c 14371if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14373$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14374if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14375 $as_echo_n "(cached) " >&6
bec39cab 14376else
81ecdfbb 14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14378/* end confdefs.h. */
3f47be5c 14379#include <thread_db.h>
bec39cab
AC
14380int
14381main ()
14382{
3f47be5c 14383int i = TD_NOTALLOC;
bec39cab
AC
14384 ;
14385 return 0;
14386}
14387_ACEOF
81ecdfbb 14388if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14389 gdb_cv_thread_db_h_has_td_notalloc=yes
14390else
81ecdfbb 14391 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14392
3f47be5c 14393fi
81ecdfbb 14394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14395
bec39cab 14396fi
81ecdfbb
RW
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14398$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14400$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14401if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14402 $as_echo_n "(cached) " >&6
59f80f10 14403else
81ecdfbb 14404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14405/* end confdefs.h. */
14406#include <thread_db.h>
14407int
14408main ()
14409{
14410int i = TD_VERSION;
14411 ;
14412 return 0;
14413}
14414_ACEOF
81ecdfbb 14415if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14416 gdb_cv_thread_db_h_has_td_version=yes
14417else
81ecdfbb 14418 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14419
14420fi
81ecdfbb 14421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14422
14423fi
81ecdfbb
RW
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14425$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14427$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14428if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14429 $as_echo_n "(cached) " >&6
59f80f10 14430else
81ecdfbb 14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14432/* end confdefs.h. */
14433#include <thread_db.h>
14434int
14435main ()
14436{
14437int i = TD_NOTLS;
14438 ;
14439 return 0;
14440}
14441_ACEOF
81ecdfbb 14442if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14443 gdb_cv_thread_db_h_has_td_notls=yes
14444else
81ecdfbb 14445 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14446
14447fi
81ecdfbb 14448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14449
14450fi
81ecdfbb
RW
14451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14452$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14453fi
14454if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14455
81ecdfbb 14456$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14457
59f80f10
DJ
14458fi
14459if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14460
81ecdfbb 14461$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14462
14463fi
14464if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14465
81ecdfbb 14466$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14467
3f47be5c
EZ
14468fi
14469
b757528f 14470if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14472$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14473if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14474 $as_echo_n "(cached) " >&6
bec39cab 14475else
81ecdfbb 14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14477/* end confdefs.h. */
b757528f 14478#include <sys/syscall.h>
bec39cab
AC
14479int
14480main ()
14481{
b757528f 14482int i = __NR_tkill;
bec39cab
AC
14483 ;
14484 return 0;
14485}
14486_ACEOF
81ecdfbb 14487if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14488 gdb_cv_sys_syscall_h_has_tkill=yes
14489else
81ecdfbb 14490 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14491
b757528f 14492fi
81ecdfbb 14493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14494
bec39cab 14495fi
81ecdfbb
RW
14496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14497$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14498fi
14499if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14500
81ecdfbb 14501$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14502
14503fi
14504
81ecdfbb
RW
14505ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14506"
14507if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14508 ac_have_decl=1
10568435 14509else
81ecdfbb 14510 ac_have_decl=0
10568435 14511fi
10568435
JK
14512
14513cat >>confdefs.h <<_ACEOF
81ecdfbb 14514#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14515_ACEOF
14516
14517
81ecdfbb
RW
14518if test "$cross_compiling" = yes; then :
14519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14520/* end confdefs.h. */
14521#include <sys/personality.h>
14522int
14523main ()
14524{
14525
14526# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14527# define ADDR_NO_RANDOMIZE 0x0040000
14528# endif
14529 /* Test the flag could be set and stays set. */
14530 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14531 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14532 return 1
14533 ;
14534 return 0;
14535}
14536_ACEOF
81ecdfbb 14537if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14538 have_personality=true
14539else
81ecdfbb 14540 have_personality=false
10568435 14541fi
81ecdfbb
RW
14542rm -f core conftest.err conftest.$ac_objext \
14543 conftest$ac_exeext conftest.$ac_ext
10568435 14544else
81ecdfbb 14545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14546/* end confdefs.h. */
14547#include <sys/personality.h>
14548int
14549main ()
14550{
14551
14552# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14553# define ADDR_NO_RANDOMIZE 0x0040000
14554# endif
14555 /* Test the flag could be set and stays set. */
14556 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14557 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14558 return 1
14559 ;
14560 return 0;
14561}
14562_ACEOF
81ecdfbb 14563if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14564 have_personality=true
14565else
81ecdfbb 14566 have_personality=false
10568435 14567fi
81ecdfbb
RW
14568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14569 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14570fi
81ecdfbb 14571
10568435
JK
14572if $have_personality
14573then
14574
81ecdfbb 14575$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14576
14577fi
14578
fb40c209 14579
b14b1491 14580target_sysroot_reloc=0
bec39cab 14581
81ecdfbb
RW
14582# Check whether --with-sysroot was given.
14583if test "${with_sysroot+set}" = set; then :
14584 withval=$with_sysroot;
030292b7 14585 case ${with_sysroot} in
715d1656 14586 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14587 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14588 esac
14589
14590 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14591
07abfebf
RS
14592 if test "x$prefix" = xNONE; then
14593 test_prefix=/usr/local
14594 else
14595 test_prefix=$prefix
14596 fi
aa28a74e 14597 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14598 test_exec_prefix=$test_prefix
030292b7 14599 else
07abfebf 14600 test_exec_prefix=$exec_prefix
030292b7
DJ
14601 fi
14602 case ${TARGET_SYSTEM_ROOT} in
715d1656 14603 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14604 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14605 '${prefix}'|'${prefix}/'*|\
715d1656 14606 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14607 target_sysroot_reloc=1
030292b7
DJ
14608 ;;
14609 esac
14610
14611else
bec39cab 14612
030292b7
DJ
14613 TARGET_SYSTEM_ROOT=
14614 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14615
81ecdfbb 14616fi
b14b1491 14617
81ecdfbb 14618TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14619
14620
14621
16e7150e 14622
16e7150e 14623
81ecdfbb
RW
14624# Check whether --with-system-gdbinit was given.
14625if test "${with_system_gdbinit+set}" = set; then :
14626 withval=$with_system_gdbinit;
b14b1491
TT
14627 SYSTEM_GDBINIT=$withval
14628else
14629 SYSTEM_GDBINIT=
81ecdfbb
RW
14630fi
14631
16e7150e
JG
14632
14633 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14634 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14635 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14636 ac_define_dir=`eval echo $ac_define_dir`
14637
14638cat >>confdefs.h <<_ACEOF
14639#define SYSTEM_GDBINIT "$ac_define_dir"
14640_ACEOF
14641
14642
14643
0c4a4063 14644
b14b1491
TT
14645 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14646 if test "x$prefix" = xNONE; then
14647 test_prefix=/usr/local
14648 else
14649 test_prefix=$prefix
14650 fi
14651 else
14652 test_prefix=$exec_prefix
14653 fi
14654 value=0
14655 case ${ac_define_dir} in
14656 "${test_prefix}"|"${test_prefix}/"*|\
14657 '${exec_prefix}'|'${exec_prefix}/'*)
14658 value=1
14659 ;;
14660 esac
16e7150e 14661
b14b1491
TT
14662cat >>confdefs.h <<_ACEOF
14663#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14664_ACEOF
14665
b14b1491 14666
16e7150e 14667
0c4a4063 14668
81ecdfbb
RW
14669# Check whether --enable-werror was given.
14670if test "${enable_werror+set}" = set; then :
14671 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14672 yes | y) ERROR_ON_WARNING="yes" ;;
14673 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14674 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14675 esac
81ecdfbb
RW
14676fi
14677
094a342e
MK
14678
14679# Enable -Werror by default when using gcc
14680if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14681 ERROR_ON_WARNING=yes
14682fi
14683
14684WERROR_CFLAGS=""
14685if test "${ERROR_ON_WARNING}" = yes ; then
14686 WERROR_CFLAGS="-Werror"
14687fi
14688
aa79a185
DJ
14689# The entries after -Wno-pointer-sign are disabled warnings which may
14690# be enabled in the future, which can not currently be used to build
14691# GDB.
14692# NOTE: If you change this list, remember to update
3b851bce 14693# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14694build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14695-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14696-Wno-unused -Wunused-value -Wunused-function \
14697-Wno-switch -Wno-char-subscripts"
a3b362c4 14698
3526781e
DJ
14699# Enable -Wno-format by default when using gcc on mingw since many
14700# GCC versions complain about %I64.
14701case "${host}" in
14702 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14703esac
14704
81ecdfbb
RW
14705# Check whether --enable-build-warnings was given.
14706if test "${enable_build_warnings+set}" = set; then :
14707 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14708 yes) ;;
14709 no) build_warnings="-w";;
14710 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14711 build_warnings="${build_warnings} ${t}";;
14712 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14713 build_warnings="${t} ${build_warnings}";;
14714 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14715esac
d4f3574e 14716if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14717 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14718fi
81ecdfbb
RW
14719fi
14720# Check whether --enable-gdb-build-warnings was given.
14721if test "${enable_gdb_build_warnings+set}" = set; then :
14722 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14723 yes) ;;
14724 no) build_warnings="-w";;
14725 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14726 build_warnings="${build_warnings} ${t}";;
14727 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14728 build_warnings="${t} ${build_warnings}";;
14729 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14730esac
14731if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14732 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14733fi
81ecdfbb
RW
14734fi
14735WARN_CFLAGS=""
c906108c
SS
14736if test "x${build_warnings}" != x -a "x$GCC" = xyes
14737then
81ecdfbb
RW
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14739$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14740 # Separate out the -Werror flag as some files just cannot be
14741 # compiled with it enabled.
14742 for w in ${build_warnings}; do
14743 case $w in
14744 -Werr*) WERROR_CFLAGS=-Werror ;;
14745 *) # Check that GCC accepts it
4536bbc6
AC
14746 saved_CFLAGS="$CFLAGS"
14747 CFLAGS="$CFLAGS $w"
81ecdfbb 14748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14749/* end confdefs.h. */
4536bbc6 14750
bec39cab
AC
14751int
14752main ()
14753{
4536bbc6 14754
bec39cab
AC
14755 ;
14756 return 0;
14757}
14758_ACEOF
81ecdfbb 14759if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14760 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14761fi
81ecdfbb 14762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14763 CFLAGS="$saved_CFLAGS"
746a987d
AC
14764 esac
14765 done
81ecdfbb
RW
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14767$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14768fi
14769
14770
104c1213 14771
7a292a7a 14772# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14774$as_echo_n "checking for cygwin... " >&6; }
14775if test "${gdb_cv_os_cygwin+set}" = set; then :
14776 $as_echo_n "(cached) " >&6
bec39cab 14777else
81ecdfbb 14778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14779/* end confdefs.h. */
7a292a7a
SS
14780
14781#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14782lose
14783#endif
bec39cab 14784_ACEOF
7a292a7a 14785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 14786 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
14787 gdb_cv_os_cygwin=yes
14788else
7a292a7a
SS
14789 gdb_cv_os_cygwin=no
14790fi
14791rm -f conftest*
14792
14793fi
81ecdfbb
RW
14794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14795$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14796
aff38e61 14797
3eb25fda 14798SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14799case ${host} in
95cbc983
AC
14800 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14801 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14802 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14803esac
14804
14805
cd0fc7c3
SS
14806# libreadline needs libuser32.a in a cygwin environment
14807WIN32LIBS=
14808if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14809 WIN32LIBS="-luser32"
14810 case "${target}" in
14811 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14812 ;;
14813 esac
cd0fc7c3 14814fi
c906108c 14815
b4505029
MM
14816# The ser-tcp.c module requires sockets.
14817case ${host} in
14818 *mingw32*)
14819
81ecdfbb 14820$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14821
14822 WIN32LIBS="$WIN32LIBS -lws2_32"
14823 ;;
14824esac
14825
7a292a7a 14826
31d99776
DJ
14827# Add ELF support to GDB, but only if BFD includes ELF support.
14828OLD_CFLAGS=$CFLAGS
14829OLD_LDFLAGS=$LDFLAGS
14830OLD_LIBS=$LIBS
cab58a69 14831CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 14832LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 14833intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 14834LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
14835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
14836$as_echo_n "checking for ELF support in BFD... " >&6; }
14837if test "${gdb_cv_var_elf+set}" = set; then :
14838 $as_echo_n "(cached) " >&6
31d99776 14839else
81ecdfbb 14840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14841/* end confdefs.h. */
14842#include <stdlib.h>
14843#include "bfd.h"
14844#include "elf-bfd.h"
14845
14846int
14847main ()
14848{
14849bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
14850 ;
14851 return 0;
14852}
14853_ACEOF
81ecdfbb 14854if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14855 gdb_cv_var_elf=yes
14856else
81ecdfbb 14857 gdb_cv_var_elf=no
31d99776 14858fi
81ecdfbb
RW
14859rm -f core conftest.err conftest.$ac_objext \
14860 conftest$ac_exeext conftest.$ac_ext
31d99776 14861fi
81ecdfbb
RW
14862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14863$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
14864if test $gdb_cv_var_elf = yes; then
14865 CONFIG_OBS="$CONFIG_OBS elfread.o"
14866
81ecdfbb 14867$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776
DJ
14868
14869fi
14870CFLAGS=$OLD_CFLAGS
14871LDFLAGS=$OLD_LDFLAGS
14872LIBS=$OLD_LIBS
14873
121ce6e5
DJ
14874# Add any host-specific objects to GDB.
14875CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14876
3fc11d3e
JM
14877LIBGUI="../libgui/src/libgui.a"
14878GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14879
14880
7a292a7a 14881
3fc11d3e
JM
14882WIN32LDAPP=
14883
14884
14885
d91670b9 14886case "${host}" in
686a5eed 14887*-*-cygwin* | *-*-mingw* )
d91670b9
CV
14888 configdir="win"
14889 ;;
14890*)
14891 configdir="unix"
14892 ;;
14893esac
3fc11d3e
JM
14894
14895GDBTKLIBS=
14896if test "${enable_gdbtk}" = "yes"; then
14897
d1c3b63a
KS
14898 # Gdbtk must have an absolute path to srcdir in order to run
14899 # properly when not installed.
14900 here=`pwd`
14901 cd ${srcdir}
14902 GDBTK_SRC_DIR=`pwd`
14903 cd $here
14904
bec39cab 14905
5062cc19
KS
14906 #
14907 # Ok, lets find the tcl configuration
14908 # First, look for one uninstalled.
14909 # the alternative search directory is invoked by --with-tcl
14910 #
3fc11d3e 14911
5062cc19
KS
14912 if test x"${no_tcl}" = x ; then
14913 # we reset no_tcl in case something fails here
14914 no_tcl=true
bec39cab 14915
81ecdfbb
RW
14916# Check whether --with-tcl was given.
14917if test "${with_tcl+set}" = set; then :
14918 withval=$with_tcl; with_tclconfig=${withval}
14919fi
14920
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14922$as_echo_n "checking for Tcl configuration... " >&6; }
14923 if test "${ac_cv_c_tclconfig+set}" = set; then :
14924 $as_echo_n "(cached) " >&6
3fc11d3e 14925else
bec39cab 14926
3fc11d3e 14927
5062cc19
KS
14928 # First check to see if --with-tcl was specified.
14929 case "${host}" in
14930 *-*-cygwin*) platDir="win" ;;
14931 *) platDir="unix" ;;
14932 esac
14933 if test x"${with_tclconfig}" != x ; then
14934 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14935 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14936 else
81ecdfbb 14937 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
14938 fi
14939 fi
14940
14941 # then check for a private Tcl installation
14942 if test x"${ac_cv_c_tclconfig}" = x ; then
14943 for i in \
14944 ../tcl \
14945 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14946 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14947 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14948 ../../tcl \
14949 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14950 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14951 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14952 ../../../tcl \
14953 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14954 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14955 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14956 if test -f "$i/$platDir/tclConfig.sh" ; then
14957 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14958 break
14959 fi
14960 done
14961 fi
14962
14963 # on Darwin, check in Framework installation locations
14964 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14965 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14966 `ls -d /Library/Frameworks 2>/dev/null` \
14967 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14968 `ls -d /System/Library/Frameworks 2>/dev/null` \
14969 ; do
14970 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14971 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14972 break
14973 fi
14974 done
14975 fi
14976
14977 # check in a few common install locations
14978 if test x"${ac_cv_c_tclconfig}" = x ; then
14979 for i in `ls -d ${libdir} 2>/dev/null` \
14980 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14981 `ls -d ${prefix}/lib 2>/dev/null` \
14982 `ls -d /usr/local/lib 2>/dev/null` \
14983 `ls -d /usr/contrib/lib 2>/dev/null` \
14984 `ls -d /usr/lib 2>/dev/null` \
14985 ; do
14986 if test -f "$i/tclConfig.sh" ; then
14987 ac_cv_c_tclconfig=`(cd $i; pwd)`
14988 break
14989 fi
14990 done
14991 fi
3fc11d3e 14992
5062cc19
KS
14993 # check in a few other private locations
14994 if test x"${ac_cv_c_tclconfig}" = x ; then
14995 for i in \
14996 ${srcdir}/../tcl \
14997 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14998 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14999 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15000 if test -f "$i/$platDir/tclConfig.sh" ; then
15001 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15002 break
15003 fi
15004 done
15005 fi
bec39cab 15006
3fc11d3e
JM
15007fi
15008
5062cc19
KS
15009
15010 if test x"${ac_cv_c_tclconfig}" = x ; then
15011 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15013$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15014 else
15015 no_tcl=
15016 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15018$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15019 fi
15020 fi
3fc11d3e 15021
bec39cab 15022
85541719
DE
15023 # If $no_tk is nonempty, then we can't do Tk, and there is no
15024 # point to doing Tcl.
bec39cab 15025
5062cc19
KS
15026 #
15027 # Ok, lets find the tk configuration
15028 # First, look for one uninstalled.
15029 # the alternative search directory is invoked by --with-tk
15030 #
3fc11d3e 15031
5062cc19
KS
15032 if test x"${no_tk}" = x ; then
15033 # we reset no_tk in case something fails here
15034 no_tk=true
bec39cab 15035
81ecdfbb
RW
15036# Check whether --with-tk was given.
15037if test "${with_tk+set}" = set; then :
15038 withval=$with_tk; with_tkconfig=${withval}
15039fi
15040
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15042$as_echo_n "checking for Tk configuration... " >&6; }
15043 if test "${ac_cv_c_tkconfig+set}" = set; then :
15044 $as_echo_n "(cached) " >&6
bec39cab 15045else
3fc11d3e
JM
15046
15047
5062cc19
KS
15048 # First check to see if --with-tkconfig was specified.
15049 if test x"${with_tkconfig}" != x ; then
15050 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15051 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15052 else
81ecdfbb 15053 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15054 fi
15055 fi
3fc11d3e 15056
5062cc19
KS
15057 # then check for a private Tk library
15058 case "${host}" in
15059 *-*-cygwin*) platDir="win" ;;
15060 *) platDir="unix" ;;
15061 esac
15062 if test x"${ac_cv_c_tkconfig}" = x ; then
15063 for i in \
15064 ../tk \
15065 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15066 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15067 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15068 ../../tk \
15069 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15070 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15071 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15072 ../../../tk \
15073 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15074 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15075 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15076 if test -f "$i/$platDir/tkConfig.sh" ; then
15077 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15078 break
15079 fi
15080 done
15081 fi
15082
15083 # on Darwin, check in Framework installation locations
15084 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15085 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15086 `ls -d /Library/Frameworks 2>/dev/null` \
15087 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15088 `ls -d /System/Library/Frameworks 2>/dev/null` \
15089 ; do
15090 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15091 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15092 break
15093 fi
15094 done
15095 fi
15096
15097 # check in a few common install locations
15098 if test x"${ac_cv_c_tkconfig}" = x ; then
15099 for i in `ls -d ${libdir} 2>/dev/null` \
15100 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15101 `ls -d ${prefix}/lib 2>/dev/null` \
15102 `ls -d /usr/local/lib 2>/dev/null` \
15103 `ls -d /usr/contrib/lib 2>/dev/null` \
15104 `ls -d /usr/lib 2>/dev/null` \
15105 ; do
15106 if test -f "$i/tkConfig.sh" ; then
15107 ac_cv_c_tkconfig=`(cd $i; pwd)`
15108 break
15109 fi
15110 done
15111 fi
15112 # check in a few other private locations
15113 if test x"${ac_cv_c_tkconfig}" = x ; then
15114 for i in \
15115 ${srcdir}/../tk \
15116 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15117 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15118 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15119 if test -f "$i/$platDir/tkConfig.sh" ; then
15120 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15121 break
15122 fi
15123 done
15124 fi
3fc11d3e 15125
3fc11d3e
JM
15126fi
15127
15128
5062cc19
KS
15129 if test x"${ac_cv_c_tkconfig}" = x ; then
15130 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15132$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15133 else
15134 no_tk=
15135 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15137$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15138 fi
3fc11d3e 15139 fi
dd2504ab 15140
dd2504ab 15141
85541719
DE
15142 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15143
81ecdfbb
RW
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15145$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15146
15147 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15149$as_echo "loading" >&6; }
85541719
DE
15150 . ${TCL_BIN_DIR}/tclConfig.sh
15151 else
81ecdfbb
RW
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15153$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15154 fi
15155
15156 # eval is required to do the TCL_DBGX substitution
15157 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15158 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15159
15160 # If the TCL_BIN_DIR is the build directory (not the install directory),
15161 # then set the common variable name to the value of the build variables.
15162 # For example, the variable TCL_LIB_SPEC will be set to the value
15163 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15164 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15165 # installed and uninstalled version of Tcl.
15166 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15167 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15168 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15169 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15170 elif test "`uname -s`" = "Darwin"; then
15171 # If Tcl was built as a framework, attempt to use the libraries
15172 # from the framework at the given location so that linking works
15173 # against Tcl.framework installed in an arbitary location.
15174 case ${TCL_DEFS} in
15175 *TCL_FRAMEWORK*)
15176 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15177 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15178 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15179 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15180 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15181 break
15182 fi
15183 done
15184 fi
15185 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15186 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15187 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15188 fi
15189 ;;
15190 esac
15191 fi
15192
15193 # eval is required to do the TCL_DBGX substitution
15194 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15195 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15196 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15197 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213 # Check for in-tree tcl
15214 here=`pwd`
15215 cd ${srcdir}/..
15216 topdir=`pwd`
15217 cd ${here}
15218
15219 intree="no"
15220 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15221 intree="yes"
15222 fi
15223
15224 # Find Tcl private headers
15225 if test x"${intree}" = xno; then
15226
81ecdfbb
RW
15227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15228$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15229 private_dir=""
15230 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15231 if test -f ${dir}/tclInt.h ; then
15232 private_dir=${dir}
15233 fi
15234
15235 if test x"${private_dir}" = x; then
81ecdfbb 15236 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15237 else
15238 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15240$as_echo "${private_dir}" >&6; }
85541719
DE
15241 fi
15242
15243 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15244 TCL_LIBRARY="${TCL_LIB_SPEC}"
15245 TCL_DEPS=""
15246 else
15247 # If building tcl in the same src tree, private headers
15248 # are not needed, but we need to be sure to use the right
15249 # headers library
15250 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15251 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15252 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15253 fi
15254
15255
15256
15257
15258
81ecdfbb
RW
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15260$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15261
5062cc19 15262 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15264$as_echo "loading" >&6; }
5062cc19 15265 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15266 else
81ecdfbb
RW
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15268$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15269 fi
bec39cab 15270
5062cc19
KS
15271 # eval is required to do the TK_DBGX substitution
15272 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15273 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15274
15275 # If the TK_BIN_DIR is the build directory (not the install directory),
15276 # then set the common variable name to the value of the build variables.
15277 # For example, the variable TK_LIB_SPEC will be set to the value
15278 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15279 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15280 # installed and uninstalled version of Tcl.
85541719 15281 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15282 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15283 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15284 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15285 elif test "`uname -s`" = "Darwin"; then
15286 # If Tk was built as a framework, attempt to use the libraries
15287 # from the framework at the given location so that linking works
15288 # against Tk.framework installed in an arbitary location.
15289 case ${TK_DEFS} in
15290 *TK_FRAMEWORK*)
85541719 15291 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15292 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15293 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15294 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15295 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15296 break
15297 fi
15298 done
15299 fi
85541719 15300 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15301 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15302 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15303 fi
15304 ;;
15305 esac
3fc11d3e
JM
15306 fi
15307
5062cc19
KS
15308 # eval is required to do the TK_DBGX substitution
15309 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15310 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15311 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15312 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15313
3fc11d3e
JM
15314
15315
bec39cab
AC
15316
15317
15318
15319
15320
15321
15322
3fc11d3e 15323
3fc11d3e 15324
bec39cab 15325
bec39cab 15326
85541719
DE
15327 # Check for in-tree Tk
15328 intree="no"
15329 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15330 intree="yes"
15331 fi
3fc11d3e 15332
85541719
DE
15333 # Find Tk private headers
15334 if test x"${intree}" = xno; then
3fc11d3e 15335
81ecdfbb
RW
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15337$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15338 private_dir=""
15339 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15340 if test -f ${dir}/tkInt.h; then
15341 private_dir=${dir}
3fc11d3e 15342 fi
bec39cab 15343
5062cc19 15344 if test x"${private_dir}" = x; then
81ecdfbb 15345 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15346 else
5062cc19 15347 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15349$as_echo "${private_dir}" >&6; }
3fc11d3e 15350 fi
3fc11d3e 15351
85541719
DE
15352 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15353 TK_LIBRARY=${TK_LIB_SPEC}
15354 TK_DEPS=""
15355 else
15356 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15357 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15358 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15359 fi
3fc11d3e
JM
15360
15361
3fc11d3e
JM
15362
15363
3fc11d3e 15364
85541719 15365 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15366
85541719
DE
15367 # Include some libraries that Tcl and Tk want.
15368 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15369 # Yes, the ordering seems wrong here. But it isn't.
15370 # TK_LIBS is the list of libraries that need to be linked
15371 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15372 # were in LIBS then any link tests after this point would
15373 # try to include things like `$(LIBGUI)', which wouldn't work.
15374 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15375
85541719
DE
15376 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15377 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15378 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15379 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15380 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15381 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15382 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15383
85541719
DE
15384 if test x$gdb_cv_os_cygwin = xyes; then
15385 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15386 WIN32LDAPP="-Wl,--subsystem,console"
15387 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15388 fi
ffc6a242 15389
81ecdfbb 15390 subdirs="$subdirs gdbtk"
3ace7edb 15391
85541719 15392 fi
3fc11d3e
JM
15393fi
15394
15395
15396
15397
15398
15399
15400
15401
81ecdfbb
RW
15402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15403$as_echo_n "checking for X... " >&6; }
bec39cab 15404
c906108c 15405
81ecdfbb
RW
15406# Check whether --with-x was given.
15407if test "${with_x+set}" = set; then :
15408 withval=$with_x;
15409fi
c906108c
SS
15410
15411# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15412if test "x$with_x" = xno; then
15413 # The user explicitly disabled X.
15414 have_x=disabled
15415else
81ecdfbb
RW
15416 case $x_includes,$x_libraries in #(
15417 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15418 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15419 $as_echo_n "(cached) " >&6
c906108c
SS
15420else
15421 # One or both of the vars are not set, and there is no cached value.
bec39cab 15422ac_x_includes=no ac_x_libraries=no
81ecdfbb 15423rm -f -r conftest.dir
bec39cab
AC
15424if mkdir conftest.dir; then
15425 cd conftest.dir
bec39cab 15426 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15427incroot:
15428 @echo incroot='${INCROOT}'
15429usrlibdir:
15430 @echo usrlibdir='${USRLIBDIR}'
15431libdir:
15432 @echo libdir='${LIBDIR}'
15433_ACEOF
15434 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15435 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15436 for ac_var in incroot usrlibdir libdir; do
15437 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15438 done
c906108c 15439 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15440 for ac_extension in a so sl dylib la dll; do
15441 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15442 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15443 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15444 fi
15445 done
15446 # Screen out bogus values from the imake configuration. They are
15447 # bogus both because they are the default anyway, and because
15448 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15449 case $ac_im_incroot in
81ecdfbb 15450 /usr/include) ac_x_includes= ;;
bec39cab 15451 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15452 esac
bec39cab 15453 case $ac_im_usrlibdir in
81ecdfbb 15454 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15455 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15456 esac
15457 fi
15458 cd ..
81ecdfbb 15459 rm -f -r conftest.dir
c906108c
SS
15460fi
15461
bec39cab
AC
15462# Standard set of common directories for X headers.
15463# Check X11 before X11Rn because it is often a symlink to the current release.
15464ac_x_header_dirs='
15465/usr/X11/include
81ecdfbb 15466/usr/X11R7/include
bec39cab
AC
15467/usr/X11R6/include
15468/usr/X11R5/include
15469/usr/X11R4/include
15470
15471/usr/include/X11
81ecdfbb 15472/usr/include/X11R7
bec39cab
AC
15473/usr/include/X11R6
15474/usr/include/X11R5
15475/usr/include/X11R4
15476
15477/usr/local/X11/include
81ecdfbb 15478/usr/local/X11R7/include
bec39cab
AC
15479/usr/local/X11R6/include
15480/usr/local/X11R5/include
15481/usr/local/X11R4/include
15482
15483/usr/local/include/X11
81ecdfbb 15484/usr/local/include/X11R7
bec39cab
AC
15485/usr/local/include/X11R6
15486/usr/local/include/X11R5
15487/usr/local/include/X11R4
15488
15489/usr/X386/include
15490/usr/x386/include
15491/usr/XFree86/include/X11
15492
15493/usr/include
15494/usr/local/include
15495/usr/unsupported/include
15496/usr/athena/include
15497/usr/local/x11r5/include
15498/usr/lpp/Xamples/include
15499
15500/usr/openwin/include
15501/usr/openwin/share/include'
15502
15503if test "$ac_x_includes" = no; then
81ecdfbb 15504 # Guess where to find include files, by looking for Xlib.h.
c906108c 15505 # First, try using that file with no special directory specified.
81ecdfbb 15506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15507/* end confdefs.h. */
81ecdfbb 15508#include <X11/Xlib.h>
bec39cab 15509_ACEOF
81ecdfbb 15510if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15511 # We can compile using X headers with no special include directory.
15512ac_x_includes=
15513else
bec39cab 15514 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15515 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15516 ac_x_includes=$ac_dir
15517 break
15518 fi
15519done
c906108c 15520fi
bec39cab
AC
15521rm -f conftest.err conftest.$ac_ext
15522fi # $ac_x_includes = no
c906108c 15523
bec39cab 15524if test "$ac_x_libraries" = no; then
c906108c 15525 # Check for the libraries.
c906108c
SS
15526 # See if we find them without any special options.
15527 # Don't add to $LIBS permanently.
bec39cab 15528 ac_save_LIBS=$LIBS
81ecdfbb
RW
15529 LIBS="-lX11 $LIBS"
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15531/* end confdefs.h. */
81ecdfbb 15532#include <X11/Xlib.h>
bec39cab
AC
15533int
15534main ()
15535{
81ecdfbb 15536XrmInitialize ()
bec39cab
AC
15537 ;
15538 return 0;
15539}
15540_ACEOF
81ecdfbb 15541if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15542 LIBS=$ac_save_LIBS
c906108c
SS
15543# We can link X programs with no special library path.
15544ac_x_libraries=
15545else
81ecdfbb
RW
15546 LIBS=$ac_save_LIBS
15547for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15548do
bec39cab 15549 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15550 for ac_extension in a so sl dylib la dll; do
15551 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15552 ac_x_libraries=$ac_dir
15553 break 2
15554 fi
15555 done
15556done
15557fi
81ecdfbb
RW
15558rm -f core conftest.err conftest.$ac_objext \
15559 conftest$ac_exeext conftest.$ac_ext
bec39cab 15560fi # $ac_x_libraries = no
c906108c 15561
81ecdfbb
RW
15562case $ac_x_includes,$ac_x_libraries in #(
15563 no,* | *,no | *\'*)
15564 # Didn't find X, or a directory has "'" in its name.
15565 ac_cv_have_x="have_x=no";; #(
15566 *)
15567 # Record where we found X for the cache.
15568 ac_cv_have_x="have_x=yes\
15569 ac_x_includes='$ac_x_includes'\
15570 ac_x_libraries='$ac_x_libraries'"
15571esac
c906108c 15572fi
81ecdfbb
RW
15573;; #(
15574 *) have_x=yes;;
15575 esac
c906108c
SS
15576 eval "$ac_cv_have_x"
15577fi # $with_x != no
15578
15579if test "$have_x" != yes; then
81ecdfbb
RW
15580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15581$as_echo "$have_x" >&6; }
c906108c
SS
15582 no_x=yes
15583else
15584 # If each of the values was on the command line, it overrides each guess.
15585 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15586 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15587 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15588 ac_cv_have_x="have_x=yes\
15589 ac_x_includes='$x_includes'\
15590 ac_x_libraries='$x_libraries'"
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15592$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15593fi
15594
15595
bec39cab 15596# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15597# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15598# This code just checks for a few cases where we'd like to ignore those
15599# definitions, even when they're present in the '.mt' file. These cases
15600# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15601# not part of the source tree.
7a292a7a 15602#
81ecdfbb
RW
15603# Check whether --enable-sim was given.
15604if test "${enable_sim+set}" = set; then :
15605 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15606 echo "enableval = ${enableval}";
15607 case "${enableval}" in
15608 yes) ignore_sim=false ;;
15609 no) ignore_sim=true ;;
15610 *) ignore_sim=false ;;
15611 esac
15612else
15613 ignore_sim=false
81ecdfbb
RW
15614fi
15615
7a292a7a
SS
15616
15617if test ! -d "${srcdir}/../sim"; then
15618 ignore_sim=true
15619fi
15620
9b624dbe
UW
15621SIM=
15622SIM_OBS=
15623if test "${ignore_sim}" = "false"; then
15624 if test x"${gdb_sim}" != x ; then
15625 SIM="${gdb_sim}"
15626 SIM_OBS="remote-sim.o"
60ca704f 15627
81ecdfbb 15628$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15629
9b624dbe 15630 fi
7a292a7a
SS
15631fi
15632
15633
15634
c906108c
SS
15635
15636
15637
15638
15639
15640
dfcd3bfb 15641
e56ac5c3
AC
15642
15643
b3a90332
AC
15644
15645
c35f4ffc 15646# List of host floatformats.
bec39cab
AC
15647
15648cat >>confdefs.h <<_ACEOF
c35f4ffc 15649#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15650_ACEOF
c35f4ffc 15651
bec39cab
AC
15652
15653cat >>confdefs.h <<_ACEOF
c35f4ffc 15654#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15655_ACEOF
15656
c35f4ffc 15657
bec39cab 15658cat >>confdefs.h <<_ACEOF
c35f4ffc 15659#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15660_ACEOF
c35f4ffc
AC
15661
15662
c906108c
SS
15663# target_subdir is used by the testsuite to find the target libraries.
15664target_subdir=
15665if test "${host}" != "${target}"; then
15666 target_subdir="${target_alias}/"
15667fi
15668
15669
15670frags=
771b4502 15671if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15672 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15673 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15674 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15675 fi
15676 frags="$frags $host_makefile_frag"
15677else
15678 host_makefile_frag=/dev/null
c906108c 15679fi
c906108c 15680
c906108c
SS
15681
15682
15683
771b4502 15684if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15685# We pick this up from the host configuration file (.mh) because we
15686# do not have a native configuration Makefile fragment.
c906108c
SS
15687nativefile=`sed -n '
15688s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15689' ${host_makefile_frag}`
c906108c
SS
15690fi
15691
15692
b00a8037 15693if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15694
15695cat >>confdefs.h <<_ACEOF
b00a8037 15696#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15697_ACEOF
b00a8037
DJ
15698
15699fi
15700
8dcde887 15701# Enable multi-ice-gdb-server.
81ecdfbb
RW
15702# Check whether --enable-multi-ice was given.
15703if test "${enable_multi_ice+set}" = set; then :
15704 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15705 yes | no)
15706 ;;
81ecdfbb 15707 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15708 esac
81ecdfbb 15709fi
b4e70030 15710
81ecdfbb
RW
15711if test "x$enable_multi_ice" = xyes; then
15712 subdirs="$subdirs multi-ice"
3ace7edb 15713
a85f51e7
DJ
15714fi
15715
a13e2c95
UW
15716# We only build gdbserver automatically in a native configuration.
15717if test "$gdb_native" = "yes"; then
81ecdfbb
RW
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15719$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15720 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15722$as_echo "yes" >&6; }
15723 subdirs="$subdirs gdbserver"
3ace7edb 15724
8dcde887 15725 else
81ecdfbb
RW
15726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15727$as_echo "no" >&6; }
8dcde887
MK
15728 fi
15729fi
15730
db985757 15731# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15732# to an empty version.
c906108c
SS
15733
15734files=
15735links=
5a2402b8 15736
c906108c
SS
15737rm -f nm.h
15738if test "${nativefile}" != ""; then
0f475e27
AC
15739 case "${nativefile}" in
15740 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15741 * ) GDB_NM_FILE="${nativefile}"
15742 esac
5a2402b8
AC
15743 files="${files} ${GDB_NM_FILE}"
15744 links="${links} nm.h"
60ca704f
SE
15745
15746cat >>confdefs.h <<_ACEOF
b78960be 15747#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15748_ACEOF
5a2402b8 15749
c906108c 15750fi
5a2402b8
AC
15751
15752
bec39cab
AC
15753ac_sources="$files"
15754ac_dests="$links"
15755while test -n "$ac_sources"; do
15756 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15757 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15758 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15759done
81ecdfbb 15760ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15761
15762
c906108c
SS
15763
15764
c906108c 15765
81ecdfbb 15766$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15767
bec39cab 15768
81ecdfbb
RW
15769ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
15770
15771ac_config_commands="$ac_config_commands default"
89a34d1b 15772
bec39cab
AC
15773cat >confcache <<\_ACEOF
15774# This file is a shell script that caches the results of configure
15775# tests run on this system so they can be shared between configure
15776# scripts and configure runs, see configure's option --config-cache.
15777# It is not useful on other systems. If it contains results you don't
15778# want to keep, you may remove or edit it.
15779#
15780# config.status only pays attention to the cache file if you give it
15781# the --recheck option to rerun configure.
15782#
15783# `ac_cv_env_foo' variables (set or unset) will be overridden when
15784# loading this file, other *unset* `ac_cv_foo' will be assigned the
15785# following values.
15786
15787_ACEOF
15788
15789# The following way of writing the cache mishandles newlines in values,
15790# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15791# So, we kill variables containing newlines.
bec39cab
AC
15792# Ultrix sh set writes to stderr and can't be redirected directly,
15793# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15794(
15795 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15796 eval ac_val=\$$ac_var
15797 case $ac_val in #(
15798 *${as_nl}*)
15799 case $ac_var in #(
15800 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15801$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15802 esac
15803 case $ac_var in #(
15804 _ | IFS | as_nl) ;; #(
15805 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15806 *) { eval $ac_var=; unset $ac_var;} ;;
15807 esac ;;
15808 esac
15809 done
15810
bec39cab 15811 (set) 2>&1 |
81ecdfbb
RW
15812 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15813 *${as_nl}ac_space=\ *)
15814 # `set' does not quote correctly, so add quotes: double-quote
15815 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15816 sed -n \
15817 "s/'/'\\\\''/g;
15818 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15819 ;; #(
bec39cab
AC
15820 *)
15821 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15822 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15823 ;;
81ecdfbb
RW
15824 esac |
15825 sort
15826) |
bec39cab 15827 sed '
81ecdfbb 15828 /^ac_cv_env_/b end
bec39cab 15829 t clear
81ecdfbb 15830 :clear
bec39cab
AC
15831 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15832 t end
81ecdfbb
RW
15833 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15834 :end' >>confcache
15835if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15836 if test -w "$cache_file"; then
15837 test "x$cache_file" != "x/dev/null" &&
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15839$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15840 cat confcache >$cache_file
15841 else
81ecdfbb
RW
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15843$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15844 fi
15845fi
15846rm -f confcache
15847
15848test "x$prefix" = xNONE && prefix=$ac_default_prefix
15849# Let make expand exec_prefix.
15850test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15851
bec39cab
AC
15852DEFS=-DHAVE_CONFIG_H
15853
15854ac_libobjs=
15855ac_ltlibobjs=
15856for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15857 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15858 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15859 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15860 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15861 # will be set to the directory where LIBOBJS objects are built.
15862 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15863 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15864done
15865LIBOBJS=$ac_libobjs
15866
15867LTLIBOBJS=$ac_ltlibobjs
15868
15869
85981d60 15870if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15871 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15872Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15873fi
a417dc56 15874if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15875 as_fn_error "conditional \"GMAKE\" was never defined.
15876Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15877fi
783e057b 15878if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
15879 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
15880Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
15881fi
15882
15883 gl_libobjs=
15884 gl_ltlibobjs=
15885 if test -n "$gl_LIBOBJS"; then
15886 # Remove the extension.
15887 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 15888 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
15889 gl_libobjs="$gl_libobjs $i.$ac_objext"
15890 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
15891 done
15892 fi
15893 gl_LIBOBJS=$gl_libobjs
15894
15895 gl_LTLIBOBJS=$gl_ltlibobjs
15896
15897
15898
15899 gltests_libobjs=
15900 gltests_ltlibobjs=
15901 if test -n "$gltests_LIBOBJS"; then
15902 # Remove the extension.
15903 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 15904 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
15905 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
15906 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
15907 done
15908 fi
15909 gltests_LIBOBJS=$gltests_libobjs
15910
15911 gltests_LTLIBOBJS=$gltests_ltlibobjs
15912
15913
e28b3332 15914if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
15915 as_fn_error "conditional \"AMDEP\" was never defined.
15916Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
15917fi
15918if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
15919 as_fn_error "conditional \"am__fastdepCC\" was never defined.
15920Usually this means the macro was only invoked conditionally." "$LINENO" 5
15921fi
15922 if test -n "$EXEEXT"; then
15923 am__EXEEXT_TRUE=
15924 am__EXEEXT_FALSE='#'
15925else
15926 am__EXEEXT_TRUE='#'
15927 am__EXEEXT_FALSE=
e28b3332 15928fi
bec39cab 15929
81ecdfbb
RW
15930
15931
bec39cab 15932: ${CONFIG_STATUS=./config.status}
81ecdfbb 15933ac_write_fail=0
bec39cab
AC
15934ac_clean_files_save=$ac_clean_files
15935ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15936{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15937$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15938as_write_fail=0
15939cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15940#! $SHELL
15941# Generated by $as_me.
15942# Run this file to recreate the current configuration.
15943# Compiler output produced by configure, useful for debugging
15944# configure, is in config.log if it exists.
15945
15946debug=false
15947ac_cs_recheck=false
15948ac_cs_silent=false
bec39cab 15949
81ecdfbb
RW
15950SHELL=\${CONFIG_SHELL-$SHELL}
15951export SHELL
15952_ASEOF
15953cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15954## -------------------- ##
15955## M4sh Initialization. ##
15956## -------------------- ##
15957
15958# Be more Bourne compatible
15959DUALCASE=1; export DUALCASE # for MKS sh
15960if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15961 emulate sh
15962 NULLCMD=:
81ecdfbb 15963 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15964 # is contrary to our usage. Disable this feature.
15965 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15966 setopt NO_GLOB_SUBST
15967else
15968 case `(set -o) 2>/dev/null` in #(
15969 *posix*) :
15970 set -o posix ;; #(
15971 *) :
15972 ;;
15973esac
bec39cab 15974fi
bec39cab 15975
81ecdfbb
RW
15976
15977as_nl='
15978'
15979export as_nl
15980# Printing a long string crashes Solaris 7 /usr/bin/printf.
15981as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15982as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15983as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15984# Prefer a ksh shell builtin over an external printf program on Solaris,
15985# but without wasting forks for bash or zsh.
15986if test -z "$BASH_VERSION$ZSH_VERSION" \
15987 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15988 as_echo='print -r --'
15989 as_echo_n='print -rn --'
15990elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15991 as_echo='printf %s\n'
15992 as_echo_n='printf %s'
15993else
15994 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15995 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15996 as_echo_n='/usr/ucb/echo -n'
15997 else
15998 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15999 as_echo_n_body='eval
16000 arg=$1;
16001 case $arg in #(
16002 *"$as_nl"*)
16003 expr "X$arg" : "X\\(.*\\)$as_nl";
16004 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16005 esac;
16006 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16007 '
16008 export as_echo_n_body
16009 as_echo_n='sh -c $as_echo_n_body as_echo'
16010 fi
16011 export as_echo_body
16012 as_echo='sh -c $as_echo_body as_echo'
16013fi
16014
16015# The user is always right.
16016if test "${PATH_SEPARATOR+set}" != set; then
16017 PATH_SEPARATOR=:
16018 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16019 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16020 PATH_SEPARATOR=';'
16021 }
bec39cab
AC
16022fi
16023
16024
81ecdfbb
RW
16025# IFS
16026# We need space, tab and new line, in precisely that order. Quoting is
16027# there to prevent editors from complaining about space-tab.
16028# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16029# splitting by setting IFS to empty value.)
16030IFS=" "" $as_nl"
16031
16032# Find who we are. Look in the path if we contain no directory separator.
16033case $0 in #((
16034 *[\\/]* ) as_myself=$0 ;;
16035 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16036for as_dir in $PATH
16037do
16038 IFS=$as_save_IFS
16039 test -z "$as_dir" && as_dir=.
16040 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16041 done
16042IFS=$as_save_IFS
16043
16044 ;;
16045esac
16046# We did not find ourselves, most probably we were run as `sh COMMAND'
16047# in which case we are not to be found in the path.
16048if test "x$as_myself" = x; then
16049 as_myself=$0
16050fi
16051if test ! -f "$as_myself"; then
16052 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16053 exit 1
16054fi
16055
16056# Unset variables that we do not need and which cause bugs (e.g. in
16057# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16058# suppresses any "Segmentation fault" message there. '((' could
16059# trigger a bug in pdksh 5.2.14.
16060for as_var in BASH_ENV ENV MAIL MAILPATH
16061do eval test x\${$as_var+set} = xset \
16062 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16063done
bec39cab
AC
16064PS1='$ '
16065PS2='> '
16066PS4='+ '
16067
16068# NLS nuisances.
81ecdfbb
RW
16069LC_ALL=C
16070export LC_ALL
16071LANGUAGE=C
16072export LANGUAGE
16073
16074# CDPATH.
16075(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16076
16077
16078# as_fn_error ERROR [LINENO LOG_FD]
16079# ---------------------------------
16080# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16081# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16082# script with status $?, using 1 if that was 0.
16083as_fn_error ()
16084{
16085 as_status=$?; test $as_status -eq 0 && as_status=1
16086 if test "$3"; then
16087 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16088 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16089 fi
16090 $as_echo "$as_me: error: $1" >&2
16091 as_fn_exit $as_status
16092} # as_fn_error
16093
16094
16095# as_fn_set_status STATUS
16096# -----------------------
16097# Set $? to STATUS, without forking.
16098as_fn_set_status ()
16099{
16100 return $1
16101} # as_fn_set_status
16102
16103# as_fn_exit STATUS
16104# -----------------
16105# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16106as_fn_exit ()
16107{
16108 set +e
16109 as_fn_set_status $1
16110 exit $1
16111} # as_fn_exit
16112
16113# as_fn_unset VAR
16114# ---------------
16115# Portably unset VAR.
16116as_fn_unset ()
16117{
16118 { eval $1=; unset $1;}
16119}
16120as_unset=as_fn_unset
16121# as_fn_append VAR VALUE
16122# ----------------------
16123# Append the text in VALUE to the end of the definition contained in VAR. Take
16124# advantage of any shell optimizations that allow amortized linear growth over
16125# repeated appends, instead of the typical quadratic growth present in naive
16126# implementations.
16127if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16128 eval 'as_fn_append ()
16129 {
16130 eval $1+=\$2
16131 }'
16132else
16133 as_fn_append ()
16134 {
16135 eval $1=\$$1\$2
16136 }
16137fi # as_fn_append
16138
16139# as_fn_arith ARG...
16140# ------------------
16141# Perform arithmetic evaluation on the ARGs, and store the result in the
16142# global $as_val. Take advantage of shells that can avoid forks. The arguments
16143# must be portable across $(()) and expr.
16144if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16145 eval 'as_fn_arith ()
16146 {
16147 as_val=$(( $* ))
16148 }'
16149else
16150 as_fn_arith ()
16151 {
16152 as_val=`expr "$@" || test $? -eq 1`
16153 }
16154fi # as_fn_arith
bec39cab 16155
81ecdfbb
RW
16156
16157if expr a : '\(a\)' >/dev/null 2>&1 &&
16158 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16159 as_expr=expr
16160else
16161 as_expr=false
16162fi
16163
81ecdfbb 16164if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16165 as_basename=basename
16166else
16167 as_basename=false
16168fi
16169
81ecdfbb
RW
16170if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16171 as_dirname=dirname
16172else
16173 as_dirname=false
16174fi
bec39cab 16175
81ecdfbb 16176as_me=`$as_basename -- "$0" ||
bec39cab
AC
16177$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16178 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16179 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16180$as_echo X/"$0" |
16181 sed '/^.*\/\([^/][^/]*\)\/*$/{
16182 s//\1/
16183 q
16184 }
16185 /^X\/\(\/\/\)$/{
16186 s//\1/
16187 q
16188 }
16189 /^X\/\(\/\).*/{
16190 s//\1/
16191 q
16192 }
16193 s/.*/./; q'`
b4e70030 16194
b4e70030
JB
16195# Avoid depending upon Character Ranges.
16196as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16197as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16198as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16199as_cr_digits='0123456789'
16200as_cr_alnum=$as_cr_Letters$as_cr_digits
16201
81ecdfbb
RW
16202ECHO_C= ECHO_N= ECHO_T=
16203case `echo -n x` in #(((((
16204-n*)
16205 case `echo 'xy\c'` in
16206 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16207 xy) ECHO_C='\c';;
16208 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16209 ECHO_T=' ';;
16210 esac;;
16211*)
16212 ECHO_N='-n';;
bec39cab
AC
16213esac
16214
81ecdfbb
RW
16215rm -f conf$$ conf$$.exe conf$$.file
16216if test -d conf$$.dir; then
16217 rm -f conf$$.dir/conf$$.file
bec39cab 16218else
81ecdfbb
RW
16219 rm -f conf$$.dir
16220 mkdir conf$$.dir 2>/dev/null
bec39cab 16221fi
81ecdfbb
RW
16222if (echo >conf$$.file) 2>/dev/null; then
16223 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16224 as_ln_s='ln -s'
81ecdfbb
RW
16225 # ... but there are two gotchas:
16226 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16227 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16228 # In both cases, we have to default to `cp -p'.
16229 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16230 as_ln_s='cp -p'
16231 elif ln conf$$.file conf$$ 2>/dev/null; then
16232 as_ln_s=ln
16233 else
16234 as_ln_s='cp -p'
b4e70030 16235 fi
bec39cab
AC
16236else
16237 as_ln_s='cp -p'
16238fi
81ecdfbb
RW
16239rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16240rmdir conf$$.dir 2>/dev/null
16241
16242
16243# as_fn_mkdir_p
16244# -------------
16245# Create "$as_dir" as a directory, including parents if necessary.
16246as_fn_mkdir_p ()
16247{
16248
16249 case $as_dir in #(
16250 -*) as_dir=./$as_dir;;
16251 esac
16252 test -d "$as_dir" || eval $as_mkdir_p || {
16253 as_dirs=
16254 while :; do
16255 case $as_dir in #(
16256 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16257 *) as_qdir=$as_dir;;
16258 esac
16259 as_dirs="'$as_qdir' $as_dirs"
16260 as_dir=`$as_dirname -- "$as_dir" ||
16261$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16262 X"$as_dir" : 'X\(//\)[^/]' \| \
16263 X"$as_dir" : 'X\(//\)$' \| \
16264 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16265$as_echo X"$as_dir" |
16266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16267 s//\1/
16268 q
16269 }
16270 /^X\(\/\/\)[^/].*/{
16271 s//\1/
16272 q
16273 }
16274 /^X\(\/\/\)$/{
16275 s//\1/
16276 q
16277 }
16278 /^X\(\/\).*/{
16279 s//\1/
16280 q
16281 }
16282 s/.*/./; q'`
16283 test -d "$as_dir" && break
16284 done
16285 test -z "$as_dirs" || eval "mkdir $as_dirs"
16286 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16287
bec39cab 16288
81ecdfbb 16289} # as_fn_mkdir_p
bec39cab 16290if mkdir -p . 2>/dev/null; then
81ecdfbb 16291 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16292else
16293 test -d ./-p && rmdir ./-p
16294 as_mkdir_p=false
16295fi
16296
81ecdfbb
RW
16297if test -x / >/dev/null 2>&1; then
16298 as_test_x='test -x'
16299else
16300 if ls -dL / >/dev/null 2>&1; then
16301 as_ls_L_option=L
16302 else
16303 as_ls_L_option=
16304 fi
16305 as_test_x='
16306 eval sh -c '\''
16307 if test -d "$1"; then
16308 test -d "$1/.";
16309 else
16310 case $1 in #(
16311 -*)set "./$1";;
16312 esac;
16313 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16314 ???[sx]*):;;*)false;;esac;fi
16315 '\'' sh
16316 '
16317fi
16318as_executable_p=$as_test_x
bec39cab
AC
16319
16320# Sed expression to map a string onto a valid CPP name.
16321as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16322
16323# Sed expression to map a string onto a valid variable name.
16324as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16325
16326
bec39cab 16327exec 6>&1
81ecdfbb
RW
16328## ----------------------------------- ##
16329## Main body of $CONFIG_STATUS script. ##
16330## ----------------------------------- ##
16331_ASEOF
16332test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16333
16334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16335# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16336# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16337# values after options handling.
16338ac_log="
bec39cab 16339This file was extended by $as_me, which was
81ecdfbb 16340generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16341
16342 CONFIG_FILES = $CONFIG_FILES
16343 CONFIG_HEADERS = $CONFIG_HEADERS
16344 CONFIG_LINKS = $CONFIG_LINKS
16345 CONFIG_COMMANDS = $CONFIG_COMMANDS
16346 $ $0 $@
16347
81ecdfbb
RW
16348on `(hostname || uname -n) 2>/dev/null | sed 1q`
16349"
16350
bec39cab
AC
16351_ACEOF
16352
81ecdfbb
RW
16353case $ac_config_files in *"
16354"*) set x $ac_config_files; shift; ac_config_files=$*;;
16355esac
234b45d4 16356
81ecdfbb
RW
16357case $ac_config_headers in *"
16358"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16359esac
b4e70030 16360
b4e70030 16361
81ecdfbb
RW
16362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16363# Files that config.status was made for.
16364config_files="$ac_config_files"
16365config_headers="$ac_config_headers"
16366config_links="$ac_config_links"
16367config_commands="$ac_config_commands"
234b45d4 16368
81ecdfbb 16369_ACEOF
b4e70030 16370
81ecdfbb 16371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16372ac_cs_usage="\
81ecdfbb
RW
16373\`$as_me' instantiates files and other configuration actions
16374from templates according to the current configuration. Unless the files
16375and actions are specified as TAGs, all are instantiated by default.
234b45d4 16376
81ecdfbb 16377Usage: $0 [OPTION]... [TAG]...
234b45d4 16378
bec39cab 16379 -h, --help print this help, then exit
81ecdfbb
RW
16380 -V, --version print version number and configuration settings, then exit
16381 -q, --quiet, --silent
16382 do not print progress messages
bec39cab
AC
16383 -d, --debug don't remove temporary files
16384 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16385 --file=FILE[:TEMPLATE]
16386 instantiate the configuration file FILE
16387 --header=FILE[:TEMPLATE]
16388 instantiate the configuration header FILE
234b45d4 16389
bec39cab
AC
16390Configuration files:
16391$config_files
234b45d4 16392
bec39cab
AC
16393Configuration headers:
16394$config_headers
234b45d4 16395
bec39cab
AC
16396Configuration links:
16397$config_links
234b45d4 16398
bec39cab
AC
16399Configuration commands:
16400$config_commands
16401
81ecdfbb 16402Report bugs to the package provider."
b4e70030 16403
81ecdfbb
RW
16404_ACEOF
16405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16406ac_cs_version="\\
16407config.status
81ecdfbb
RW
16408configured by $0, generated by GNU Autoconf 2.64,
16409 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16410
81ecdfbb 16411Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16412This config.status script is free software; the Free Software Foundation
16413gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16414
16415ac_pwd='$ac_pwd'
16416srcdir='$srcdir'
16417INSTALL='$INSTALL'
16418MKDIR_P='$MKDIR_P'
16419AWK='$AWK'
16420test -n "\$AWK" || AWK=awk
bec39cab
AC
16421_ACEOF
16422
81ecdfbb
RW
16423cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16424# The default lists apply if the user does not specify any file.
bec39cab
AC
16425ac_need_defaults=:
16426while test $# != 0
16427do
16428 case $1 in
16429 --*=*)
81ecdfbb
RW
16430 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16431 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16432 ac_shift=:
c906108c 16433 ;;
81ecdfbb 16434 *)
bec39cab
AC
16435 ac_option=$1
16436 ac_optarg=$2
16437 ac_shift=shift
c906108c 16438 ;;
bec39cab 16439 esac
c906108c 16440
bec39cab
AC
16441 case $ac_option in
16442 # Handling of the options.
bec39cab
AC
16443 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16444 ac_cs_recheck=: ;;
81ecdfbb
RW
16445 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16446 $as_echo "$ac_cs_version"; exit ;;
16447 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16448 debug=: ;;
16449 --file | --fil | --fi | --f )
16450 $ac_shift
81ecdfbb
RW
16451 case $ac_optarg in
16452 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16453 esac
16454 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16455 ac_need_defaults=false;;
16456 --header | --heade | --head | --hea )
16457 $ac_shift
81ecdfbb
RW
16458 case $ac_optarg in
16459 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16460 esac
16461 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16462 ac_need_defaults=false;;
81ecdfbb
RW
16463 --he | --h)
16464 # Conflict between --help and --header
16465 as_fn_error "ambiguous option: \`$1'
16466Try \`$0 --help' for more information.";;
16467 --help | --hel | -h )
16468 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16469 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16470 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16471 ac_cs_silent=: ;;
c906108c 16472
bec39cab 16473 # This is an error.
81ecdfbb
RW
16474 -*) as_fn_error "unrecognized option: \`$1'
16475Try \`$0 --help' for more information." ;;
c906108c 16476
81ecdfbb
RW
16477 *) as_fn_append ac_config_targets " $1"
16478 ac_need_defaults=false ;;
c906108c 16479
bec39cab
AC
16480 esac
16481 shift
16482done
c906108c 16483
bec39cab 16484ac_configure_extra_args=
c906108c 16485
bec39cab
AC
16486if $ac_cs_silent; then
16487 exec 6>/dev/null
16488 ac_configure_extra_args="$ac_configure_extra_args --silent"
16489fi
c906108c 16490
bec39cab 16491_ACEOF
81ecdfbb 16492cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16493if \$ac_cs_recheck; then
81ecdfbb
RW
16494 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16495 shift
16496 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16497 CONFIG_SHELL='$SHELL'
16498 export CONFIG_SHELL
16499 exec "\$@"
bec39cab
AC
16500fi
16501
16502_ACEOF
81ecdfbb
RW
16503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16504exec 5>>config.log
16505{
16506 echo
16507 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16508## Running $as_me. ##
16509_ASBOX
16510 $as_echo "$ac_log"
16511} >&5
bec39cab 16512
81ecdfbb
RW
16513_ACEOF
16514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16515#
81ecdfbb 16516# INIT-COMMANDS
c906108c 16517#
a417dc56 16518ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16519AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16520
bec39cab
AC
16521_ACEOF
16522
81ecdfbb 16523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16524
81ecdfbb 16525# Handling of arguments.
bec39cab 16526for ac_config_target in $ac_config_targets
c906108c 16527do
81ecdfbb
RW
16528 case $ac_config_target in
16529 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16530 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16531 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16532 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16533 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16534 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
16535 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
16536 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16537
16538 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16539 esac
16540done
16541
81ecdfbb 16542
bec39cab
AC
16543# If the user did not use the arguments to specify the items to instantiate,
16544# then the envvar interface is used. Set only those that are not.
16545# We use the long form for the default assignment because of an extremely
16546# bizarre bug on SunOS 4.1.3.
16547if $ac_need_defaults; then
16548 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16549 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16550 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16551 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16552fi
16553
b4e70030 16554# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16555# simply because there is no reason against having it here, and in addition,
b4e70030 16556# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16557# Hook for its removal unless debugging.
16558# Note that there is a small window in which the directory will not be cleaned:
16559# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16560$debug ||
16561{
81ecdfbb
RW
16562 tmp=
16563 trap 'exit_status=$?
16564 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16565' 0
16566 trap 'as_fn_exit 1' 1 2 13 15
16567}
16568# Create a (secure) tmp directory for tmp files.
16569
16570{
16571 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16572 test -n "$tmp" && test -d "$tmp"
16573} ||
16574{
16575 tmp=./conf$$-$RANDOM
16576 (umask 077 && mkdir "$tmp")
16577} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16578
16579# Set up the scripts for CONFIG_FILES section.
16580# No need to generate them if there are no CONFIG_FILES.
16581# This happens for instance with `./config.status config.h'.
16582if test -n "$CONFIG_FILES"; then
16583
16584if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16585 ac_cs_awk_getline=:
16586 ac_cs_awk_pipe_init=
16587 ac_cs_awk_read_file='
16588 while ((getline aline < (F[key])) > 0)
16589 print(aline)
16590 close(F[key])'
16591 ac_cs_awk_pipe_fini=
16592else
16593 ac_cs_awk_getline=false
16594 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16595 ac_cs_awk_read_file='
16596 print "|#_!!_#|"
16597 print "cat " F[key] " &&"
16598 '$ac_cs_awk_pipe_init
16599 # The final `:' finishes the AND list.
16600 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16601fi
16602ac_cr=`echo X | tr X '\015'`
16603# On cygwin, bash can eat \r inside `` if the user requested igncr.
16604# But we know of no other shell where ac_cr would be empty at this
16605# point, so we can use a bashism as a fallback.
16606if test "x$ac_cr" = x; then
16607 eval ac_cr=\$\'\\r\'
16608fi
16609ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16610if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16611 ac_cs_awk_cr='\r'
16612else
16613 ac_cs_awk_cr=$ac_cr
16614fi
16615
16616echo 'BEGIN {' >"$tmp/subs1.awk" &&
16617_ACEOF
16618
16619# Create commands to substitute file output variables.
16620{
16621 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16622 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16623 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16624 echo "_ACAWK" &&
16625 echo "_ACEOF"
16626} >conf$$files.sh &&
16627. ./conf$$files.sh ||
16628 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16629rm -f conf$$files.sh
16630
16631{
16632 echo "cat >conf$$subs.awk <<_ACEOF" &&
16633 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16634 echo "_ACEOF"
16635} >conf$$subs.sh ||
16636 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16637ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16638ac_delim='%!_!# '
16639for ac_last_try in false false false false false :; do
16640 . ./conf$$subs.sh ||
16641 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16642
16643 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16644 if test $ac_delim_n = $ac_delim_num; then
16645 break
16646 elif $ac_last_try; then
16647 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16648 else
16649 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16650 fi
16651done
16652rm -f conf$$subs.sh
16653
16654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16655cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16656_ACEOF
16657sed -n '
16658h
16659s/^/S["/; s/!.*/"]=/
16660p
16661g
16662s/^[^!]*!//
16663:repl
16664t repl
16665s/'"$ac_delim"'$//
16666t delim
16667:nl
16668h
16669s/\(.\{148\}\).*/\1/
16670t more1
16671s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16672p
16673n
16674b repl
16675:more1
16676s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16677p
16678g
16679s/.\{148\}//
16680t nl
16681:delim
16682h
16683s/\(.\{148\}\).*/\1/
16684t more2
16685s/["\\]/\\&/g; s/^/"/; s/$/"/
16686p
16687b
16688:more2
16689s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16690p
16691g
16692s/.\{148\}//
16693t delim
16694' <conf$$subs.awk | sed '
16695/^[^""]/{
16696 N
16697 s/\n//
16698}
16699' >>$CONFIG_STATUS || ac_write_fail=1
16700rm -f conf$$subs.awk
16701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16702_ACAWK
16703cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16704 for (key in S) S_is_set[key] = 1
16705 FS = "\a"
16706 \$ac_cs_awk_pipe_init
16707}
16708{
16709 line = $ 0
16710 nfields = split(line, field, "@")
16711 substed = 0
16712 len = length(field[1])
16713 for (i = 2; i < nfields; i++) {
16714 key = field[i]
16715 keylen = length(key)
16716 if (S_is_set[key]) {
16717 value = S[key]
16718 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16719 len += length(value) + length(field[++i])
16720 substed = 1
16721 } else
16722 len += 1 + keylen
16723 }
16724 if (nfields == 3 && !substed) {
16725 key = field[2]
16726 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16727 \$ac_cs_awk_read_file
16728 next
16729 }
16730 }
16731 print line
b4e70030 16732}
81ecdfbb
RW
16733\$ac_cs_awk_pipe_fini
16734_ACAWK
16735_ACEOF
16736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16737if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16738 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16739else
16740 cat
16741fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16742 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16743_ACEOF
16744
16745# VPATH may cause trouble with some makes, so we remove $(srcdir),
16746# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16747# trailing colons and then remove the whole line if VPATH becomes empty
16748# (actually we leave an empty line to preserve line numbers).
16749if test "x$srcdir" = x.; then
16750 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16751s/:*\$(srcdir):*/:/
16752s/:*\${srcdir}:*/:/
16753s/:*@srcdir@:*/:/
16754s/^\([^=]*=[ ]*\):*/\1/
16755s/:*$//
16756s/^[^=]*=[ ]*$//
16757}'
16758fi
16759
16760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16761fi # test -n "$CONFIG_FILES"
16762
16763# Set up the scripts for CONFIG_HEADERS section.
16764# No need to generate them if there are no CONFIG_HEADERS.
16765# This happens for instance with `./config.status Makefile'.
16766if test -n "$CONFIG_HEADERS"; then
16767cat >"$tmp/defines.awk" <<\_ACAWK ||
16768BEGIN {
16769_ACEOF
16770
16771# Transform confdefs.h into an awk script `defines.awk', embedded as
16772# here-document in config.status, that substitutes the proper values into
16773# config.h.in to produce config.h.
4e8d927d 16774
81ecdfbb
RW
16775# Create a delimiter string that does not exist in confdefs.h, to ease
16776# handling of long lines.
16777ac_delim='%!_!# '
16778for ac_last_try in false false :; do
16779 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16780 if test -z "$ac_t"; then
16781 break
16782 elif $ac_last_try; then
16783 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16784 else
16785 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16786 fi
16787done
4e8d927d 16788
81ecdfbb
RW
16789# For the awk script, D is an array of macro values keyed by name,
16790# likewise P contains macro parameters if any. Preserve backslash
16791# newline sequences.
16792
16793ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16794sed -n '
16795s/.\{148\}/&'"$ac_delim"'/g
16796t rset
16797:rset
16798s/^[ ]*#[ ]*define[ ][ ]*/ /
16799t def
16800d
16801:def
16802s/\\$//
16803t bsnl
16804s/["\\]/\\&/g
16805s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16806D["\1"]=" \3"/p
16807s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16808d
16809:bsnl
16810s/["\\]/\\&/g
16811s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16812D["\1"]=" \3\\\\\\n"\\/p
16813t cont
16814s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16815t cont
16816d
16817:cont
16818n
16819s/.\{148\}/&'"$ac_delim"'/g
16820t clear
16821:clear
16822s/\\$//
16823t bsnlc
16824s/["\\]/\\&/g; s/^/"/; s/$/"/p
16825d
16826:bsnlc
16827s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16828b cont
16829' <confdefs.h | sed '
16830s/'"$ac_delim"'/"\\\
16831"/g' >>$CONFIG_STATUS || ac_write_fail=1
16832
16833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16834 for (key in D) D_is_set[key] = 1
16835 FS = "\a"
16836}
16837/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16838 line = \$ 0
16839 split(line, arg, " ")
16840 if (arg[1] == "#") {
16841 defundef = arg[2]
16842 mac1 = arg[3]
16843 } else {
16844 defundef = substr(arg[1], 2)
16845 mac1 = arg[2]
16846 }
16847 split(mac1, mac2, "(") #)
16848 macro = mac2[1]
16849 prefix = substr(line, 1, index(line, defundef) - 1)
16850 if (D_is_set[macro]) {
16851 # Preserve the white space surrounding the "#".
16852 print prefix "define", macro P[macro] D[macro]
16853 next
16854 } else {
16855 # Replace #undef with comments. This is necessary, for example,
16856 # in the case of _POSIX_SOURCE, which is predefined and required
16857 # on some systems where configure will not decide to define it.
16858 if (defundef == "undef") {
16859 print "/*", prefix defundef, macro, "*/"
16860 next
16861 }
16862 }
b4e70030 16863}
81ecdfbb
RW
16864{ print }
16865_ACAWK
b4e70030 16866_ACEOF
81ecdfbb
RW
16867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16868 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16869fi # test -n "$CONFIG_HEADERS"
4e8d927d 16870
4e8d927d 16871
81ecdfbb
RW
16872eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16873shift
16874for ac_tag
16875do
16876 case $ac_tag in
16877 :[FHLC]) ac_mode=$ac_tag; continue;;
16878 esac
16879 case $ac_mode$ac_tag in
16880 :[FHL]*:*);;
16881 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16882 :[FH]-) ac_tag=-:-;;
16883 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16884 esac
16885 ac_save_IFS=$IFS
16886 IFS=:
16887 set x $ac_tag
16888 IFS=$ac_save_IFS
16889 shift
16890 ac_file=$1
16891 shift
4e8d927d 16892
81ecdfbb
RW
16893 case $ac_mode in
16894 :L) ac_source=$1;;
16895 :[FH])
16896 ac_file_inputs=
16897 for ac_f
16898 do
16899 case $ac_f in
16900 -) ac_f="$tmp/stdin";;
16901 *) # Look for the file first in the build tree, then in the source tree
16902 # (if the path is not absolute). The absolute path cannot be DOS-style,
16903 # because $ac_f cannot contain `:'.
16904 test -f "$ac_f" ||
16905 case $ac_f in
16906 [\\/$]*) false;;
16907 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16908 esac ||
16909 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16910 esac
16911 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16912 as_fn_append ac_file_inputs " '$ac_f'"
16913 done
16914
16915 # Let's still pretend it is `configure' which instantiates (i.e., don't
16916 # use $as_me), people would be surprised to read:
16917 # /* config.h. Generated by config.status. */
16918 configure_input='Generated from '`
16919 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16920 `' by configure.'
16921 if test x"$ac_file" != x-; then
16922 configure_input="$ac_file. $configure_input"
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16924$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16925 fi
81ecdfbb
RW
16926 # Neutralize special characters interpreted by sed in replacement strings.
16927 case $configure_input in #(
16928 *\&* | *\|* | *\\* )
16929 ac_sed_conf_input=`$as_echo "$configure_input" |
16930 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16931 *) ac_sed_conf_input=$configure_input;;
16932 esac
4e8d927d 16933
81ecdfbb
RW
16934 case $ac_tag in
16935 *:-:* | *:-) cat >"$tmp/stdin" \
16936 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16937 esac
16938 ;;
c906108c
SS
16939 esac
16940
81ecdfbb 16941 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16942$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16943 X"$ac_file" : 'X\(//\)[^/]' \| \
16944 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16945 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16946$as_echo X"$ac_file" |
16947 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16948 s//\1/
16949 q
16950 }
16951 /^X\(\/\/\)[^/].*/{
16952 s//\1/
16953 q
16954 }
16955 /^X\(\/\/\)$/{
16956 s//\1/
16957 q
16958 }
16959 /^X\(\/\).*/{
16960 s//\1/
16961 q
16962 }
16963 s/.*/./; q'`
16964 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16965 ac_builddir=.
16966
81ecdfbb
RW
16967case "$ac_dir" in
16968.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16969*)
16970 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16971 # A ".." for each directory in $ac_dir_suffix.
16972 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16973 case $ac_top_builddir_sub in
16974 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16975 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16976 esac ;;
16977esac
16978ac_abs_top_builddir=$ac_pwd
16979ac_abs_builddir=$ac_pwd$ac_dir_suffix
16980# for backward compatibility:
16981ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16982
16983case $srcdir in
81ecdfbb 16984 .) # We are building in place.
bec39cab 16985 ac_srcdir=.
81ecdfbb
RW
16986 ac_top_srcdir=$ac_top_builddir_sub
16987 ac_abs_top_srcdir=$ac_pwd ;;
16988 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16989 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16990 ac_top_srcdir=$srcdir
16991 ac_abs_top_srcdir=$srcdir ;;
16992 *) # Relative name.
16993 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16994 ac_top_srcdir=$ac_top_build_prefix$srcdir
16995 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16996esac
81ecdfbb 16997ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16998
c906108c 16999
81ecdfbb
RW
17000 case $ac_mode in
17001 :F)
17002 #
17003 # CONFIG_FILE
17004 #
c906108c 17005
bec39cab
AC
17006 case $INSTALL in
17007 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17008 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17009 esac
81ecdfbb
RW
17010 ac_MKDIR_P=$MKDIR_P
17011 case $MKDIR_P in
17012 [\\/$]* | ?:[\\/]* ) ;;
17013 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17014 esac
17015_ACEOF
121ce6e5 17016
81ecdfbb
RW
17017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17018# If the template does not know about datarootdir, expand it.
17019# FIXME: This hack should be removed a few years after 2.60.
17020ac_datarootdir_hack=; ac_datarootdir_seen=
17021ac_sed_dataroot='
17022/datarootdir/ {
17023 p
17024 q
17025}
17026/@datadir@/p
17027/@docdir@/p
17028/@infodir@/p
17029/@localedir@/p
17030/@mandir@/p'
17031case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17032*datarootdir*) ac_datarootdir_seen=yes;;
17033*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17035$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17036_ACEOF
17037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17038 ac_datarootdir_hack='
17039 s&@datadir@&$datadir&g
17040 s&@docdir@&$docdir&g
17041 s&@infodir@&$infodir&g
17042 s&@localedir@&$localedir&g
17043 s&@mandir@&$mandir&g
17044 s&\\\${datarootdir}&$datarootdir&g' ;;
17045esac
4e8d927d 17046_ACEOF
81ecdfbb
RW
17047
17048# Neutralize VPATH when `$srcdir' = `.'.
17049# Shell code in configure.ac might set extrasub.
17050# FIXME: do we really want to maintain this feature?
17051cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17052ac_sed_extra="$ac_vpsub
bec39cab
AC
17053$extrasub
17054_ACEOF
81ecdfbb 17055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17056:t
17057/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17058s|@configure_input@|$ac_sed_conf_input|;t t
17059s&@top_builddir@&$ac_top_builddir_sub&;t t
17060s&@top_build_prefix@&$ac_top_build_prefix&;t t
17061s&@srcdir@&$ac_srcdir&;t t
17062s&@abs_srcdir@&$ac_abs_srcdir&;t t
17063s&@top_srcdir@&$ac_top_srcdir&;t t
17064s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17065s&@builddir@&$ac_builddir&;t t
17066s&@abs_builddir@&$ac_abs_builddir&;t t
17067s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17068s&@INSTALL@&$ac_INSTALL&;t t
17069s&@MKDIR_P@&$ac_MKDIR_P&;t t
17070$ac_datarootdir_hack
17071"
17072eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17073if $ac_cs_awk_getline; then
17074 $AWK -f "$tmp/subs.awk"
17075else
17076 $AWK -f "$tmp/subs.awk" | $SHELL
17077fi >$tmp/out \
17078 || as_fn_error "could not create $ac_file" "$LINENO" 5
17079
17080test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17081 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17082 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17084which seems to be undefined. Please make sure it is defined." >&5
17085$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17086which seems to be undefined. Please make sure it is defined." >&2;}
17087
17088 rm -f "$tmp/stdin"
bec39cab 17089 case $ac_file in
81ecdfbb
RW
17090 -) cat "$tmp/out" && rm -f "$tmp/out";;
17091 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17092 esac \
17093 || as_fn_error "could not create $ac_file" "$LINENO" 5
17094 ;;
17095 :H)
17096 #
17097 # CONFIG_HEADER
17098 #
bec39cab 17099 if test x"$ac_file" != x-; then
81ecdfbb
RW
17100 {
17101 $as_echo "/* $configure_input */" \
17102 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17103 } >"$tmp/config.h" \
17104 || as_fn_error "could not create $ac_file" "$LINENO" 5
17105 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17106 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17107$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17108 else
81ecdfbb
RW
17109 rm -f "$ac_file"
17110 mv "$tmp/config.h" "$ac_file" \
17111 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17112 fi
17113 else
81ecdfbb
RW
17114 $as_echo "/* $configure_input */" \
17115 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17116 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17117 fi
81ecdfbb
RW
17118# Compute "$ac_file"'s index in $config_headers.
17119_am_arg="$ac_file"
e28b3332
DJ
17120_am_stamp_count=1
17121for _am_header in $config_headers :; do
17122 case $_am_header in
81ecdfbb 17123 $_am_arg | $_am_arg:* )
e28b3332
DJ
17124 break ;;
17125 * )
17126 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17127 esac
17128done
81ecdfbb
RW
17129echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17130$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17131 X"$_am_arg" : 'X\(//\)[^/]' \| \
17132 X"$_am_arg" : 'X\(//\)$' \| \
17133 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17134$as_echo X"$_am_arg" |
17135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17136 s//\1/
17137 q
17138 }
17139 /^X\(\/\/\)[^/].*/{
17140 s//\1/
17141 q
17142 }
17143 /^X\(\/\/\)$/{
17144 s//\1/
17145 q
17146 }
17147 /^X\(\/\).*/{
17148 s//\1/
17149 q
17150 }
17151 s/.*/./; q'`/stamp-h$_am_stamp_count
17152 ;;
17153 :L)
17154 #
17155 # CONFIG_LINK
17156 #
c906108c 17157
81ecdfbb
RW
17158 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17159 :
b4e70030 17160 else
81ecdfbb
RW
17161 # Prefer the file from the source tree if names are identical.
17162 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17163 ac_source=$srcdir/$ac_source
17164 fi
b4e70030 17165
81ecdfbb
RW
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17167$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17168
81ecdfbb
RW
17169 if test ! -r "$ac_source"; then
17170 as_fn_error "$ac_source: file not found" "$LINENO" 5
17171 fi
17172 rm -f "$ac_file"
bec39cab 17173
81ecdfbb
RW
17174 # Try a relative symlink, then a hard link, then a copy.
17175 case $srcdir in
17176 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17177 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17178 esac
17179 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17180 ln "$ac_source" "$ac_file" 2>/dev/null ||
17181 cp -p "$ac_source" "$ac_file" ||
17182 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17183 fi
17184 ;;
17185 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17186$as_echo "$as_me: executing $ac_file commands" >&6;}
17187 ;;
c906108c 17188 esac
b4e70030 17189
bec39cab 17190
81ecdfbb
RW
17191 case $ac_file$ac_mode in
17192 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17193 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17194 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17195 # are listed without --file. Let's play safe and only enable the eval
17196 # if we detect the quoting.
17197 case $CONFIG_FILES in
17198 *\'*) eval set x "$CONFIG_FILES" ;;
17199 *) set x $CONFIG_FILES ;;
17200 esac
17201 shift
17202 for mf
17203 do
17204 # Strip MF so we end up with the name of the file.
17205 mf=`echo "$mf" | sed -e 's/:.*$//'`
17206 # Check whether this is an Automake generated Makefile or not.
17207 # We used to match only the files named `Makefile.in', but
17208 # some people rename them; so instead we look at the file content.
17209 # Grep'ing the first line is not enough: some people post-process
17210 # each Makefile.in and add a new line on top of each file to say so.
17211 # Grep'ing the whole file is not good either: AIX grep has a line
17212 # limit of 2048, but all sed's we know have understand at least 4000.
17213 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17214 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17215$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17216 X"$mf" : 'X\(//\)[^/]' \| \
17217 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17218 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17219$as_echo X"$mf" |
17220 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17221 s//\1/
17222 q
17223 }
17224 /^X\(\/\/\)[^/].*/{
17225 s//\1/
17226 q
17227 }
17228 /^X\(\/\/\)$/{
17229 s//\1/
17230 q
17231 }
17232 /^X\(\/\).*/{
17233 s//\1/
17234 q
17235 }
17236 s/.*/./; q'`
17237 else
17238 continue
17239 fi
17240 # Extract the definition of DEPDIR, am__include, and am__quote
17241 # from the Makefile without running `make'.
17242 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17243 test -z "$DEPDIR" && continue
17244 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17245 test -z "am__include" && continue
17246 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17247 # When using ansi2knr, U may be empty or an underscore; expand it
17248 U=`sed -n 's/^U = //p' < "$mf"`
17249 # Find all dependency output files, they are included files with
17250 # $(DEPDIR) in their names. We invoke sed twice because it is the
17251 # simplest approach to changing $(DEPDIR) to its actual value in the
17252 # expansion.
17253 for file in `sed -n "
17254 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17255 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17256 # Make sure the directory exists.
17257 test -f "$dirpart/$file" && continue
17258 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17259$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17260 X"$file" : 'X\(//\)[^/]' \| \
17261 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17262 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17263$as_echo X"$file" |
17264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17265 s//\1/
17266 q
17267 }
17268 /^X\(\/\/\)[^/].*/{
17269 s//\1/
17270 q
17271 }
17272 /^X\(\/\/\)$/{
17273 s//\1/
17274 q
17275 }
17276 /^X\(\/\).*/{
17277 s//\1/
17278 q
17279 }
17280 s/.*/./; q'`
17281 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17282 # echo "creating $dirpart/$file"
17283 echo '# dummy' > "$dirpart/$file"
e28b3332 17284 done
e28b3332 17285 done
81ecdfbb 17286}
4e8d927d 17287 ;;
81ecdfbb 17288 "default":C)
c906108c
SS
17289case x$CONFIG_HEADERS in
17290xconfig.h:config.in)
17291echo > stamp-h ;;
17292esac
bec39cab 17293 ;;
81ecdfbb 17294
bec39cab 17295 esac
81ecdfbb 17296done # for ac_tag
c906108c 17297
bec39cab 17298
81ecdfbb 17299as_fn_exit 0
bec39cab 17300_ACEOF
bec39cab
AC
17301ac_clean_files=$ac_clean_files_save
17302
81ecdfbb
RW
17303test $ac_write_fail = 0 ||
17304 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17305
bec39cab
AC
17306
17307# configure is writing to config.log, and then calls config.status.
17308# config.status does its own redirection, appending to config.log.
17309# Unfortunately, on DOS this fails, as config.log is still kept open
17310# by configure, so config.status won't be able to write to it; its
17311# output is simply discarded. So we exec the FD to /dev/null,
17312# effectively closing config.log, so it can be properly (re)opened and
17313# appended to by config.status. When coming back to configure, we
17314# need to make the FD available again.
17315if test "$no_create" != yes; then
17316 ac_cs_success=:
17317 ac_config_status_args=
17318 test "$silent" = yes &&
17319 ac_config_status_args="$ac_config_status_args --quiet"
17320 exec 5>/dev/null
17321 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17322 exec 5>>config.log
17323 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17324 # would make configure fail if this is the last instruction.
81ecdfbb 17325 $ac_cs_success || as_fn_exit $?
bec39cab 17326fi
c906108c 17327
bec39cab 17328#
81ecdfbb 17329# CONFIG_SUBDIRS section.
bec39cab 17330#
c906108c
SS
17331if test "$no_recursion" != yes; then
17332
81ecdfbb
RW
17333 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17334 # so they do not pile up.
c906108c
SS
17335 ac_sub_configure_args=
17336 ac_prev=
fdc59709
PB
17337 eval "set x $ac_configure_args"
17338 shift
17339 for ac_arg
17340 do
c906108c
SS
17341 if test -n "$ac_prev"; then
17342 ac_prev=
17343 continue
17344 fi
bec39cab 17345 case $ac_arg in
c906108c
SS
17346 -cache-file | --cache-file | --cache-fil | --cache-fi \
17347 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17348 ac_prev=cache_file ;;
17349 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17350 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17351 | --c=*)
17352 ;;
17353 --config-cache | -C)
c906108c
SS
17354 ;;
17355 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17356 ac_prev=srcdir ;;
17357 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17358 ;;
bec39cab
AC
17359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17360 ac_prev=prefix ;;
17361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17362 ;;
81ecdfbb
RW
17363 --disable-option-checking)
17364 ;;
fdc59709
PB
17365 *)
17366 case $ac_arg in
81ecdfbb 17367 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17368 esac
81ecdfbb 17369 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17370 esac
17371 done
17372
bec39cab
AC
17373 # Always prepend --prefix to ensure using the same prefix
17374 # in subdir configurations.
fdc59709
PB
17375 ac_arg="--prefix=$prefix"
17376 case $ac_arg in
81ecdfbb 17377 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17378 esac
81ecdfbb
RW
17379 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17380
17381 # Pass --silent
17382 if test "$silent" = yes; then
17383 ac_sub_configure_args="--silent $ac_sub_configure_args"
17384 fi
17385
17386 # Always prepend --disable-option-checking to silence warnings, since
17387 # different subdirs can have different --enable and --with options.
17388 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17389
b4e70030 17390 ac_popdir=`pwd`
bec39cab 17391 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17392
17393 # Do not complain, so a configure script can configure whichever
17394 # parts of a large source tree are present.
fdc59709 17395 test -d "$srcdir/$ac_dir" || continue
c906108c 17396
81ecdfbb
RW
17397 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17398 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17399 $as_echo "$ac_msg" >&6
17400 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17401 ac_builddir=.
17402
81ecdfbb
RW
17403case "$ac_dir" in
17404.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17405*)
17406 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17407 # A ".." for each directory in $ac_dir_suffix.
17408 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17409 case $ac_top_builddir_sub in
17410 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17411 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17412 esac ;;
17413esac
17414ac_abs_top_builddir=$ac_pwd
17415ac_abs_builddir=$ac_pwd$ac_dir_suffix
17416# for backward compatibility:
17417ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17418
17419case $srcdir in
81ecdfbb 17420 .) # We are building in place.
bec39cab 17421 ac_srcdir=.
81ecdfbb
RW
17422 ac_top_srcdir=$ac_top_builddir_sub
17423 ac_abs_top_srcdir=$ac_pwd ;;
17424 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17425 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17426 ac_top_srcdir=$srcdir
17427 ac_abs_top_srcdir=$srcdir ;;
17428 *) # Relative name.
17429 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17430 ac_top_srcdir=$ac_top_build_prefix$srcdir
17431 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17432esac
81ecdfbb 17433ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17434
c906108c 17435
fdc59709 17436 cd "$ac_dir"
c906108c
SS
17437
17438 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17439 if test -f "$ac_srcdir/configure.gnu"; then
17440 ac_sub_configure=$ac_srcdir/configure.gnu
17441 elif test -f "$ac_srcdir/configure"; then
17442 ac_sub_configure=$ac_srcdir/configure
17443 elif test -f "$ac_srcdir/configure.in"; then
17444 # This should be Cygnus configure.
17445 ac_sub_configure=$ac_aux_dir/configure
c906108c 17446 else
81ecdfbb
RW
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17448$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17449 ac_sub_configure=
17450 fi
17451
17452 # The recursion is here.
17453 if test -n "$ac_sub_configure"; then
c906108c 17454 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17455 case $cache_file in
17456 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17457 *) # Relative name.
17458 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17459 esac
c906108c 17460
81ecdfbb
RW
17461 { $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
17462$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17463 # The eval makes quoting arguments work.
fdc59709
PB
17464 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17465 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17466 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17467 fi
17468
fdc59709 17469 cd "$ac_popdir"
c906108c
SS
17470 done
17471fi
81ecdfbb
RW
17472if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17474$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17475fi
c906108c
SS
17476
17477
17478exit 0
This page took 1.993051 seconds and 4 git commands to generate.