Add 'getthrds' declaration check in configure for AIX
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
783e057b 591gl_header_list=
f434ba03 592gl_func_list=
81ecdfbb
RW
593enable_option_checking=no
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602GDB_NM_FILE
603frags
604target_subdir
605CONFIG_UNINSTALL
606CONFIG_INSTALL
607CONFIG_CLEAN
608CONFIG_ALL
609CONFIG_SRCS
610CONFIG_DEPS
611CONFIG_OBS
612PROFILE_CFLAGS
613ENABLE_CFLAGS
614SIM_OBS
615SIM
616XMKMF
617GDBTK_SRC_DIR
618GDBTK_CFLAGS
619GDBTKLIBS
620X_LIBS
621X_LDFLAGS
622X_CFLAGS
623TK_XINCLUDES
624TK_DEPS
625TK_LIBRARY
626TK_INCLUDE
627TK_STUB_LIB_SPEC
628TK_STUB_LIB_FLAG
629TK_STUB_LIB_FILE
630TK_LIB_SPEC
631TK_LIB_FLAG
632TK_LIB_FILE
633TK_SRC_DIR
634TK_BIN_DIR
635TK_VERSION
636TCL_DEPS
637TCL_LIBRARY
638TCL_INCLUDE
639TCL_STUB_LIB_SPEC
640TCL_STUB_LIB_FLAG
641TCL_STUB_LIB_FILE
642TCL_LIB_SPEC
643TCL_LIB_FLAG
644TCL_LIB_FILE
645TCL_SRC_DIR
646TCL_BIN_DIR
647TCL_PATCH_LEVEL
648TCL_VERSION
649WIN32LDAPP
650GUI_CFLAGS_X
651LIBGUI
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
657TARGET_SYSTEM_ROOT_DEFINE
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
ac534cba
JB
662PYTHON_LIBS
663PYTHON_CPPFLAGS
81ecdfbb 664PYTHON_CFLAGS
ec685c5e 665python_prog_path
81ecdfbb
RW
666LTLIBEXPAT
667LIBEXPAT
668HAVE_LIBEXPAT
39037522 669READLINE_TEXI_INCFLAG
81ecdfbb
RW
670READLINE_CFLAGS
671READLINE_DEPS
672READLINE
673MIG
674WINDRES
675DLLTOOL
676AR
677YFLAGS
678YACC
679LN_S
680REPORT_BUGS_TEXI
681REPORT_BUGS_TO
682PKGVERSION
683TARGET_OBS
684subdirs
685GDB_DATADIR
686DEBUGDIR
687am__fastdepCC_FALSE
688am__fastdepCC_TRUE
689AMDEPBACKSLASH
690AMDEP_FALSE
691AMDEP_TRUE
692am__quote
693am__include
694am__untar
695am__tar
696AMTAR
697AWK
698mkdir_p
699MKDIR_P
700INSTALL_STRIP_PROGRAM
701STRIP
702install_sh
703MAKEINFO
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709CYGPATH_W
710am__isrc
711INSTALL_DATA
712INSTALL_SCRIPT
713INSTALL_PROGRAM
714PACKAGE
715GNULIB_STDINT_H
716LIBGNU_LTLIBDEPS
717LIBGNU_LIBDEPS
f434ba03
PA
718gltests_WITNESS
719HAVE_WINT_T
81ecdfbb 720HAVE_WCHAR_H
f434ba03
PA
721NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
722NEXT_WCHAR_H
81ecdfbb 723REPLACE_WCWIDTH
f434ba03
PA
724REPLACE_WCSNRTOMBS
725REPLACE_WCSRTOMBS
726REPLACE_WCRTOMB
727REPLACE_MBSNRTOWCS
728REPLACE_MBSRTOWCS
729REPLACE_MBRLEN
730REPLACE_MBRTOWC
731REPLACE_MBSINIT
732REPLACE_WCTOB
733REPLACE_BTOWC
734REPLACE_MBSTATE_T
81ecdfbb 735HAVE_DECL_WCWIDTH
f434ba03
PA
736HAVE_DECL_WCTOB
737HAVE_WCSNRTOMBS
738HAVE_WCSRTOMBS
739HAVE_WCRTOMB
740HAVE_MBSNRTOWCS
741HAVE_MBSRTOWCS
742HAVE_MBRLEN
743HAVE_MBRTOWC
744HAVE_MBSINIT
745HAVE_BTOWC
81ecdfbb 746GNULIB_WCWIDTH
f434ba03
PA
747GNULIB_WCSNRTOMBS
748GNULIB_WCSRTOMBS
749GNULIB_WCRTOMB
750GNULIB_MBSNRTOWCS
751GNULIB_MBSRTOWCS
752GNULIB_MBRLEN
753GNULIB_MBRTOWC
754GNULIB_MBSINIT
755GNULIB_WCTOB
756GNULIB_BTOWC
757NEXT_AS_FIRST_DIRECTIVE_STRING_H
81ecdfbb
RW
758NEXT_STRING_H
759STDINT_H
760WINT_T_SUFFIX
761WCHAR_T_SUFFIX
81ecdfbb 762SIG_ATOMIC_T_SUFFIX
f434ba03 763SIZE_T_SUFFIX
81ecdfbb
RW
764PTRDIFF_T_SUFFIX
765HAVE_SIGNED_WINT_T
766HAVE_SIGNED_WCHAR_T
767HAVE_SIGNED_SIG_ATOMIC_T
768BITSIZEOF_WINT_T
769BITSIZEOF_WCHAR_T
81ecdfbb 770BITSIZEOF_SIG_ATOMIC_T
f434ba03 771BITSIZEOF_SIZE_T
81ecdfbb
RW
772BITSIZEOF_PTRDIFF_T
773HAVE_SYS_BITYPES_H
774HAVE_SYS_INTTYPES_H
775HAVE_STDINT_H
f434ba03 776NEXT_AS_FIRST_DIRECTIVE_STDINT_H
81ecdfbb 777NEXT_STDINT_H
81ecdfbb
RW
778HAVE_SYS_TYPES_H
779HAVE_INTTYPES_H
780HAVE_UNSIGNED_LONG_LONG_INT
781HAVE_LONG_LONG_INT
f434ba03
PA
782NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
783NEXT_STDDEF_H
784PRAGMA_SYSTEM_HEADER
785INCLUDE_NEXT_AS_FIRST_DIRECTIVE
786INCLUDE_NEXT
787STDDEF_H
788HAVE_WCHAR_T
789REPLACE_NULL
790APPLE_UNIVERSAL_BUILD
791UNDEFINE_STRTOK_R
792REPLACE_STRTOK_R
81ecdfbb 793REPLACE_STRSIGNAL
f434ba03
PA
794REPLACE_STRNLEN
795REPLACE_STRNDUP
796REPLACE_STRNCAT
81ecdfbb 797REPLACE_STRERROR
f434ba03
PA
798REPLACE_STRCASESTR
799REPLACE_STRSTR
800REPLACE_STRDUP
801REPLACE_STPNCPY
802REPLACE_MEMMEM
803REPLACE_MEMCHR
804HAVE_STRVERSCMP
81ecdfbb 805HAVE_DECL_STRSIGNAL
81ecdfbb
RW
806HAVE_DECL_STRTOK_R
807HAVE_STRCASESTR
808HAVE_STRSEP
809HAVE_STRPBRK
810HAVE_DECL_STRNLEN
811HAVE_DECL_STRNDUP
81ecdfbb
RW
812HAVE_DECL_STRDUP
813HAVE_STRCHRNUL
814HAVE_STPNCPY
815HAVE_STPCPY
f434ba03 816HAVE_RAWMEMCHR
81ecdfbb
RW
817HAVE_DECL_MEMRCHR
818HAVE_MEMPCPY
819HAVE_DECL_MEMMEM
f434ba03
PA
820HAVE_MEMCHR
821HAVE_MBSLEN
822GNULIB_STRVERSCMP
81ecdfbb
RW
823GNULIB_STRSIGNAL
824GNULIB_STRERROR
825GNULIB_MBSTOK_R
826GNULIB_MBSSEP
827GNULIB_MBSSPN
828GNULIB_MBSPBRK
829GNULIB_MBSCSPN
830GNULIB_MBSCASESTR
831GNULIB_MBSPCASECMP
832GNULIB_MBSNCASECMP
833GNULIB_MBSCASECMP
834GNULIB_MBSSTR
835GNULIB_MBSRCHR
836GNULIB_MBSCHR
837GNULIB_MBSNLEN
838GNULIB_MBSLEN
839GNULIB_STRTOK_R
840GNULIB_STRCASESTR
841GNULIB_STRSTR
842GNULIB_STRSEP
843GNULIB_STRPBRK
844GNULIB_STRNLEN
845GNULIB_STRNDUP
f434ba03 846GNULIB_STRNCAT
81ecdfbb
RW
847GNULIB_STRDUP
848GNULIB_STRCHRNUL
849GNULIB_STPNCPY
850GNULIB_STPCPY
f434ba03 851GNULIB_RAWMEMCHR
81ecdfbb
RW
852GNULIB_MEMRCHR
853GNULIB_MEMPCPY
854GNULIB_MEMMEM
f434ba03 855GNULIB_MEMCHR
81ecdfbb
RW
856GL_COND_LIBTOOL_FALSE
857GL_COND_LIBTOOL_TRUE
858CATOBJEXT
859GENCAT
860INSTOBJEXT
861DATADIRNAME
862CATALOGS
863POSUB
864GMSGFMT
865XGETTEXT
866INCINTL
867LIBINTL_DEP
868LIBINTL
869USE_NLS
870SET_MAKE
871GMAKE_FALSE
872GMAKE_TRUE
873MAKE
874CCDEPMODE
875DEPDIR
876am__leading_dot
877target_os
878target_vendor
879target_cpu
880target
f434ba03
PA
881RANLIB
882EGREP
883GREP
884CPP
81ecdfbb
RW
885host_os
886host_vendor
887host_cpu
888host
889build_os
890build_vendor
891build_cpu
892build
81ecdfbb
RW
893OBJEXT
894EXEEXT
895ac_ct_CC
896CPPFLAGS
897LDFLAGS
898CFLAGS
899CC
900MAINT
901MAINTAINER_MODE_FALSE
902MAINTAINER_MODE_TRUE
903target_alias
904host_alias
905build_alias
906LIBS
907ECHO_T
908ECHO_N
909ECHO_C
910DEFS
911mandir
912localedir
913libdir
914psdir
915pdfdir
916dvidir
917htmldir
918infodir
919docdir
920oldincludedir
921includedir
922localstatedir
923sharedstatedir
924sysconfdir
925datadir
926datarootdir
927libexecdir
928sbindir
929bindir
930program_transform_name
931prefix
932exec_prefix
933PACKAGE_URL
934PACKAGE_BUGREPORT
935PACKAGE_STRING
936PACKAGE_VERSION
937PACKAGE_TARNAME
938PACKAGE_NAME
939PATH_SEPARATOR
940SHELL'
a4ce5b0d 941ac_subst_files='host_makefile_frag'
81ecdfbb
RW
942ac_user_opts='
943enable_option_checking
944enable_maintainer_mode
da2f07f1
JK
945enable_plugins
946enable_largefile
81ecdfbb
RW
947enable_dependency_tracking
948with_separate_debug_dir
949with_gdb_datadir
950with_relocated_sources
951enable_targets
952enable_64_bit_bfd
953enable_gdbcli
954enable_gdbmi
955enable_tui
956enable_gdbtk
957with_libunwind
958with_curses
959enable_profiling
960with_pkgversion
961with_bugurl
b040ad30 962with_zlib
81ecdfbb
RW
963with_libiconv_prefix
964with_system_readline
965with_expat
966with_gnu_ld
967enable_rpath
968with_libexpat_prefix
969with_python
970with_included_regex
971with_sysroot
972with_system_gdbinit
973enable_werror
974enable_build_warnings
975enable_gdb_build_warnings
976with_tcl
977with_tk
978with_x
979enable_sim
980enable_multi_ice
496c0e1b 981enable_gdbserver
81ecdfbb
RW
982'
983 ac_precious_vars='build_alias
984host_alias
985target_alias
986CC
987CFLAGS
988LDFLAGS
989LIBS
990CPPFLAGS
991CPP
992YACC
993YFLAGS
994XMKMF'
5ae98d25 995ac_subdirs_all='testsuite
81ecdfbb
RW
996gdbtk
997multi-ice
998gdbserver'
c906108c
SS
999
1000# Initialize some variables set by options.
bec39cab
AC
1001ac_init_help=
1002ac_init_version=false
81ecdfbb
RW
1003ac_unrecognized_opts=
1004ac_unrecognized_sep=
c906108c
SS
1005# The variables have the same names as the options, with
1006# dashes changed to underlines.
bec39cab 1007cache_file=/dev/null
c906108c 1008exec_prefix=NONE
c906108c 1009no_create=
c906108c
SS
1010no_recursion=
1011prefix=NONE
1012program_prefix=NONE
1013program_suffix=NONE
1014program_transform_name=s,x,x,
1015silent=
1016site=
1017srcdir=
c906108c
SS
1018verbose=
1019x_includes=NONE
1020x_libraries=NONE
bec39cab
AC
1021
1022# Installation directory options.
1023# These are left unexpanded so users can "make install exec_prefix=/foo"
1024# and all the variables that are supposed to be based on exec_prefix
1025# by default will actually change.
1026# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1027# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1028bindir='${exec_prefix}/bin'
1029sbindir='${exec_prefix}/sbin'
1030libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1031datarootdir='${prefix}/share'
1032datadir='${datarootdir}'
c906108c
SS
1033sysconfdir='${prefix}/etc'
1034sharedstatedir='${prefix}/com'
1035localstatedir='${prefix}/var'
c906108c
SS
1036includedir='${prefix}/include'
1037oldincludedir='/usr/include'
81ecdfbb
RW
1038docdir='${datarootdir}/doc/${PACKAGE}'
1039infodir='${datarootdir}/info'
1040htmldir='${docdir}'
1041dvidir='${docdir}'
1042pdfdir='${docdir}'
1043psdir='${docdir}'
1044libdir='${exec_prefix}/lib'
1045localedir='${datarootdir}/locale'
1046mandir='${datarootdir}/man'
c906108c 1047
c906108c 1048ac_prev=
81ecdfbb 1049ac_dashdash=
c906108c
SS
1050for ac_option
1051do
c906108c
SS
1052 # If the previous option needs an argument, assign it.
1053 if test -n "$ac_prev"; then
81ecdfbb 1054 eval $ac_prev=\$ac_option
c906108c
SS
1055 ac_prev=
1056 continue
1057 fi
1058
81ecdfbb
RW
1059 case $ac_option in
1060 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1061 *) ac_optarg=yes ;;
1062 esac
c906108c
SS
1063
1064 # Accept the important Cygnus configure options, so we can diagnose typos.
1065
81ecdfbb
RW
1066 case $ac_dashdash$ac_option in
1067 --)
1068 ac_dashdash=yes ;;
c906108c
SS
1069
1070 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1071 ac_prev=bindir ;;
1072 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1073 bindir=$ac_optarg ;;
c906108c
SS
1074
1075 -build | --build | --buil | --bui | --bu)
bec39cab 1076 ac_prev=build_alias ;;
c906108c 1077 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1078 build_alias=$ac_optarg ;;
c906108c
SS
1079
1080 -cache-file | --cache-file | --cache-fil | --cache-fi \
1081 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1082 ac_prev=cache_file ;;
1083 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1084 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1085 cache_file=$ac_optarg ;;
1086
1087 --config-cache | -C)
1088 cache_file=config.cache ;;
c906108c 1089
81ecdfbb 1090 -datadir | --datadir | --datadi | --datad)
c906108c 1091 ac_prev=datadir ;;
81ecdfbb 1092 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1093 datadir=$ac_optarg ;;
c906108c 1094
81ecdfbb
RW
1095 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1096 | --dataroo | --dataro | --datar)
1097 ac_prev=datarootdir ;;
1098 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1099 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1100 datarootdir=$ac_optarg ;;
1101
c906108c 1102 -disable-* | --disable-*)
81ecdfbb 1103 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1104 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1105 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1106 as_fn_error "invalid feature name: $ac_useropt"
1107 ac_useropt_orig=$ac_useropt
1108 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1109 case $ac_user_opts in
1110 *"
1111"enable_$ac_useropt"
1112"*) ;;
1113 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1114 ac_unrecognized_sep=', ';;
1115 esac
1116 eval enable_$ac_useropt=no ;;
1117
1118 -docdir | --docdir | --docdi | --doc | --do)
1119 ac_prev=docdir ;;
1120 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1121 docdir=$ac_optarg ;;
1122
1123 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1124 ac_prev=dvidir ;;
1125 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1126 dvidir=$ac_optarg ;;
c906108c
SS
1127
1128 -enable-* | --enable-*)
81ecdfbb 1129 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1130 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1132 as_fn_error "invalid feature name: $ac_useropt"
1133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"enable_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
b4e70030 1141 esac
81ecdfbb 1142 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1143
1144 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1145 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1146 | --exec | --exe | --ex)
1147 ac_prev=exec_prefix ;;
1148 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1149 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1150 | --exec=* | --exe=* | --ex=*)
bec39cab 1151 exec_prefix=$ac_optarg ;;
c906108c
SS
1152
1153 -gas | --gas | --ga | --g)
1154 # Obsolete; use --with-gas.
1155 with_gas=yes ;;
1156
bec39cab
AC
1157 -help | --help | --hel | --he | -h)
1158 ac_init_help=long ;;
1159 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1160 ac_init_help=recursive ;;
1161 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1162 ac_init_help=short ;;
c906108c
SS
1163
1164 -host | --host | --hos | --ho)
bec39cab 1165 ac_prev=host_alias ;;
c906108c 1166 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1167 host_alias=$ac_optarg ;;
c906108c 1168
81ecdfbb
RW
1169 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1170 ac_prev=htmldir ;;
1171 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1172 | --ht=*)
1173 htmldir=$ac_optarg ;;
1174
c906108c
SS
1175 -includedir | --includedir | --includedi | --included | --include \
1176 | --includ | --inclu | --incl | --inc)
1177 ac_prev=includedir ;;
1178 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1179 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1180 includedir=$ac_optarg ;;
c906108c
SS
1181
1182 -infodir | --infodir | --infodi | --infod | --info | --inf)
1183 ac_prev=infodir ;;
1184 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1185 infodir=$ac_optarg ;;
c906108c
SS
1186
1187 -libdir | --libdir | --libdi | --libd)
1188 ac_prev=libdir ;;
1189 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1190 libdir=$ac_optarg ;;
c906108c
SS
1191
1192 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1193 | --libexe | --libex | --libe)
1194 ac_prev=libexecdir ;;
1195 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1196 | --libexe=* | --libex=* | --libe=*)
bec39cab 1197 libexecdir=$ac_optarg ;;
c906108c 1198
81ecdfbb
RW
1199 -localedir | --localedir | --localedi | --localed | --locale)
1200 ac_prev=localedir ;;
1201 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1202 localedir=$ac_optarg ;;
1203
c906108c 1204 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1205 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1206 ac_prev=localstatedir ;;
1207 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1208 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1209 localstatedir=$ac_optarg ;;
c906108c
SS
1210
1211 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1212 ac_prev=mandir ;;
1213 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1214 mandir=$ac_optarg ;;
c906108c
SS
1215
1216 -nfp | --nfp | --nf)
1217 # Obsolete; use --without-fp.
1218 with_fp=no ;;
1219
1220 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1221 | --no-cr | --no-c | -n)
c906108c
SS
1222 no_create=yes ;;
1223
1224 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1225 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1226 no_recursion=yes ;;
1227
1228 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1229 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1230 | --oldin | --oldi | --old | --ol | --o)
1231 ac_prev=oldincludedir ;;
1232 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1233 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1234 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1235 oldincludedir=$ac_optarg ;;
c906108c
SS
1236
1237 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1238 ac_prev=prefix ;;
1239 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1240 prefix=$ac_optarg ;;
c906108c
SS
1241
1242 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1243 | --program-pre | --program-pr | --program-p)
1244 ac_prev=program_prefix ;;
1245 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1246 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1247 program_prefix=$ac_optarg ;;
c906108c
SS
1248
1249 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1250 | --program-suf | --program-su | --program-s)
1251 ac_prev=program_suffix ;;
1252 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1253 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1254 program_suffix=$ac_optarg ;;
c906108c
SS
1255
1256 -program-transform-name | --program-transform-name \
1257 | --program-transform-nam | --program-transform-na \
1258 | --program-transform-n | --program-transform- \
1259 | --program-transform | --program-transfor \
1260 | --program-transfo | --program-transf \
1261 | --program-trans | --program-tran \
1262 | --progr-tra | --program-tr | --program-t)
1263 ac_prev=program_transform_name ;;
1264 -program-transform-name=* | --program-transform-name=* \
1265 | --program-transform-nam=* | --program-transform-na=* \
1266 | --program-transform-n=* | --program-transform-=* \
1267 | --program-transform=* | --program-transfor=* \
1268 | --program-transfo=* | --program-transf=* \
1269 | --program-trans=* | --program-tran=* \
1270 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1271 program_transform_name=$ac_optarg ;;
c906108c 1272
81ecdfbb
RW
1273 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1274 ac_prev=pdfdir ;;
1275 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1276 pdfdir=$ac_optarg ;;
1277
1278 -psdir | --psdir | --psdi | --psd | --ps)
1279 ac_prev=psdir ;;
1280 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1281 psdir=$ac_optarg ;;
1282
c906108c
SS
1283 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1284 | -silent | --silent | --silen | --sile | --sil)
1285 silent=yes ;;
1286
1287 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1288 ac_prev=sbindir ;;
1289 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1290 | --sbi=* | --sb=*)
bec39cab 1291 sbindir=$ac_optarg ;;
c906108c
SS
1292
1293 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1294 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1295 | --sharedst | --shareds | --shared | --share | --shar \
1296 | --sha | --sh)
1297 ac_prev=sharedstatedir ;;
1298 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1299 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1300 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1301 | --sha=* | --sh=*)
bec39cab 1302 sharedstatedir=$ac_optarg ;;
c906108c
SS
1303
1304 -site | --site | --sit)
1305 ac_prev=site ;;
1306 -site=* | --site=* | --sit=*)
bec39cab 1307 site=$ac_optarg ;;
3ace7edb 1308
c906108c
SS
1309 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1310 ac_prev=srcdir ;;
1311 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1312 srcdir=$ac_optarg ;;
c906108c
SS
1313
1314 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1315 | --syscon | --sysco | --sysc | --sys | --sy)
1316 ac_prev=sysconfdir ;;
1317 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1318 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1319 sysconfdir=$ac_optarg ;;
c906108c
SS
1320
1321 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1322 ac_prev=target_alias ;;
c906108c 1323 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1324 target_alias=$ac_optarg ;;
c906108c
SS
1325
1326 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1327 verbose=yes ;;
1328
bec39cab
AC
1329 -version | --version | --versio | --versi | --vers | -V)
1330 ac_init_version=: ;;
c906108c
SS
1331
1332 -with-* | --with-*)
81ecdfbb 1333 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1334 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1335 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1336 as_fn_error "invalid package name: $ac_useropt"
1337 ac_useropt_orig=$ac_useropt
1338 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1339 case $ac_user_opts in
1340 *"
1341"with_$ac_useropt"
1342"*) ;;
1343 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1344 ac_unrecognized_sep=', ';;
b4e70030 1345 esac
81ecdfbb 1346 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1347
1348 -without-* | --without-*)
81ecdfbb 1349 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1350 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1351 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1352 as_fn_error "invalid package name: $ac_useropt"
1353 ac_useropt_orig=$ac_useropt
1354 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1355 case $ac_user_opts in
1356 *"
1357"with_$ac_useropt"
1358"*) ;;
1359 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1360 ac_unrecognized_sep=', ';;
1361 esac
1362 eval with_$ac_useropt=no ;;
c906108c
SS
1363
1364 --x)
1365 # Obsolete; use --with-x.
1366 with_x=yes ;;
1367
1368 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1369 | --x-incl | --x-inc | --x-in | --x-i)
1370 ac_prev=x_includes ;;
1371 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1372 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1373 x_includes=$ac_optarg ;;
c906108c
SS
1374
1375 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1376 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1377 ac_prev=x_libraries ;;
1378 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1379 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1380 x_libraries=$ac_optarg ;;
c906108c 1381
81ecdfbb
RW
1382 -*) as_fn_error "unrecognized option: \`$ac_option'
1383Try \`$0 --help' for more information."
c906108c
SS
1384 ;;
1385
bec39cab
AC
1386 *=*)
1387 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1388 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1389 case $ac_envvar in #(
1390 '' | [0-9]* | *[!_$as_cr_alnum]* )
1391 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1392 esac
1393 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1394 export $ac_envvar ;;
1395
c906108c 1396 *)
bec39cab 1397 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1398 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1399 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1400 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1401 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1402 ;;
1403
1404 esac
1405done
1406
1407if test -n "$ac_prev"; then
bec39cab 1408 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1409 as_fn_error "missing argument to $ac_option"
c906108c 1410fi
c906108c 1411
81ecdfbb
RW
1412if test -n "$ac_unrecognized_opts"; then
1413 case $enable_option_checking in
1414 no) ;;
1415 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1416 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1417 esac
81ecdfbb 1418fi
b4e70030 1419
81ecdfbb
RW
1420# Check all directory arguments for consistency.
1421for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1422 datadir sysconfdir sharedstatedir localstatedir includedir \
1423 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1424 libdir localedir mandir
b4e70030 1425do
81ecdfbb
RW
1426 eval ac_val=\$$ac_var
1427 # Remove trailing slashes.
1428 case $ac_val in
1429 */ )
1430 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1431 eval $ac_var=\$ac_val;;
1432 esac
1433 # Be sure to have absolute directory names.
b4e70030 1434 case $ac_val in
81ecdfbb
RW
1435 [\\/$]* | ?:[\\/]* ) continue;;
1436 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1437 esac
81ecdfbb 1438 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1439done
1440
bec39cab
AC
1441# There might be people who depend on the old broken behavior: `$host'
1442# used to hold the argument of --host etc.
1443# FIXME: To remove some day.
1444build=$build_alias
1445host=$host_alias
1446target=$target_alias
1447
1448# FIXME: To remove some day.
1449if test "x$host_alias" != x; then
1450 if test "x$build_alias" = x; then
1451 cross_compiling=maybe
81ecdfbb 1452 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1453 If a cross compiler is detected then cross compile mode will be used." >&2
1454 elif test "x$build_alias" != "x$host_alias"; then
1455 cross_compiling=yes
1456 fi
1457fi
c906108c 1458
bec39cab
AC
1459ac_tool_prefix=
1460test -n "$host_alias" && ac_tool_prefix=$host_alias-
1461
1462test "$silent" = yes && exec 6>/dev/null
c906108c 1463
c906108c 1464
81ecdfbb
RW
1465ac_pwd=`pwd` && test -n "$ac_pwd" &&
1466ac_ls_di=`ls -di .` &&
1467ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1468 as_fn_error "working directory cannot be determined"
1469test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1470 as_fn_error "pwd does not report name of working directory"
1471
1472
c906108c
SS
1473# Find the source files, if location was not specified.
1474if test -z "$srcdir"; then
1475 ac_srcdir_defaulted=yes
81ecdfbb
RW
1476 # Try the directory containing this script, then the parent directory.
1477 ac_confdir=`$as_dirname -- "$as_myself" ||
1478$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1479 X"$as_myself" : 'X\(//\)[^/]' \| \
1480 X"$as_myself" : 'X\(//\)$' \| \
1481 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1482$as_echo X"$as_myself" |
1483 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1484 s//\1/
1485 q
1486 }
1487 /^X\(\/\/\)[^/].*/{
1488 s//\1/
1489 q
1490 }
1491 /^X\(\/\/\)$/{
1492 s//\1/
1493 q
1494 }
1495 /^X\(\/\).*/{
1496 s//\1/
1497 q
1498 }
1499 s/.*/./; q'`
c906108c 1500 srcdir=$ac_confdir
81ecdfbb 1501 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1502 srcdir=..
1503 fi
1504else
1505 ac_srcdir_defaulted=no
1506fi
81ecdfbb
RW
1507if test ! -r "$srcdir/$ac_unique_file"; then
1508 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1509 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1510fi
1511ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1512ac_abs_confdir=`(
1513 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1514 pwd)`
1515# When building in place, set srcdir=.
1516if test "$ac_abs_confdir" = "$ac_pwd"; then
1517 srcdir=.
1518fi
1519# Remove unnecessary trailing slashes from srcdir.
1520# Double slashes in file names in object file debugging info
1521# mess up M-x gdb in Emacs.
1522case $srcdir in
1523*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1524esac
1525for ac_var in $ac_precious_vars; do
1526 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1527 eval ac_env_${ac_var}_value=\$${ac_var}
1528 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1529 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1530done
c906108c 1531
bec39cab
AC
1532#
1533# Report the --help message.
1534#
1535if test "$ac_init_help" = "long"; then
1536 # Omit some internal or obsolete options to make the list less imposing.
1537 # This message is too long to be a string in the A/UX 3.1 sh.
1538 cat <<_ACEOF
1539\`configure' configures this package to adapt to many kinds of systems.
1540
1541Usage: $0 [OPTION]... [VAR=VALUE]...
1542
1543To assign environment variables (e.g., CC, CFLAGS...), specify them as
1544VAR=VALUE. See below for descriptions of some of the useful variables.
1545
1546Defaults for the options are specified in brackets.
1547
1548Configuration:
1549 -h, --help display this help and exit
1550 --help=short display options specific to this package
1551 --help=recursive display the short help of all the included packages
1552 -V, --version display version information and exit
1553 -q, --quiet, --silent do not print \`checking...' messages
1554 --cache-file=FILE cache test results in FILE [disabled]
1555 -C, --config-cache alias for \`--cache-file=config.cache'
1556 -n, --no-create do not create output files
1557 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1558
bec39cab
AC
1559Installation directories:
1560 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1561 [$ac_default_prefix]
bec39cab 1562 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1563 [PREFIX]
bec39cab
AC
1564
1565By default, \`make install' will install all the files in
1566\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1567an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1568for instance \`--prefix=\$HOME'.
1569
1570For better control, use the options below.
1571
1572Fine tuning of the installation directories:
81ecdfbb
RW
1573 --bindir=DIR user executables [EPREFIX/bin]
1574 --sbindir=DIR system admin executables [EPREFIX/sbin]
1575 --libexecdir=DIR program executables [EPREFIX/libexec]
1576 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1577 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1578 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1579 --libdir=DIR object code libraries [EPREFIX/lib]
1580 --includedir=DIR C header files [PREFIX/include]
1581 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1582 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1583 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1584 --infodir=DIR info documentation [DATAROOTDIR/info]
1585 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1586 --mandir=DIR man documentation [DATAROOTDIR/man]
1587 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1588 --htmldir=DIR html documentation [DOCDIR]
1589 --dvidir=DIR dvi documentation [DOCDIR]
1590 --pdfdir=DIR pdf documentation [DOCDIR]
1591 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1592_ACEOF
1593
1594 cat <<\_ACEOF
1595
1596Program names:
1597 --program-prefix=PREFIX prepend PREFIX to installed program names
1598 --program-suffix=SUFFIX append SUFFIX to installed program names
1599 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1600
1601X features:
1602 --x-includes=DIR X include files are in DIR
1603 --x-libraries=DIR X library files are in DIR
1604
1605System types:
1606 --build=BUILD configure for building on BUILD [guessed]
1607 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1608 --target=TARGET configure for building compilers for TARGET [HOST]
1609_ACEOF
1610fi
1611
1612if test -n "$ac_init_help"; then
1613
1614 cat <<\_ACEOF
1615
1616Optional Features:
81ecdfbb 1617 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1618 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1619 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1620 --enable-maintainer-mode enable make rules and dependencies not useful
1621 (and sometimes confusing) to the casual installer
da2f07f1
JK
1622 --enable-plugins Enable support for plugins (defaults no)
1623 --disable-largefile omit support for large files
e28b3332
DJ
1624 --disable-dependency-tracking speeds up one-time build
1625 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1626 --enable-targets=TARGETS
1627 alternative target configurations
c0993dbe 1628 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1629 --disable-gdbcli disable command-line interface (CLI)
1630 --disable-gdbmi disable machine-interface (MI)
1631 --enable-tui enable full-screen terminal user interface (TUI)
1632 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1633 --enable-profiling enable profiling of GDB
3841debe 1634 --disable-rpath do not hardcode runtime library paths
a1220294 1635 --enable-werror treat compile warnings as errors
32c1c914 1636 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1637 --enable-gdb-build-warnings
32c1c914 1638 enable GDB specific build-time compiler warnings if
a1220294 1639 gcc is used
32c1c914 1640 --enable-sim link gdb with simulator
bec39cab 1641 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1642 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1643 is auto)
bec39cab
AC
1644
1645Optional Packages:
1646 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1647 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1648 --with-separate-debug-dir=PATH
32c1c914 1649 look for global separate debug info in this path
62e4f60c 1650 [LIBDIR/debug]
b14b1491
TT
1651 --with-gdb-datadir=PATH look for global separate data files in this path
1652 [DATADIR/gdb]
29b0e8a2 1653 --with-relocated-sources=PATH
32c1c914
TT
1654 automatically relocate this path for source files
1655 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1656 --with-curses use the curses library instead of the termcap
1657 library
c16158bc
JM
1658 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1659 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1660 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1661 --with-libiconv-prefix=DIR
1662 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1663 --with-system-readline use installed readline library
5c39566f 1664 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1665 --with-gnu-ld assume the C compiler uses GNU ld default=no
1666 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1667 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1668 --with-python[=PYTHON] include python support
1669 (auto/yes/no/<python-program>)
a1220294
TT
1670 --without-included-regex
1671 don't use included regex; this is the default on
1672 systems with version 2 of the GNU C library (use
1673 with caution on other system)
81ecdfbb 1674 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1675 --with-system-gdbinit=PATH
32c1c914 1676 automatically load a system-wide gdbinit file
5062cc19
KS
1677 --with-tcl directory containing tcl configuration (tclConfig.sh)
1678 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1679 --with-x use the X Window System
bec39cab
AC
1680
1681Some influential environment variables:
1682 CC C compiler command
1683 CFLAGS C compiler flags
1684 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1685 nonstandard directory <lib dir>
81ecdfbb
RW
1686 LIBS libraries to pass to the linker, e.g. -l<library>
1687 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1688 you have headers in a nonstandard directory <include dir>
bec39cab 1689 CPP C preprocessor
81ecdfbb
RW
1690 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1691 the first program found out of: `bison -y', `byacc', `yacc'.
1692 YFLAGS The list of arguments that will be passed by default to $YACC.
1693 This script will default YFLAGS to the empty string to avoid a
1694 default value of `-d' given by some make applications.
1695 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1696
1697Use these variables to override the choices made by `configure' or to help
1698it to find libraries and programs with nonstandard names/locations.
1699
81ecdfbb 1700Report bugs to the package provider.
bec39cab 1701_ACEOF
81ecdfbb 1702ac_status=$?
bec39cab
AC
1703fi
1704
1705if test "$ac_init_help" = "recursive"; then
1706 # If there are subdirs, report their specific --help.
bec39cab 1707 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1708 test -d "$ac_dir" ||
1709 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1710 continue
bec39cab
AC
1711 ac_builddir=.
1712
81ecdfbb
RW
1713case "$ac_dir" in
1714.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1715*)
1716 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1717 # A ".." for each directory in $ac_dir_suffix.
1718 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1719 case $ac_top_builddir_sub in
1720 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1721 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1722 esac ;;
1723esac
1724ac_abs_top_builddir=$ac_pwd
1725ac_abs_builddir=$ac_pwd$ac_dir_suffix
1726# for backward compatibility:
1727ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1728
1729case $srcdir in
81ecdfbb 1730 .) # We are building in place.
bec39cab 1731 ac_srcdir=.
81ecdfbb
RW
1732 ac_top_srcdir=$ac_top_builddir_sub
1733 ac_abs_top_srcdir=$ac_pwd ;;
1734 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1735 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1736 ac_top_srcdir=$srcdir
1737 ac_abs_top_srcdir=$srcdir ;;
1738 *) # Relative name.
1739 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1740 ac_top_srcdir=$ac_top_build_prefix$srcdir
1741 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1742esac
81ecdfbb 1743ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1744
81ecdfbb
RW
1745 cd "$ac_dir" || { ac_status=$?; continue; }
1746 # Check for guested configure.
1747 if test -f "$ac_srcdir/configure.gnu"; then
1748 echo &&
1749 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1750 elif test -f "$ac_srcdir/configure"; then
1751 echo &&
1752 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1753 else
81ecdfbb
RW
1754 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1755 fi || ac_status=$?
1756 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1757 done
1758fi
1759
81ecdfbb 1760test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1761if $ac_init_version; then
1762 cat <<\_ACEOF
81ecdfbb
RW
1763configure
1764generated by GNU Autoconf 2.64
bec39cab 1765
81ecdfbb 1766Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1767This configure script is free software; the Free Software Foundation
1768gives unlimited permission to copy, distribute and modify it.
1769_ACEOF
81ecdfbb 1770 exit
bec39cab 1771fi
bec39cab 1772
81ecdfbb
RW
1773## ------------------------ ##
1774## Autoconf initialization. ##
1775## ------------------------ ##
bec39cab 1776
81ecdfbb
RW
1777# ac_fn_c_try_compile LINENO
1778# --------------------------
1779# Try to compile conftest.$ac_ext, and return whether this succeeded.
1780ac_fn_c_try_compile ()
1781{
1782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783 rm -f conftest.$ac_objext
1784 if { { ac_try="$ac_compile"
1785case "(($ac_try" in
1786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787 *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791 (eval "$ac_compile") 2>conftest.err
1792 ac_status=$?
1793 if test -s conftest.err; then
1794 grep -v '^ *+' conftest.err >conftest.er1
1795 cat conftest.er1 >&5
1796 mv -f conftest.er1 conftest.err
1797 fi
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; } && {
1800 test -z "$ac_c_werror_flag" ||
1801 test ! -s conftest.err
1802 } && test -s conftest.$ac_objext; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1807
81ecdfbb
RW
1808 ac_retval=1
1809fi
1810 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1811 return $ac_retval
1812
1813} # ac_fn_c_try_compile
1814
1815# ac_fn_c_try_cpp LINENO
1816# ----------------------
1817# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1818ac_fn_c_try_cpp ()
bec39cab 1819{
81ecdfbb
RW
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 if { { ac_try="$ac_cpp conftest.$ac_ext"
1822case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1829 ac_status=$?
1830 if test -s conftest.err; then
1831 grep -v '^ *+' conftest.err >conftest.er1
1832 cat conftest.er1 >&5
1833 mv -f conftest.er1 conftest.err
1834 fi
1835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1836 test $ac_status = 0; } >/dev/null && {
1837 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1838 test ! -s conftest.err
1839 }; then :
1840 ac_retval=0
1841else
1842 $as_echo "$as_me: failed program was:" >&5
1843sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1844
81ecdfbb
RW
1845 ac_retval=1
1846fi
1847 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1848 return $ac_retval
bec39cab 1849
81ecdfbb 1850} # ac_fn_c_try_cpp
bec39cab 1851
81ecdfbb
RW
1852# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1853# -------------------------------------------------------
1854# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1855# the include files in INCLUDES and setting the cache variable VAR
1856# accordingly.
1857ac_fn_c_check_header_mongrel ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1862$as_echo_n "checking for $2... " >&6; }
1863if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1864 $as_echo_n "(cached) " >&6
1865fi
1866eval ac_res=\$$3
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1868$as_echo "$ac_res" >&6; }
1869else
1870 # Is the header compilable?
1871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1872$as_echo_n "checking $2 usability... " >&6; }
1873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876#include <$2>
1877_ACEOF
1878if ac_fn_c_try_compile "$LINENO"; then :
1879 ac_header_compiler=yes
1880else
1881 ac_header_compiler=no
1882fi
1883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1885$as_echo "$ac_header_compiler" >&6; }
bec39cab 1886
81ecdfbb
RW
1887# Is the header present?
1888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1889$as_echo_n "checking $2 presence... " >&6; }
1890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892#include <$2>
1893_ACEOF
1894if ac_fn_c_try_cpp "$LINENO"; then :
1895 ac_header_preproc=yes
1896else
1897 ac_header_preproc=no
1898fi
1899rm -f conftest.err conftest.$ac_ext
1900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1901$as_echo "$ac_header_preproc" >&6; }
bec39cab 1902
81ecdfbb
RW
1903# So? What about this header?
1904case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1905 yes:no: )
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1907$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1909$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1910 ;;
1911 no:yes:* )
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1913$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1915$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1917$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1919$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1921$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1922 ;;
1923esac
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1925$as_echo_n "checking for $2... " >&6; }
1926if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1927 $as_echo_n "(cached) " >&6
1928else
1929 eval "$3=\$ac_header_compiler"
1930fi
1931eval ac_res=\$$3
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933$as_echo "$ac_res" >&6; }
1934fi
1935 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1936
81ecdfbb 1937} # ac_fn_c_check_header_mongrel
bec39cab 1938
81ecdfbb
RW
1939# ac_fn_c_try_run LINENO
1940# ----------------------
1941# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1942# that executables *can* be run.
1943ac_fn_c_try_run ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 if { { ac_try="$ac_link"
1947case "(($ac_try" in
1948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949 *) ac_try_echo=$ac_try;;
1950esac
1951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1952$as_echo "$ac_try_echo"; } >&5
1953 (eval "$ac_link") 2>&5
1954 ac_status=$?
1955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1957 { { case "(($ac_try" in
1958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959 *) ac_try_echo=$ac_try;;
1960esac
1961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962$as_echo "$ac_try_echo"; } >&5
1963 (eval "$ac_try") 2>&5
1964 ac_status=$?
1965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1966 test $ac_status = 0; }; }; then :
1967 ac_retval=0
1968else
1969 $as_echo "$as_me: program exited with status $ac_status" >&5
1970 $as_echo "$as_me: failed program was:" >&5
1971sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1972
81ecdfbb
RW
1973 ac_retval=$ac_status
1974fi
1975 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1976 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1977 return $ac_retval
bec39cab 1978
81ecdfbb 1979} # ac_fn_c_try_run
bec39cab 1980
81ecdfbb
RW
1981# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1982# -------------------------------------------------------
1983# Tests whether HEADER exists and can be compiled using the include files in
1984# INCLUDES, setting the cache variable VAR accordingly.
1985ac_fn_c_check_header_compile ()
1986{
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989$as_echo_n "checking for $2... " >&6; }
1990if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1991 $as_echo_n "(cached) " >&6
1992else
1993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$4
1996#include <$2>
bec39cab 1997_ACEOF
81ecdfbb
RW
1998if ac_fn_c_try_compile "$LINENO"; then :
1999 eval "$3=yes"
2000else
2001 eval "$3=no"
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2004fi
2005eval ac_res=\$$3
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2007$as_echo "$ac_res" >&6; }
2008 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2009
81ecdfbb 2010} # ac_fn_c_check_header_compile
bec39cab 2011
81ecdfbb
RW
2012# ac_fn_c_try_link LINENO
2013# -----------------------
2014# Try to link conftest.$ac_ext, and return whether this succeeded.
2015ac_fn_c_try_link ()
b4e70030 2016{
81ecdfbb
RW
2017 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2018 rm -f conftest.$ac_objext conftest$ac_exeext
2019 if { { ac_try="$ac_link"
2020case "(($ac_try" in
2021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2022 *) ac_try_echo=$ac_try;;
2023esac
2024eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2025$as_echo "$ac_try_echo"; } >&5
2026 (eval "$ac_link") 2>conftest.err
2027 ac_status=$?
2028 if test -s conftest.err; then
2029 grep -v '^ *+' conftest.err >conftest.er1
2030 cat conftest.er1 >&5
2031 mv -f conftest.er1 conftest.err
2032 fi
2033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2034 test $ac_status = 0; } && {
2035 test -z "$ac_c_werror_flag" ||
2036 test ! -s conftest.err
2037 } && test -s conftest$ac_exeext && {
2038 test "$cross_compiling" = yes ||
2039 $as_test_x conftest$ac_exeext
2040 }; then :
2041 ac_retval=0
2042else
2043 $as_echo "$as_me: failed program was:" >&5
2044sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2045
81ecdfbb
RW
2046 ac_retval=1
2047fi
2048 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2049 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2050 # interfere with the next link command; also delete a directory that is
2051 # left behind by Apple's compiler. We do this before executing the actions.
2052 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2053 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2054 return $ac_retval
bec39cab 2055
81ecdfbb 2056} # ac_fn_c_try_link
bec39cab 2057
81ecdfbb
RW
2058# ac_fn_c_check_func LINENO FUNC VAR
2059# ----------------------------------
2060# Tests whether FUNC exists, setting the cache variable VAR accordingly
2061ac_fn_c_check_func ()
2062{
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2065$as_echo_n "checking for $2... " >&6; }
2066if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2067 $as_echo_n "(cached) " >&6
2068else
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2073#define $2 innocuous_$2
bec39cab 2074
81ecdfbb
RW
2075/* System header to define __stub macros and hopefully few prototypes,
2076 which can conflict with char $2 (); below.
2077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2078 <limits.h> exists even on freestanding compilers. */
bec39cab 2079
81ecdfbb
RW
2080#ifdef __STDC__
2081# include <limits.h>
2082#else
2083# include <assert.h>
2084#endif
bec39cab 2085
81ecdfbb 2086#undef $2
bec39cab 2087
81ecdfbb
RW
2088/* Override any GCC internal prototype to avoid an error.
2089 Use char because int might match the return type of a GCC
2090 builtin and then its argument prototype would still apply. */
2091#ifdef __cplusplus
2092extern "C"
2093#endif
2094char $2 ();
2095/* The GNU C library defines this for functions which it implements
2096 to always fail with ENOSYS. Some functions are actually named
2097 something starting with __ and the normal name is an alias. */
2098#if defined __stub_$2 || defined __stub___$2
2099choke me
2100#endif
bec39cab 2101
81ecdfbb
RW
2102int
2103main ()
2104{
2105return $2 ();
2106 ;
2107 return 0;
2108}
bec39cab 2109_ACEOF
81ecdfbb
RW
2110if ac_fn_c_try_link "$LINENO"; then :
2111 eval "$3=yes"
2112else
2113 eval "$3=no"
2114fi
2115rm -f core conftest.err conftest.$ac_objext \
2116 conftest$ac_exeext conftest.$ac_ext
2117fi
2118eval ac_res=\$$3
2119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2120$as_echo "$ac_res" >&6; }
2121 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2122
81ecdfbb 2123} # ac_fn_c_check_func
bec39cab 2124
81ecdfbb
RW
2125# ac_fn_c_check_decl LINENO SYMBOL VAR
2126# ------------------------------------
2127# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2128ac_fn_c_check_decl ()
2129{
2130 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2131 as_decl_name=`echo $2|sed 's/ *(.*//'`
2132 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2134$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2135if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2136 $as_echo_n "(cached) " >&6
2137else
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
e7a30f46
DE
2144#ifndef $as_decl_name
2145#ifdef __cplusplus
2146 (void) $as_decl_use;
2147#else
2148 (void) $as_decl_name;
2149#endif
81ecdfbb 2150#endif
bec39cab 2151
81ecdfbb
RW
2152 ;
2153 return 0;
2154}
bec39cab 2155_ACEOF
81ecdfbb
RW
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 eval "$3=yes"
2158else
2159 eval "$3=no"
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162fi
2163eval ac_res=\$$3
2164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2165$as_echo "$ac_res" >&6; }
2166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2167
81ecdfbb 2168} # ac_fn_c_check_decl
bec39cab 2169
81ecdfbb
RW
2170# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2171# --------------------------------------------
2172# Tries to find the compile-time value of EXPR in a program that includes
2173# INCLUDES, setting VAR accordingly. Returns whether the value could be
2174# computed
2175ac_fn_c_compute_int ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 if test "$cross_compiling" = yes; then
2179 # Depending upon the size, compute the lo and hi bounds.
2180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183int
2184main ()
2185{
2186static int test_array [1 - 2 * !(($2) >= 0)];
2187test_array [0] = 0
bec39cab 2188
81ecdfbb
RW
2189 ;
2190 return 0;
2191}
2192_ACEOF
2193if ac_fn_c_try_compile "$LINENO"; then :
2194 ac_lo=0 ac_mid=0
2195 while :; do
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
2198$4
2199int
2200main ()
2201{
2202static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2203test_array [0] = 0
bec39cab 2204
81ecdfbb
RW
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_compile "$LINENO"; then :
2210 ac_hi=$ac_mid; break
2211else
2212 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2213 if test $ac_lo -le $ac_mid; then
2214 ac_lo= ac_hi=
2215 break
2216 fi
2217 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2218fi
81ecdfbb
RW
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220 done
c906108c 2221else
81ecdfbb
RW
2222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h. */
2224$4
2225int
2226main ()
2227{
2228static int test_array [1 - 2 * !(($2) < 0)];
2229test_array [0] = 0
bec39cab 2230
81ecdfbb
RW
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_compile "$LINENO"; then :
2236 ac_hi=-1 ac_mid=-1
2237 while :; do
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$4
2241int
2242main ()
2243{
2244static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2245test_array [0] = 0
bec39cab 2246
81ecdfbb
RW
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_compile "$LINENO"; then :
2252 ac_lo=$ac_mid; break
2253else
2254 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2255 if test $ac_mid -le $ac_hi; then
2256 ac_lo= ac_hi=
2257 break
2258 fi
2259 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262 done
2263else
2264 ac_lo= ac_hi=
2265fi
2266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2267fi
2268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269# Binary search between lo and hi bounds.
2270while test "x$ac_lo" != "x$ac_hi"; do
2271 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$4
2275int
2276main ()
2277{
2278static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2279test_array [0] = 0
bec39cab 2280
81ecdfbb
RW
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 ac_hi=$ac_mid
2287else
2288 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291done
2292case $ac_lo in #((
2293?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2294'') ac_retval=1 ;;
2295esac
2296 else
2297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h. */
2299$4
2300static long int longval () { return $2; }
2301static unsigned long int ulongval () { return $2; }
2302#include <stdio.h>
2303#include <stdlib.h>
2304int
2305main ()
2306{
bec39cab 2307
81ecdfbb
RW
2308 FILE *f = fopen ("conftest.val", "w");
2309 if (! f)
2310 return 1;
2311 if (($2) < 0)
2312 {
2313 long int i = longval ();
2314 if (i != ($2))
2315 return 1;
2316 fprintf (f, "%ld", i);
2317 }
2318 else
2319 {
2320 unsigned long int i = ulongval ();
2321 if (i != ($2))
2322 return 1;
2323 fprintf (f, "%lu", i);
2324 }
2325 /* Do not output a trailing newline, as this causes \r\n confusion
2326 on some platforms. */
2327 return ferror (f) || fclose (f) != 0;
bec39cab 2328
81ecdfbb
RW
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_run "$LINENO"; then :
2334 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2335else
2336 ac_retval=1
2337fi
2338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2339 conftest.$ac_objext conftest.beam conftest.$ac_ext
2340rm -f conftest.val
bec39cab 2341
81ecdfbb
RW
2342 fi
2343 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2344 return $ac_retval
bec39cab 2345
81ecdfbb 2346} # ac_fn_c_compute_int
bec39cab 2347
81ecdfbb
RW
2348# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2349# ----------------------------------------------------
2350# Tries to find if the field MEMBER exists in type AGGR, after including
2351# INCLUDES, setting cache variable VAR accordingly.
2352ac_fn_c_check_member ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2356$as_echo_n "checking for $2.$3... " >&6; }
2357if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$5
2363int
2364main ()
2365{
2366static $2 ac_aggr;
2367if (ac_aggr.$3)
2368return 0;
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$4=yes"
2375else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h. */
2378$5
2379int
2380main ()
2381{
2382static $2 ac_aggr;
2383if (sizeof ac_aggr.$3)
2384return 0;
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$4=yes"
2391else
2392 eval "$4=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$4
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2402
81ecdfbb 2403} # ac_fn_c_check_member
bec39cab 2404
81ecdfbb
RW
2405# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2406# -------------------------------------------
2407# Tests whether TYPE exists after having included INCLUDES, setting cache
2408# variable VAR accordingly.
2409ac_fn_c_check_type ()
2410{
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2413$as_echo_n "checking for $2... " >&6; }
2414if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2415 $as_echo_n "(cached) " >&6
2416else
2417 eval "$3=no"
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 :
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$4
2434int
2435main ()
2436{
2437if (sizeof (($2)))
2438 return 0;
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2444
81ecdfbb
RW
2445else
2446 eval "$3=yes"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452eval ac_res=\$$3
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454$as_echo "$ac_res" >&6; }
2455 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2456
81ecdfbb
RW
2457} # ac_fn_c_check_type
2458cat >config.log <<_ACEOF
2459This file contains any messages produced by compilers while
2460running configure, to aid debugging if configure makes a mistake.
d5af19ba 2461
81ecdfbb
RW
2462It was created by $as_me, which was
2463generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2464
81ecdfbb 2465 $ $0 $@
413ccac7 2466
81ecdfbb
RW
2467_ACEOF
2468exec 5>>config.log
2469{
2470cat <<_ASUNAME
2471## --------- ##
2472## Platform. ##
2473## --------- ##
413ccac7 2474
81ecdfbb
RW
2475hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2476uname -m = `(uname -m) 2>/dev/null || echo unknown`
2477uname -r = `(uname -r) 2>/dev/null || echo unknown`
2478uname -s = `(uname -s) 2>/dev/null || echo unknown`
2479uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2480
81ecdfbb
RW
2481/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2482/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2483
81ecdfbb
RW
2484/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2485/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2486/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2487/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2488/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2489/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2490/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2491
81ecdfbb 2492_ASUNAME
bec39cab 2493
bec39cab
AC
2494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495for as_dir in $PATH
2496do
2497 IFS=$as_save_IFS
2498 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2499 $as_echo "PATH: $as_dir"
2500 done
2501IFS=$as_save_IFS
bec39cab 2502
81ecdfbb 2503} >&5
bec39cab 2504
81ecdfbb 2505cat >&5 <<_ACEOF
bec39cab 2506
bec39cab 2507
81ecdfbb
RW
2508## ----------- ##
2509## Core tests. ##
2510## ----------- ##
2511
2512_ACEOF
2513
2514
2515# Keep a trace of the command line.
2516# Strip out --no-create and --no-recursion so they do not pile up.
2517# Strip out --silent because we don't want to record it for future runs.
2518# Also quote any args containing shell meta-characters.
2519# Make two passes to allow for proper duplicate-argument suppression.
2520ac_configure_args=
2521ac_configure_args0=
2522ac_configure_args1=
2523ac_must_keep_next=false
2524for ac_pass in 1 2
2525do
2526 for ac_arg
2527 do
2528 case $ac_arg in
2529 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2531 | -silent | --silent | --silen | --sile | --sil)
2532 continue ;;
2533 *\'*)
2534 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2535 esac
2536 case $ac_pass in
2537 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2538 2)
2539 as_fn_append ac_configure_args1 " '$ac_arg'"
2540 if test $ac_must_keep_next = true; then
2541 ac_must_keep_next=false # Got value, back to normal.
2542 else
2543 case $ac_arg in
2544 *=* | --config-cache | -C | -disable-* | --disable-* \
2545 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2546 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2547 | -with-* | --with-* | -without-* | --without-* | --x)
2548 case "$ac_configure_args0 " in
2549 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2550 esac
2551 ;;
2552 -* ) ac_must_keep_next=true ;;
2553 esac
2554 fi
2555 as_fn_append ac_configure_args " '$ac_arg'"
2556 ;;
2557 esac
2558 done
2559done
2560{ ac_configure_args0=; unset ac_configure_args0;}
2561{ ac_configure_args1=; unset ac_configure_args1;}
2562
2563# When interrupted or exit'd, cleanup temporary files, and complete
2564# config.log. We remove comments because anyway the quotes in there
2565# would cause problems or look ugly.
2566# WARNING: Use '\'' to represent an apostrophe within the trap.
2567# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2568trap 'exit_status=$?
2569 # Save into config.log some information that might help in debugging.
2570 {
2571 echo
2572
2573 cat <<\_ASBOX
2574## ---------------- ##
2575## Cache variables. ##
2576## ---------------- ##
2577_ASBOX
2578 echo
2579 # The following way of writing the cache mishandles newlines in values,
2580(
2581 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2582 eval ac_val=\$$ac_var
2583 case $ac_val in #(
2584 *${as_nl}*)
2585 case $ac_var in #(
2586 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2587$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2588 esac
2589 case $ac_var in #(
2590 _ | IFS | as_nl) ;; #(
2591 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2592 *) { eval $ac_var=; unset $ac_var;} ;;
2593 esac ;;
2594 esac
2595 done
2596 (set) 2>&1 |
2597 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2598 *${as_nl}ac_space=\ *)
2599 sed -n \
2600 "s/'\''/'\''\\\\'\'''\''/g;
2601 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2602 ;; #(
2603 *)
2604 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2605 ;;
2606 esac |
2607 sort
2608)
2609 echo
2610
2611 cat <<\_ASBOX
2612## ----------------- ##
2613## Output variables. ##
2614## ----------------- ##
2615_ASBOX
2616 echo
2617 for ac_var in $ac_subst_vars
2618 do
2619 eval ac_val=\$$ac_var
2620 case $ac_val in
2621 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2622 esac
2623 $as_echo "$ac_var='\''$ac_val'\''"
2624 done | sort
2625 echo
2626
2627 if test -n "$ac_subst_files"; then
2628 cat <<\_ASBOX
2629## ------------------- ##
2630## File substitutions. ##
2631## ------------------- ##
2632_ASBOX
2633 echo
2634 for ac_var in $ac_subst_files
2635 do
2636 eval ac_val=\$$ac_var
2637 case $ac_val in
2638 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2639 esac
2640 $as_echo "$ac_var='\''$ac_val'\''"
2641 done | sort
2642 echo
2643 fi
2644
2645 if test -s confdefs.h; then
2646 cat <<\_ASBOX
2647## ----------- ##
2648## confdefs.h. ##
2649## ----------- ##
2650_ASBOX
2651 echo
2652 cat confdefs.h
2653 echo
2654 fi
2655 test "$ac_signal" != 0 &&
2656 $as_echo "$as_me: caught signal $ac_signal"
2657 $as_echo "$as_me: exit $exit_status"
2658 } >&5
2659 rm -f core *.core core.conftest.* &&
2660 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2661 exit $exit_status
2662' 0
2663for ac_signal in 1 2 13 15; do
2664 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2665done
2666ac_signal=0
2667
2668# confdefs.h avoids OS command line length limits that DEFS can exceed.
2669rm -f -r conftest* confdefs.h
2670
2671$as_echo "/* confdefs.h */" > confdefs.h
2672
2673# Predefined preprocessor variables.
2674
2675cat >>confdefs.h <<_ACEOF
2676#define PACKAGE_NAME "$PACKAGE_NAME"
2677_ACEOF
2678
2679cat >>confdefs.h <<_ACEOF
2680#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2681_ACEOF
2682
2683cat >>confdefs.h <<_ACEOF
2684#define PACKAGE_VERSION "$PACKAGE_VERSION"
2685_ACEOF
2686
2687cat >>confdefs.h <<_ACEOF
2688#define PACKAGE_STRING "$PACKAGE_STRING"
2689_ACEOF
2690
2691cat >>confdefs.h <<_ACEOF
2692#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2693_ACEOF
2694
2695cat >>confdefs.h <<_ACEOF
2696#define PACKAGE_URL "$PACKAGE_URL"
2697_ACEOF
2698
2699
2700# Let the site file select an alternate cache file if it wants to.
2701# Prefer an explicitly selected file to automatically selected ones.
2702ac_site_file1=NONE
2703ac_site_file2=NONE
2704if test -n "$CONFIG_SITE"; then
2705 ac_site_file1=$CONFIG_SITE
2706elif test "x$prefix" != xNONE; then
2707 ac_site_file1=$prefix/share/config.site
2708 ac_site_file2=$prefix/etc/config.site
2709else
2710 ac_site_file1=$ac_default_prefix/share/config.site
2711 ac_site_file2=$ac_default_prefix/etc/config.site
2712fi
2713for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2714do
2715 test "x$ac_site_file" = xNONE && continue
2716 if test -r "$ac_site_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2718$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2719 sed 's/^/| /' "$ac_site_file" >&5
2720 . "$ac_site_file"
2721 fi
2722done
2723
2724if test -r "$cache_file"; then
2725 # Some versions of bash will fail to source /dev/null (special
2726 # files actually), so we avoid doing that.
2727 if test -f "$cache_file"; then
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2729$as_echo "$as_me: loading cache $cache_file" >&6;}
2730 case $cache_file in
2731 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2732 *) . "./$cache_file";;
2733 esac
2734 fi
2735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2737$as_echo "$as_me: creating cache $cache_file" >&6;}
2738 >$cache_file
bec39cab
AC
2739fi
2740
f434ba03
PA
2741gl_header_list="$gl_header_list sys/mman.h"
2742gl_func_list="$gl_func_list mprotect"
2743gl_func_list="$gl_func_list memchr"
2744gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2745gl_header_list="$gl_header_list stdint.h"
2746gl_header_list="$gl_header_list wchar.h"
2747gl_header_list="$gl_header_list string.h"
2748# Check that the precious variables saved in the cache have kept the same
2749# value.
2750ac_cache_corrupted=false
2751for ac_var in $ac_precious_vars; do
2752 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2753 eval ac_new_set=\$ac_env_${ac_var}_set
2754 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2755 eval ac_new_val=\$ac_env_${ac_var}_value
2756 case $ac_old_set,$ac_new_set in
2757 set,)
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2759$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2760 ac_cache_corrupted=: ;;
2761 ,set)
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2763$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2764 ac_cache_corrupted=: ;;
2765 ,);;
2766 *)
2767 if test "x$ac_old_val" != "x$ac_new_val"; then
2768 # differences in whitespace do not lead to failure.
2769 ac_old_val_w=`echo x $ac_old_val`
2770 ac_new_val_w=`echo x $ac_new_val`
2771 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2773$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2774 ac_cache_corrupted=:
2775 else
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2777$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2778 eval $ac_var=\$ac_old_val
2779 fi
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2781$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2783$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2784 fi;;
2785 esac
2786 # Pass precious variables to config.status.
2787 if test "$ac_new_set" = set; then
2788 case $ac_new_val in
2789 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2790 *) ac_arg=$ac_var=$ac_new_val ;;
2791 esac
2792 case " $ac_configure_args " in
2793 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2794 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2795 esac
2796 fi
2797done
2798if $ac_cache_corrupted; then
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2802$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2803 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2804fi
2805## -------------------- ##
2806## Main body of script. ##
2807## -------------------- ##
2808
2809ac_ext=c
2810ac_cpp='$CPP $CPPFLAGS'
2811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2813ac_compiler_gnu=$ac_cv_c_compiler_gnu
2814
2815
2816
2817
2818
2819ac_config_headers="$ac_config_headers config.h:config.in"
2820
2821
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2823$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2824 # Check whether --enable-maintainer-mode was given.
2825if test "${enable_maintainer_mode+set}" = set; then :
2826 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2827else
2828 USE_MAINTAINER_MODE=no
2829fi
2830
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2832$as_echo "$USE_MAINTAINER_MODE" >&6; }
2833 if test $USE_MAINTAINER_MODE = yes; then
2834 MAINTAINER_MODE_TRUE=
2835 MAINTAINER_MODE_FALSE='#'
2836else
2837 MAINTAINER_MODE_TRUE='#'
2838 MAINTAINER_MODE_FALSE=
2839fi
2840
2841 MAINT=$MAINTAINER_MODE_TRUE
2842
2843
2844
2845ac_ext=c
2846ac_cpp='$CPP $CPPFLAGS'
2847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2849ac_compiler_gnu=$ac_cv_c_compiler_gnu
2850if test -n "$ac_tool_prefix"; then
2851 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2852set dummy ${ac_tool_prefix}gcc; ac_word=$2
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2854$as_echo_n "checking for $ac_word... " >&6; }
2855if test "${ac_cv_prog_CC+set}" = set; then :
2856 $as_echo_n "(cached) " >&6
c906108c
SS
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
bec39cab
AC
2861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2862for as_dir in $PATH
2863do
2864 IFS=$as_save_IFS
2865 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2866 for ac_exec_ext in '' $ac_executable_extensions; do
2867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2868 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2870 break 2
2871 fi
2872done
81ecdfbb
RW
2873 done
2874IFS=$as_save_IFS
bec39cab 2875
c906108c
SS
2876fi
2877fi
bec39cab 2878CC=$ac_cv_prog_CC
c906108c 2879if test -n "$CC"; then
81ecdfbb
RW
2880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2881$as_echo "$CC" >&6; }
c906108c 2882else
81ecdfbb
RW
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2884$as_echo "no" >&6; }
c906108c
SS
2885fi
2886
81ecdfbb 2887
b4e70030
JB
2888fi
2889if test -z "$ac_cv_prog_CC"; then
2890 ac_ct_CC=$CC
81ecdfbb
RW
2891 # Extract the first word of "gcc", so it can be a program name with args.
2892set dummy gcc; ac_word=$2
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
2895if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2896 $as_echo_n "(cached) " >&6
b4e70030
JB
2897else
2898 if test -n "$ac_ct_CC"; then
2899 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2900else
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2908 ac_cv_prog_ac_ct_CC="gcc"
2909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2910 break 2
4e8d927d 2911 fi
b4e70030 2912done
81ecdfbb
RW
2913 done
2914IFS=$as_save_IFS
b4e70030
JB
2915
2916fi
2917fi
2918ac_ct_CC=$ac_cv_prog_ac_ct_CC
2919if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2921$as_echo "$ac_ct_CC" >&6; }
b4e70030 2922else
81ecdfbb
RW
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
b4e70030
JB
2925fi
2926
81ecdfbb
RW
2927 if test "x$ac_ct_CC" = x; then
2928 CC=""
2929 else
2930 case $cross_compiling:$ac_tool_warned in
2931yes:)
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2933$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2934ac_tool_warned=yes ;;
2935esac
2936 CC=$ac_ct_CC
2937 fi
b4e70030
JB
2938else
2939 CC="$ac_cv_prog_CC"
2940fi
2941
c906108c 2942if test -z "$CC"; then
81ecdfbb
RW
2943 if test -n "$ac_tool_prefix"; then
2944 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2945set dummy ${ac_tool_prefix}cc; ac_word=$2
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2947$as_echo_n "checking for $ac_word... " >&6; }
2948if test "${ac_cv_prog_CC+set}" = set; then :
2949 $as_echo_n "(cached) " >&6
c906108c
SS
2950else
2951 if test -n "$CC"; then
2952 ac_cv_prog_CC="$CC" # Let the user override the test.
2953else
bec39cab
AC
2954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2955for as_dir in $PATH
2956do
2957 IFS=$as_save_IFS
2958 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2959 for ac_exec_ext in '' $ac_executable_extensions; do
2960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2961 ac_cv_prog_CC="${ac_tool_prefix}cc"
2962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2963 break 2
2964 fi
2965done
81ecdfbb
RW
2966 done
2967IFS=$as_save_IFS
2968
2969fi
2970fi
2971CC=$ac_cv_prog_CC
2972if test -n "$CC"; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2974$as_echo "$CC" >&6; }
2975else
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2977$as_echo "no" >&6; }
2978fi
2979
2980
2981 fi
2982fi
2983if test -z "$CC"; then
2984 # Extract the first word of "cc", so it can be a program name with args.
2985set dummy cc; ac_word=$2
2986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2987$as_echo_n "checking for $ac_word... " >&6; }
2988if test "${ac_cv_prog_CC+set}" = set; then :
2989 $as_echo_n "(cached) " >&6
2990else
2991 if test -n "$CC"; then
2992 ac_cv_prog_CC="$CC" # Let the user override the test.
2993else
2994 ac_prog_rejected=no
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998 IFS=$as_save_IFS
2999 test -z "$as_dir" && as_dir=.
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3002 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3003 ac_prog_rejected=yes
3004 continue
3005 fi
3006 ac_cv_prog_CC="cc"
3007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3008 break 2
3009 fi
3010done
3011 done
3012IFS=$as_save_IFS
bec39cab 3013
c906108c
SS
3014if test $ac_prog_rejected = yes; then
3015 # We found a bogon in the path, so make sure we never use it.
3016 set dummy $ac_cv_prog_CC
3017 shift
bec39cab 3018 if test $# != 0; then
c906108c
SS
3019 # We chose a different compiler from the bogus one.
3020 # However, it has the same basename, so the bogon will be chosen
3021 # first if we set CC to just the basename; use the full file name.
3022 shift
bec39cab 3023 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3024 fi
3025fi
3026fi
3027fi
bec39cab 3028CC=$ac_cv_prog_CC
c906108c 3029if test -n "$CC"; then
81ecdfbb
RW
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3031$as_echo "$CC" >&6; }
c906108c 3032else
81ecdfbb
RW
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3034$as_echo "no" >&6; }
c906108c
SS
3035fi
3036
81ecdfbb 3037
bec39cab
AC
3038fi
3039if test -z "$CC"; then
3040 if test -n "$ac_tool_prefix"; then
81ecdfbb 3041 for ac_prog in cl.exe
bec39cab
AC
3042 do
3043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3046$as_echo_n "checking for $ac_word... " >&6; }
3047if test "${ac_cv_prog_CC+set}" = set; then :
3048 $as_echo_n "(cached) " >&6
c906108c
SS
3049else
3050 if test -n "$CC"; then
3051 ac_cv_prog_CC="$CC" # Let the user override the test.
3052else
bec39cab
AC
3053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3054for as_dir in $PATH
3055do
3056 IFS=$as_save_IFS
3057 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3058 for ac_exec_ext in '' $ac_executable_extensions; do
3059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3060 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3062 break 2
3063 fi
3064done
81ecdfbb
RW
3065 done
3066IFS=$as_save_IFS
bec39cab 3067
c906108c
SS
3068fi
3069fi
bec39cab 3070CC=$ac_cv_prog_CC
c906108c 3071if test -n "$CC"; then
81ecdfbb
RW
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3073$as_echo "$CC" >&6; }
c906108c 3074else
81ecdfbb
RW
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3076$as_echo "no" >&6; }
c906108c 3077fi
bec39cab 3078
81ecdfbb 3079
bec39cab
AC
3080 test -n "$CC" && break
3081 done
3082fi
3083if test -z "$CC"; then
3084 ac_ct_CC=$CC
81ecdfbb 3085 for ac_prog in cl.exe
bec39cab
AC
3086do
3087 # Extract the first word of "$ac_prog", so it can be a program name with args.
3088set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3090$as_echo_n "checking for $ac_word... " >&6; }
3091if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3092 $as_echo_n "(cached) " >&6
bec39cab
AC
3093else
3094 if test -n "$ac_ct_CC"; then
3095 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3096else
3097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098for as_dir in $PATH
3099do
3100 IFS=$as_save_IFS
3101 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3102 for ac_exec_ext in '' $ac_executable_extensions; do
3103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3104 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3106 break 2
c906108c 3107 fi
bec39cab 3108done
81ecdfbb
RW
3109 done
3110IFS=$as_save_IFS
bec39cab
AC
3111
3112fi
3113fi
3114ac_ct_CC=$ac_cv_prog_ac_ct_CC
3115if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3117$as_echo "$ac_ct_CC" >&6; }
bec39cab 3118else
81ecdfbb
RW
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
c906108c
SS
3121fi
3122
81ecdfbb 3123
bec39cab
AC
3124 test -n "$ac_ct_CC" && break
3125done
c906108c 3126
81ecdfbb
RW
3127 if test "x$ac_ct_CC" = x; then
3128 CC=""
3129 else
3130 case $cross_compiling:$ac_tool_warned in
3131yes:)
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3134ac_tool_warned=yes ;;
3135esac
3136 CC=$ac_ct_CC
3137 fi
bec39cab
AC
3138fi
3139
3140fi
3141
3142
81ecdfbb
RW
3143test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3145as_fn_error "no acceptable C compiler found in \$PATH
3146See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3147
3148# Provide some information about the compiler.
81ecdfbb
RW
3149$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3150set X $ac_compile
3151ac_compiler=$2
3152for ac_option in --version -v -V -qversion; do
3153 { { ac_try="$ac_compiler $ac_option >&5"
3154case "(($ac_try" in
3155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3156 *) ac_try_echo=$ac_try;;
3157esac
3158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3159$as_echo "$ac_try_echo"; } >&5
3160 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3161 ac_status=$?
81ecdfbb
RW
3162 if test -s conftest.err; then
3163 sed '10a\
3164... rest of stderr output deleted ...
3165 10q' conftest.err >conftest.er1
3166 cat conftest.er1 >&5
3167 rm -f conftest.er1 conftest.err
3168 fi
3169 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3170 test $ac_status = 0; }
3171done
bec39cab 3172
81ecdfbb 3173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3174/* end confdefs.h. */
3175
3176int
3177main ()
3178{
3179
3180 ;
3181 return 0;
3182}
3183_ACEOF
3184ac_clean_files_save=$ac_clean_files
81ecdfbb 3185ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3186# Try to create an executable without -o first, disregard a.out.
3187# It will help us diagnose broken compilers, and finding out an intuition
3188# of exeext.
81ecdfbb
RW
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3190$as_echo_n "checking for C compiler default output file name... " >&6; }
3191ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3192
3193# The possible output files:
3194ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3195
3196ac_rmfiles=
3197for ac_file in $ac_files
3198do
3199 case $ac_file in
3200 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3201 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3202 esac
3203done
3204rm -f $ac_rmfiles
3205
3206if { { ac_try="$ac_link_default"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
3211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3212$as_echo "$ac_try_echo"; } >&5
3213 (eval "$ac_link_default") 2>&5
3214 ac_status=$?
3215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3216 test $ac_status = 0; }; then :
3217 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3218# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3219# in a Makefile. We should not override ac_cv_exeext if it was cached,
3220# so that the user can short-circuit this test for compilers unknown to
3221# Autoconf.
3222for ac_file in $ac_files ''
bec39cab
AC
3223do
3224 test -f "$ac_file" || continue
3225 case $ac_file in
81ecdfbb 3226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3227 ;;
3228 [ab].out )
3229 # We found the default executable, but exeext='' is most
3230 # certainly right.
3231 break;;
3232 *.* )
81ecdfbb
RW
3233 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3234 then :; else
3235 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3236 fi
3237 # We set ac_cv_exeext here because the later test for it is not
3238 # safe: cross compilers may not add the suffix if given an `-o'
3239 # argument, so we may need to know it at that point already.
3240 # Even if this section looks crufty: it has the advantage of
3241 # actually working.
b4e70030
JB
3242 break;;
3243 * )
3244 break;;
bec39cab
AC
3245 esac
3246done
81ecdfbb
RW
3247test "$ac_cv_exeext" = no && ac_cv_exeext=
3248
bec39cab 3249else
81ecdfbb
RW
3250 ac_file=''
3251fi
3252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3253$as_echo "$ac_file" >&6; }
3254if test -z "$ac_file"; then :
3255 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3256sed 's/^/| /' conftest.$ac_ext >&5
3257
81ecdfbb
RW
3258{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3260{ as_fn_set_status 77
3261as_fn_error "C compiler cannot create executables
3262See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3263fi
b4e70030 3264ac_exeext=$ac_cv_exeext
b4e70030 3265
81ecdfbb 3266# Check that the compiler produces executables we can run. If not, either
bec39cab 3267# the compiler is broken, or we cross compile.
81ecdfbb
RW
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3269$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3270# If not cross compiling, check that we can run a simple program.
3271if test "$cross_compiling" != yes; then
3272 if { ac_try='./$ac_file'
81ecdfbb
RW
3273 { { case "(($ac_try" in
3274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3275 *) ac_try_echo=$ac_try;;
3276esac
3277eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3278$as_echo "$ac_try_echo"; } >&5
3279 (eval "$ac_try") 2>&5
bec39cab 3280 ac_status=$?
81ecdfbb
RW
3281 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3282 test $ac_status = 0; }; }; then
bec39cab 3283 cross_compiling=no
c906108c 3284 else
bec39cab
AC
3285 if test "$cross_compiling" = maybe; then
3286 cross_compiling=yes
3287 else
81ecdfbb
RW
3288 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290as_fn_error "cannot run C compiled programs.
bec39cab 3291If you meant to cross compile, use \`--host'.
81ecdfbb 3292See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3293 fi
c906108c 3294 fi
bec39cab 3295fi
81ecdfbb
RW
3296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3297$as_echo "yes" >&6; }
bec39cab 3298
81ecdfbb 3299rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3300ac_clean_files=$ac_clean_files_save
81ecdfbb 3301# Check that the compiler produces executables we can run. If not, either
b4e70030 3302# the compiler is broken, or we cross compile.
81ecdfbb
RW
3303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3304$as_echo_n "checking whether we are cross compiling... " >&6; }
3305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3306$as_echo "$cross_compiling" >&6; }
3307
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3309$as_echo_n "checking for suffix of executables... " >&6; }
3310if { { ac_try="$ac_link"
3311case "(($ac_try" in
3312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3313 *) ac_try_echo=$ac_try;;
3314esac
3315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3316$as_echo "$ac_try_echo"; } >&5
3317 (eval "$ac_link") 2>&5
bec39cab 3318 ac_status=$?
81ecdfbb
RW
3319 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3320 test $ac_status = 0; }; then :
b4e70030
JB
3321 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3322# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3323# work properly (i.e., refer to `conftest.exe'), while it won't with
3324# `rm'.
3325for ac_file in conftest.exe conftest conftest.*; do
3326 test -f "$ac_file" || continue
3327 case $ac_file in
81ecdfbb 3328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3329 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3330 break;;
3331 * ) break;;
3332 esac
3333done
c906108c 3334else
81ecdfbb
RW
3335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3337as_fn_error "cannot compute suffix of executables: cannot compile and link
3338See \`config.log' for more details." "$LINENO" 5; }
c906108c 3339fi
b4e70030 3340rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3342$as_echo "$ac_cv_exeext" >&6; }
c906108c 3343
b4e70030 3344rm -f conftest.$ac_ext
bec39cab
AC
3345EXEEXT=$ac_cv_exeext
3346ac_exeext=$EXEEXT
81ecdfbb
RW
3347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3348$as_echo_n "checking for suffix of object files... " >&6; }
3349if test "${ac_cv_objext+set}" = set; then :
3350 $as_echo_n "(cached) " >&6
bec39cab 3351else
81ecdfbb 3352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3353/* end confdefs.h. */
3354
3355int
3356main ()
3357{
3358
3359 ;
3360 return 0;
3361}
3362_ACEOF
3363rm -f conftest.o conftest.obj
81ecdfbb
RW
3364if { { ac_try="$ac_compile"
3365case "(($ac_try" in
3366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3367 *) ac_try_echo=$ac_try;;
3368esac
3369eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3370$as_echo "$ac_try_echo"; } >&5
3371 (eval "$ac_compile") 2>&5
3372 ac_status=$?
3373 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3374 test $ac_status = 0; }; then :
3375 for ac_file in conftest.o conftest.obj conftest.*; do
3376 test -f "$ac_file" || continue;
bec39cab 3377 case $ac_file in
81ecdfbb 3378 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3379 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3380 break;;
3381 esac
3382done
c906108c 3383else
81ecdfbb 3384 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3385sed 's/^/| /' conftest.$ac_ext >&5
3386
81ecdfbb
RW
3387{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3389as_fn_error "cannot compute suffix of object files: cannot compile
3390See \`config.log' for more details." "$LINENO" 5; }
c906108c 3391fi
b4e70030 3392rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3393fi
81ecdfbb
RW
3394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3395$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3396OBJEXT=$ac_cv_objext
3397ac_objext=$OBJEXT
81ecdfbb
RW
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3399$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3400if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3401 $as_echo_n "(cached) " >&6
c906108c 3402else
81ecdfbb 3403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3404/* end confdefs.h. */
3405
3406int
3407main ()
3408{
3409#ifndef __GNUC__
3410 choke me
3411#endif
3412
3413 ;
3414 return 0;
3415}
3416_ACEOF
81ecdfbb 3417if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3418 ac_compiler_gnu=yes
3419else
81ecdfbb 3420 ac_compiler_gnu=no
bec39cab 3421fi
81ecdfbb 3422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3423ac_cv_c_compiler_gnu=$ac_compiler_gnu
3424
3425fi
81ecdfbb
RW
3426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3427$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3428if test $ac_compiler_gnu = yes; then
3429 GCC=yes
3430else
3431 GCC=
3432fi
bec39cab
AC
3433ac_test_CFLAGS=${CFLAGS+set}
3434ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3436$as_echo_n "checking whether $CC accepts -g... " >&6; }
3437if test "${ac_cv_prog_cc_g+set}" = set; then :
3438 $as_echo_n "(cached) " >&6
bec39cab 3439else
81ecdfbb
RW
3440 ac_save_c_werror_flag=$ac_c_werror_flag
3441 ac_c_werror_flag=yes
3442 ac_cv_prog_cc_g=no
3443 CFLAGS="-g"
3444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3445/* end confdefs.h. */
3446
3447int
3448main ()
3449{
3450
3451 ;
3452 return 0;
3453}
3454_ACEOF
81ecdfbb 3455if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3456 ac_cv_prog_cc_g=yes
3457else
81ecdfbb
RW
3458 CFLAGS=""
3459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3460/* end confdefs.h. */
3461
3462int
3463main ()
3464{
3465
3466 ;
3467 return 0;
3468}
3469_ACEOF
3470if ac_fn_c_try_compile "$LINENO"; then :
3471
3472else
3473 ac_c_werror_flag=$ac_save_c_werror_flag
3474 CFLAGS="-g"
3475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3476/* end confdefs.h. */
3477
3478int
3479main ()
3480{
c906108c 3481
81ecdfbb
RW
3482 ;
3483 return 0;
3484}
3485_ACEOF
3486if ac_fn_c_try_compile "$LINENO"; then :
3487 ac_cv_prog_cc_g=yes
3488fi
3489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3490fi
3491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3492fi
81ecdfbb
RW
3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3494 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3495fi
81ecdfbb
RW
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3497$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3498if test "$ac_test_CFLAGS" = set; then
bec39cab 3499 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3500elif test $ac_cv_prog_cc_g = yes; then
3501 if test "$GCC" = yes; then
3502 CFLAGS="-g -O2"
3503 else
3504 CFLAGS="-g"
3505 fi
3506else
3507 if test "$GCC" = yes; then
3508 CFLAGS="-O2"
3509 else
3510 CFLAGS=
3511 fi
3512fi
81ecdfbb
RW
3513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3514$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3515if test "${ac_cv_prog_cc_c89+set}" = set; then :
3516 $as_echo_n "(cached) " >&6
bec39cab 3517else
81ecdfbb 3518 ac_cv_prog_cc_c89=no
bec39cab 3519ac_save_CC=$CC
81ecdfbb 3520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3521/* end confdefs.h. */
c906108c
SS
3522#include <stdarg.h>
3523#include <stdio.h>
3524#include <sys/types.h>
3525#include <sys/stat.h>
3526/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3527struct buf { int x; };
3528FILE * (*rcsopen) (struct buf *, struct stat *, int);
3529static char *e (p, i)
3530 char **p;
3531 int i;
3532{
3533 return p[i];
3534}
3535static char *f (char * (*g) (char **, int), char **p, ...)
3536{
3537 char *s;
3538 va_list v;
3539 va_start (v,p);
3540 s = g (p, va_arg (v,int));
3541 va_end (v);
3542 return s;
3543}
bec39cab
AC
3544
3545/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3546 function prototypes and stuff, but not '\xHH' hex character constants.
3547 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3548 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3549 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3550 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3551 that's true only with -std. */
bec39cab
AC
3552int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3553
81ecdfbb
RW
3554/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3555 inside strings and character constants. */
3556#define FOO(x) 'x'
3557int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3558
c906108c
SS
3559int test (int i, double x);
3560struct s1 {int (*f) (int a);};
3561struct s2 {int (*f) (double a);};
3562int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3563int argc;
3564char **argv;
bec39cab
AC
3565int
3566main ()
3567{
c906108c 3568return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3569 ;
3570 return 0;
3571}
3572_ACEOF
81ecdfbb
RW
3573for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3574 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3575do
3576 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3577 if ac_fn_c_try_compile "$LINENO"; then :
3578 ac_cv_prog_cc_c89=$ac_arg
c906108c 3579fi
81ecdfbb
RW
3580rm -f core conftest.err conftest.$ac_objext
3581 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3582done
81ecdfbb 3583rm -f conftest.$ac_ext
bec39cab 3584CC=$ac_save_CC
c906108c
SS
3585
3586fi
81ecdfbb
RW
3587# AC_CACHE_VAL
3588case "x$ac_cv_prog_cc_c89" in
3589 x)
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3591$as_echo "none needed" >&6; } ;;
3592 xno)
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3594$as_echo "unsupported" >&6; } ;;
bec39cab 3595 *)
81ecdfbb
RW
3596 CC="$CC $ac_cv_prog_cc_c89"
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3598$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3599esac
81ecdfbb 3600if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3601
b4e70030
JB
3602fi
3603
bec39cab
AC
3604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3609
f434ba03
PA
3610ac_aux_dir=
3611for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3612 for ac_t in install-sh install.sh shtool; do
3613 if test -f "$ac_dir/$ac_t"; then
3614 ac_aux_dir=$ac_dir
3615 ac_install_sh="$ac_aux_dir/$ac_t -c"
3616 break 2
3617 fi
3618 done
3619done
3620if test -z "$ac_aux_dir"; then
3621 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3622fi
3623
3624# These three variables are undocumented and unsupported,
3625# and are intended to be withdrawn in a future Autoconf release.
3626# They can cause serious problems if a builder's source tree is in a directory
3627# whose full name contains unusual characters.
3628ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3629ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3630ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3631
3632
3633# Make sure we can run config.sub.
3634$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3635 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3636
3637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3638$as_echo_n "checking build system type... " >&6; }
3639if test "${ac_cv_build+set}" = set; then :
3640 $as_echo_n "(cached) " >&6
3641else
3642 ac_build_alias=$build_alias
3643test "x$ac_build_alias" = x &&
3644 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3645test "x$ac_build_alias" = x &&
3646 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3647ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3648 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3649
3650fi
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3652$as_echo "$ac_cv_build" >&6; }
3653case $ac_cv_build in
3654*-*-*) ;;
3655*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3656esac
3657build=$ac_cv_build
3658ac_save_IFS=$IFS; IFS='-'
3659set x $ac_cv_build
3660shift
3661build_cpu=$1
3662build_vendor=$2
3663shift; shift
3664# Remember, the first character of IFS is used to create $*,
3665# except with old shells:
3666build_os=$*
3667IFS=$ac_save_IFS
3668case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3669
3670
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3672$as_echo_n "checking host system type... " >&6; }
3673if test "${ac_cv_host+set}" = set; then :
3674 $as_echo_n "(cached) " >&6
3675else
3676 if test "x$host_alias" = x; then
3677 ac_cv_host=$ac_cv_build
3678else
3679 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3680 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3681fi
3682
3683fi
3684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3685$as_echo "$ac_cv_host" >&6; }
3686case $ac_cv_host in
3687*-*-*) ;;
3688*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3689esac
3690host=$ac_cv_host
3691ac_save_IFS=$IFS; IFS='-'
3692set x $ac_cv_host
3693shift
3694host_cpu=$1
3695host_vendor=$2
3696shift; shift
3697# Remember, the first character of IFS is used to create $*,
3698# except with old shells:
3699host_os=$*
3700IFS=$ac_save_IFS
3701case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3702
3703
60ca704f 3704
bec39cab
AC
3705ac_ext=c
3706ac_cpp='$CPP $CPPFLAGS'
3707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3709ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3711$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3712# On Suns, sometimes $CPP names a directory.
3713if test -n "$CPP" && test -d "$CPP"; then
3714 CPP=
8bb2c122 3715fi
bec39cab 3716if test -z "$CPP"; then
81ecdfbb
RW
3717 if test "${ac_cv_prog_CPP+set}" = set; then :
3718 $as_echo_n "(cached) " >&6
bec39cab
AC
3719else
3720 # Double quotes because CPP needs to be expanded
3721 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3722 do
3723 ac_preproc_ok=false
3724for ac_c_preproc_warn_flag in '' yes
3725do
3726 # Use a header file that comes with gcc, so configuring glibc
3727 # with a fresh cross-compiler works.
3728 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3729 # <limits.h> exists even on freestanding compilers.
3730 # On the NeXT, cc -E runs the code through the compiler's parser,
3731 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3733/* end confdefs.h. */
3734#ifdef __STDC__
3735# include <limits.h>
3736#else
3737# include <assert.h>
3738#endif
3739 Syntax error
3740_ACEOF
81ecdfbb 3741if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3742
81ecdfbb 3743else
bec39cab
AC
3744 # Broken: fails on valid input.
3745continue
3746fi
3747rm -f conftest.err conftest.$ac_ext
3748
81ecdfbb 3749 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3750 # can be detected and how.
81ecdfbb 3751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3752/* end confdefs.h. */
3753#include <ac_nonexistent.h>
3754_ACEOF
81ecdfbb 3755if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3756 # Broken: success on invalid input.
3757continue
8bb2c122 3758else
bec39cab
AC
3759 # Passes both tests.
3760ac_preproc_ok=:
3761break
8bb2c122 3762fi
bec39cab 3763rm -f conftest.err conftest.$ac_ext
8bb2c122 3764
bec39cab
AC
3765done
3766# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3767rm -f conftest.err conftest.$ac_ext
81ecdfbb 3768if $ac_preproc_ok; then :
bec39cab
AC
3769 break
3770fi
8bb2c122 3771
bec39cab
AC
3772 done
3773 ac_cv_prog_CPP=$CPP
ddc9cd0f 3774
c906108c 3775fi
bec39cab
AC
3776 CPP=$ac_cv_prog_CPP
3777else
3778 ac_cv_prog_CPP=$CPP
c906108c 3779fi
81ecdfbb
RW
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3781$as_echo "$CPP" >&6; }
bec39cab
AC
3782ac_preproc_ok=false
3783for ac_c_preproc_warn_flag in '' yes
3784do
3785 # Use a header file that comes with gcc, so configuring glibc
3786 # with a fresh cross-compiler works.
3787 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3788 # <limits.h> exists even on freestanding compilers.
3789 # On the NeXT, cc -E runs the code through the compiler's parser,
3790 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3792/* end confdefs.h. */
3793#ifdef __STDC__
3794# include <limits.h>
3795#else
3796# include <assert.h>
3797#endif
3798 Syntax error
3799_ACEOF
81ecdfbb 3800if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3801
81ecdfbb 3802else
bec39cab
AC
3803 # Broken: fails on valid input.
3804continue
3805fi
3806rm -f conftest.err conftest.$ac_ext
3807
81ecdfbb 3808 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3809 # can be detected and how.
81ecdfbb 3810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3811/* end confdefs.h. */
3812#include <ac_nonexistent.h>
3813_ACEOF
81ecdfbb 3814if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3815 # Broken: success on invalid input.
3816continue
c906108c 3817else
bec39cab
AC
3818 # Passes both tests.
3819ac_preproc_ok=:
3820break
c906108c 3821fi
bec39cab 3822rm -f conftest.err conftest.$ac_ext
c906108c 3823
bec39cab
AC
3824done
3825# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3826rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3827if $ac_preproc_ok; then :
3828
c906108c 3829else
81ecdfbb
RW
3830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3832as_fn_error "C preprocessor \"$CPP\" fails sanity check
3833See \`config.log' for more details." "$LINENO" 5; }
c906108c 3834fi
c906108c 3835
bec39cab
AC
3836ac_ext=c
3837ac_cpp='$CPP $CPPFLAGS'
3838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3840ac_compiler_gnu=$ac_cv_c_compiler_gnu
3841
3842
81ecdfbb
RW
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3844$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3845if test "${ac_cv_path_GREP+set}" = set; then :
3846 $as_echo_n "(cached) " >&6
4e8d927d 3847else
81ecdfbb
RW
3848 if test -z "$GREP"; then
3849 ac_path_GREP_found=false
3850 # Loop through the user's path and test for each of PROGNAME-LIST
3851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3853do
3854 IFS=$as_save_IFS
3855 test -z "$as_dir" && as_dir=.
3856 for ac_prog in grep ggrep; do
3857 for ac_exec_ext in '' $ac_executable_extensions; do
3858 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3859 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3860# Check for GNU ac_path_GREP and select it if it is found.
3861 # Check for GNU $ac_path_GREP
3862case `"$ac_path_GREP" --version 2>&1` in
3863*GNU*)
3864 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3865*)
3866 ac_count=0
3867 $as_echo_n 0123456789 >"conftest.in"
3868 while :
3869 do
3870 cat "conftest.in" "conftest.in" >"conftest.tmp"
3871 mv "conftest.tmp" "conftest.in"
3872 cp "conftest.in" "conftest.nl"
3873 $as_echo 'GREP' >> "conftest.nl"
3874 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3875 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3876 as_fn_arith $ac_count + 1 && ac_count=$as_val
3877 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3878 # Best one so far, save it but keep looking for a better one
3879 ac_cv_path_GREP="$ac_path_GREP"
3880 ac_path_GREP_max=$ac_count
bec39cab 3881 fi
81ecdfbb
RW
3882 # 10*(2^10) chars as input seems more than enough
3883 test $ac_count -gt 10 && break
3884 done
3885 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3886esac
bec39cab 3887
81ecdfbb
RW
3888 $ac_path_GREP_found && break 3
3889 done
3890 done
3891 done
3892IFS=$as_save_IFS
3893 if test -z "$ac_cv_path_GREP"; then
3894 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3895 fi
c906108c 3896else
81ecdfbb 3897 ac_cv_path_GREP=$GREP
c906108c 3898fi
c906108c 3899
81ecdfbb
RW
3900fi
3901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3902$as_echo "$ac_cv_path_GREP" >&6; }
3903 GREP="$ac_cv_path_GREP"
c906108c 3904
c906108c 3905
81ecdfbb
RW
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3907$as_echo_n "checking for egrep... " >&6; }
3908if test "${ac_cv_path_EGREP+set}" = set; then :
3909 $as_echo_n "(cached) " >&6
783e057b 3910else
81ecdfbb
RW
3911 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3912 then ac_cv_path_EGREP="$GREP -E"
3913 else
3914 if test -z "$EGREP"; then
3915 ac_path_EGREP_found=false
3916 # Loop through the user's path and test for each of PROGNAME-LIST
3917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3919do
3920 IFS=$as_save_IFS
3921 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3922 for ac_prog in egrep; do
3923 for ac_exec_ext in '' $ac_executable_extensions; do
3924 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3925 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3926# Check for GNU ac_path_EGREP and select it if it is found.
3927 # Check for GNU $ac_path_EGREP
3928case `"$ac_path_EGREP" --version 2>&1` in
3929*GNU*)
3930 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3931*)
3932 ac_count=0
3933 $as_echo_n 0123456789 >"conftest.in"
3934 while :
3935 do
3936 cat "conftest.in" "conftest.in" >"conftest.tmp"
3937 mv "conftest.tmp" "conftest.in"
3938 cp "conftest.in" "conftest.nl"
3939 $as_echo 'EGREP' >> "conftest.nl"
3940 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3941 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3942 as_fn_arith $ac_count + 1 && ac_count=$as_val
3943 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3944 # Best one so far, save it but keep looking for a better one
3945 ac_cv_path_EGREP="$ac_path_EGREP"
3946 ac_path_EGREP_max=$ac_count
3947 fi
3948 # 10*(2^10) chars as input seems more than enough
3949 test $ac_count -gt 10 && break
3950 done
3951 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3952esac
bec39cab 3953
81ecdfbb
RW
3954 $ac_path_EGREP_found && break 3
3955 done
3956 done
3957 done
3958IFS=$as_save_IFS
3959 if test -z "$ac_cv_path_EGREP"; then
3960 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3961 fi
783e057b 3962else
81ecdfbb 3963 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3964fi
3965
81ecdfbb 3966 fi
783e057b 3967fi
81ecdfbb
RW
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3969$as_echo "$ac_cv_path_EGREP" >&6; }
3970 EGREP="$ac_cv_path_EGREP"
3971
783e057b 3972
81ecdfbb
RW
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3974$as_echo_n "checking for ANSI C header files... " >&6; }
3975if test "${ac_cv_header_stdc+set}" = set; then :
3976 $as_echo_n "(cached) " >&6
783e057b 3977else
81ecdfbb 3978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3979/* end confdefs.h. */
783e057b 3980#include <stdlib.h>
bec39cab 3981#include <stdarg.h>
783e057b
DJ
3982#include <string.h>
3983#include <float.h>
c906108c 3984
bec39cab
AC
3985int
3986main ()
3987{
c906108c 3988
bec39cab
AC
3989 ;
3990 return 0;
3991}
3992_ACEOF
81ecdfbb 3993if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3994 ac_cv_header_stdc=yes
c906108c 3995else
81ecdfbb 3996 ac_cv_header_stdc=no
c906108c 3997fi
81ecdfbb 3998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3999
783e057b
DJ
4000if test $ac_cv_header_stdc = yes; then
4001 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4003/* end confdefs.h. */
4004#include <string.h>
c906108c 4005
783e057b
DJ
4006_ACEOF
4007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4008 $EGREP "memchr" >/dev/null 2>&1; then :
4009
c906108c 4010else
783e057b 4011 ac_cv_header_stdc=no
c906108c 4012fi
783e057b 4013rm -f conftest*
c906108c
SS
4014
4015fi
4016
783e057b
DJ
4017if test $ac_cv_header_stdc = yes; then
4018 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4020/* end confdefs.h. */
4021#include <stdlib.h>
bec39cab 4022
783e057b
DJ
4023_ACEOF
4024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4025 $EGREP "free" >/dev/null 2>&1; then :
4026
bec39cab 4027else
783e057b 4028 ac_cv_header_stdc=no
bec39cab 4029fi
783e057b 4030rm -f conftest*
bec39cab
AC
4031
4032fi
bec39cab 4033
783e057b
DJ
4034if test $ac_cv_header_stdc = yes; then
4035 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4036 if test "$cross_compiling" = yes; then :
783e057b 4037 :
bec39cab 4038else
81ecdfbb 4039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4040/* end confdefs.h. */
4041#include <ctype.h>
81ecdfbb 4042#include <stdlib.h>
783e057b
DJ
4043#if ((' ' & 0x0FF) == 0x020)
4044# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4045# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4046#else
4047# define ISLOWER(c) \
4048 (('a' <= (c) && (c) <= 'i') \
4049 || ('j' <= (c) && (c) <= 'r') \
4050 || ('s' <= (c) && (c) <= 'z'))
4051# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4052#endif
4053
4054#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4055int
4056main ()
4057{
4058 int i;
4059 for (i = 0; i < 256; i++)
4060 if (XOR (islower (i), ISLOWER (i))
4061 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4062 return 2;
4063 return 0;
783e057b
DJ
4064}
4065_ACEOF
81ecdfbb 4066if ac_fn_c_try_run "$LINENO"; then :
783e057b 4067
81ecdfbb
RW
4068else
4069 ac_cv_header_stdc=no
783e057b 4070fi
81ecdfbb
RW
4071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4072 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4073fi
81ecdfbb 4074
783e057b
DJ
4075fi
4076fi
81ecdfbb
RW
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4078$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4079if test $ac_cv_header_stdc = yes; then
4080
81ecdfbb 4081$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4082
4083fi
4084
4085# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4086for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4087 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4088do :
4089 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4090ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4091"
4092eval as_val=\$$as_ac_Header
4093 if test "x$as_val" = x""yes; then :
783e057b 4094 cat >>confdefs.h <<_ACEOF
81ecdfbb 4095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4096_ACEOF
4097
4098fi
4099
4100done
4101
4102
4103
f434ba03
PA
4104
4105
81ecdfbb
RW
4106 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4107if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4108 MINIX=yes
4109else
4110 MINIX=
4111fi
4112
4113
4114 if test "$MINIX" = yes; then
4115
81ecdfbb 4116$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4117
4118
81ecdfbb 4119$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4120
4121
81ecdfbb 4122$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4123
4124 fi
4125
f434ba03
PA
4126 case "$host_os" in
4127 hpux*)
4128
4129$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4130
4131 ;;
4132 esac
4133
783e057b 4134
81ecdfbb
RW
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4136$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4137if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4138 $as_echo_n "(cached) " >&6
783e057b 4139else
81ecdfbb 4140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4141/* end confdefs.h. */
4142
f434ba03
PA
4143# define __EXTENSIONS__ 1
4144 $ac_includes_default
783e057b
DJ
4145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
81ecdfbb 4153if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4154 ac_cv_safe_to_define___extensions__=yes
4155else
81ecdfbb 4156 ac_cv_safe_to_define___extensions__=no
783e057b 4157fi
81ecdfbb 4158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4159fi
81ecdfbb
RW
4160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4161$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4162 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4163 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4164
81ecdfbb 4165 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4166
81ecdfbb 4167 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4168
81ecdfbb 4169 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4170
81ecdfbb 4171 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4172
4173
81ecdfbb
RW
4174if test -n "$ac_tool_prefix"; then
4175 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4176set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4178$as_echo_n "checking for $ac_word... " >&6; }
4179if test "${ac_cv_prog_RANLIB+set}" = set; then :
4180 $as_echo_n "(cached) " >&6
4181else
4182 if test -n "$RANLIB"; then
4183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4184else
4185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188 IFS=$as_save_IFS
4189 test -z "$as_dir" && as_dir=.
4190 for ac_exec_ext in '' $ac_executable_extensions; do
4191 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194 break 2
4195 fi
4196done
4197 done
4198IFS=$as_save_IFS
783e057b 4199
81ecdfbb
RW
4200fi
4201fi
4202RANLIB=$ac_cv_prog_RANLIB
4203if test -n "$RANLIB"; then
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4205$as_echo "$RANLIB" >&6; }
4206else
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4208$as_echo "no" >&6; }
4209fi
783e057b
DJ
4210
4211
81ecdfbb
RW
4212fi
4213if test -z "$ac_cv_prog_RANLIB"; then
4214 ac_ct_RANLIB=$RANLIB
4215 # Extract the first word of "ranlib", so it can be a program name with args.
4216set dummy ranlib; ac_word=$2
4217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4218$as_echo_n "checking for $ac_word... " >&6; }
4219if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4220 $as_echo_n "(cached) " >&6
783e057b 4221else
81ecdfbb
RW
4222 if test -n "$ac_ct_RANLIB"; then
4223 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4224else
4225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
4231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4232 ac_cv_prog_ac_ct_RANLIB="ranlib"
4233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236done
4237 done
4238IFS=$as_save_IFS
4239
4240fi
4241fi
4242ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4243if test -n "$ac_ct_RANLIB"; then
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4245$as_echo "$ac_ct_RANLIB" >&6; }
4246else
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4248$as_echo "no" >&6; }
4249fi
4250
4251 if test "x$ac_ct_RANLIB" = x; then
4252 RANLIB=":"
4253 else
4254 case $cross_compiling:$ac_tool_warned in
4255yes:)
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4258ac_tool_warned=yes ;;
4259esac
4260 RANLIB=$ac_ct_RANLIB
4261 fi
4262else
4263 RANLIB="$ac_cv_prog_RANLIB"
4264fi
4265
4266
4267
4268
4269
4270
3388710e
JM
4271
4272
3388710e 4273
f434ba03
PA
4274 # Code from module arg-nonnull:
4275 # Code from module c++defs:
4276 # Code from module extensions:
3388710e 4277
f434ba03
PA
4278 # Code from module include_next:
4279 # Code from module memchr:
4280 # Code from module memmem:
4281 # Code from module memmem-simple:
4282 # Code from module multiarch:
4283 # Code from module stddef:
4284 # Code from module stdint:
4285 # Code from module string:
4286 # Code from module warn-on-use:
4287 # Code from module wchar:
3388710e
JM
4288
4289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4290$as_echo_n "checking target system type... " >&6; }
4291if test "${ac_cv_target+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
4293else
4294 if test "x$target_alias" = x; then
4295 ac_cv_target=$ac_cv_host
4296else
4297 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4298 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4299fi
4300
4301fi
4302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4303$as_echo "$ac_cv_target" >&6; }
4304case $ac_cv_target in
4305*-*-*) ;;
4306*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4307esac
4308target=$ac_cv_target
4309ac_save_IFS=$IFS; IFS='-'
4310set x $ac_cv_target
4311shift
4312target_cpu=$1
4313target_vendor=$2
4314shift; shift
4315# Remember, the first character of IFS is used to create $*,
4316# except with old shells:
4317target_os=$*
4318IFS=$ac_save_IFS
4319case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4320
4321
4322# The aliases save the names the user supplied, while $host etc.
4323# will get canonicalized.
4324test -n "$target_alias" &&
4325 test "$program_prefix$program_suffix$program_transform_name" = \
4326 NONENONEs,x,x, &&
4327 program_prefix=${target_alias}-
4328
4329# The tests for host and target for $enable_largefile require
4330# canonical names.
4331
4332
81ecdfbb 4333
da2f07f1
JK
4334# As the $enable_largefile decision depends on --enable-plugins we must set it
4335# even in directories otherwise not depending on the $plugins option.
4336
4337
4338# Check whether --enable-plugins was given.
4339if test "${enable_plugins+set}" = set; then :
4340 enableval=$enable_plugins; case "${enableval}" in
4341 yes | "") plugins=yes ;;
4342 no) plugins=no ;;
4343 *) plugins=yes ;;
4344 esac
4345else
4346 plugins=no
4347fi
4348
4349
4350
4351case "${host}" in
4352 sparc-*-solaris*|i[3-7]86-*-solaris*)
4353 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4354 # are mutually exclusive; and without procfs support, the bfd/ elf module
4355 # cannot provide certain routines such as elfcore_write_prpsinfo
4356 # or elfcore_write_prstatus. So unless the user explicitly requested
4357 # large-file support through the --enable-largefile switch, disable
4358 # large-file support in favor of procfs support.
4359 test "${target}" = "${host}" -a "x$plugins" = xno \
4360 && : ${enable_largefile="no"}
4361 ;;
4362esac
4363
4364# Check whether --enable-largefile was given.
4365if test "${enable_largefile+set}" = set; then :
4366 enableval=$enable_largefile;
4367fi
4368
4369if test "$enable_largefile" != no; then
4370
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4372$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4373if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4374 $as_echo_n "(cached) " >&6
4375else
4376 ac_cv_sys_largefile_CC=no
4377 if test "$GCC" != yes; then
4378 ac_save_CC=$CC
4379 while :; do
4380 # IRIX 6.2 and later do not support large files by default,
4381 # so use the C compiler's -n32 option if that helps.
4382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4383/* end confdefs.h. */
4384#include <sys/types.h>
4385 /* Check that off_t can represent 2**63 - 1 correctly.
4386 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4387 since some C++ compilers masquerading as C compilers
4388 incorrectly reject 9223372036854775807. */
4389#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4390 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4391 && LARGE_OFF_T % 2147483647 == 1)
4392 ? 1 : -1];
4393int
4394main ()
4395{
4396
4397 ;
4398 return 0;
4399}
4400_ACEOF
4401 if ac_fn_c_try_compile "$LINENO"; then :
4402 break
4403fi
4404rm -f core conftest.err conftest.$ac_objext
4405 CC="$CC -n32"
4406 if ac_fn_c_try_compile "$LINENO"; then :
4407 ac_cv_sys_largefile_CC=' -n32'; break
4408fi
4409rm -f core conftest.err conftest.$ac_objext
4410 break
4411 done
4412 CC=$ac_save_CC
4413 rm -f conftest.$ac_ext
4414 fi
4415fi
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4417$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4418 if test "$ac_cv_sys_largefile_CC" != no; then
4419 CC=$CC$ac_cv_sys_largefile_CC
4420 fi
4421
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4423$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4424if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4425 $as_echo_n "(cached) " >&6
4426else
4427 while :; do
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429/* end confdefs.h. */
4430#include <sys/types.h>
4431 /* Check that off_t can represent 2**63 - 1 correctly.
4432 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4433 since some C++ compilers masquerading as C compilers
4434 incorrectly reject 9223372036854775807. */
4435#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4436 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4437 && LARGE_OFF_T % 2147483647 == 1)
4438 ? 1 : -1];
4439int
4440main ()
4441{
4442
4443 ;
4444 return 0;
4445}
4446_ACEOF
4447if ac_fn_c_try_compile "$LINENO"; then :
4448 ac_cv_sys_file_offset_bits=no; break
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4452/* end confdefs.h. */
4453#define _FILE_OFFSET_BITS 64
4454#include <sys/types.h>
4455 /* Check that off_t can represent 2**63 - 1 correctly.
4456 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4457 since some C++ compilers masquerading as C compilers
4458 incorrectly reject 9223372036854775807. */
4459#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4460 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4461 && LARGE_OFF_T % 2147483647 == 1)
4462 ? 1 : -1];
4463int
4464main ()
4465{
4466
4467 ;
4468 return 0;
4469}
4470_ACEOF
4471if ac_fn_c_try_compile "$LINENO"; then :
4472 ac_cv_sys_file_offset_bits=64; break
4473fi
4474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4475 ac_cv_sys_file_offset_bits=unknown
4476 break
4477done
4478fi
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4480$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4481case $ac_cv_sys_file_offset_bits in #(
4482 no | unknown) ;;
4483 *)
4484cat >>confdefs.h <<_ACEOF
4485#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4486_ACEOF
4487;;
4488esac
4489rm -rf conftest*
4490 if test $ac_cv_sys_file_offset_bits = unknown; then
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4492$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4493if test "${ac_cv_sys_large_files+set}" = set; then :
4494 $as_echo_n "(cached) " >&6
4495else
4496 while :; do
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <sys/types.h>
4500 /* Check that off_t can represent 2**63 - 1 correctly.
4501 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4502 since some C++ compilers masquerading as C compilers
4503 incorrectly reject 9223372036854775807. */
4504#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4505 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4506 && LARGE_OFF_T % 2147483647 == 1)
4507 ? 1 : -1];
4508int
4509main ()
4510{
4511
4512 ;
4513 return 0;
4514}
4515_ACEOF
4516if ac_fn_c_try_compile "$LINENO"; then :
4517 ac_cv_sys_large_files=no; break
4518fi
4519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4521/* end confdefs.h. */
4522#define _LARGE_FILES 1
4523#include <sys/types.h>
4524 /* Check that off_t can represent 2**63 - 1 correctly.
4525 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4526 since some C++ compilers masquerading as C compilers
4527 incorrectly reject 9223372036854775807. */
4528#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4529 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4530 && LARGE_OFF_T % 2147483647 == 1)
4531 ? 1 : -1];
4532int
4533main ()
4534{
4535
4536 ;
4537 return 0;
4538}
4539_ACEOF
4540if ac_fn_c_try_compile "$LINENO"; then :
4541 ac_cv_sys_large_files=1; break
4542fi
4543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4544 ac_cv_sys_large_files=unknown
4545 break
4546done
4547fi
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4549$as_echo "$ac_cv_sys_large_files" >&6; }
4550case $ac_cv_sys_large_files in #(
4551 no | unknown) ;;
4552 *)
4553cat >>confdefs.h <<_ACEOF
4554#define _LARGE_FILES $ac_cv_sys_large_files
4555_ACEOF
4556;;
4557esac
4558rm -rf conftest*
4559 fi
4560fi
4561
4562
4563
81ecdfbb
RW
4564
4565
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4567$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4568if test "${am_cv_prog_cc_stdc+set}" = set; then :
4569 $as_echo_n "(cached) " >&6
4570else
4571 am_cv_prog_cc_stdc=no
4572ac_save_CC="$CC"
4573# Don't try gcc -ansi; that turns off useful extensions and
4574# breaks some systems' header files.
4575# AIX -qlanglvl=ansi
4576# Ultrix and OSF/1 -std1
4577# HP-UX 10.20 and later -Ae
4578# HP-UX older versions -Aa -D_HPUX_SOURCE
4579# SVR4 -Xc -D__EXTENSIONS__
4580for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4581do
783e057b 4582 CC="$ac_save_CC $ac_arg"
81ecdfbb 4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4584/* end confdefs.h. */
4585#include <stdarg.h>
4586#include <stdio.h>
4587#include <sys/types.h>
4588#include <sys/stat.h>
4589/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4590struct buf { int x; };
4591FILE * (*rcsopen) (struct buf *, struct stat *, int);
4592static char *e (p, i)
4593 char **p;
4594 int i;
4595{
4596 return p[i];
4597}
4598static char *f (char * (*g) (char **, int), char **p, ...)
4599{
4600 char *s;
4601 va_list v;
4602 va_start (v,p);
4603 s = g (p, va_arg (v,int));
4604 va_end (v);
4605 return s;
4606}
4607int test (int i, double x);
4608struct s1 {int (*f) (int a);};
4609struct s2 {int (*f) (double a);};
4610int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4611int argc;
4612char **argv;
4613
4614int
4615main ()
4616{
4617
4618return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4619
4620 ;
4621 return 0;
4622}
4623_ACEOF
81ecdfbb 4624if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4625 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4626fi
81ecdfbb 4627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4628done
4629CC="$ac_save_CC"
4630
4631fi
4632
4633if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4635$as_echo "none needed" >&6; }
783e057b 4636else
81ecdfbb
RW
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4638$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4639fi
4640case "x$am_cv_prog_cc_stdc" in
4641 x|xno) ;;
4642 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4643esac
4644
4645
4646ac_aux_dir=
81ecdfbb
RW
4647for ac_dir in .. "$srcdir"/..; do
4648 for ac_t in install-sh install.sh shtool; do
4649 if test -f "$ac_dir/$ac_t"; then
4650 ac_aux_dir=$ac_dir
4651 ac_install_sh="$ac_aux_dir/$ac_t -c"
4652 break 2
4653 fi
4654 done
783e057b
DJ
4655done
4656if test -z "$ac_aux_dir"; then
81ecdfbb 4657 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4658fi
81ecdfbb
RW
4659
4660# These three variables are undocumented and unsupported,
4661# and are intended to be withdrawn in a future Autoconf release.
4662# They can cause serious problems if a builder's source tree is in a directory
4663# whose full name contains unusual characters.
4664ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4665ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4666ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4667
783e057b 4668
783e057b 4669
81ecdfbb 4670
a417dc56
RW
4671# Dependency checking.
4672rm -rf .tst 2>/dev/null
4673mkdir .tst 2>/dev/null
4674if test -d .tst; then
4675 am__leading_dot=.
4676else
4677 am__leading_dot=_
4678fi
4679rmdir .tst 2>/dev/null
4680
4681DEPDIR="${am__leading_dot}deps"
4682
81ecdfbb 4683ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4684
4685
4686depcc="$CC" am_compiler_list=
4687
4688am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4690$as_echo_n "checking dependency style of $depcc... " >&6; }
4691if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4692 $as_echo_n "(cached) " >&6
a417dc56
RW
4693else
4694 if test -f "$am_depcomp"; then
4695 # We make a subdir and do the tests there. Otherwise we can end up
4696 # making bogus files that we don't know about and never remove. For
4697 # instance it was reported that on HP-UX the gcc test will end up
4698 # making a dummy file named `D' -- because `-MD' means `put the output
4699 # in D'.
4700 mkdir conftest.dir
4701 # Copy depcomp to subdir because otherwise we won't find it if we're
4702 # using a relative directory.
4703 cp "$am_depcomp" conftest.dir
4704 cd conftest.dir
4705 # We will build objects and dependencies in a subdirectory because
4706 # it helps to detect inapplicable dependency modes. For instance
4707 # both Tru64's cc and ICC support -MD to output dependencies as a
4708 # side effect of compilation, but ICC will put the dependencies in
4709 # the current directory while Tru64 will put them in the object
4710 # directory.
4711 mkdir sub
4712
4713 am_cv_CC_dependencies_compiler_type=none
4714 if test "$am_compiler_list" = ""; then
4715 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4716 fi
4717 for depmode in $am_compiler_list; do
4718 if test $depmode = none; then break; fi
4719
81ecdfbb 4720 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4721 # Setup a source with many dependencies, because some compilers
4722 # like to wrap large dependency lists on column 80 (with \), and
4723 # we should not choose a depcomp mode which is confused by this.
4724 #
4725 # We need to recreate these files for each test, as the compiler may
4726 # overwrite some of them when testing with obscure command lines.
4727 # This happens at least with the AIX C compiler.
4728 : > sub/conftest.c
4729 for i in 1 2 3 4 5 6; do
4730 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4731 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4732 # Solaris 8's {/usr,}/bin/sh.
4733 touch sub/conftst$i.h
4734 done
4735 echo "include sub/conftest.Po" > confmf
4736
4737 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4738 # mode. It turns out that the SunPro C++ compiler does not properly
4739 # handle `-M -o', and we need to detect this.
4740 depcmd="depmode=$depmode \
4741 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4742 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4743 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4744 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4745 if env $depcmd > conftest.err 2>&1 &&
4746 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4747 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4748 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4749 # icc doesn't choke on unknown options, it will just issue warnings
4750 # or remarks (even with -Werror). So we grep stderr for any message
4751 # that says an option was ignored or not supported.
4752 # When given -MP, icc 7.0 and 7.1 complain thusly:
4753 # icc: Command line warning: ignoring option '-M'; no argument required
4754 # The diagnosis changed in icc 8.0:
4755 # icc: Command line remark: option '-MP' not supported
4756 if (grep 'ignoring option' conftest.err ||
4757 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4758 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4759 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4760 break
4761 fi
4762 fi
81ecdfbb 4763 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4764 sed -e 's/^/| /' < conftest.err >&5
4765 done
4766
4767 cd ..
4768 rm -rf conftest.dir
4769else
4770 am_cv_CC_dependencies_compiler_type=none
4771fi
4772
4773fi
81ecdfbb
RW
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4775$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4776if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4777then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4778else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4779
4780fi
4781
4782
4783# Check for the 'make' the user wants to use.
4784for ac_prog in make
4785do
4786 # Extract the first word of "$ac_prog", so it can be a program name with args.
4787set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if test "${ac_cv_prog_MAKE+set}" = set; then :
4791 $as_echo_n "(cached) " >&6
a417dc56
RW
4792else
4793 if test -n "$MAKE"; then
4794 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4795else
4796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797for as_dir in $PATH
4798do
4799 IFS=$as_save_IFS
4800 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4801 for ac_exec_ext in '' $ac_executable_extensions; do
4802 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4803 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4805 break 2
4806 fi
4807done
81ecdfbb
RW
4808 done
4809IFS=$as_save_IFS
a417dc56
RW
4810
4811fi
4812fi
4813MAKE=$ac_cv_prog_MAKE
4814if test -n "$MAKE"; then
81ecdfbb
RW
4815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4816$as_echo "$MAKE" >&6; }
a417dc56 4817else
81ecdfbb
RW
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
a417dc56
RW
4820fi
4821
81ecdfbb 4822
a417dc56
RW
4823 test -n "$MAKE" && break
4824done
4825
4826MAKE_IS_GNU=
4827case "`$MAKE --version 2>&1 | sed 1q`" in
4828 *GNU*)
4829 MAKE_IS_GNU=yes
4830 ;;
4831esac
81ecdfbb 4832 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4833 GMAKE_TRUE=
4834 GMAKE_FALSE='#'
4835else
4836 GMAKE_TRUE='#'
4837 GMAKE_FALSE=
4838fi
4839
81ecdfbb
RW
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4841$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4842set x ${MAKE-make}
4843ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4844if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4845 $as_echo_n "(cached) " >&6
a417dc56
RW
4846else
4847 cat >conftest.make <<\_ACEOF
81ecdfbb 4848SHELL = /bin/sh
a417dc56 4849all:
81ecdfbb 4850 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4851_ACEOF
4852# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4853case `${MAKE-make} -f conftest.make 2>/dev/null` in
4854 *@@@%%%=?*=@@@%%%*)
4855 eval ac_cv_prog_make_${ac_make}_set=yes;;
4856 *)
4857 eval ac_cv_prog_make_${ac_make}_set=no;;
4858esac
a417dc56
RW
4859rm -f conftest.make
4860fi
81ecdfbb
RW
4861if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4863$as_echo "yes" >&6; }
a417dc56
RW
4864 SET_MAKE=
4865else
81ecdfbb
RW
4866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
a417dc56
RW
4868 SET_MAKE="MAKE=${MAKE-make}"
4869fi
4870
4871
783e057b
DJ
4872
4873CONFIG_OBS=
4874CONFIG_DEPS=
4875CONFIG_SRCS=
4876ENABLE_CFLAGS=
4877
4878CONFIG_ALL=
4879CONFIG_CLEAN=
4880CONFIG_INSTALL=
4881CONFIG_UNINSTALL=
4882
4883# If we haven't got the data from the intl directory,
4884# assume NLS is disabled.
4885USE_NLS=no
4886LIBINTL=
4887LIBINTL_DEP=
4888INCINTL=
4889XGETTEXT=
4890GMSGFMT=
4891POSUB=
4892
4893if test -f ../intl/config.intl; then
4894 . ../intl/config.intl
4895fi
81ecdfbb
RW
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4897$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4898if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
783e057b 4901else
81ecdfbb
RW
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4903$as_echo "yes" >&6; }
783e057b 4904
81ecdfbb 4905$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4906
4907
81ecdfbb
RW
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4909$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4910 # Look for .po and .gmo files in the source directory.
4911 CATALOGS=
4912 XLINGUAS=
4913 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4914 # If there aren't any .gmo files the shell will give us the
4915 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4916 # weeded out.
4917 case "$cat" in *\**)
4918 continue;;
4919 esac
4920 # The quadruple backslash is collapsed to a double backslash
4921 # by the backticks, then collapsed again by the double quotes,
4922 # leaving us with one backslash in the sed expression (right
4923 # before the dot that mustn't act as a wildcard).
4924 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4925 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4926 # The user is allowed to set LINGUAS to a list of languages to
4927 # install catalogs for. If it's empty that means "all of them."
4928 if test "x$LINGUAS" = x; then
4929 CATALOGS="$CATALOGS $cat"
4930 XLINGUAS="$XLINGUAS $lang"
4931 else
4932 case "$LINGUAS" in *$lang*)
4933 CATALOGS="$CATALOGS $cat"
4934 XLINGUAS="$XLINGUAS $lang"
4935 ;;
4936 esac
4937 fi
4938 done
4939 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4941$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4942
4943
4944 DATADIRNAME=share
4945
4946 INSTOBJEXT=.mo
4947
4948 GENCAT=gencat
4949
4950 CATOBJEXT=.gmo
4951
4952fi
4953
4954localedir='${datadir}/locale'
4955
4956
4957if test x"$USE_NLS" = xyes; then
4958 CONFIG_ALL="$CONFIG_ALL all-po"
4959 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4960 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4961 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4962fi
4963
4964
f434ba03
PA
4965
4966
4967
4968 LIBC_FATAL_STDERR_=1
4969 export LIBC_FATAL_STDERR_
4970
4971
4972
4973
4974
4975 for ac_header in $gl_header_list
4976do :
4977 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4978ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4979eval as_val=\$$as_ac_Header
4980 if test "x$as_val" = x""yes; then :
4981 cat >>confdefs.h <<_ACEOF
4982#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4983_ACEOF
4984
4985fi
4986
4987done
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997 for ac_func in $gl_func_list
4998do :
4999 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5000ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5001eval as_val=\$$as_ac_var
5002 if test "x$as_val" = x""yes; then :
5003 cat >>confdefs.h <<_ACEOF
5004#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5005_ACEOF
5006
5007fi
5008done
5009
5010
5011
5012
5013
5014
5015 GNULIB_MEMCHR=0;
5016 GNULIB_MEMMEM=0;
5017 GNULIB_MEMPCPY=0;
5018 GNULIB_MEMRCHR=0;
5019 GNULIB_RAWMEMCHR=0;
5020 GNULIB_STPCPY=0;
5021 GNULIB_STPNCPY=0;
5022 GNULIB_STRCHRNUL=0;
5023 GNULIB_STRDUP=0;
5024 GNULIB_STRNCAT=0;
5025 GNULIB_STRNDUP=0;
5026 GNULIB_STRNLEN=0;
5027 GNULIB_STRPBRK=0;
5028 GNULIB_STRSEP=0;
5029 GNULIB_STRSTR=0;
5030 GNULIB_STRCASESTR=0;
5031 GNULIB_STRTOK_R=0;
5032 GNULIB_MBSLEN=0;
5033 GNULIB_MBSNLEN=0;
5034 GNULIB_MBSCHR=0;
5035 GNULIB_MBSRCHR=0;
5036 GNULIB_MBSSTR=0;
5037 GNULIB_MBSCASECMP=0;
5038 GNULIB_MBSNCASECMP=0;
5039 GNULIB_MBSPCASECMP=0;
5040 GNULIB_MBSCASESTR=0;
5041 GNULIB_MBSCSPN=0;
5042 GNULIB_MBSPBRK=0;
5043 GNULIB_MBSSPN=0;
5044 GNULIB_MBSSEP=0;
5045 GNULIB_MBSTOK_R=0;
5046 GNULIB_STRERROR=0;
5047 GNULIB_STRSIGNAL=0;
5048 GNULIB_STRVERSCMP=0;
5049 HAVE_MBSLEN=0;
5050 HAVE_MEMCHR=1;
5051 HAVE_DECL_MEMMEM=1;
5052 HAVE_MEMPCPY=1;
5053 HAVE_DECL_MEMRCHR=1;
5054 HAVE_RAWMEMCHR=1;
5055 HAVE_STPCPY=1;
5056 HAVE_STPNCPY=1;
5057 HAVE_STRCHRNUL=1;
5058 HAVE_DECL_STRDUP=1;
5059 HAVE_DECL_STRNDUP=1;
5060 HAVE_DECL_STRNLEN=1;
5061 HAVE_STRPBRK=1;
5062 HAVE_STRSEP=1;
5063 HAVE_STRCASESTR=1;
5064 HAVE_DECL_STRTOK_R=1;
5065 HAVE_DECL_STRSIGNAL=1;
5066 HAVE_STRVERSCMP=1;
5067 REPLACE_MEMCHR=0;
783e057b 5068 REPLACE_MEMMEM=0;
f434ba03
PA
5069 REPLACE_STPNCPY=0;
5070 REPLACE_STRDUP=0;
783e057b 5071 REPLACE_STRSTR=0;
f434ba03
PA
5072 REPLACE_STRCASESTR=0;
5073 REPLACE_STRERROR=0;
5074 REPLACE_STRNCAT=0;
5075 REPLACE_STRNDUP=0;
5076 REPLACE_STRNLEN=0;
5077 REPLACE_STRSIGNAL=0;
5078 REPLACE_STRTOK_R=0;
5079 UNDEFINE_STRTOK_R=0;
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5094 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5095 # irrelevant for anonymous mappings.
5096 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5097if test "x$ac_cv_func_mmap" = x""yes; then :
5098 gl_have_mmap=yes
5099else
5100 gl_have_mmap=no
5101fi
5102
5103
5104 # Try to allow MAP_ANONYMOUS.
5105 gl_have_mmap_anonymous=no
5106 if test $gl_have_mmap = yes; then
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5108$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5110/* end confdefs.h. */
5111
5112#include <sys/mman.h>
5113#ifdef MAP_ANONYMOUS
5114 I cant identify this map.
5115#endif
5116
5117_ACEOF
5118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5119 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5120 gl_have_mmap_anonymous=yes
5121fi
5122rm -f conftest*
5123
5124 if test $gl_have_mmap_anonymous != yes; then
5125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126/* end confdefs.h. */
5127
5128#include <sys/mman.h>
5129#ifdef MAP_ANON
5130 I cant identify this map.
5131#endif
5132
5133_ACEOF
5134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5135 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5136
5137$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5138
5139 gl_have_mmap_anonymous=yes
5140fi
5141rm -f conftest*
5142
5143 fi
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5145$as_echo "$gl_have_mmap_anonymous" >&6; }
5146 if test $gl_have_mmap_anonymous = yes; then
5147
5148$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5149
5150 fi
5151 fi
5152
5153
5154 :
5155
5156
5157
5158
5159
5160
5161 :
5162
5163
5164
5165
5166
5167
5168
5169
5170 :
5171
5172
5173
5174
5175
5176 if test $ac_cv_func_memchr = yes; then
5177 # Detect platform-specific bugs in some versions of glibc:
5178 # memchr should not dereference anything with length 0
5179 # http://bugzilla.redhat.com/499689
5180 # memchr should not dereference overestimated length after a match
5181 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5182 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5183 # Assume that memchr works on platforms that lack mprotect.
5184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5185$as_echo_n "checking whether memchr works... " >&6; }
5186if test "${gl_cv_func_memchr_works+set}" = set; then :
5187 $as_echo_n "(cached) " >&6
5188else
5189 if test "$cross_compiling" = yes; then :
5190 gl_cv_func_memchr_works="guessing no"
5191else
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193/* end confdefs.h. */
5194
5195#include <string.h>
5196#if HAVE_SYS_MMAN_H
5197# include <fcntl.h>
5198# include <unistd.h>
5199# include <sys/types.h>
5200# include <sys/mman.h>
5201# ifndef MAP_FILE
5202# define MAP_FILE 0
5203# endif
5204#endif
5205
5206int
5207main ()
5208{
5209
5210 char *fence = NULL;
5211#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5212# if HAVE_MAP_ANONYMOUS
5213 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5214 const int fd = -1;
5215# else /* !HAVE_MAP_ANONYMOUS */
5216 const int flags = MAP_FILE | MAP_PRIVATE;
5217 int fd = open ("/dev/zero", O_RDONLY, 0666);
5218 if (fd >= 0)
5219# endif
5220 {
5221 int pagesize = getpagesize ();
5222 char *two_pages =
5223 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5224 flags, fd, 0);
5225 if (two_pages != (char *)(-1)
5226 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5227 fence = two_pages + pagesize;
5228 }
5229#endif
5230 if (fence)
5231 {
5232 if (memchr (fence, 0, 0))
5233 return 1;
5234 strcpy (fence - 9, "12345678");
5235 if (memchr (fence - 9, 0, 79) != fence - 1)
5236 return 2;
5237 }
5238 return 0;
5239
5240 ;
5241 return 0;
5242}
5243_ACEOF
5244if ac_fn_c_try_run "$LINENO"; then :
5245 gl_cv_func_memchr_works=yes
5246else
5247 gl_cv_func_memchr_works=no
5248fi
5249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5250 conftest.$ac_objext conftest.beam conftest.$ac_ext
5251fi
5252
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5255$as_echo "$gl_cv_func_memchr_works" >&6; }
5256 if test "$gl_cv_func_memchr_works" != yes; then
5257 REPLACE_MEMCHR=1
5258 fi
5259 else
5260 HAVE_MEMCHR=0
5261 fi
5262 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5263
5264
5265
5266
5267
5268
5269
5270
5271 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5272
5273
5274 for ac_header in bp-sym.h
5275do :
5276 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5277if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5278 cat >>confdefs.h <<_ACEOF
5279#define HAVE_BP_SYM_H 1
5280_ACEOF
5281
5282fi
5283
5284done
5285
5286
5287 fi
783e057b
DJ
5288
5289
81ecdfbb
RW
5290 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5291if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5292 ac_have_decl=1
783e057b 5293else
81ecdfbb 5294 ac_have_decl=0
783e057b 5295fi
783e057b
DJ
5296
5297cat >>confdefs.h <<_ACEOF
81ecdfbb 5298#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5299_ACEOF
5300
5301
783e057b
DJ
5302
5303
5304
5305
5306
5307
5308
5309
783e057b 5310
783e057b 5311
783e057b 5312
f434ba03 5313
81ecdfbb
RW
5314 for ac_func in memmem
5315do :
5316 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5317if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5318 cat >>confdefs.h <<_ACEOF
81ecdfbb 5319#define HAVE_MEMMEM 1
783e057b
DJ
5320_ACEOF
5321
5322else
5323
5324 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5325
5326fi
5327done
5328
5329
5330
5331 :
5332
5333
5334
5335
5336
5337 if test $ac_cv_have_decl_memmem = no; then
5338 HAVE_DECL_MEMMEM=0
5339 fi
5340 :
5341
5342
f434ba03
PA
5343 gl_cv_c_multiarch=no
5344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5345/* end confdefs.h. */
5346#ifndef __APPLE_CC__
5347 not a universal capable compiler
5348 #endif
5349 typedef int dummy;
5350
5351_ACEOF
5352if ac_fn_c_try_compile "$LINENO"; then :
5353
5354 arch=
5355 prev=
5356 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5357 if test -n "$prev"; then
5358 case $word in
5359 i?86 | x86_64 | ppc | ppc64)
5360 if test -z "$arch" || test "$arch" = "$word"; then
5361 arch="$word"
5362 else
5363 gl_cv_c_multiarch=yes
5364 fi
5365 ;;
5366 esac
5367 prev=
5368 else
5369 if test "x$word" = "x-arch"; then
5370 prev=arch
5371 fi
5372 fi
5373 done
5374
5375fi
5376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 if test $gl_cv_c_multiarch = yes; then
5378
5379$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5380
5381 APPLE_UNIVERSAL_BUILD=1
5382 else
5383 APPLE_UNIVERSAL_BUILD=0
5384 fi
5385
5386
5387
5388 REPLACE_NULL=0;
5389 HAVE_WCHAR_T=1;
5390 STDDEF_H='';
5391
5392
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5394$as_echo_n "checking for wchar_t... " >&6; }
5395if test "${gt_cv_c_wchar_t+set}" = set; then :
5396 $as_echo_n "(cached) " >&6
5397else
5398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5399/* end confdefs.h. */
5400#include <stddef.h>
5401 wchar_t foo = (wchar_t)'\0';
5402int
5403main ()
5404{
5405
5406 ;
5407 return 0;
5408}
5409_ACEOF
5410if ac_fn_c_try_compile "$LINENO"; then :
5411 gt_cv_c_wchar_t=yes
5412else
5413 gt_cv_c_wchar_t=no
5414fi
5415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416fi
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5418$as_echo "$gt_cv_c_wchar_t" >&6; }
5419 if test $gt_cv_c_wchar_t = yes; then
5420
5421$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5422
5423 fi
5424
5425
5426
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5428$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5429if test "${gl_cv_have_include_next+set}" = set; then :
5430 $as_echo_n "(cached) " >&6
5431else
5432 rm -rf conftestd1a conftestd1b conftestd2
5433 mkdir conftestd1a conftestd1b conftestd2
5434 cat <<EOF > conftestd1a/conftest.h
5435#define DEFINED_IN_CONFTESTD1
5436#include_next <conftest.h>
5437#ifdef DEFINED_IN_CONFTESTD2
5438int foo;
5439#else
5440#error "include_next doesn't work"
5441#endif
5442EOF
5443 cat <<EOF > conftestd1b/conftest.h
5444#define DEFINED_IN_CONFTESTD1
5445#include <stdio.h>
5446#include_next <conftest.h>
5447#ifdef DEFINED_IN_CONFTESTD2
5448int foo;
5449#else
5450#error "include_next doesn't work"
5451#endif
5452EOF
5453 cat <<EOF > conftestd2/conftest.h
5454#ifndef DEFINED_IN_CONFTESTD1
5455#error "include_next test doesn't work"
5456#endif
5457#define DEFINED_IN_CONFTESTD2
5458EOF
5459 gl_save_CPPFLAGS="$CPPFLAGS"
5460 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <conftest.h>
5464_ACEOF
5465if ac_fn_c_try_compile "$LINENO"; then :
5466 gl_cv_have_include_next=yes
5467else
5468 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <conftest.h>
5472_ACEOF
5473if ac_fn_c_try_compile "$LINENO"; then :
5474 gl_cv_have_include_next=buggy
5475else
5476 gl_cv_have_include_next=no
5477fi
5478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5479
5480fi
5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5482 CPPFLAGS="$gl_save_CPPFLAGS"
5483 rm -rf conftestd1a conftestd1b conftestd2
5484
5485fi
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5487$as_echo "$gl_cv_have_include_next" >&6; }
5488 PRAGMA_SYSTEM_HEADER=
5489 if test $gl_cv_have_include_next = yes; then
5490 INCLUDE_NEXT=include_next
5491 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5492 if test -n "$GCC"; then
5493 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5494 fi
5495 else
5496 if test $gl_cv_have_include_next = buggy; then
5497 INCLUDE_NEXT=include
5498 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5499 else
5500 INCLUDE_NEXT=include
5501 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5502 fi
5503 fi
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
81ecdfbb
RW
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5515$as_echo_n "checking for long long int... " >&6; }
5516if test "${ac_cv_type_long_long_int+set}" = set; then :
5517 $as_echo_n "(cached) " >&6
783e057b 5518else
81ecdfbb 5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5520/* end confdefs.h. */
81ecdfbb
RW
5521
5522 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5523 implementations with broken preprocessors. Perhaps this can
5524 be revisited in 2012. In the meantime, code should not expect
5525 #if to work with literals wider than 32 bits. */
783e057b
DJ
5526 /* Test literals. */
5527 long long int ll = 9223372036854775807ll;
5528 long long int nll = -9223372036854775807LL;
5529 unsigned long long int ull = 18446744073709551615ULL;
5530 /* Test constant expressions. */
5531 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5532 ? 1 : -1)];
783e057b 5533 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5534 ? 1 : -1)];
783e057b
DJ
5535 int i = 63;
5536int
5537main ()
5538{
5539/* Test availability of runtime routines for shift and division. */
5540 long long int llmax = 9223372036854775807ll;
5541 unsigned long long int ullmax = 18446744073709551615ull;
5542 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5543 | (llmax / ll) | (llmax % ll)
5544 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5545 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5546 ;
5547 return 0;
5548}
5549
5550_ACEOF
81ecdfbb 5551if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5552 if test "$cross_compiling" = yes; then :
783e057b
DJ
5553 ac_cv_type_long_long_int=yes
5554else
81ecdfbb 5555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5556/* end confdefs.h. */
5557#include <limits.h>
f434ba03
PA
5558 #ifndef LLONG_MAX
5559 # define HALF \
5560 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5561 # define LLONG_MAX (HALF - 1 + HALF)
5562 #endif
783e057b
DJ
5563int
5564main ()
5565{
5566long long int n = 1;
f434ba03
PA
5567 int i;
5568 for (i = 0; ; i++)
5569 {
5570 long long int m = n << i;
5571 if (m >> i != n)
5572 return 1;
5573 if (LLONG_MAX / 2 < m)
5574 break;
5575 }
5576 return 0;
783e057b
DJ
5577 ;
5578 return 0;
5579}
5580_ACEOF
81ecdfbb 5581if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5582 ac_cv_type_long_long_int=yes
5583else
81ecdfbb 5584 ac_cv_type_long_long_int=no
783e057b 5585fi
81ecdfbb
RW
5586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5587 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5588fi
783e057b 5589
81ecdfbb
RW
5590else
5591 ac_cv_type_long_long_int=no
783e057b 5592fi
81ecdfbb
RW
5593rm -f core conftest.err conftest.$ac_objext \
5594 conftest$ac_exeext conftest.$ac_ext
783e057b 5595fi
81ecdfbb
RW
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5597$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5598 if test $ac_cv_type_long_long_int = yes; then
5599
81ecdfbb 5600$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5601
5602 fi
5603
5604
81ecdfbb
RW
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5606$as_echo_n "checking for unsigned long long int... " >&6; }
5607if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5608 $as_echo_n "(cached) " >&6
783e057b 5609else
81ecdfbb 5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5611/* end confdefs.h. */
81ecdfbb
RW
5612
5613 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5614 implementations with broken preprocessors. Perhaps this can
5615 be revisited in 2012. In the meantime, code should not expect
5616 #if to work with literals wider than 32 bits. */
783e057b
DJ
5617 /* Test literals. */
5618 long long int ll = 9223372036854775807ll;
5619 long long int nll = -9223372036854775807LL;
5620 unsigned long long int ull = 18446744073709551615ULL;
5621 /* Test constant expressions. */
5622 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5623 ? 1 : -1)];
783e057b 5624 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5625 ? 1 : -1)];
783e057b
DJ
5626 int i = 63;
5627int
5628main ()
5629{
5630/* Test availability of runtime routines for shift and division. */
5631 long long int llmax = 9223372036854775807ll;
5632 unsigned long long int ullmax = 18446744073709551615ull;
5633 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5634 | (llmax / ll) | (llmax % ll)
5635 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5636 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5637 ;
5638 return 0;
5639}
5640
5641_ACEOF
81ecdfbb 5642if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5643 ac_cv_type_unsigned_long_long_int=yes
5644else
81ecdfbb 5645 ac_cv_type_unsigned_long_long_int=no
783e057b 5646fi
81ecdfbb
RW
5647rm -f core conftest.err conftest.$ac_objext \
5648 conftest$ac_exeext conftest.$ac_ext
783e057b 5649fi
81ecdfbb
RW
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5651$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5652 if test $ac_cv_type_unsigned_long_long_int = yes; then
5653
81ecdfbb 5654$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5655
5656 fi
5657
5658
5659
783e057b
DJ
5660
5661
5662
5663
5664
5665
5666
5667
81ecdfbb
RW
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5669$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5670if test "${ac_cv_c_restrict+set}" = set; then :
5671 $as_echo_n "(cached) " >&6
783e057b
DJ
5672else
5673 ac_cv_c_restrict=no
5674 # The order here caters to the fact that C++ does not require restrict.
5675 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5677/* end confdefs.h. */
5678typedef int * int_ptr;
5679 int foo (int_ptr $ac_kw ip) {
5680 return ip[0];
5681 }
5682int
5683main ()
5684{
5685int s[1];
5686 int * $ac_kw t = s;
5687 t[0] = 0;
5688 return foo(t)
5689 ;
5690 return 0;
5691}
5692_ACEOF
81ecdfbb 5693if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5694 ac_cv_c_restrict=$ac_kw
783e057b 5695fi
81ecdfbb 5696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5697 test "$ac_cv_c_restrict" != no && break
5698 done
5699
5700fi
81ecdfbb
RW
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5702$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5703
5704 case $ac_cv_c_restrict in
5705 restrict) ;;
81ecdfbb 5706 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5707 ;;
5708 *) cat >>confdefs.h <<_ACEOF
5709#define restrict $ac_cv_c_restrict
5710_ACEOF
5711 ;;
5712 esac
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
f434ba03 5725
783e057b
DJ
5726 :
5727
5728
5729
5730
5731
5732
5733
f434ba03
PA
5734 if test $gl_cv_have_include_next = yes; then
5735 gl_cv_next_string_h='<'string.h'>'
5736 else
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5738$as_echo_n "checking absolute name of <string.h>... " >&6; }
5739if test "${gl_cv_next_string_h+set}" = set; then :
5740 $as_echo_n "(cached) " >&6
5741else
5742
5743 if test $ac_cv_header_string_h = yes; then
5744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5745/* end confdefs.h. */
5746#include <string.h>
5747
5748_ACEOF
5749 case "$host_os" in
5750 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5751 *) gl_absname_cpp="$ac_cpp" ;;
5752 esac
5753 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5754 sed -n '\#/string.h#{
5755 s#.*"\(.*/string.h\)".*#\1#
5756 s#^/[^/]#//&#
5757 p
5758 q
5759 }'`'"'
5760 else
5761 gl_cv_next_string_h='<'string.h'>'
5762 fi
5763
5764fi
5765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5766$as_echo "$gl_cv_next_string_h" >&6; }
5767 fi
5768 NEXT_STRING_H=$gl_cv_next_string_h
5769
5770 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5771 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5772 gl_next_as_first_directive='<'string.h'>'
5773 else
5774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5775 gl_next_as_first_directive=$gl_cv_next_string_h
5776 fi
5777 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5778
5779
5780
5781
5782
5783 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5784 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5786$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5787if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5788 $as_echo_n "(cached) " >&6
5789else
5790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5791/* end confdefs.h. */
5792#include <string.h>
5793
5794int
5795main ()
5796{
5797#undef $gl_func
5798 (void) $gl_func;
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803if ac_fn_c_try_compile "$LINENO"; then :
5804 eval "$as_gl_Symbol=yes"
5805else
5806 eval "$as_gl_Symbol=no"
5807fi
5808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5809fi
5810eval ac_res=\$$as_gl_Symbol
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5812$as_echo "$ac_res" >&6; }
5813 eval as_val=\$$as_gl_Symbol
5814 if test "x$as_val" = x""yes; then :
5815 cat >>confdefs.h <<_ACEOF
5816#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5817_ACEOF
5818
5819 eval ac_cv_have_decl_$gl_func=yes
5820fi
5821 done
5822
5823
5824
5825 GNULIB_BTOWC=0;
5826 GNULIB_WCTOB=0;
5827 GNULIB_MBSINIT=0;
5828 GNULIB_MBRTOWC=0;
5829 GNULIB_MBRLEN=0;
5830 GNULIB_MBSRTOWCS=0;
5831 GNULIB_MBSNRTOWCS=0;
5832 GNULIB_WCRTOMB=0;
5833 GNULIB_WCSRTOMBS=0;
5834 GNULIB_WCSNRTOMBS=0;
5835 GNULIB_WCWIDTH=0;
5836 HAVE_BTOWC=1;
5837 HAVE_MBSINIT=1;
5838 HAVE_MBRTOWC=1;
5839 HAVE_MBRLEN=1;
5840 HAVE_MBSRTOWCS=1;
5841 HAVE_MBSNRTOWCS=1;
5842 HAVE_WCRTOMB=1;
5843 HAVE_WCSRTOMBS=1;
5844 HAVE_WCSNRTOMBS=1;
5845 HAVE_DECL_WCTOB=1;
5846 HAVE_DECL_WCWIDTH=1;
5847 REPLACE_MBSTATE_T=0;
5848 REPLACE_BTOWC=0;
5849 REPLACE_WCTOB=0;
5850 REPLACE_MBSINIT=0;
5851 REPLACE_MBRTOWC=0;
5852 REPLACE_MBRLEN=0;
5853 REPLACE_MBSRTOWCS=0;
5854 REPLACE_MBSNRTOWCS=0;
5855 REPLACE_WCRTOMB=0;
5856 REPLACE_WCSRTOMBS=0;
5857 REPLACE_WCSNRTOMBS=0;
5858 REPLACE_WCWIDTH=0;
5859
5860
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5862$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5863if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5864 $as_echo_n "(cached) " >&6
783e057b 5865else
f434ba03
PA
5866 gl_cv_header_wchar_h_correct_inline=yes
5867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5868/* end confdefs.h. */
783e057b 5869
f434ba03
PA
5870 #define wcstod renamed_wcstod
5871#include <wchar.h>
5872extern int zero (void);
5873int main () { return zero(); }
5874
5875_ACEOF
5876 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5877 (eval $ac_compile) 2>&5
5878 ac_status=$?
5879 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5880 test $ac_status = 0; }; then
5881 mv conftest.$ac_objext conftest1.$ac_objext
5882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5883/* end confdefs.h. */
f434ba03
PA
5884
5885 #define wcstod renamed_wcstod
5886#include <wchar.h>
5887int zero (void) { return 0; }
783e057b
DJ
5888
5889_ACEOF
f434ba03
PA
5890 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5894 test $ac_status = 0; }; then
5895 mv conftest.$ac_objext conftest2.$ac_objext
5896 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5897 :
5898 else
5899 gl_cv_header_wchar_h_correct_inline=no
5900 fi
5901 fi
5902 fi
5903 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5904
5905fi
f434ba03
PA
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5907$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5908 if test $gl_cv_header_wchar_h_correct_inline = no; then
5909 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5910This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5911C99 mode. You have four options:
5912 - Add the flag -fgnu89-inline to CC and reconfigure, or
5913 - Fix your include files, using parts of
5914 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5915 - Use a gcc version older than 4.3, or
5916 - Don't use the flags -std=c99 or -std=gnu99.
5917Configuration aborted." "$LINENO" 5
5918 fi
783e057b
DJ
5919
5920
f434ba03
PA
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5922$as_echo_n "checking for wint_t... " >&6; }
5923if test "${gt_cv_c_wint_t+set}" = set; then :
5924 $as_echo_n "(cached) " >&6
5925else
5926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5927/* end confdefs.h. */
783e057b 5928
f434ba03
PA
5929/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5930 <wchar.h>.
5931 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5932 before <wchar.h>. */
5933#include <stddef.h>
5934#include <stdio.h>
5935#include <time.h>
5936#include <wchar.h>
5937 wint_t foo = (wchar_t)'\0';
5938int
5939main ()
5940{
783e057b 5941
f434ba03
PA
5942 ;
5943 return 0;
5944}
5945_ACEOF
5946if ac_fn_c_try_compile "$LINENO"; then :
5947 gt_cv_c_wint_t=yes
5948else
5949 gt_cv_c_wint_t=no
5950fi
5951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5952fi
5953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5954$as_echo "$gt_cv_c_wint_t" >&6; }
5955 if test $gt_cv_c_wint_t = yes; then
783e057b 5956
f434ba03 5957$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5958
f434ba03 5959 fi
783e057b
DJ
5960
5961
81ecdfbb 5962 if false; then
783e057b
DJ
5963 GL_COND_LIBTOOL_TRUE=
5964 GL_COND_LIBTOOL_FALSE='#'
5965else
5966 GL_COND_LIBTOOL_TRUE='#'
5967 GL_COND_LIBTOOL_FALSE=
5968fi
5969
5970 gl_cond_libtool=false
5971 gl_libdeps=
5972 gl_ltlibdeps=
f434ba03 5973 gl_m4_base='gnulib/m4'
783e057b
DJ
5974
5975
5976
783e057b
DJ
5977
5978
5979
5980
5981
5982
f434ba03
PA
5983 gl_source_base='gnulib'
5984 # Code from module arg-nonnull:
5985 # Code from module c++defs:
5986 # Code from module extensions:
5987 # Code from module include_next:
5988 # Code from module memchr:
783e057b 5989
783e057b 5990
783e057b 5991
783e057b 5992
f434ba03 5993 GNULIB_MEMCHR=1
783e057b 5994
783e057b 5995
783e057b 5996
f434ba03 5997$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 5998
783e057b
DJ
5999
6000
f434ba03 6001 # Code from module memmem:
783e057b
DJ
6002
6003
f434ba03
PA
6004 if test $ac_cv_have_decl_memmem = yes; then
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6006$as_echo_n "checking whether memmem works in linear time... " >&6; }
6007if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6008 $as_echo_n "(cached) " >&6
783e057b 6009else
81ecdfbb 6010 if test "$cross_compiling" = yes; then :
f434ba03 6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6012/* end confdefs.h. */
783e057b 6013
f434ba03
PA
6014#include <features.h>
6015#ifdef __GNU_LIBRARY__
6016 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6017 Lucky user
6018 #endif
6019#endif
6020#ifdef __CYGWIN__
6021 #include <cygwin/version.h>
6022 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6023 Lucky user
6024 #endif
6025#endif
783e057b 6026
783e057b 6027_ACEOF
f434ba03
PA
6028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6029 $EGREP "Lucky user" >/dev/null 2>&1; then :
6030 gl_cv_func_memmem_works=yes
783e057b 6031else
f434ba03 6032 gl_cv_func_memmem_works="guessing no"
783e057b 6033fi
f434ba03 6034rm -f conftest*
783e057b
DJ
6035
6036
783e057b 6037else
81ecdfbb 6038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6039/* end confdefs.h. */
6040
f434ba03 6041#include <signal.h> /* for signal */
783e057b
DJ
6042#include <string.h> /* for memmem */
6043#include <stdlib.h> /* for malloc */
6044#include <unistd.h> /* for alarm */
6045
6046int
6047main ()
6048{
6049size_t m = 1000000;
6050 char *haystack = (char *) malloc (2 * m + 1);
6051 char *needle = (char *) malloc (m + 1);
6052 void *result = 0;
6053 /* Failure to compile this test due to missing alarm is okay,
6054 since all such platforms (mingw) also lack memmem. */
f434ba03 6055 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6056 alarm (5);
6057 /* Check for quadratic performance. */
6058 if (haystack && needle)
6059 {
f434ba03
PA
6060 memset (haystack, 'A', 2 * m);
6061 haystack[2 * m] = 'B';
6062 memset (needle, 'A', m);
6063 needle[m] = 'B';
6064 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6065 }
6066 /* Check for empty needle behavior. */
6067 return !result || !memmem ("a", 1, 0, 0);
6068 ;
6069 return 0;
6070}
6071_ACEOF
81ecdfbb 6072if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6073 gl_cv_func_memmem_works=yes
6074else
81ecdfbb 6075 gl_cv_func_memmem_works=no
783e057b 6076fi
81ecdfbb
RW
6077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6078 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6079fi
81ecdfbb 6080
f434ba03 6081
783e057b 6082fi
81ecdfbb
RW
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6084$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6085 if test "$gl_cv_func_memmem_works" != yes; then
6086 REPLACE_MEMMEM=1
6087
6088
6089
6090
6091
6092
6093
f434ba03 6094
783e057b
DJ
6095 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6096
6097 fi
6098 fi
6099
f434ba03
PA
6100 # Code from module memmem-simple:
6101
783e057b
DJ
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
81ecdfbb
RW
6113 for ac_func in memmem
6114do :
6115 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6116if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6117 cat >>confdefs.h <<_ACEOF
81ecdfbb 6118#define HAVE_MEMMEM 1
783e057b
DJ
6119_ACEOF
6120
6121else
6122
6123 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6124
6125fi
6126done
6127
6128
6129
6130 :
6131
6132
6133
6134
6135
6136 if test $ac_cv_have_decl_memmem = no; then
6137 HAVE_DECL_MEMMEM=0
6138 fi
6139 :
6140
6141
6142
f434ba03 6143
783e057b
DJ
6144 GNULIB_MEMMEM=1
6145
6146
6147
f434ba03
PA
6148$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6149
6150
6151
6152 # Code from module multiarch:
6153
6154 # Code from module stddef:
6155
6156
6157
6158 if test $gt_cv_c_wchar_t = no; then
6159 HAVE_WCHAR_T=0
6160 STDDEF_H=stddef.h
6161 fi
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6163$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6164if test "${gl_cv_decl_null_works+set}" = set; then :
6165 $as_echo_n "(cached) " >&6
6166else
6167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6168/* end confdefs.h. */
6169#include <stddef.h>
6170 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6171
6172int
6173main ()
6174{
6175
6176 ;
6177 return 0;
6178}
6179_ACEOF
6180if ac_fn_c_try_compile "$LINENO"; then :
6181 gl_cv_decl_null_works=yes
6182else
6183 gl_cv_decl_null_works=no
6184fi
6185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6186fi
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6188$as_echo "$gl_cv_decl_null_works" >&6; }
6189 if test $gl_cv_decl_null_works = no; then
6190 REPLACE_NULL=1
6191 STDDEF_H=stddef.h
6192 fi
6193 if test -n "$STDDEF_H"; then
6194
6195
6196
6197
6198 :
6199
6200
6201
6202
6203
6204
6205
6206 if test $gl_cv_have_include_next = yes; then
6207 gl_cv_next_stddef_h='<'stddef.h'>'
6208 else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6210$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6211if test "${gl_cv_next_stddef_h+set}" = set; then :
6212 $as_echo_n "(cached) " >&6
6213else
6214
6215 if test $ac_cv_header_stddef_h = yes; then
6216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6217/* end confdefs.h. */
6218#include <stddef.h>
6219
6220_ACEOF
6221 case "$host_os" in
6222 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6223 *) gl_absname_cpp="$ac_cpp" ;;
6224 esac
6225 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6226 sed -n '\#/stddef.h#{
6227 s#.*"\(.*/stddef.h\)".*#\1#
6228 s#^/[^/]#//&#
6229 p
6230 q
6231 }'`'"'
6232 else
6233 gl_cv_next_stddef_h='<'stddef.h'>'
6234 fi
6235
6236fi
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6238$as_echo "$gl_cv_next_stddef_h" >&6; }
6239 fi
6240 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6241
6242 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6243 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6244 gl_next_as_first_directive='<'stddef.h'>'
6245 else
6246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6247 gl_next_as_first_directive=$gl_cv_next_stddef_h
6248 fi
6249 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6250
6251
6252
6253 fi
6254
6255 # Code from module stdint:
6256
6257
783e057b
DJ
6258
6259 if test $ac_cv_type_long_long_int = yes; then
6260 HAVE_LONG_LONG_INT=1
6261 else
6262 HAVE_LONG_LONG_INT=0
6263 fi
6264
6265
6266 if test $ac_cv_type_unsigned_long_long_int = yes; then
6267 HAVE_UNSIGNED_LONG_LONG_INT=1
6268 else
6269 HAVE_UNSIGNED_LONG_LONG_INT=0
6270 fi
6271
6272
6273 if test $ac_cv_header_inttypes_h = yes; then
6274 HAVE_INTTYPES_H=1
6275 else
6276 HAVE_INTTYPES_H=0
6277 fi
6278
6279
6280 if test $ac_cv_header_sys_types_h = yes; then
6281 HAVE_SYS_TYPES_H=1
6282 else
6283 HAVE_SYS_TYPES_H=0
6284 fi
6285
6286
6287
6288
6289
f434ba03 6290
783e057b
DJ
6291 :
6292
6293
6294
6295
6296
6297
6298
6299 if test $gl_cv_have_include_next = yes; then
6300 gl_cv_next_stdint_h='<'stdint.h'>'
6301 else
81ecdfbb
RW
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6303$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6304if test "${gl_cv_next_stdint_h+set}" = set; then :
6305 $as_echo_n "(cached) " >&6
783e057b
DJ
6306else
6307
f434ba03
PA
6308 if test $ac_cv_header_stdint_h = yes; then
6309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6310/* end confdefs.h. */
6311#include <stdint.h>
6312
6313_ACEOF
f434ba03
PA
6314 case "$host_os" in
6315 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6316 *) gl_absname_cpp="$ac_cpp" ;;
6317 esac
6318 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6319 sed -n '\#/stdint.h#{
6320 s#.*"\(.*/stdint.h\)".*#\1#
6321 s#^/[^/]#//&#
6322 p
6323 q
6324 }'`'"'
6325 else
6326 gl_cv_next_stdint_h='<'stdint.h'>'
6327 fi
783e057b
DJ
6328
6329fi
81ecdfbb
RW
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6331$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6332 fi
6333 NEXT_STDINT_H=$gl_cv_next_stdint_h
6334
f434ba03
PA
6335 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6336 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6337 gl_next_as_first_directive='<'stdint.h'>'
6338 else
6339 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6340 gl_next_as_first_directive=$gl_cv_next_stdint_h
6341 fi
6342 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6343
783e057b
DJ
6344
6345
6346 if test $ac_cv_header_stdint_h = yes; then
6347 HAVE_STDINT_H=1
6348 else
6349 HAVE_STDINT_H=0
6350 fi
6351
6352
6353 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6355$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6356if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6357 $as_echo_n "(cached) " >&6
783e057b
DJ
6358else
6359 gl_cv_header_working_stdint_h=no
81ecdfbb 6360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6361/* end confdefs.h. */
6362
81ecdfbb 6363
783e057b
DJ
6364#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6365#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6366#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6367#include <stdint.h>
6368/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6369#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6370#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6371#endif
6372
6373
6374 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6375 included before <wchar.h>. */
6376 #include <stddef.h>
6377 #include <signal.h>
6378 #if HAVE_WCHAR_H
6379 # include <stdio.h>
6380 # include <time.h>
6381 # include <wchar.h>
6382 #endif
6383
6384
6385#ifdef INT8_MAX
6386int8_t a1 = INT8_MAX;
6387int8_t a1min = INT8_MIN;
6388#endif
6389#ifdef INT16_MAX
6390int16_t a2 = INT16_MAX;
6391int16_t a2min = INT16_MIN;
6392#endif
6393#ifdef INT32_MAX
6394int32_t a3 = INT32_MAX;
6395int32_t a3min = INT32_MIN;
6396#endif
6397#ifdef INT64_MAX
6398int64_t a4 = INT64_MAX;
6399int64_t a4min = INT64_MIN;
6400#endif
6401#ifdef UINT8_MAX
6402uint8_t b1 = UINT8_MAX;
6403#else
6404typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6405#endif
6406#ifdef UINT16_MAX
6407uint16_t b2 = UINT16_MAX;
6408#endif
6409#ifdef UINT32_MAX
6410uint32_t b3 = UINT32_MAX;
6411#endif
6412#ifdef UINT64_MAX
6413uint64_t b4 = UINT64_MAX;
6414#endif
6415int_least8_t c1 = INT8_C (0x7f);
6416int_least8_t c1max = INT_LEAST8_MAX;
6417int_least8_t c1min = INT_LEAST8_MIN;
6418int_least16_t c2 = INT16_C (0x7fff);
6419int_least16_t c2max = INT_LEAST16_MAX;
6420int_least16_t c2min = INT_LEAST16_MIN;
6421int_least32_t c3 = INT32_C (0x7fffffff);
6422int_least32_t c3max = INT_LEAST32_MAX;
6423int_least32_t c3min = INT_LEAST32_MIN;
6424int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6425int_least64_t c4max = INT_LEAST64_MAX;
6426int_least64_t c4min = INT_LEAST64_MIN;
6427uint_least8_t d1 = UINT8_C (0xff);
6428uint_least8_t d1max = UINT_LEAST8_MAX;
6429uint_least16_t d2 = UINT16_C (0xffff);
6430uint_least16_t d2max = UINT_LEAST16_MAX;
6431uint_least32_t d3 = UINT32_C (0xffffffff);
6432uint_least32_t d3max = UINT_LEAST32_MAX;
6433uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6434uint_least64_t d4max = UINT_LEAST64_MAX;
6435int_fast8_t e1 = INT_FAST8_MAX;
6436int_fast8_t e1min = INT_FAST8_MIN;
6437int_fast16_t e2 = INT_FAST16_MAX;
6438int_fast16_t e2min = INT_FAST16_MIN;
6439int_fast32_t e3 = INT_FAST32_MAX;
6440int_fast32_t e3min = INT_FAST32_MIN;
6441int_fast64_t e4 = INT_FAST64_MAX;
6442int_fast64_t e4min = INT_FAST64_MIN;
6443uint_fast8_t f1 = UINT_FAST8_MAX;
6444uint_fast16_t f2 = UINT_FAST16_MAX;
6445uint_fast32_t f3 = UINT_FAST32_MAX;
6446uint_fast64_t f4 = UINT_FAST64_MAX;
6447#ifdef INTPTR_MAX
6448intptr_t g = INTPTR_MAX;
6449intptr_t gmin = INTPTR_MIN;
6450#endif
6451#ifdef UINTPTR_MAX
6452uintptr_t h = UINTPTR_MAX;
6453#endif
6454intmax_t i = INTMAX_MAX;
6455uintmax_t j = UINTMAX_MAX;
6456
6457#include <limits.h> /* for CHAR_BIT */
6458#define TYPE_MINIMUM(t) \
6459 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6460#define TYPE_MAXIMUM(t) \
6461 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6462struct s {
6463 int check_PTRDIFF:
6464 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6465 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6466 ? 1 : -1;
6467 /* Detect bug in FreeBSD 6.0 / ia64. */
6468 int check_SIG_ATOMIC:
6469 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6470 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6471 ? 1 : -1;
6472 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6473 int check_WCHAR:
6474 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6475 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6476 ? 1 : -1;
6477 /* Detect bug in mingw. */
6478 int check_WINT:
6479 WINT_MIN == TYPE_MINIMUM (wint_t)
6480 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6481 ? 1 : -1;
6482
f434ba03
PA
6483 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6484 int check_UINT8_C:
6485 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6486 int check_UINT16_C:
6487 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6488
6489 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6490#ifdef UINT8_MAX
6491 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6492#endif
6493#ifdef UINT16_MAX
6494 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6495#endif
6496#ifdef UINT32_MAX
6497 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6498#endif
6499#ifdef UINT64_MAX
6500 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6501#endif
6502 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6503 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6504 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6505 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6506 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6507 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6508 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6509 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6510 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6511 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6512 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6513};
6514
6515int
6516main ()
6517{
6518
6519 ;
6520 return 0;
6521}
6522_ACEOF
6523if ac_fn_c_try_compile "$LINENO"; then :
6524 if test "$cross_compiling" = yes; then :
6525 gl_cv_header_working_stdint_h=yes
6526
6527else
6528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6529/* end confdefs.h. */
6530
6531
6532#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6533#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6534#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6535#include <stdint.h>
6536
783e057b 6537
f434ba03
PA
6538 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6539 included before <wchar.h>. */
6540 #include <stddef.h>
6541 #include <signal.h>
6542 #if HAVE_WCHAR_H
6543 # include <stdio.h>
6544 # include <time.h>
6545 # include <wchar.h>
6546 #endif
6547
6548
6549#include <stdio.h>
6550#include <string.h>
6551#define MVAL(macro) MVAL1(macro)
6552#define MVAL1(expression) #expression
6553static const char *macro_values[] =
6554 {
6555#ifdef INT8_MAX
6556 MVAL (INT8_MAX),
6557#endif
6558#ifdef INT16_MAX
6559 MVAL (INT16_MAX),
6560#endif
6561#ifdef INT32_MAX
6562 MVAL (INT32_MAX),
6563#endif
6564#ifdef INT64_MAX
6565 MVAL (INT64_MAX),
6566#endif
783e057b 6567#ifdef UINT8_MAX
f434ba03 6568 MVAL (UINT8_MAX),
783e057b
DJ
6569#endif
6570#ifdef UINT16_MAX
f434ba03 6571 MVAL (UINT16_MAX),
783e057b
DJ
6572#endif
6573#ifdef UINT32_MAX
f434ba03 6574 MVAL (UINT32_MAX),
783e057b
DJ
6575#endif
6576#ifdef UINT64_MAX
f434ba03 6577 MVAL (UINT64_MAX),
783e057b 6578#endif
f434ba03
PA
6579 NULL
6580 };
783e057b
DJ
6581
6582int
6583main ()
6584{
6585
f434ba03
PA
6586 const char **mv;
6587 for (mv = macro_values; *mv != NULL; mv++)
6588 {
6589 const char *value = *mv;
6590 /* Test whether it looks like a cast expression. */
6591 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6592 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6593 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6594 || strncmp (value, "((int)"/*)*/, 6) == 0
6595 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6596 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6597 return 1;
6598 }
6599 return 0;
6600
783e057b
DJ
6601 ;
6602 return 0;
6603}
6604_ACEOF
f434ba03 6605if ac_fn_c_try_run "$LINENO"; then :
783e057b 6606 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6607fi
6608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6609 conftest.$ac_objext conftest.beam conftest.$ac_ext
6610fi
6611
6612
783e057b 6613fi
81ecdfbb 6614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6615
783e057b 6616fi
81ecdfbb
RW
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6618$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6619 fi
6620 if test "$gl_cv_header_working_stdint_h" = yes; then
6621 STDINT_H=
6622 else
81ecdfbb
RW
6623 for ac_header in sys/inttypes.h sys/bitypes.h
6624do :
6625 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6626ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6627eval as_val=\$$as_ac_Header
6628 if test "x$as_val" = x""yes; then :
783e057b 6629 cat >>confdefs.h <<_ACEOF
81ecdfbb 6630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6631_ACEOF
6632
6633fi
6634
6635done
6636
6637 if test $ac_cv_header_sys_inttypes_h = yes; then
6638 HAVE_SYS_INTTYPES_H=1
6639 else
6640 HAVE_SYS_INTTYPES_H=0
6641 fi
6642
6643 if test $ac_cv_header_sys_bitypes_h = yes; then
6644 HAVE_SYS_BITYPES_H=1
6645 else
6646 HAVE_SYS_BITYPES_H=0
6647 fi
6648
6649
6650
6651 :
6652
6653
6654
6655
6656
6657
6658
6659
f434ba03
PA
6660 if test $APPLE_UNIVERSAL_BUILD = 0; then
6661
6662
6663 for gltype in ptrdiff_t size_t ; do
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6665$as_echo_n "checking for bit size of $gltype... " >&6; }
6666if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6667 $as_echo_n "(cached) " >&6
6668else
6669 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6670 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6671 included before <wchar.h>. */
6672 #include <stddef.h>
6673 #include <signal.h>
6674 #if HAVE_WCHAR_H
6675 # include <stdio.h>
6676 # include <time.h>
6677 # include <wchar.h>
6678 #endif
6679
6680#include <limits.h>"; then :
6681
6682else
6683 result=unknown
6684fi
6685
6686 eval gl_cv_bitsizeof_${gltype}=\$result
6687
6688fi
6689eval ac_res=\$gl_cv_bitsizeof_${gltype}
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6691$as_echo "$ac_res" >&6; }
6692 eval result=\$gl_cv_bitsizeof_${gltype}
6693 if test $result = unknown; then
6694 result=0
6695 fi
6696 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6697 cat >>confdefs.h <<_ACEOF
6698#define BITSIZEOF_${GLTYPE} $result
6699_ACEOF
6700
6701 eval BITSIZEOF_${GLTYPE}=\$result
6702 done
6703
6704
6705 fi
6706
783e057b 6707
f434ba03 6708 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6710$as_echo_n "checking for bit size of $gltype... " >&6; }
6711if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6712 $as_echo_n "(cached) " >&6
6713else
6714 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6715 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6716 included before <wchar.h>. */
6717 #include <stddef.h>
6718 #include <signal.h>
6719 #if HAVE_WCHAR_H
6720 # include <stdio.h>
6721 # include <time.h>
6722 # include <wchar.h>
6723 #endif
6724
6725#include <limits.h>"; then :
6726
6727else
6728 result=unknown
6729fi
6730
6731 eval gl_cv_bitsizeof_${gltype}=\$result
6732
6733fi
6734eval ac_res=\$gl_cv_bitsizeof_${gltype}
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6736$as_echo "$ac_res" >&6; }
6737 eval result=\$gl_cv_bitsizeof_${gltype}
6738 if test $result = unknown; then
6739 result=0
6740 fi
6741 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6742 cat >>confdefs.h <<_ACEOF
6743#define BITSIZEOF_${GLTYPE} $result
6744_ACEOF
783e057b 6745
81ecdfbb
RW
6746 eval BITSIZEOF_${GLTYPE}=\$result
6747 done
783e057b
DJ
6748
6749
6750
6751
81ecdfbb
RW
6752 for gltype in sig_atomic_t wchar_t wint_t ; do
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6754$as_echo_n "checking whether $gltype is signed... " >&6; }
6755if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6756 $as_echo_n "(cached) " >&6
783e057b 6757else
81ecdfbb 6758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6759/* end confdefs.h. */
6760
6761 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6762 included before <wchar.h>. */
6763 #include <stddef.h>
6764 #include <signal.h>
6765 #if HAVE_WCHAR_H
6766 # include <stdio.h>
6767 # include <time.h>
6768 # include <wchar.h>
6769 #endif
6770
6771 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6772int
6773main ()
6774{
6775
6776 ;
6777 return 0;
6778}
6779_ACEOF
81ecdfbb 6780if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6781 result=yes
6782else
81ecdfbb 6783 result=no
20e95c23 6784fi
81ecdfbb 6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6786 eval gl_cv_type_${gltype}_signed=\$result
6787
6788fi
81ecdfbb
RW
6789eval ac_res=\$gl_cv_type_${gltype}_signed
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6791$as_echo "$ac_res" >&6; }
783e057b
DJ
6792 eval result=\$gl_cv_type_${gltype}_signed
6793 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6794 if test "$result" = yes; then
6795 cat >>confdefs.h <<_ACEOF
6796#define HAVE_SIGNED_${GLTYPE} 1
6797_ACEOF
6798
6799 eval HAVE_SIGNED_${GLTYPE}=1
6800 else
6801 eval HAVE_SIGNED_${GLTYPE}=0
6802 fi
6803 done
6804
6805
6806 gl_cv_type_ptrdiff_t_signed=yes
6807 gl_cv_type_size_t_signed=no
f434ba03 6808 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6809
6810
f434ba03 6811 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6813$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6814if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6815 $as_echo_n "(cached) " >&6
c906108c 6816else
783e057b
DJ
6817 eval gl_cv_type_${gltype}_suffix=no
6818 eval result=\$gl_cv_type_${gltype}_signed
6819 if test "$result" = yes; then
6820 glsufu=
6821 else
6822 glsufu=u
6823 fi
6824 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6825 case $glsuf in
6826 '') gltype1='int';;
f434ba03
PA
6827 l) gltype1='long int';;
6828 ll) gltype1='long long int';;
6829 i64) gltype1='__int64';;
6830 u) gltype1='unsigned int';;
6831 ul) gltype1='unsigned long int';;
6832 ull) gltype1='unsigned long long int';;
783e057b
DJ
6833 ui64)gltype1='unsigned __int64';;
6834 esac
81ecdfbb 6835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6836/* end confdefs.h. */
6837
6838 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6839 included before <wchar.h>. */
6840 #include <stddef.h>
6841 #include <signal.h>
6842 #if HAVE_WCHAR_H
6843 # include <stdio.h>
6844 # include <time.h>
6845 # include <wchar.h>
6846 #endif
6847
6848 extern $gltype foo;
6849 extern $gltype1 foo;
6850int
6851main ()
6852{
6853
6854 ;
6855 return 0;
6856}
6857_ACEOF
81ecdfbb 6858if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6859 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6860fi
81ecdfbb 6861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6862 eval result=\$gl_cv_type_${gltype}_suffix
6863 test "$result" != no && break
6864 done
6865fi
81ecdfbb
RW
6866eval ac_res=\$gl_cv_type_${gltype}_suffix
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6868$as_echo "$ac_res" >&6; }
783e057b
DJ
6869 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6870 eval result=\$gl_cv_type_${gltype}_suffix
6871 test "$result" = no && result=
6872 eval ${GLTYPE}_SUFFIX=\$result
6873 cat >>confdefs.h <<_ACEOF
6874#define ${GLTYPE}_SUFFIX $result
6875_ACEOF
6876
6877 done
6878
6879
783e057b
DJ
6880 fi
6881
6882
f434ba03
PA
6883 for gltype in sig_atomic_t wchar_t wint_t ; do
6884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6885$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6886if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6887 $as_echo_n "(cached) " >&6
783e057b 6888else
f434ba03
PA
6889 eval gl_cv_type_${gltype}_suffix=no
6890 eval result=\$gl_cv_type_${gltype}_signed
6891 if test "$result" = yes; then
6892 glsufu=
6893 else
6894 glsufu=u
6895 fi
6896 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6897 case $glsuf in
6898 '') gltype1='int';;
6899 l) gltype1='long int';;
6900 ll) gltype1='long long int';;
6901 i64) gltype1='__int64';;
6902 u) gltype1='unsigned int';;
6903 ul) gltype1='unsigned long int';;
6904 ull) gltype1='unsigned long long int';;
6905 ui64)gltype1='unsigned __int64';;
6906 esac
6907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6908/* end confdefs.h. */
f434ba03
PA
6909
6910 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6911 included before <wchar.h>. */
6912 #include <stddef.h>
6913 #include <signal.h>
6914 #if HAVE_WCHAR_H
6915 # include <stdio.h>
6916 # include <time.h>
6917 # include <wchar.h>
6918 #endif
6919
6920 extern $gltype foo;
6921 extern $gltype1 foo;
6922int
6923main ()
6924{
6925
6926 ;
6927 return 0;
6928}
783e057b 6929_ACEOF
81ecdfbb 6930if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6931 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6932fi
81ecdfbb 6933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6934 eval result=\$gl_cv_type_${gltype}_suffix
6935 test "$result" != no && break
6936 done
783e057b 6937fi
f434ba03
PA
6938eval ac_res=\$gl_cv_type_${gltype}_suffix
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6940$as_echo "$ac_res" >&6; }
6941 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6942 eval result=\$gl_cv_type_${gltype}_suffix
6943 test "$result" = no && result=
6944 eval ${GLTYPE}_SUFFIX=\$result
6945 cat >>confdefs.h <<_ACEOF
6946#define ${GLTYPE}_SUFFIX $result
6947_ACEOF
6948
6949 done
6950
6951
6952
6953 STDINT_H=stdint.h
783e057b
DJ
6954 fi
6955
6956
f434ba03
PA
6957 # Code from module string:
6958
6959
6960
6961 # Code from module warn-on-use:
6962 # Code from module wchar:
6963
6964
6965
6966
783e057b
DJ
6967 :
6968
6969
6970
6971
6972
783e057b
DJ
6973
6974
6975
6976
6977 :
6978
6979
6980
6981
6982
6983
6984
6985 if test $gl_cv_have_include_next = yes; then
6986 gl_cv_next_wchar_h='<'wchar.h'>'
6987 else
81ecdfbb
RW
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6989$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6990if test "${gl_cv_next_wchar_h+set}" = set; then :
6991 $as_echo_n "(cached) " >&6
783e057b
DJ
6992else
6993
f434ba03
PA
6994 if test $ac_cv_header_wchar_h = yes; then
6995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6996/* end confdefs.h. */
6997#include <wchar.h>
6998
6999_ACEOF
f434ba03
PA
7000 case "$host_os" in
7001 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7002 *) gl_absname_cpp="$ac_cpp" ;;
7003 esac
7004 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7005 sed -n '\#/wchar.h#{
7006 s#.*"\(.*/wchar.h\)".*#\1#
7007 s#^/[^/]#//&#
7008 p
7009 q
7010 }'`'"'
7011 else
7012 gl_cv_next_wchar_h='<'wchar.h'>'
7013 fi
783e057b
DJ
7014
7015fi
81ecdfbb
RW
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7017$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7018 fi
7019 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7020
f434ba03
PA
7021 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7022 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7023 gl_next_as_first_directive='<'wchar.h'>'
7024 else
7025 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7026 gl_next_as_first_directive=$gl_cv_next_wchar_h
7027 fi
7028 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7029
7030
7031
7032 if test $ac_cv_header_wchar_h = yes; then
7033 HAVE_WCHAR_H=1
7034 else
7035 HAVE_WCHAR_H=0
7036 fi
7037
7038
7039
7040 if test $gt_cv_c_wint_t = yes; then
7041 HAVE_WINT_T=1
7042 else
7043 HAVE_WINT_T=0
7044 fi
7045
7046
7047
7048 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7049 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7051$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7052if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7053 $as_echo_n "(cached) " >&6
7054else
7055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7056/* end confdefs.h. */
7057
7058/* Some systems require additional headers. */
7059#ifndef __GLIBC__
7060# include <stddef.h>
7061# include <stdio.h>
7062# include <time.h>
7063#endif
7064#include <wchar.h>
7065
7066int
7067main ()
7068{
7069#undef $gl_func
7070 (void) $gl_func;
7071 ;
7072 return 0;
7073}
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076 eval "$as_gl_Symbol=yes"
7077else
7078 eval "$as_gl_Symbol=no"
7079fi
7080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7081fi
7082eval ac_res=\$$as_gl_Symbol
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7084$as_echo "$ac_res" >&6; }
7085 eval as_val=\$$as_gl_Symbol
7086 if test "x$as_val" = x""yes; then :
7087 cat >>confdefs.h <<_ACEOF
7088#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7089_ACEOF
7090
7091 eval ac_cv_have_decl_$gl_func=yes
7092fi
7093 done
7094
7095
7096 # Code from module dummy:
7097 # End of code from modules
7098
7099
c906108c 7100
c906108c 7101
c906108c 7102
c906108c 7103
c906108c 7104
c906108c 7105
c906108c 7106
783e057b
DJ
7107 gltests_libdeps=
7108 gltests_ltlibdeps=
20e95c23 7109
20e95c23 7110
20e95c23 7111
f434ba03
PA
7112
7113
7114
7115
7116
7117
783e057b 7118 gl_source_base='tests'
f434ba03
PA
7119 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
7120
7121 gl_module_indicator_condition=$gltests_WITNESS
7122
7123
7124
7125
7126
c906108c 7127
bec39cab 7128
bec39cab 7129
783e057b
DJ
7130
7131 LIBGNU_LIBDEPS="$gl_libdeps"
7132
7133 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7134
7135
e28b3332 7136
d5af19ba
DJ
7137# For Makefile dependencies.
7138GNULIB_STDINT_H=
7139if test x"$STDINT_H" != x; then
7140 GNULIB_STDINT_H=gnulib/$STDINT_H
7141fi
7142
7143
bec39cab
AC
7144PACKAGE=gdb
7145
7146cat >>confdefs.h <<_ACEOF
7147#define PACKAGE "$PACKAGE"
7148_ACEOF
7149
7150
7151
e28b3332
DJ
7152# GDB does not use automake, but gnulib does. This line lets us
7153# generate its Makefile.in.
81ecdfbb
RW
7154am__api_version='1.11'
7155
e28b3332
DJ
7156# Find a good install program. We prefer a C program (faster),
7157# so one script is as good as another. But avoid the broken or
7158# incompatible versions:
7159# SysV /etc/install, /usr/sbin/install
7160# SunOS /usr/etc/install
7161# IRIX /sbin/install
7162# AIX /bin/install
7163# AmigaOS /C/install, which installs bootblocks on floppy discs
7164# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7165# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7166# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7167# OS/2's system install, which has a completely different semantic
7168# ./install, which can be erroneously created by make from ./install.sh.
85541719 7169# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7171$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7172if test -z "$INSTALL"; then
81ecdfbb
RW
7173if test "${ac_cv_path_install+set}" = set; then :
7174 $as_echo_n "(cached) " >&6
e28b3332
DJ
7175else
7176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7177for as_dir in $PATH
7178do
7179 IFS=$as_save_IFS
7180 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7181 # Account for people who put trailing slashes in PATH elements.
7182case $as_dir/ in #((
7183 ./ | .// | /[cC]/* | \
e28b3332 7184 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7185 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7186 /usr/ucb/* ) ;;
7187 *)
7188 # OSF1 and SCO ODT 3.0 have their own names for install.
7189 # Don't use installbsd from OSF since it installs stuff as root
7190 # by default.
7191 for ac_prog in ginstall scoinst install; do
7192 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7193 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7194 if test $ac_prog = install &&
7195 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7196 # AIX install. It has an incompatible calling convention.
7197 :
7198 elif test $ac_prog = install &&
7199 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7200 # program-specific install script used by HP pwplus--don't use.
7201 :
7202 else
85541719
DE
7203 rm -rf conftest.one conftest.two conftest.dir
7204 echo one > conftest.one
7205 echo two > conftest.two
7206 mkdir conftest.dir
7207 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7208 test -s conftest.one && test -s conftest.two &&
7209 test -s conftest.dir/conftest.one &&
7210 test -s conftest.dir/conftest.two
7211 then
7212 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7213 break 3
7214 fi
e28b3332
DJ
7215 fi
7216 fi
7217 done
7218 done
7219 ;;
7220esac
81ecdfbb
RW
7221
7222 done
7223IFS=$as_save_IFS
e28b3332 7224
85541719 7225rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7226
7227fi
7228 if test "${ac_cv_path_install+set}" = set; then
7229 INSTALL=$ac_cv_path_install
7230 else
85541719
DE
7231 # As a last resort, use the slow shell script. Don't cache a
7232 # value for INSTALL within a source directory, because that will
e28b3332 7233 # break other packages using the cache if that directory is
85541719 7234 # removed, or if the value is a relative name.
e28b3332
DJ
7235 INSTALL=$ac_install_sh
7236 fi
7237fi
81ecdfbb
RW
7238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7239$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7240
7241# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7242# It thinks the first close brace ends the variable substitution.
7243test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7244
7245test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7246
7247test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7248
81ecdfbb
RW
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7250$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7251# Just in case
7252sleep 1
7253echo timestamp > conftest.file
81ecdfbb
RW
7254# Reject unsafe characters in $srcdir or the absolute working directory
7255# name. Accept space and tab only in the latter.
7256am_lf='
7257'
7258case `pwd` in
7259 *[\\\"\#\$\&\'\`$am_lf]*)
7260 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7261esac
7262case $srcdir in
7263 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7264 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7265esac
7266
e28b3332
DJ
7267# Do `set' in a subshell so we don't clobber the current shell's
7268# arguments. Must try -L first in case configure is actually a
7269# symlink; some systems play weird games with the mod time of symlinks
7270# (eg FreeBSD returns the mod time of the symlink's containing
7271# directory).
7272if (
81ecdfbb 7273 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7274 if test "$*" = "X"; then
7275 # -L didn't work.
81ecdfbb 7276 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7277 fi
7278 rm -f conftest.file
7279 if test "$*" != "X $srcdir/configure conftest.file" \
7280 && test "$*" != "X conftest.file $srcdir/configure"; then
7281
7282 # If neither matched, then we have a broken ls. This can happen
7283 # if, for instance, CONFIG_SHELL is bash and it inherits a
7284 # broken ls alias from the environment. This has actually
7285 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7286 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7287alias in your environment" "$LINENO" 5
e28b3332
DJ
7288 fi
7289
7290 test "$2" = conftest.file
7291 )
7292then
7293 # Ok.
7294 :
7295else
81ecdfbb
RW
7296 as_fn_error "newly created file is older than distributed files!
7297Check your system clock" "$LINENO" 5
e28b3332 7298fi
81ecdfbb
RW
7299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7300$as_echo "yes" >&6; }
e28b3332 7301test "$program_prefix" != NONE &&
81ecdfbb 7302 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7303# Use a double $ so make ignores it.
7304test "$program_suffix" != NONE &&
81ecdfbb
RW
7305 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7306# Double any \ or $.
e28b3332 7307# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7308ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7309program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7310
7311# expand $ac_aux_dir to an absolute path
7312am_aux_dir=`cd $ac_aux_dir && pwd`
7313
81ecdfbb
RW
7314if test x"${MISSING+set}" != xset; then
7315 case $am_aux_dir in
7316 *\ * | *\ *)
7317 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7318 *)
7319 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7320 esac
7321fi
e28b3332
DJ
7322# Use eval to expand $SHELL
7323if eval "$MISSING --run true"; then
7324 am_missing_run="$MISSING --run "
7325else
7326 am_missing_run=
81ecdfbb
RW
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7328$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7329fi
7330
7331if test x"${install_sh}" != xset; then
7332 case $am_aux_dir in
7333 *\ * | *\ *)
7334 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7335 *)
7336 install_sh="\${SHELL} $am_aux_dir/install-sh"
7337 esac
7338fi
7339
7340# Installed binaries are usually stripped using `strip' when the user
7341# run `make install-strip'. However `strip' might not be the right
7342# tool to use in cross-compilation environments, therefore Automake
7343# will honor the `STRIP' environment variable to overrule this program.
7344if test "$cross_compiling" != no; then
7345 if test -n "$ac_tool_prefix"; then
7346 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7347set dummy ${ac_tool_prefix}strip; ac_word=$2
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
7350if test "${ac_cv_prog_STRIP+set}" = set; then :
7351 $as_echo_n "(cached) " >&6
7352else
7353 if test -n "$STRIP"; then
7354 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7355else
7356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357for as_dir in $PATH
7358do
7359 IFS=$as_save_IFS
7360 test -z "$as_dir" && as_dir=.
7361 for ac_exec_ext in '' $ac_executable_extensions; do
7362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7363 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7365 break 2
7366 fi
7367done
7368 done
7369IFS=$as_save_IFS
7370
7371fi
7372fi
7373STRIP=$ac_cv_prog_STRIP
7374if test -n "$STRIP"; then
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7376$as_echo "$STRIP" >&6; }
7377else
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381
7382
7383fi
7384if test -z "$ac_cv_prog_STRIP"; then
7385 ac_ct_STRIP=$STRIP
7386 # Extract the first word of "strip", so it can be a program name with args.
7387set dummy strip; ac_word=$2
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389$as_echo_n "checking for $ac_word... " >&6; }
7390if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7391 $as_echo_n "(cached) " >&6
7392else
7393 if test -n "$ac_ct_STRIP"; then
7394 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7395else
7396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399 IFS=$as_save_IFS
7400 test -z "$as_dir" && as_dir=.
7401 for ac_exec_ext in '' $ac_executable_extensions; do
7402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7403 ac_cv_prog_ac_ct_STRIP="strip"
7404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405 break 2
7406 fi
7407done
7408 done
7409IFS=$as_save_IFS
7410
7411fi
7412fi
7413ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7414if test -n "$ac_ct_STRIP"; then
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7416$as_echo "$ac_ct_STRIP" >&6; }
7417else
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419$as_echo "no" >&6; }
7420fi
7421
7422 if test "x$ac_ct_STRIP" = x; then
7423 STRIP=":"
7424 else
7425 case $cross_compiling:$ac_tool_warned in
7426yes:)
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7429ac_tool_warned=yes ;;
7430esac
7431 STRIP=$ac_ct_STRIP
7432 fi
7433else
7434 STRIP="$ac_cv_prog_STRIP"
7435fi
7436
7437fi
7438INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7439
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7441$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7442if test -z "$MKDIR_P"; then
7443 if test "${ac_cv_path_mkdir+set}" = set; then :
7444 $as_echo_n "(cached) " >&6
7445else
7446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7448do
7449 IFS=$as_save_IFS
7450 test -z "$as_dir" && as_dir=.
7451 for ac_prog in mkdir gmkdir; do
7452 for ac_exec_ext in '' $ac_executable_extensions; do
7453 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7454 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7455 'mkdir (GNU coreutils) '* | \
7456 'mkdir (coreutils) '* | \
7457 'mkdir (fileutils) '4.1*)
7458 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7459 break 3;;
7460 esac
7461 done
7462 done
e28b3332 7463 done
81ecdfbb
RW
7464IFS=$as_save_IFS
7465
7466fi
7467
7468 if test "${ac_cv_path_mkdir+set}" = set; then
7469 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7470 else
81ecdfbb
RW
7471 # As a last resort, use the slow shell script. Don't cache a
7472 # value for MKDIR_P within a source directory, because that will
7473 # break other packages using the cache if that directory is
7474 # removed, or if the value is a relative name.
7475 test -d ./--version && rmdir ./--version
7476 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7477 fi
7478fi
81ecdfbb
RW
7479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7480$as_echo "$MKDIR_P" >&6; }
7481
f434ba03 7482
81ecdfbb
RW
7483mkdir_p="$MKDIR_P"
7484case $mkdir_p in
7485 [\\/$]* | ?:[\\/]*) ;;
7486 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7487esac
e28b3332
DJ
7488
7489for ac_prog in gawk mawk nawk awk
7490do
7491 # Extract the first word of "$ac_prog", so it can be a program name with args.
7492set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494$as_echo_n "checking for $ac_word... " >&6; }
7495if test "${ac_cv_prog_AWK+set}" = set; then :
7496 $as_echo_n "(cached) " >&6
e28b3332
DJ
7497else
7498 if test -n "$AWK"; then
7499 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7500else
7501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502for as_dir in $PATH
7503do
7504 IFS=$as_save_IFS
7505 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7506 for ac_exec_ext in '' $ac_executable_extensions; do
7507 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7508 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7510 break 2
7511 fi
7512done
81ecdfbb
RW
7513 done
7514IFS=$as_save_IFS
e28b3332
DJ
7515
7516fi
7517fi
7518AWK=$ac_cv_prog_AWK
7519if test -n "$AWK"; then
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7521$as_echo "$AWK" >&6; }
e28b3332 7522else
81ecdfbb
RW
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524$as_echo "no" >&6; }
e28b3332
DJ
7525fi
7526
81ecdfbb 7527
e28b3332
DJ
7528 test -n "$AWK" && break
7529done
7530
81ecdfbb 7531ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7532
7533
7534am_make=${MAKE-make}
7535cat > confinc << 'END'
7536am__doit:
81ecdfbb 7537 @echo this is the am__doit target
e28b3332
DJ
7538.PHONY: am__doit
7539END
7540# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7542$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7543am__include="#"
7544am__quote=
7545_am_result=none
7546# First try GNU make style include.
7547echo "include confinc" > confmf
81ecdfbb
RW
7548# Ignore all kinds of additional output from `make'.
7549case `$am_make -s -f confmf 2> /dev/null` in #(
7550*the\ am__doit\ target*)
7551 am__include=include
7552 am__quote=
7553 _am_result=GNU
7554 ;;
7555esac
e28b3332
DJ
7556# Now try BSD make style include.
7557if test "$am__include" = "#"; then
7558 echo '.include "confinc"' > confmf
81ecdfbb
RW
7559 case `$am_make -s -f confmf 2> /dev/null` in #(
7560 *the\ am__doit\ target*)
7561 am__include=.include
7562 am__quote="\""
7563 _am_result=BSD
7564 ;;
7565 esac
e28b3332
DJ
7566fi
7567
7568
81ecdfbb
RW
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7570$as_echo "$_am_result" >&6; }
e28b3332
DJ
7571rm -f confinc confmf
7572
81ecdfbb
RW
7573# Check whether --enable-dependency-tracking was given.
7574if test "${enable_dependency_tracking+set}" = set; then :
7575 enableval=$enable_dependency_tracking;
7576fi
e28b3332 7577
e28b3332
DJ
7578if test "x$enable_dependency_tracking" != xno; then
7579 am_depcomp="$ac_aux_dir/depcomp"
7580 AMDEPBACKSLASH='\'
7581fi
81ecdfbb 7582 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7583 AMDEP_TRUE=
7584 AMDEP_FALSE='#'
7585else
7586 AMDEP_TRUE='#'
7587 AMDEP_FALSE=
7588fi
7589
7590
81ecdfbb
RW
7591if test "`cd $srcdir && pwd`" != "`pwd`"; then
7592 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7593 # is not polluted with repeated "-I."
7594 am__isrc=' -I$(srcdir)'
7595 # test to see if srcdir already configured
7596 if test -f $srcdir/config.status; then
7597 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7598 fi
e28b3332
DJ
7599fi
7600
7601# test whether we have cygpath
7602if test -z "$CYGPATH_W"; then
7603 if (cygpath --version) >/dev/null 2>/dev/null; then
7604 CYGPATH_W='cygpath -w'
7605 else
7606 CYGPATH_W=echo
7607 fi
7608fi
7609
7610
7611# Define the identity of the package.
7612 PACKAGE=gdb
7613 VERSION=UNUSED-VERSION
7614
7615
7616# Some tools Automake needs.
7617
7618ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7619
7620
7621AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7622
7623
7624AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7625
7626
7627AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7628
7629
7630MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7631
e28b3332
DJ
7632# We need awk for the "check" target. The system "awk" is bad on
7633# some platforms.
7634# Always define AMTAR for backward compatibility.
7635
7636AMTAR=${AMTAR-"${am_missing_run}tar"}
7637
7638am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7639
7640
7641
7642
7643depcc="$CC" am_compiler_list=
7644
81ecdfbb
RW
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7646$as_echo_n "checking dependency style of $depcc... " >&6; }
7647if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7648 $as_echo_n "(cached) " >&6
e28b3332
DJ
7649else
7650 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7651 # We make a subdir and do the tests there. Otherwise we can end up
7652 # making bogus files that we don't know about and never remove. For
7653 # instance it was reported that on HP-UX the gcc test will end up
7654 # making a dummy file named `D' -- because `-MD' means `put the output
7655 # in D'.
7656 mkdir conftest.dir
7657 # Copy depcomp to subdir because otherwise we won't find it if we're
7658 # using a relative directory.
7659 cp "$am_depcomp" conftest.dir
7660 cd conftest.dir
7661 # We will build objects and dependencies in a subdirectory because
7662 # it helps to detect inapplicable dependency modes. For instance
7663 # both Tru64's cc and ICC support -MD to output dependencies as a
7664 # side effect of compilation, but ICC will put the dependencies in
7665 # the current directory while Tru64 will put them in the object
7666 # directory.
7667 mkdir sub
7668
7669 am_cv_CC_dependencies_compiler_type=none
7670 if test "$am_compiler_list" = ""; then
7671 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7672 fi
81ecdfbb
RW
7673 am__universal=false
7674 case " $depcc " in #(
7675 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7676 esac
7677
e28b3332
DJ
7678 for depmode in $am_compiler_list; do
7679 # Setup a source with many dependencies, because some compilers
7680 # like to wrap large dependency lists on column 80 (with \), and
7681 # we should not choose a depcomp mode which is confused by this.
7682 #
7683 # We need to recreate these files for each test, as the compiler may
7684 # overwrite some of them when testing with obscure command lines.
7685 # This happens at least with the AIX C compiler.
7686 : > sub/conftest.c
7687 for i in 1 2 3 4 5 6; do
7688 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7689 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7690 # Solaris 8's {/usr,}/bin/sh.
7691 touch sub/conftst$i.h
7692 done
7693 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7694
81ecdfbb
RW
7695 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7696 # mode. It turns out that the SunPro C++ compiler does not properly
7697 # handle `-M -o', and we need to detect this. Also, some Intel
7698 # versions had trouble with output in subdirs
7699 am__obj=sub/conftest.${OBJEXT-o}
7700 am__minus_obj="-o $am__obj"
e28b3332 7701 case $depmode in
81ecdfbb
RW
7702 gcc)
7703 # This depmode causes a compiler race in universal mode.
7704 test "$am__universal" = false || continue
7705 ;;
e28b3332
DJ
7706 nosideeffect)
7707 # after this tag, mechanisms are not by side-effect, so they'll
7708 # only be used when explicitly requested
7709 if test "x$enable_dependency_tracking" = xyes; then
7710 continue
7711 else
7712 break
7713 fi
7714 ;;
81ecdfbb
RW
7715 msvisualcpp | msvcmsys)
7716 # This compiler won't grok `-c -o', but also, the minuso test has
7717 # not run yet. These depmodes are late enough in the game, and
7718 # so weak that their functioning should not be impacted.
7719 am__obj=conftest.${OBJEXT-o}
7720 am__minus_obj=
7721 ;;
e28b3332
DJ
7722 none) break ;;
7723 esac
e28b3332 7724 if depmode=$depmode \
81ecdfbb 7725 source=sub/conftest.c object=$am__obj \
e28b3332 7726 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7727 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7728 >/dev/null 2>conftest.err &&
81ecdfbb 7729 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7730 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7731 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7732 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7733 # icc doesn't choke on unknown options, it will just issue warnings
7734 # or remarks (even with -Werror). So we grep stderr for any message
7735 # that says an option was ignored or not supported.
7736 # When given -MP, icc 7.0 and 7.1 complain thusly:
7737 # icc: Command line warning: ignoring option '-M'; no argument required
7738 # The diagnosis changed in icc 8.0:
7739 # icc: Command line remark: option '-MP' not supported
7740 if (grep 'ignoring option' conftest.err ||
7741 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7742 am_cv_CC_dependencies_compiler_type=$depmode
7743 break
7744 fi
7745 fi
7746 done
7747
7748 cd ..
7749 rm -rf conftest.dir
7750else
7751 am_cv_CC_dependencies_compiler_type=none
7752fi
7753
7754fi
81ecdfbb
RW
7755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7756$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7757CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7758
81ecdfbb 7759 if
e28b3332
DJ
7760 test "x$enable_dependency_tracking" != xno \
7761 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7762 am__fastdepCC_TRUE=
7763 am__fastdepCC_FALSE='#'
7764else
7765 am__fastdepCC_TRUE='#'
7766 am__fastdepCC_FALSE=
7767fi
7768
7769
7770
7771
bec39cab
AC
7772
7773
81ecdfbb
RW
7774# Check whether --with-separate-debug-dir was given.
7775if test "${with_separate_debug_dir+set}" = set; then :
7776 withval=$with_separate_debug_dir;
b14b1491
TT
7777 DEBUGDIR=$withval
7778else
7779 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7780fi
7781
20e95c23 7782
783e057b
DJ
7783 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7784 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7785 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7786 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7787
783e057b
DJ
7788cat >>confdefs.h <<_ACEOF
7789#define DEBUGDIR "$ac_define_dir"
20e95c23 7790_ACEOF
20e95c23 7791
20e95c23 7792
20e95c23 7793
0c4a4063 7794
b14b1491
TT
7795 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7796 if test "x$prefix" = xNONE; then
7797 test_prefix=/usr/local
7798 else
7799 test_prefix=$prefix
7800 fi
783e057b 7801 else
b14b1491 7802 test_prefix=$exec_prefix
783e057b 7803 fi
b14b1491
TT
7804 value=0
7805 case ${ac_define_dir} in
7806 "${test_prefix}"|"${test_prefix}/"*|\
7807 '${exec_prefix}'|'${exec_prefix}/'*)
7808 value=1
7809 ;;
7810 esac
7811
7812cat >>confdefs.h <<_ACEOF
7813#define DEBUGDIR_RELOCATABLE $value
7814_ACEOF
7815
7816
7817
0c4a4063 7818
b14b1491
TT
7819# GDB's datadir relocation
7820
7821
7822
81ecdfbb
RW
7823# Check whether --with-gdb-datadir was given.
7824if test "${with_gdb_datadir+set}" = set; then :
7825 withval=$with_gdb_datadir;
b14b1491 7826 GDB_DATADIR=$withval
20e95c23 7827else
b14b1491 7828 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7829fi
7830
20e95c23 7831
b14b1491
TT
7832 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7833 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7834 ac_define_dir=`eval echo $GDB_DATADIR`
7835 ac_define_dir=`eval echo $ac_define_dir`
7836
7837cat >>confdefs.h <<_ACEOF
7838#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7839_ACEOF
7840
b14b1491
TT
7841
7842
0c4a4063 7843
b14b1491
TT
7844 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7845 if test "x$prefix" = xNONE; then
7846 test_prefix=/usr/local
7847 else
7848 test_prefix=$prefix
7849 fi
7850 else
7851 test_prefix=$exec_prefix
7852 fi
7853 value=0
7854 case ${ac_define_dir} in
7855 "${test_prefix}"|"${test_prefix}/"*|\
7856 '${exec_prefix}'|'${exec_prefix}/'*)
7857 value=1
7858 ;;
7859 esac
7860
7861cat >>confdefs.h <<_ACEOF
7862#define GDB_DATADIR_RELOCATABLE $value
7863_ACEOF
7864
7865
783e057b 7866
20e95c23 7867
0c4a4063 7868
81ecdfbb
RW
7869# Check whether --with-relocated-sources was given.
7870if test "${with_relocated_sources+set}" = set; then :
7871 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7872
7873 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7874 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7875 ac_define_dir=`eval echo $reloc_srcdir`
7876 ac_define_dir=`eval echo $ac_define_dir`
7877
7878cat >>confdefs.h <<_ACEOF
7879#define RELOC_SRCDIR "$ac_define_dir"
7880_ACEOF
7881
7882
7883
81ecdfbb
RW
7884fi
7885
29b0e8a2
JM
7886
7887
20e95c23 7888
5ae98d25 7889subdirs="$subdirs testsuite"
20e95c23
DJ
7890
7891
783e057b 7892# Check whether to support alternative target configurations
81ecdfbb
RW
7893# Check whether --enable-targets was given.
7894if test "${enable_targets+set}" = set; then :
7895 enableval=$enable_targets; case "${enableval}" in
7896 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7897 ;;
7898 no) enable_targets= ;;
7899 *) enable_targets=$enableval ;;
7900esac
81ecdfbb
RW
7901fi
7902
20e95c23 7903
783e057b 7904# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7905# Check whether --enable-64-bit-bfd was given.
7906if test "${enable_64_bit_bfd+set}" = set; then :
7907 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7908 yes) want64=true ;;
7909 no) want64=false ;;
81ecdfbb 7910 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7911esac
7912else
7913 want64=false
81ecdfbb
RW
7914fi
7915
783e057b
DJ
7916# Provide defaults for some variables set by the per-host and per-target
7917# configuration.
7918gdb_host_obs=posix-hdep.o
20e95c23 7919
783e057b
DJ
7920if test "${target}" = "${host}"; then
7921 gdb_native=yes
7922else
7923 gdb_native=no
7924fi
20e95c23 7925
783e057b 7926. $srcdir/configure.host
20e95c23 7927
783e057b 7928# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7929
783e057b
DJ
7930TARGET_OBS=
7931all_targets=
20e95c23 7932
783e057b 7933for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7934do
783e057b
DJ
7935 if test "$targ_alias" = "all"; then
7936 all_targets=true
7937 else
7938 # Canonicalize the secondary target names.
7939 result=`$ac_config_sub $targ_alias 2>/dev/null`
7940 if test -n "$result"; then
7941 targ=$result
7942 else
7943 targ=$targ_alias
7944 fi
20e95c23 7945
783e057b 7946 . ${srcdir}/configure.tgt
20e95c23 7947
bf307134
JB
7948 if test -z "${gdb_target_obs}"; then :
7949 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
7950fi
7951
783e057b
DJ
7952 # Target-specific object files
7953 for i in ${gdb_target_obs}; do
7954 case " $TARGET_OBS " in
7955 *" ${i} "*) ;;
7956 *)
7957 TARGET_OBS="$TARGET_OBS ${i}"
7958 ;;
7959 esac
7960 done
20e95c23 7961
783e057b
DJ
7962 # Check whether this target needs 64-bit CORE_ADDR
7963 if test x${want64} = xfalse; then
7964 . ${srcdir}/../bfd/config.bfd
7965 fi
7966 fi
20e95c23
DJ
7967done
7968
783e057b
DJ
7969if test x${all_targets} = xtrue; then
7970
7971 # We want all 64-bit targets if we either:
7972 # - run on a 64-bit host or
7973 # - already require 64-bit support for some other target or
7974 # - the --enable-64-bit-bfd option was supplied
7975 # Otherwise we only support all 32-bit targets.
7976 #
7977 # NOTE: This test must be in sync with the corresponding
7978 # tests in BFD!
20e95c23 7979
783e057b 7980 if test x${want64} = xfalse; then
81ecdfbb
RW
7981 # The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7986$as_echo_n "checking size of long... " >&6; }
7987if test "${ac_cv_sizeof_long+set}" = set; then :
7988 $as_echo_n "(cached) " >&6
c0993dbe 7989else
81ecdfbb 7990 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 7991
81ecdfbb
RW
7992else
7993 if test "$ac_cv_type_long" = yes; then
7994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7996{ as_fn_set_status 77
7997as_fn_error "cannot compute sizeof (long)
7998See \`config.log' for more details." "$LINENO" 5; }; }
7999 else
8000 ac_cv_sizeof_long=0
8001 fi
c0993dbe 8002fi
81ecdfbb 8003
c0993dbe 8004fi
81ecdfbb
RW
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8006$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8007
c0993dbe 8008
c0993dbe 8009
c0993dbe
UW
8010cat >>confdefs.h <<_ACEOF
8011#define SIZEOF_LONG $ac_cv_sizeof_long
8012_ACEOF
8013
8014
8015 if test "x${ac_cv_sizeof_long}" = "x8"; then
8016 want64=true
8017 fi
8018 fi
8019 if test x${want64} = xtrue; then
8020 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8021 else
8022 TARGET_OBS='$(ALL_TARGET_OBS)'
8023 fi
8024fi
8025
8026
8027
8028# For other settings, only the main target counts.
8029gdb_sim=
8030gdb_osabi=
8031build_gdbserver=
8032targ=$target; . ${srcdir}/configure.tgt
8033
8034# Fetch the default architecture and default target vector from BFD.
8035targ=$target; . $srcdir/../bfd/config.bfd
8036
8037# We only want the first architecture, so strip off the others if
8038# there is more than one.
8039targ_archs=`echo $targ_archs | sed 's/ .*//'`
8040
8041if test "x$targ_archs" != x; then
8042
8043cat >>confdefs.h <<_ACEOF
8044#define DEFAULT_BFD_ARCH $targ_archs
8045_ACEOF
8046
8047fi
8048if test "x$targ_defvec" != x; then
8049
8050cat >>confdefs.h <<_ACEOF
8051#define DEFAULT_BFD_VEC $targ_defvec
8052_ACEOF
8053
8054fi
8055
c0993dbe
UW
8056# The CLI cannot be disabled yet, but may be in the future.
8057
8058# Enable CLI.
81ecdfbb
RW
8059# Check whether --enable-gdbcli was given.
8060if test "${enable_gdbcli+set}" = set; then :
8061 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8062 yes)
8063 ;;
8064 no)
81ecdfbb 8065 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8066 *)
81ecdfbb 8067 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8068 esac
8069else
8070 enable_gdbcli=yes
81ecdfbb
RW
8071fi
8072
c0993dbe
UW
8073if test x"$enable_gdbcli" = xyes; then
8074 if test -d $srcdir/cli; then
8075 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8076 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8077 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8078 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8079 fi
8080fi
8081
8082# Enable MI.
81ecdfbb
RW
8083# Check whether --enable-gdbmi was given.
8084if test "${enable_gdbmi+set}" = set; then :
8085 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8086 yes | no)
8087 ;;
8088 *)
81ecdfbb 8089 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8090 esac
8091else
8092 enable_gdbmi=yes
81ecdfbb
RW
8093fi
8094
c0993dbe
UW
8095if test x"$enable_gdbmi" = xyes; then
8096 if test -d $srcdir/mi; then
8097 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8098 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8099 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8100 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8101 fi
8102fi
8103
8104# Enable TUI.
81ecdfbb
RW
8105# Check whether --enable-tui was given.
8106if test "${enable_tui+set}" = set; then :
8107 enableval=$enable_tui; case $enableval in
3ca64bd3 8108 yes | no | auto)
c0993dbe
UW
8109 ;;
8110 *)
81ecdfbb 8111 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8112 esac
8113else
3ca64bd3 8114 enable_tui=auto
81ecdfbb
RW
8115fi
8116
c0993dbe
UW
8117
8118# Enable gdbtk.
81ecdfbb
RW
8119# Check whether --enable-gdbtk was given.
8120if test "${enable_gdbtk+set}" = set; then :
8121 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8122 yes | no)
8123 ;;
8124 *)
81ecdfbb 8125 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8126 esac
8127else
5062cc19 8128 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8129 enable_gdbtk=yes
8130 else
8131 enable_gdbtk=no
8132 fi
81ecdfbb
RW
8133fi
8134
c0993dbe
UW
8135# We unconditionally disable gdbtk tests on selected platforms.
8136case $host_os in
8137 go32* | windows*)
81ecdfbb
RW
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8139$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8140 enable_gdbtk=no ;;
8141esac
8142
8143# Libunwind support.
bec39cab 8144
81ecdfbb
RW
8145# Check whether --with-libunwind was given.
8146if test "${with_libunwind+set}" = set; then :
8147 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8148 yes) enable_libunwind=yes ;;
8149 no) enable_libunwind=no ;;
81ecdfbb 8150 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8151esac
bec39cab 8152else
bec39cab 8153
81ecdfbb
RW
8154 for ac_header in libunwind.h libunwind-ia64.h
8155do :
8156 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8157ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8158eval as_val=\$$as_ac_Header
8159 if test "x$as_val" = x""yes; then :
bec39cab 8160 cat >>confdefs.h <<_ACEOF
81ecdfbb 8161#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8162_ACEOF
8163
8164fi
8165
8166done
8167
a9322a30
TT
8168 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8169 enable_libunwind=yes;
8170 fi
8171
bec39cab 8172fi
bec39cab 8173
bec39cab 8174
81ecdfbb
RW
8175if test x"$enable_libunwind" = xyes; then
8176 for ac_header in libunwind.h libunwind-ia64.h
8177do :
8178 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8179ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8180eval as_val=\$$as_ac_Header
8181 if test "x$as_val" = x""yes; then :
bec39cab 8182 cat >>confdefs.h <<_ACEOF
81ecdfbb 8183#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8184_ACEOF
8185
8186fi
8187
8188done
8189
bec39cab 8190
81ecdfbb 8191$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8192
8193 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8194 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8195 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8196fi
8197
cb01cfba
JB
8198opt_curses=no
8199
81ecdfbb
RW
8200# Check whether --with-curses was given.
8201if test "${with_curses+set}" = set; then :
8202 withval=$with_curses; opt_curses=$withval
8203fi
8204
cb01cfba 8205
76a39ba7 8206prefer_curses=no
cb01cfba 8207if test "$opt_curses" = "yes"; then
76a39ba7 8208 prefer_curses=yes
cb01cfba
JB
8209fi
8210
a9322a30 8211# Profiling support.
81ecdfbb
RW
8212# Check whether --enable-profiling was given.
8213if test "${enable_profiling+set}" = set; then :
8214 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8215 yes | no)
8216 ;;
8217 *)
81ecdfbb 8218 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8219 esac
8220else
8221 enable_profiling=no
81ecdfbb 8222fi
bec39cab 8223
a9322a30
TT
8224
8225for ac_func in monstartup _mcleanup
81ecdfbb
RW
8226do :
8227 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8229eval as_val=\$$as_ac_var
8230 if test "x$as_val" = x""yes; then :
8231 cat >>confdefs.h <<_ACEOF
8232#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8233_ACEOF
a9322a30 8234
81ecdfbb
RW
8235fi
8236done
a9322a30 8237
81ecdfbb
RW
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8239$as_echo_n "checking for _etext... " >&6; }
8240if test "${ac_cv_var__etext+set}" = set; then :
8241 $as_echo_n "(cached) " >&6
8242else
8243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8244/* end confdefs.h. */
8245#include <stdlib.h>
8246extern char _etext;
a9322a30
TT
8247
8248int
8249main ()
8250{
8251free (&_etext);
8252 ;
8253 return 0;
8254}
bec39cab 8255_ACEOF
81ecdfbb 8256if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8257 ac_cv_var__etext=yes
bec39cab 8258else
81ecdfbb 8259 ac_cv_var__etext=no
bec39cab 8260fi
81ecdfbb
RW
8261rm -f core conftest.err conftest.$ac_objext \
8262 conftest$ac_exeext conftest.$ac_ext
bec39cab 8263fi
81ecdfbb
RW
8264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8265$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8266if test $ac_cv_var__etext = yes; then
60ca704f 8267
81ecdfbb 8268$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8269
bec39cab 8270fi
81ecdfbb
RW
8271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8272$as_echo_n "checking for etext... " >&6; }
8273if test "${ac_cv_var_etext+set}" = set; then :
8274 $as_echo_n "(cached) " >&6
bec39cab 8275else
81ecdfbb 8276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8277/* end confdefs.h. */
a9322a30
TT
8278#include <stdlib.h>
8279extern char etext;
bec39cab
AC
8280
8281int
8282main ()
8283{
a9322a30 8284free (&etext);
bec39cab
AC
8285 ;
8286 return 0;
8287}
8288_ACEOF
81ecdfbb 8289if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8290 ac_cv_var_etext=yes
bec39cab 8291else
81ecdfbb 8292 ac_cv_var_etext=no
bec39cab 8293fi
81ecdfbb
RW
8294rm -f core conftest.err conftest.$ac_objext \
8295 conftest$ac_exeext conftest.$ac_ext
bec39cab 8296fi
81ecdfbb
RW
8297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8298$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8299if test $ac_cv_var_etext = yes; then
8300
81ecdfbb 8301$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8302
8303fi
a9322a30
TT
8304if test "$enable_profiling" = yes ; then
8305 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8306 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8307 fi
8308 PROFILE_CFLAGS=-pg
8309 OLD_CFLAGS="$CFLAGS"
8310 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8311
81ecdfbb
RW
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8313$as_echo_n "checking whether $CC supports -pg... " >&6; }
8314if test "${ac_cv_cc_supports_pg+set}" = set; then :
8315 $as_echo_n "(cached) " >&6
bec39cab 8316else
81ecdfbb 8317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8318/* end confdefs.h. */
bec39cab
AC
8319
8320int
8321main ()
8322{
a9322a30 8323int x;
bec39cab
AC
8324 ;
8325 return 0;
8326}
8327_ACEOF
81ecdfbb 8328if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8329 ac_cv_cc_supports_pg=yes
bec39cab 8330else
81ecdfbb 8331 ac_cv_cc_supports_pg=no
bec39cab 8332fi
81ecdfbb 8333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8334fi
81ecdfbb
RW
8335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8336$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8337
a9322a30 8338 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8339 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8340 fi
bec39cab 8341
a9322a30 8342 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8343fi
8344
c16158bc
JM
8345
8346
81ecdfbb
RW
8347# Check whether --with-pkgversion was given.
8348if test "${with_pkgversion+set}" = set; then :
8349 withval=$with_pkgversion; case "$withval" in
8350 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8351 no) PKGVERSION= ;;
8352 *) PKGVERSION="($withval) " ;;
8353 esac
8354else
8355 PKGVERSION="(GDB) "
8356
81ecdfbb 8357fi
c16158bc
JM
8358
8359
8360
8361
81ecdfbb
RW
8362
8363# Check whether --with-bugurl was given.
8364if test "${with_bugurl+set}" = set; then :
8365 withval=$with_bugurl; case "$withval" in
8366 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8367 no) BUGURL=
8368 ;;
8369 *) BUGURL="$withval"
8370 ;;
8371 esac
8372else
8373 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8374
81ecdfbb
RW
8375fi
8376
c16158bc
JM
8377 case ${BUGURL} in
8378 "")
8379 REPORT_BUGS_TO=
8380 REPORT_BUGS_TEXI=
8381 ;;
8382 *)
8383 REPORT_BUGS_TO="<$BUGURL>"
8384 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8385 ;;
8386 esac;
8387
8388
8389
8390
8391cat >>confdefs.h <<_ACEOF
8392#define PKGVERSION "$PKGVERSION"
8393_ACEOF
8394
8395
8396cat >>confdefs.h <<_ACEOF
8397#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8398_ACEOF
8399
8400
bec39cab
AC
8401# --------------------- #
8402# Checks for programs. #
8403# --------------------- #
8404
8405for ac_prog in gawk mawk nawk awk
8406do
8407 # Extract the first word of "$ac_prog", so it can be a program name with args.
8408set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8410$as_echo_n "checking for $ac_word... " >&6; }
8411if test "${ac_cv_prog_AWK+set}" = set; then :
8412 $as_echo_n "(cached) " >&6
bec39cab
AC
8413else
8414 if test -n "$AWK"; then
8415 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8416else
8417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420 IFS=$as_save_IFS
8421 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8422 for ac_exec_ext in '' $ac_executable_extensions; do
8423 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8424 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8426 break 2
8427 fi
8428done
81ecdfbb
RW
8429 done
8430IFS=$as_save_IFS
bec39cab
AC
8431
8432fi
8433fi
8434AWK=$ac_cv_prog_AWK
8435if test -n "$AWK"; then
81ecdfbb
RW
8436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8437$as_echo "$AWK" >&6; }
bec39cab 8438else
81ecdfbb
RW
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
bec39cab
AC
8441fi
8442
bec39cab 8443
81ecdfbb 8444 test -n "$AWK" && break
bec39cab
AC
8445done
8446
bec39cab 8447
81ecdfbb
RW
8448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8449$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8450LN_S=$as_ln_s
8451if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8453$as_echo "yes" >&6; }
bec39cab 8454else
81ecdfbb
RW
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8456$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8457fi
8458
8459if test -n "$ac_tool_prefix"; then
8460 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8461set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8463$as_echo_n "checking for $ac_word... " >&6; }
8464if test "${ac_cv_prog_RANLIB+set}" = set; then :
8465 $as_echo_n "(cached) " >&6
bec39cab
AC
8466else
8467 if test -n "$RANLIB"; then
8468 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8469else
8470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8471for as_dir in $PATH
8472do
8473 IFS=$as_save_IFS
8474 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8475 for ac_exec_ext in '' $ac_executable_extensions; do
8476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8477 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8479 break 2
8480 fi
8481done
81ecdfbb
RW
8482 done
8483IFS=$as_save_IFS
bec39cab
AC
8484
8485fi
8486fi
8487RANLIB=$ac_cv_prog_RANLIB
8488if test -n "$RANLIB"; then
81ecdfbb
RW
8489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8490$as_echo "$RANLIB" >&6; }
bec39cab 8491else
81ecdfbb
RW
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8493$as_echo "no" >&6; }
bec39cab
AC
8494fi
8495
81ecdfbb 8496
bec39cab
AC
8497fi
8498if test -z "$ac_cv_prog_RANLIB"; then
8499 ac_ct_RANLIB=$RANLIB
8500 # Extract the first word of "ranlib", so it can be a program name with args.
8501set dummy ranlib; ac_word=$2
81ecdfbb
RW
8502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8503$as_echo_n "checking for $ac_word... " >&6; }
8504if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8505 $as_echo_n "(cached) " >&6
bec39cab
AC
8506else
8507 if test -n "$ac_ct_RANLIB"; then
8508 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8509else
8510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8511for as_dir in $PATH
8512do
8513 IFS=$as_save_IFS
8514 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8515 for ac_exec_ext in '' $ac_executable_extensions; do
8516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8517 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8519 break 2
8520 fi
8521done
81ecdfbb
RW
8522 done
8523IFS=$as_save_IFS
bec39cab 8524
bec39cab
AC
8525fi
8526fi
8527ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8528if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8530$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8531else
81ecdfbb
RW
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8533$as_echo "no" >&6; }
bec39cab
AC
8534fi
8535
81ecdfbb
RW
8536 if test "x$ac_ct_RANLIB" = x; then
8537 RANLIB=":"
8538 else
8539 case $cross_compiling:$ac_tool_warned in
8540yes:)
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8543ac_tool_warned=yes ;;
8544esac
8545 RANLIB=$ac_ct_RANLIB
8546 fi
bec39cab
AC
8547else
8548 RANLIB="$ac_cv_prog_RANLIB"
8549fi
8550
8551for ac_prog in 'bison -y' byacc
8552do
8553 # Extract the first word of "$ac_prog", so it can be a program name with args.
8554set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if test "${ac_cv_prog_YACC+set}" = set; then :
8558 $as_echo_n "(cached) " >&6
bec39cab
AC
8559else
8560 if test -n "$YACC"; then
8561 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8562else
8563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564for as_dir in $PATH
8565do
8566 IFS=$as_save_IFS
8567 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8568 for ac_exec_ext in '' $ac_executable_extensions; do
8569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8570 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8572 break 2
8573 fi
8574done
81ecdfbb
RW
8575 done
8576IFS=$as_save_IFS
bec39cab
AC
8577
8578fi
8579fi
8580YACC=$ac_cv_prog_YACC
8581if test -n "$YACC"; then
81ecdfbb
RW
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8583$as_echo "$YACC" >&6; }
bec39cab 8584else
81ecdfbb
RW
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
bec39cab
AC
8587fi
8588
81ecdfbb 8589
bec39cab
AC
8590 test -n "$YACC" && break
8591done
8592test -n "$YACC" || YACC="yacc"
8593
8594
8595if test -n "$ac_tool_prefix"; then
8596 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8597set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if test "${ac_cv_prog_AR+set}" = set; then :
8601 $as_echo_n "(cached) " >&6
bec39cab
AC
8602else
8603 if test -n "$AR"; then
8604 ac_cv_prog_AR="$AR" # Let the user override the test.
8605else
8606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8607for as_dir in $PATH
8608do
8609 IFS=$as_save_IFS
8610 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8611 for ac_exec_ext in '' $ac_executable_extensions; do
8612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8613 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8615 break 2
8616 fi
8617done
81ecdfbb
RW
8618 done
8619IFS=$as_save_IFS
bec39cab
AC
8620
8621fi
8622fi
8623AR=$ac_cv_prog_AR
8624if test -n "$AR"; then
81ecdfbb
RW
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8626$as_echo "$AR" >&6; }
bec39cab 8627else
81ecdfbb
RW
8628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8629$as_echo "no" >&6; }
bec39cab
AC
8630fi
8631
81ecdfbb 8632
bec39cab
AC
8633fi
8634if test -z "$ac_cv_prog_AR"; then
8635 ac_ct_AR=$AR
8636 # Extract the first word of "ar", so it can be a program name with args.
8637set dummy ar; ac_word=$2
81ecdfbb
RW
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639$as_echo_n "checking for $ac_word... " >&6; }
8640if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8641 $as_echo_n "(cached) " >&6
bec39cab
AC
8642else
8643 if test -n "$ac_ct_AR"; then
8644 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8645else
8646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649 IFS=$as_save_IFS
8650 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8651 for ac_exec_ext in '' $ac_executable_extensions; do
8652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8653 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8655 break 2
8656 fi
8657done
81ecdfbb
RW
8658 done
8659IFS=$as_save_IFS
bec39cab
AC
8660
8661fi
8662fi
8663ac_ct_AR=$ac_cv_prog_ac_ct_AR
8664if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8666$as_echo "$ac_ct_AR" >&6; }
bec39cab 8667else
81ecdfbb
RW
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
bec39cab
AC
8670fi
8671
81ecdfbb
RW
8672 if test "x$ac_ct_AR" = x; then
8673 AR=""
8674 else
8675 case $cross_compiling:$ac_tool_warned in
8676yes:)
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8679ac_tool_warned=yes ;;
8680esac
8681 AR=$ac_ct_AR
8682 fi
bec39cab
AC
8683else
8684 AR="$ac_cv_prog_AR"
8685fi
8686
8687if test -n "$ac_tool_prefix"; then
8688 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8689set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691$as_echo_n "checking for $ac_word... " >&6; }
8692if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8693 $as_echo_n "(cached) " >&6
bec39cab
AC
8694else
8695 if test -n "$DLLTOOL"; then
8696 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8697else
8698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699for as_dir in $PATH
8700do
8701 IFS=$as_save_IFS
8702 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8703 for ac_exec_ext in '' $ac_executable_extensions; do
8704 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8705 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8707 break 2
8708 fi
8709done
81ecdfbb
RW
8710 done
8711IFS=$as_save_IFS
bec39cab
AC
8712
8713fi
8714fi
8715DLLTOOL=$ac_cv_prog_DLLTOOL
8716if test -n "$DLLTOOL"; then
81ecdfbb
RW
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8718$as_echo "$DLLTOOL" >&6; }
bec39cab 8719else
81ecdfbb
RW
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721$as_echo "no" >&6; }
bec39cab
AC
8722fi
8723
81ecdfbb 8724
bec39cab
AC
8725fi
8726if test -z "$ac_cv_prog_DLLTOOL"; then
8727 ac_ct_DLLTOOL=$DLLTOOL
8728 # Extract the first word of "dlltool", so it can be a program name with args.
8729set dummy dlltool; ac_word=$2
81ecdfbb
RW
8730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8731$as_echo_n "checking for $ac_word... " >&6; }
8732if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8733 $as_echo_n "(cached) " >&6
bec39cab
AC
8734else
8735 if test -n "$ac_ct_DLLTOOL"; then
8736 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8737else
8738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8739for as_dir in $PATH
8740do
8741 IFS=$as_save_IFS
8742 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8743 for ac_exec_ext in '' $ac_executable_extensions; do
8744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8745 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8747 break 2
8748 fi
8749done
81ecdfbb
RW
8750 done
8751IFS=$as_save_IFS
bec39cab
AC
8752
8753fi
8754fi
8755ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8756if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8758$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8759else
81ecdfbb
RW
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761$as_echo "no" >&6; }
bec39cab
AC
8762fi
8763
81ecdfbb
RW
8764 if test "x$ac_ct_DLLTOOL" = x; then
8765 DLLTOOL=""
8766 else
8767 case $cross_compiling:$ac_tool_warned in
8768yes:)
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8771ac_tool_warned=yes ;;
8772esac
8773 DLLTOOL=$ac_ct_DLLTOOL
8774 fi
bec39cab
AC
8775else
8776 DLLTOOL="$ac_cv_prog_DLLTOOL"
8777fi
8778
8779if test -n "$ac_tool_prefix"; then
8780 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8781set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if test "${ac_cv_prog_WINDRES+set}" = set; then :
8785 $as_echo_n "(cached) " >&6
bec39cab
AC
8786else
8787 if test -n "$WINDRES"; then
8788 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8789else
8790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791for as_dir in $PATH
8792do
8793 IFS=$as_save_IFS
8794 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8795 for ac_exec_ext in '' $ac_executable_extensions; do
8796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8797 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8799 break 2
8800 fi
8801done
81ecdfbb
RW
8802 done
8803IFS=$as_save_IFS
bec39cab
AC
8804
8805fi
8806fi
8807WINDRES=$ac_cv_prog_WINDRES
8808if test -n "$WINDRES"; then
81ecdfbb
RW
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8810$as_echo "$WINDRES" >&6; }
bec39cab 8811else
81ecdfbb
RW
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
bec39cab
AC
8814fi
8815
81ecdfbb 8816
bec39cab
AC
8817fi
8818if test -z "$ac_cv_prog_WINDRES"; then
8819 ac_ct_WINDRES=$WINDRES
8820 # Extract the first word of "windres", so it can be a program name with args.
8821set dummy windres; ac_word=$2
81ecdfbb
RW
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8823$as_echo_n "checking for $ac_word... " >&6; }
8824if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8825 $as_echo_n "(cached) " >&6
bec39cab
AC
8826else
8827 if test -n "$ac_ct_WINDRES"; then
8828 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8829else
8830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8831for as_dir in $PATH
8832do
8833 IFS=$as_save_IFS
8834 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8835 for ac_exec_ext in '' $ac_executable_extensions; do
8836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8837 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8839 break 2
8840 fi
8841done
81ecdfbb
RW
8842 done
8843IFS=$as_save_IFS
bec39cab
AC
8844
8845fi
8846fi
8847ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8848if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8850$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8851else
81ecdfbb
RW
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8853$as_echo "no" >&6; }
c906108c 8854fi
bec39cab 8855
81ecdfbb
RW
8856 if test "x$ac_ct_WINDRES" = x; then
8857 WINDRES=""
8858 else
8859 case $cross_compiling:$ac_tool_warned in
8860yes:)
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8863ac_tool_warned=yes ;;
8864esac
8865 WINDRES=$ac_ct_WINDRES
8866 fi
c906108c 8867else
bec39cab 8868 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8869fi
8870
bec39cab
AC
8871
8872# Needed for GNU/Hurd.
8873if test -n "$ac_tool_prefix"; then
8874 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8875set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8877$as_echo_n "checking for $ac_word... " >&6; }
8878if test "${ac_cv_prog_MIG+set}" = set; then :
8879 $as_echo_n "(cached) " >&6
c906108c 8880else
bec39cab
AC
8881 if test -n "$MIG"; then
8882 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8883else
8884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8885for as_dir in $PATH
8886do
8887 IFS=$as_save_IFS
8888 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8889 for ac_exec_ext in '' $ac_executable_extensions; do
8890 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8891 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8893 break 2
8894 fi
8895done
81ecdfbb
RW
8896 done
8897IFS=$as_save_IFS
bec39cab 8898
c906108c 8899fi
bec39cab
AC
8900fi
8901MIG=$ac_cv_prog_MIG
8902if test -n "$MIG"; then
81ecdfbb
RW
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8904$as_echo "$MIG" >&6; }
c906108c 8905else
81ecdfbb
RW
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
c906108c
SS
8908fi
8909
81ecdfbb 8910
bec39cab
AC
8911fi
8912if test -z "$ac_cv_prog_MIG"; then
8913 ac_ct_MIG=$MIG
8914 # Extract the first word of "mig", so it can be a program name with args.
8915set dummy mig; ac_word=$2
81ecdfbb
RW
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8917$as_echo_n "checking for $ac_word... " >&6; }
8918if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8919 $as_echo_n "(cached) " >&6
bec39cab
AC
8920else
8921 if test -n "$ac_ct_MIG"; then
8922 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8923else
8924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8925for as_dir in $PATH
8926do
8927 IFS=$as_save_IFS
8928 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8929 for ac_exec_ext in '' $ac_executable_extensions; do
8930 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8931 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8933 break 2
8934 fi
8935done
81ecdfbb
RW
8936 done
8937IFS=$as_save_IFS
c906108c 8938
bec39cab
AC
8939fi
8940fi
8941ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8942if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8944$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8945else
81ecdfbb
RW
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8947$as_echo "no" >&6; }
bec39cab 8948fi
c906108c 8949
81ecdfbb
RW
8950 if test "x$ac_ct_MIG" = x; then
8951 MIG=""
8952 else
8953 case $cross_compiling:$ac_tool_warned in
8954yes:)
8955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8957ac_tool_warned=yes ;;
8958esac
8959 MIG=$ac_ct_MIG
8960 fi
bec39cab
AC
8961else
8962 MIG="$ac_cv_prog_MIG"
8963fi
c906108c 8964
c906108c 8965
bec39cab
AC
8966# ---------------------- #
8967# Checks for libraries. #
8968# ---------------------- #
c906108c 8969
bec39cab 8970# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8972$as_echo_n "checking for main in -lm... " >&6; }
8973if test "${ac_cv_lib_m_main+set}" = set; then :
8974 $as_echo_n "(cached) " >&6
bec39cab
AC
8975else
8976 ac_check_lib_save_LIBS=$LIBS
8977LIBS="-lm $LIBS"
81ecdfbb 8978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8979/* end confdefs.h. */
c906108c 8980
c906108c 8981
bec39cab
AC
8982int
8983main ()
8984{
81ecdfbb 8985return main ();
bec39cab
AC
8986 ;
8987 return 0;
8988}
8989_ACEOF
81ecdfbb 8990if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8991 ac_cv_lib_m_main=yes
8992else
81ecdfbb 8993 ac_cv_lib_m_main=no
bec39cab 8994fi
81ecdfbb
RW
8995rm -f core conftest.err conftest.$ac_objext \
8996 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8997LIBS=$ac_check_lib_save_LIBS
8998fi
81ecdfbb
RW
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9000$as_echo "$ac_cv_lib_m_main" >&6; }
9001if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9002 cat >>confdefs.h <<_ACEOF
9003#define HAVE_LIBM 1
9004_ACEOF
9005
9006 LIBS="-lm $LIBS"
c906108c 9007
c906108c 9008fi
bec39cab
AC
9009
9010
9011# We need to link with -lw to get `wctype' on Solaris before Solaris
9012# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9013# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9014# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9015ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9016if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9017
c906108c 9018else
81ecdfbb
RW
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9020$as_echo_n "checking for wctype in -lw... " >&6; }
9021if test "${ac_cv_lib_w_wctype+set}" = set; then :
9022 $as_echo_n "(cached) " >&6
bec39cab
AC
9023else
9024 ac_check_lib_save_LIBS=$LIBS
9025LIBS="-lw $LIBS"
81ecdfbb 9026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9027/* end confdefs.h. */
c906108c 9028
81ecdfbb
RW
9029/* Override any GCC internal prototype to avoid an error.
9030 Use char because int might match the return type of a GCC
9031 builtin and then its argument prototype would still apply. */
bec39cab
AC
9032#ifdef __cplusplus
9033extern "C"
9034#endif
bec39cab
AC
9035char wctype ();
9036int
9037main ()
9038{
81ecdfbb 9039return wctype ();
bec39cab
AC
9040 ;
9041 return 0;
9042}
9043_ACEOF
81ecdfbb 9044if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9045 ac_cv_lib_w_wctype=yes
9046else
81ecdfbb 9047 ac_cv_lib_w_wctype=no
bec39cab 9048fi
81ecdfbb
RW
9049rm -f core conftest.err conftest.$ac_objext \
9050 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9051LIBS=$ac_check_lib_save_LIBS
9052fi
81ecdfbb
RW
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9054$as_echo "$ac_cv_lib_w_wctype" >&6; }
9055if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9056 cat >>confdefs.h <<_ACEOF
9057#define HAVE_LIBW 1
9058_ACEOF
c906108c 9059
bec39cab 9060 LIBS="-lw $LIBS"
c906108c 9061
bec39cab 9062fi
c906108c 9063
bec39cab 9064fi
c906108c 9065
ddc9cd0f 9066
bec39cab 9067# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9069$as_echo_n "checking for library containing gethostbyname... " >&6; }
9070if test "${ac_cv_search_gethostbyname+set}" = set; then :
9071 $as_echo_n "(cached) " >&6
bec39cab
AC
9072else
9073 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9075/* end confdefs.h. */
ddc9cd0f 9076
81ecdfbb
RW
9077/* Override any GCC internal prototype to avoid an error.
9078 Use char because int might match the return type of a GCC
9079 builtin and then its argument prototype would still apply. */
bec39cab
AC
9080#ifdef __cplusplus
9081extern "C"
9082#endif
bec39cab
AC
9083char gethostbyname ();
9084int
9085main ()
9086{
81ecdfbb 9087return gethostbyname ();
bec39cab
AC
9088 ;
9089 return 0;
9090}
9091_ACEOF
81ecdfbb
RW
9092for ac_lib in '' nsl; do
9093 if test -z "$ac_lib"; then
9094 ac_res="none required"
9095 else
9096 ac_res=-l$ac_lib
b4e70030 9097 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9098 fi
9099 if ac_fn_c_try_link "$LINENO"; then :
9100 ac_cv_search_gethostbyname=$ac_res
9101fi
9102rm -f core conftest.err conftest.$ac_objext \
9103 conftest$ac_exeext
9104 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9105 break
9106fi
9107done
9108if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9109
bec39cab 9110else
81ecdfbb 9111 ac_cv_search_gethostbyname=no
bec39cab 9112fi
81ecdfbb 9113rm conftest.$ac_ext
bec39cab
AC
9114LIBS=$ac_func_search_save_LIBS
9115fi
81ecdfbb
RW
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9117$as_echo "$ac_cv_search_gethostbyname" >&6; }
9118ac_res=$ac_cv_search_gethostbyname
9119if test "$ac_res" != no; then :
9120 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9121
bec39cab 9122fi
96baa820 9123
c906108c 9124
b4e70030 9125# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9127$as_echo_n "checking for library containing socketpair... " >&6; }
9128if test "${ac_cv_search_socketpair+set}" = set; then :
9129 $as_echo_n "(cached) " >&6
b4e70030
JB
9130else
9131 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9133/* end confdefs.h. */
9134
81ecdfbb
RW
9135/* Override any GCC internal prototype to avoid an error.
9136 Use char because int might match the return type of a GCC
9137 builtin and then its argument prototype would still apply. */
b4e70030
JB
9138#ifdef __cplusplus
9139extern "C"
9140#endif
b4e70030
JB
9141char socketpair ();
9142int
9143main ()
9144{
81ecdfbb 9145return socketpair ();
b4e70030
JB
9146 ;
9147 return 0;
9148}
9149_ACEOF
81ecdfbb
RW
9150for ac_lib in '' socket; do
9151 if test -z "$ac_lib"; then
9152 ac_res="none required"
9153 else
9154 ac_res=-l$ac_lib
b4e70030 9155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9156 fi
9157 if ac_fn_c_try_link "$LINENO"; then :
9158 ac_cv_search_socketpair=$ac_res
9159fi
9160rm -f core conftest.err conftest.$ac_objext \
9161 conftest$ac_exeext
9162 if test "${ac_cv_search_socketpair+set}" = set; then :
9163 break
9164fi
9165done
9166if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9167
b4e70030 9168else
81ecdfbb 9169 ac_cv_search_socketpair=no
b4e70030 9170fi
81ecdfbb 9171rm conftest.$ac_ext
b4e70030
JB
9172LIBS=$ac_func_search_save_LIBS
9173fi
81ecdfbb
RW
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9175$as_echo "$ac_cv_search_socketpair" >&6; }
9176ac_res=$ac_cv_search_socketpair
9177if test "$ac_res" != no; then :
9178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9179
9180fi
9181
9182
233a11ab 9183# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9184
9185 # See if the user specified whether he wants zlib support or not.
9186
9187# Check whether --with-zlib was given.
9188if test "${with_zlib+set}" = set; then :
9189 withval=$with_zlib;
9190else
9191 with_zlib=auto
9192fi
9193
9194
9195 if test "$with_zlib" != "no"; then
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9197$as_echo_n "checking for library containing zlibVersion... " >&6; }
9198if test "${ac_cv_search_zlibVersion+set}" = set; then :
9199 $as_echo_n "(cached) " >&6
233a11ab
CS
9200else
9201 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9203/* end confdefs.h. */
9204
81ecdfbb
RW
9205/* Override any GCC internal prototype to avoid an error.
9206 Use char because int might match the return type of a GCC
233a11ab 9207 builtin and then its argument prototype would still apply. */
233a11ab
CS
9208#ifdef __cplusplus
9209extern "C"
9210#endif
233a11ab
CS
9211char zlibVersion ();
9212int
9213main ()
9214{
81ecdfbb 9215return zlibVersion ();
233a11ab
CS
9216 ;
9217 return 0;
9218}
9219_ACEOF
81ecdfbb
RW
9220for ac_lib in '' z; do
9221 if test -z "$ac_lib"; then
9222 ac_res="none required"
233a11ab 9223 else
81ecdfbb
RW
9224 ac_res=-l$ac_lib
9225 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9226 fi
81ecdfbb
RW
9227 if ac_fn_c_try_link "$LINENO"; then :
9228 ac_cv_search_zlibVersion=$ac_res
233a11ab 9229fi
81ecdfbb
RW
9230rm -f core conftest.err conftest.$ac_objext \
9231 conftest$ac_exeext
9232 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9233 break
233a11ab 9234fi
81ecdfbb
RW
9235done
9236if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9237
233a11ab 9238else
81ecdfbb 9239 ac_cv_search_zlibVersion=no
233a11ab 9240fi
81ecdfbb
RW
9241rm conftest.$ac_ext
9242LIBS=$ac_func_search_save_LIBS
233a11ab 9243fi
81ecdfbb
RW
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9245$as_echo "$ac_cv_search_zlibVersion" >&6; }
9246ac_res=$ac_cv_search_zlibVersion
9247if test "$ac_res" != no; then :
9248 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9249 for ac_header in zlib.h
9250do :
9251 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9252if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9253 cat >>confdefs.h <<_ACEOF
81ecdfbb 9254#define HAVE_ZLIB_H 1
233a11ab
CS
9255_ACEOF
9256
9257fi
9258
9259done
9260
9261fi
9262
b040ad30
JB
9263 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9264 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9265 fi
9266 fi
9267
233a11ab 9268
77f120bf 9269# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9271$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9272if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9273 $as_echo_n "(cached) " >&6
bec39cab
AC
9274else
9275 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9277/* end confdefs.h. */
c906108c 9278
81ecdfbb
RW
9279/* Override any GCC internal prototype to avoid an error.
9280 Use char because int might match the return type of a GCC
9281 builtin and then its argument prototype would still apply. */
bec39cab
AC
9282#ifdef __cplusplus
9283extern "C"
9284#endif
77f120bf 9285char dlgetmodinfo ();
bec39cab
AC
9286int
9287main ()
9288{
81ecdfbb 9289return dlgetmodinfo ();
bec39cab
AC
9290 ;
9291 return 0;
9292}
9293_ACEOF
81ecdfbb
RW
9294for ac_lib in '' dl xpdl; do
9295 if test -z "$ac_lib"; then
9296 ac_res="none required"
9297 else
9298 ac_res=-l$ac_lib
b4e70030 9299 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9300 fi
9301 if ac_fn_c_try_link "$LINENO"; then :
9302 ac_cv_search_dlgetmodinfo=$ac_res
9303fi
9304rm -f core conftest.err conftest.$ac_objext \
9305 conftest$ac_exeext
9306 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9307 break
9308fi
9309done
9310if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9311
4e8d927d 9312else
81ecdfbb 9313 ac_cv_search_dlgetmodinfo=no
1ba607ad 9314fi
81ecdfbb 9315rm conftest.$ac_ext
bec39cab
AC
9316LIBS=$ac_func_search_save_LIBS
9317fi
81ecdfbb
RW
9318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9319$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9320ac_res=$ac_cv_search_dlgetmodinfo
9321if test "$ac_res" != no; then :
9322 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9323
8bb2c122 9324fi
8bb2c122 9325
8bb2c122 9326
77f120bf 9327
77f120bf 9328
6c7a06a3 9329
81ecdfbb
RW
9330# Check whether --with-libiconv-prefix was given.
9331if test "${with_libiconv_prefix+set}" = set; then :
9332 withval=$with_libiconv_prefix;
6c7a06a3 9333 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9334 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9335 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9336 done
9337
81ecdfbb
RW
9338fi
9339
6c7a06a3 9340
f18c4681 9341 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9342 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9343
81ecdfbb
RW
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9345$as_echo_n "checking for iconv... " >&6; }
9346if test "${am_cv_func_iconv+set}" = set; then :
9347 $as_echo_n "(cached) " >&6
d542061a 9348else
6c7a06a3
TT
9349
9350 am_cv_func_iconv="no, consider installing GNU libiconv"
9351 am_cv_lib_iconv=no
9352 am_cv_use_build_libiconv=no
f0f20949 9353 am_cv_build_libiconv_path=
4edb1e84
JB
9354
9355 # If libiconv is part of the build tree, then try using it over
9356 # any system iconv.
9357 if test -d ../libiconv; then
f18c4681
JB
9358 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9359 am_save_LIBS="$LIBS"
9360 am_save_CPPFLAGS="$CPPFLAGS"
9361 LIBS="$LIBS $lib_dir/libiconv.a"
9362 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9364/* end confdefs.h. */
6c7a06a3
TT
9365#include <stdlib.h>
9366#include <iconv.h>
d542061a
UW
9367int
9368main ()
9369{
6c7a06a3 9370iconv_t cd = iconv_open("","");
f18c4681
JB
9371 iconv(cd,NULL,NULL,NULL,NULL);
9372 iconv_close(cd);
d542061a
UW
9373 ;
9374 return 0;
9375}
9376_ACEOF
81ecdfbb 9377if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9378 am_cv_use_build_libiconv=yes
f0f20949 9379 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9380 am_cv_lib_iconv=yes
9381 am_cv_func_iconv=yes
d542061a 9382fi
81ecdfbb
RW
9383rm -f core conftest.err conftest.$ac_objext \
9384 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9385 LIBS="$am_save_LIBS"
9386 CPPFLAGS="$am_save_CPPFLAGS"
9387 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9388 break
9389 fi
9390 done
4edb1e84 9391 fi
94ae1714 9392
4edb1e84 9393 # Next, try to find iconv in libc.
6c7a06a3 9394 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9396/* end confdefs.h. */
6c7a06a3
TT
9397#include <stdlib.h>
9398#include <iconv.h>
d542061a
UW
9399int
9400main ()
9401{
6c7a06a3
TT
9402iconv_t cd = iconv_open("","");
9403 iconv(cd,NULL,NULL,NULL,NULL);
9404 iconv_close(cd);
d542061a
UW
9405 ;
9406 return 0;
9407}
9408_ACEOF
81ecdfbb 9409if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9410 am_cv_func_iconv=yes
d542061a 9411fi
81ecdfbb
RW
9412rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
77f120bf 9414 fi
94ae1714 9415
4edb1e84
JB
9416 # If iconv was not in libc, try -liconv. In this case, arrange to
9417 # look in the libiconv prefix, if it was specified by the user.
9418 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9419 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9420 am_save_LIBS="$LIBS"
9421 if test -n "$LIBICONV_INCLUDE"; then
9422 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9423 LIBS="$LIBS $LIBICONV_LIBDIR"
9424 fi
9425 LIBS="$LIBS -liconv"
81ecdfbb 9426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9427/* end confdefs.h. */
6c7a06a3
TT
9428#include <stdlib.h>
9429#include <iconv.h>
bec39cab
AC
9430int
9431main ()
9432{
6c7a06a3
TT
9433iconv_t cd = iconv_open("","");
9434 iconv(cd,NULL,NULL,NULL,NULL);
9435 iconv_close(cd);
bec39cab
AC
9436 ;
9437 return 0;
9438}
9439_ACEOF
81ecdfbb 9440if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9441 am_cv_lib_iconv=yes
6c7a06a3 9442 am_cv_func_iconv=yes
627af7ea 9443fi
81ecdfbb
RW
9444rm -f core conftest.err conftest.$ac_objext \
9445 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9446 LIBS="$am_save_LIBS"
fc3b640d 9447 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9448 fi
9449
9450fi
81ecdfbb
RW
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9452$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9453
9454 # Set the various flags based on the cache variables. We can't rely
9455 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9456 LIBICONV=
9457 if test "$am_cv_lib_iconv" = yes; then
9458 LIBICONV="-liconv"
94ae1714
TT
9459 else
9460 LIBICONV_LIBDIR=
9461 LIBICONV_INCLUDE=
fc3b640d
TT
9462 fi
9463 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9464 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9465 LIBICONV_LIBDIR=""
fc3b640d
TT
9466 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9467 fi
9468 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9469 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9470
6c7a06a3
TT
9471 if test "$am_cv_func_iconv" = yes; then
9472
81ecdfbb 9473$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9474
81ecdfbb
RW
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9476$as_echo_n "checking for iconv declaration... " >&6; }
9477 if test "${am_cv_proto_iconv+set}" = set; then :
9478 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9479else
9480
81ecdfbb 9481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9482/* end confdefs.h. */
9483
6c7a06a3
TT
9484#include <stdlib.h>
9485#include <iconv.h>
9486extern
b4e70030 9487#ifdef __cplusplus
6c7a06a3 9488"C"
b4e70030 9489#endif
6c7a06a3
TT
9490#if defined(__STDC__) || defined(__cplusplus)
9491size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9492#else
9493size_t iconv();
9494#endif
9495
b4e70030
JB
9496int
9497main ()
9498{
6c7a06a3 9499
b4e70030
JB
9500 ;
9501 return 0;
9502}
9503_ACEOF
81ecdfbb 9504if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9505 am_cv_proto_iconv_arg1=""
4e8d927d 9506else
81ecdfbb 9507 am_cv_proto_iconv_arg1="const"
b4e70030 9508fi
81ecdfbb 9509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9510 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);"
9511fi
9512
9513 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9515 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9516$as_echo "${ac_t:-
9517 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9518
9519cat >>confdefs.h <<_ACEOF
9520#define ICONV_CONST $am_cv_proto_iconv_arg1
9521_ACEOF
9522
9523 fi
6c7a06a3
TT
9524
9525
9526# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9527# There is a very specific comment in /usr/include/curses.h explaining that
9528# termcap routines built into libcurses must not be used.
9529#
9530# The symptoms we observed so far is GDB unexpectedly changing
9531# the terminal settings when tgetent is called - this is particularly
9532# visible as the output is missing carriage returns, and so rapidly
9533# becomes very hard to read.
9534#
9535# The readline configure script has already decided that libtermcap
9536# was enough for its purposes, and so decided to build readline using
9537# libtermcap. Since the TUI mode requires curses, building GDB with
9538# TUI enabled results in both libraries to be used at the same time,
9539# which is not allowed. This basically means that GDB with TUI is
9540# broken on alpha-osf.
9541
9542case $host_os in
6bcc772d
RO
9543 osf* )
9544 if test x"$enable_tui" = xyes; then
81ecdfbb 9545 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9546 fi
6bcc772d 9547 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9548 enable_tui=no
9549 fi
9550 ;;
9551esac
9552
cb01cfba 9553# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9554if test x"$enable_tui" != xno; then
cb01cfba
JB
9555 prefer_curses=yes
9556fi
9557
9558curses_found=no
9559if test x"$prefer_curses" = xyes; then
9560 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9561 # curses library because the latter might not provide all the
9562 # functionality we need. However, this leads to problems on systems
9563 # where the linker searches /usr/local/lib, but the compiler doesn't
9564 # search /usr/local/include, if ncurses is installed in /usr/local. A
9565 # default installation of ncurses on alpha*-dec-osf* will lead to such
9566 # a situation.
81ecdfbb
RW
9567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9568$as_echo_n "checking for library containing waddstr... " >&6; }
9569if test "${ac_cv_search_waddstr+set}" = set; then :
9570 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9571else
9572 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9574/* end confdefs.h. */
9575
81ecdfbb
RW
9576/* Override any GCC internal prototype to avoid an error.
9577 Use char because int might match the return type of a GCC
9578 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9579#ifdef __cplusplus
9580extern "C"
9581#endif
6c7a06a3
TT
9582char waddstr ();
9583int
9584main ()
9585{
81ecdfbb 9586return waddstr ();
6c7a06a3
TT
9587 ;
9588 return 0;
9589}
9590_ACEOF
81ecdfbb
RW
9591for ac_lib in '' ncurses cursesX curses; do
9592 if test -z "$ac_lib"; then
9593 ac_res="none required"
9594 else
9595 ac_res=-l$ac_lib
9596 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9597 fi
9598 if ac_fn_c_try_link "$LINENO"; then :
9599 ac_cv_search_waddstr=$ac_res
9600fi
9601rm -f core conftest.err conftest.$ac_objext \
9602 conftest$ac_exeext
9603 if test "${ac_cv_search_waddstr+set}" = set; then :
9604 break
9605fi
9606done
9607if test "${ac_cv_search_waddstr+set}" = set; then :
9608
6c7a06a3 9609else
81ecdfbb
RW
9610 ac_cv_search_waddstr=no
9611fi
9612rm conftest.$ac_ext
9613LIBS=$ac_func_search_save_LIBS
9614fi
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9616$as_echo "$ac_cv_search_waddstr" >&6; }
9617ac_res=$ac_cv_search_waddstr
9618if test "$ac_res" != no; then :
9619 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9620
9621fi
9622
9623
cb01cfba
JB
9624 if test "$ac_cv_search_waddstr" != no; then
9625 curses_found=yes
9626 fi
9627fi
9628
9629# Check whether we should enable the TUI, but only do so if we really
9630# can.
9631if test x"$enable_tui" != xno; then
9632 if test -d $srcdir/tui; then
9633 if test "$curses_found" != no; then
6c7a06a3
TT
9634 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9635 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9636 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9637 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9638 CONFIG_ALL="${CONFIG_ALL} all-tui"
9639 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9640 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9641 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9642 else
9643 if test x"$enable_tui" = xyes; then
81ecdfbb 9644 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9645 else
81ecdfbb
RW
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9647$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9648 fi
9649 fi
9650 fi
9651fi
9652
9653# Since GDB uses Readline, we need termcap functionality. In many
9654# cases this will be provided by the curses library, but some systems
9655# have a seperate termcap library, or no curses library at all.
9656
9657case $host_os in
9658 cygwin*)
9659 if test -d $srcdir/libtermcap; then
9660 LIBS="../libtermcap/libtermcap.a $LIBS"
9661 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9662 fi ;;
9663 go32* | *djgpp*)
9664 ac_cv_search_tgetent="none required"
9665 ;;
9666 *mingw32*)
9667 ac_cv_search_tgetent="none required"
9668 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9669 ;;
9670esac
9671
9672# These are the libraries checked by Readline.
81ecdfbb
RW
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9674$as_echo_n "checking for library containing tgetent... " >&6; }
9675if test "${ac_cv_search_tgetent+set}" = set; then :
9676 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9677else
9678 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9680/* end confdefs.h. */
9681
81ecdfbb
RW
9682/* Override any GCC internal prototype to avoid an error.
9683 Use char because int might match the return type of a GCC
9684 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9685#ifdef __cplusplus
9686extern "C"
9687#endif
6c7a06a3
TT
9688char tgetent ();
9689int
9690main ()
9691{
81ecdfbb 9692return tgetent ();
6c7a06a3
TT
9693 ;
9694 return 0;
9695}
9696_ACEOF
81ecdfbb
RW
9697for ac_lib in '' termcap tinfo curses ncurses; do
9698 if test -z "$ac_lib"; then
9699 ac_res="none required"
9700 else
9701 ac_res=-l$ac_lib
6c7a06a3 9702 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9703 fi
9704 if ac_fn_c_try_link "$LINENO"; then :
9705 ac_cv_search_tgetent=$ac_res
9706fi
9707rm -f core conftest.err conftest.$ac_objext \
9708 conftest$ac_exeext
9709 if test "${ac_cv_search_tgetent+set}" = set; then :
9710 break
9711fi
9712done
9713if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9714
6c7a06a3 9715else
81ecdfbb 9716 ac_cv_search_tgetent=no
6c7a06a3 9717fi
81ecdfbb 9718rm conftest.$ac_ext
6c7a06a3
TT
9719LIBS=$ac_func_search_save_LIBS
9720fi
81ecdfbb
RW
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9722$as_echo "$ac_cv_search_tgetent" >&6; }
9723ac_res=$ac_cv_search_tgetent
9724if test "$ac_res" != no; then :
9725 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9726
06825bd1
MK
9727fi
9728
06825bd1 9729
bec39cab 9730if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9731 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9732fi
9733
3841debe 9734
81ecdfbb
RW
9735# Check whether --with-system-readline was given.
9736if test "${with_system_readline+set}" = set; then :
9737 withval=$with_system_readline;
9738fi
6a30b0a5 9739
6a30b0a5
AS
9740
9741if test "$with_system_readline" = yes; then
9742 READLINE=-lreadline
9743 READLINE_DEPS=
9744 READLINE_CFLAGS=
39037522 9745 READLINE_TEXI_INCFLAG=
a71e0887
JK
9746
9747 # readline-6.0 started to use the name `_rl_echoing_p'.
9748 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
9749
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
9751$as_echo_n "checking for readline_echoing_p... " >&6; }
9752 save_LIBS=$LIBS
9753 LIBS="$LIBS $READLINE"
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9755/* end confdefs.h. */
9756
9757int
9758main ()
9759{
9760extern int readline_echoing_p;
9761 return readline_echoing_p;
9762 ;
9763 return 0;
9764}
9765_ACEOF
9766if ac_fn_c_try_link "$LINENO"; then :
9767 READLINE_ECHOING_P=yes
9768else
9769 READLINE_ECHOING_P=no
9770
9771$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
9772
9773fi
9774rm -f core conftest.err conftest.$ac_objext \
9775 conftest$ac_exeext conftest.$ac_ext
9776 LIBS="$save_LIBS"
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
9778$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
9779else
9780 READLINE='$(READLINE_DIR)/libreadline.a'
9781 READLINE_DEPS='$(READLINE)'
9782 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9783 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9784fi
9785
9786
9787
9788
9789
39037522 9790
81ecdfbb
RW
9791# Check whether --with-expat was given.
9792if test "${with_expat+set}" = set; then :
9793 withval=$with_expat;
5c39566f
DJ
9794else
9795 with_expat=auto
81ecdfbb
RW
9796fi
9797
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9799$as_echo_n "checking whether to use expat... " >&6; }
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9801$as_echo "$with_expat" >&6; }
5c39566f
DJ
9802
9803if test "${with_expat}" = no; then
81ecdfbb
RW
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9805$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9806 HAVE_LIBEXPAT=no
9807else
9808
3841debe
DJ
9809 if test "X$prefix" = "XNONE"; then
9810 acl_final_prefix="$ac_default_prefix"
9811 else
9812 acl_final_prefix="$prefix"
9813 fi
9814 if test "X$exec_prefix" = "XNONE"; then
9815 acl_final_exec_prefix='${prefix}'
9816 else
9817 acl_final_exec_prefix="$exec_prefix"
9818 fi
9819 acl_save_prefix="$prefix"
9820 prefix="$acl_final_prefix"
9821 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9822 prefix="$acl_save_prefix"
9823
9824
81ecdfbb
RW
9825# Check whether --with-gnu-ld was given.
9826if test "${with_gnu_ld+set}" = set; then :
9827 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9828else
9829 with_gnu_ld=no
81ecdfbb
RW
9830fi
9831
3841debe
DJ
9832# Prepare PATH_SEPARATOR.
9833# The user is always right.
9834if test "${PATH_SEPARATOR+set}" != set; then
9835 echo "#! /bin/sh" >conf$$.sh
9836 echo "exit 0" >>conf$$.sh
9837 chmod +x conf$$.sh
9838 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9839 PATH_SEPARATOR=';'
9840 else
9841 PATH_SEPARATOR=:
9842 fi
9843 rm -f conf$$.sh
9844fi
9845ac_prog=ld
9846if test "$GCC" = yes; then
9847 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9849$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9850 case $host in
9851 *-*-mingw*)
9852 # gcc leaves a trailing carriage return which upsets mingw
9853 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9854 *)
9855 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9856 esac
9857 case $ac_prog in
9858 # Accept absolute paths.
9859 [\\/]* | [A-Za-z]:[\\/]*)
9860 re_direlt='/[^/][^/]*/\.\./'
9861 # Canonicalize the path of ld
9862 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9863 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9864 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9865 done
9866 test -z "$LD" && LD="$ac_prog"
9867 ;;
9868 "")
9869 # If it fails, then pretend we aren't using GCC.
9870 ac_prog=ld
9871 ;;
9872 *)
9873 # If it is relative, then search for the first ld in PATH.
9874 with_gnu_ld=unknown
9875 ;;
9876 esac
9877elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9879$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9880else
81ecdfbb
RW
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9882$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9883fi
81ecdfbb
RW
9884if test "${acl_cv_path_LD+set}" = set; then :
9885 $as_echo_n "(cached) " >&6
3841debe
DJ
9886else
9887 if test -z "$LD"; then
9888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9889 for ac_dir in $PATH; do
9890 test -z "$ac_dir" && ac_dir=.
9891 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9892 acl_cv_path_LD="$ac_dir/$ac_prog"
9893 # Check to see if the program is GNU ld. I'd rather use --version,
9894 # but apparently some GNU ld's only accept -v.
9895 # Break only if it was the GNU/non-GNU ld that we prefer.
9896 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9897 test "$with_gnu_ld" != no && break
9898 else
9899 test "$with_gnu_ld" != yes && break
9900 fi
9901 fi
9902 done
9903 IFS="$ac_save_ifs"
9904else
9905 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9906fi
9907fi
9908
9909LD="$acl_cv_path_LD"
9910if test -n "$LD"; then
81ecdfbb
RW
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9912$as_echo "$LD" >&6; }
3841debe 9913else
81ecdfbb
RW
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
3841debe 9916fi
81ecdfbb
RW
9917test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9919$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9920if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9921 $as_echo_n "(cached) " >&6
3841debe
DJ
9922else
9923 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9924if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9925 acl_cv_prog_gnu_ld=yes
9926else
9927 acl_cv_prog_gnu_ld=no
9928fi
9929fi
81ecdfbb
RW
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9931$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
9932with_gnu_ld=$acl_cv_prog_gnu_ld
9933
9934
9935
81ecdfbb
RW
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9937$as_echo_n "checking for shared library run path origin... " >&6; }
9938if test "${acl_cv_rpath+set}" = set; then :
9939 $as_echo_n "(cached) " >&6
3841debe
DJ
9940else
9941
9942 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9943 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9944 . ./conftest.sh
9945 rm -f ./conftest.sh
9946 acl_cv_rpath=done
9947
9948fi
81ecdfbb
RW
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9950$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
9951 wl="$acl_cv_wl"
9952 libext="$acl_cv_libext"
9953 shlibext="$acl_cv_shlibext"
9954 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9955 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9956 hardcode_direct="$acl_cv_hardcode_direct"
9957 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
9958 # Check whether --enable-rpath was given.
9959if test "${enable_rpath+set}" = set; then :
9960 enableval=$enable_rpath; :
3841debe
DJ
9961else
9962 enable_rpath=yes
81ecdfbb
RW
9963fi
9964
3841debe
DJ
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974 use_additional=yes
9975
9976 acl_save_prefix="$prefix"
9977 prefix="$acl_final_prefix"
9978 acl_save_exec_prefix="$exec_prefix"
9979 exec_prefix="$acl_final_exec_prefix"
9980
9981 eval additional_includedir=\"$includedir\"
9982 eval additional_libdir=\"$libdir\"
9983
9984 exec_prefix="$acl_save_exec_prefix"
9985 prefix="$acl_save_prefix"
9986
9987
81ecdfbb
RW
9988# Check whether --with-libexpat-prefix was given.
9989if test "${with_libexpat_prefix+set}" = set; then :
9990 withval=$with_libexpat_prefix;
3841debe
DJ
9991 if test "X$withval" = "Xno"; then
9992 use_additional=no
9993 else
9994 if test "X$withval" = "X"; then
9995
9996 acl_save_prefix="$prefix"
9997 prefix="$acl_final_prefix"
9998 acl_save_exec_prefix="$exec_prefix"
9999 exec_prefix="$acl_final_exec_prefix"
10000
10001 eval additional_includedir=\"$includedir\"
10002 eval additional_libdir=\"$libdir\"
10003
10004 exec_prefix="$acl_save_exec_prefix"
10005 prefix="$acl_save_prefix"
10006
10007 else
10008 additional_includedir="$withval/include"
10009 additional_libdir="$withval/lib"
10010 fi
10011 fi
10012
81ecdfbb
RW
10013fi
10014
3841debe
DJ
10015 LIBEXPAT=
10016 LTLIBEXPAT=
10017 INCEXPAT=
10018 rpathdirs=
10019 ltrpathdirs=
10020 names_already_handled=
10021 names_next_round='expat '
10022 while test -n "$names_next_round"; do
10023 names_this_round="$names_next_round"
10024 names_next_round=
10025 for name in $names_this_round; do
10026 already_handled=
10027 for n in $names_already_handled; do
10028 if test "$n" = "$name"; then
10029 already_handled=yes
10030 break
10031 fi
10032 done
10033 if test -z "$already_handled"; then
10034 names_already_handled="$names_already_handled $name"
10035 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10036 eval value=\"\$HAVE_LIB$uppername\"
10037 if test -n "$value"; then
10038 if test "$value" = yes; then
10039 eval value=\"\$LIB$uppername\"
10040 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10041 eval value=\"\$LTLIB$uppername\"
10042 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10043 else
10044 :
10045 fi
10046 else
10047 found_dir=
10048 found_la=
10049 found_so=
10050 found_a=
10051 if test $use_additional = yes; then
10052 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10053 found_dir="$additional_libdir"
10054 found_so="$additional_libdir/lib$name.$shlibext"
10055 if test -f "$additional_libdir/lib$name.la"; then
10056 found_la="$additional_libdir/lib$name.la"
10057 fi
10058 else
10059 if test -f "$additional_libdir/lib$name.$libext"; then
10060 found_dir="$additional_libdir"
10061 found_a="$additional_libdir/lib$name.$libext"
10062 if test -f "$additional_libdir/lib$name.la"; then
10063 found_la="$additional_libdir/lib$name.la"
10064 fi
10065 fi
10066 fi
10067 fi
10068 if test "X$found_dir" = "X"; then
10069 for x in $LDFLAGS $LTLIBEXPAT; do
10070
10071 acl_save_prefix="$prefix"
10072 prefix="$acl_final_prefix"
10073 acl_save_exec_prefix="$exec_prefix"
10074 exec_prefix="$acl_final_exec_prefix"
10075 eval x=\"$x\"
10076 exec_prefix="$acl_save_exec_prefix"
10077 prefix="$acl_save_prefix"
10078
10079 case "$x" in
10080 -L*)
10081 dir=`echo "X$x" | sed -e 's/^X-L//'`
10082 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10083 found_dir="$dir"
10084 found_so="$dir/lib$name.$shlibext"
10085 if test -f "$dir/lib$name.la"; then
10086 found_la="$dir/lib$name.la"
10087 fi
10088 else
10089 if test -f "$dir/lib$name.$libext"; then
10090 found_dir="$dir"
10091 found_a="$dir/lib$name.$libext"
10092 if test -f "$dir/lib$name.la"; then
10093 found_la="$dir/lib$name.la"
10094 fi
10095 fi
10096 fi
10097 ;;
10098 esac
10099 if test "X$found_dir" != "X"; then
10100 break
10101 fi
10102 done
10103 fi
10104 if test "X$found_dir" != "X"; then
10105 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10106 if test "X$found_so" != "X"; then
10107 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10108 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10109 else
10110 haveit=
10111 for x in $ltrpathdirs; do
10112 if test "X$x" = "X$found_dir"; then
10113 haveit=yes
10114 break
10115 fi
10116 done
10117 if test -z "$haveit"; then
10118 ltrpathdirs="$ltrpathdirs $found_dir"
10119 fi
10120 if test "$hardcode_direct" = yes; then
10121 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10122 else
10123 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10124 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10125 haveit=
10126 for x in $rpathdirs; do
10127 if test "X$x" = "X$found_dir"; then
10128 haveit=yes
10129 break
10130 fi
10131 done
10132 if test -z "$haveit"; then
10133 rpathdirs="$rpathdirs $found_dir"
10134 fi
10135 else
10136 haveit=
10137 for x in $LDFLAGS $LIBEXPAT; do
10138
10139 acl_save_prefix="$prefix"
10140 prefix="$acl_final_prefix"
10141 acl_save_exec_prefix="$exec_prefix"
10142 exec_prefix="$acl_final_exec_prefix"
10143 eval x=\"$x\"
10144 exec_prefix="$acl_save_exec_prefix"
10145 prefix="$acl_save_prefix"
10146
10147 if test "X$x" = "X-L$found_dir"; then
10148 haveit=yes
10149 break
10150 fi
10151 done
10152 if test -z "$haveit"; then
10153 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10154 fi
10155 if test "$hardcode_minus_L" != no; then
10156 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10157 else
10158 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10159 fi
10160 fi
10161 fi
10162 fi
10163 else
10164 if test "X$found_a" != "X"; then
10165 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10166 else
10167 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10168 fi
10169 fi
10170 additional_includedir=
10171 case "$found_dir" in
10172 */lib | */lib/)
10173 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10174 additional_includedir="$basedir/include"
10175 ;;
10176 esac
10177 if test "X$additional_includedir" != "X"; then
10178 if test "X$additional_includedir" != "X/usr/include"; then
10179 haveit=
10180 if test "X$additional_includedir" = "X/usr/local/include"; then
10181 if test -n "$GCC"; then
10182 case $host_os in
10183 linux*) haveit=yes;;
10184 esac
10185 fi
10186 fi
10187 if test -z "$haveit"; then
10188 for x in $CPPFLAGS $INCEXPAT; do
10189
10190 acl_save_prefix="$prefix"
10191 prefix="$acl_final_prefix"
10192 acl_save_exec_prefix="$exec_prefix"
10193 exec_prefix="$acl_final_exec_prefix"
10194 eval x=\"$x\"
10195 exec_prefix="$acl_save_exec_prefix"
10196 prefix="$acl_save_prefix"
10197
10198 if test "X$x" = "X-I$additional_includedir"; then
10199 haveit=yes
10200 break
10201 fi
10202 done
10203 if test -z "$haveit"; then
10204 if test -d "$additional_includedir"; then
10205 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10206 fi
10207 fi
10208 fi
10209 fi
10210 fi
10211 if test -n "$found_la"; then
10212 save_libdir="$libdir"
10213 case "$found_la" in
10214 */* | *\\*) . "$found_la" ;;
10215 *) . "./$found_la" ;;
10216 esac
10217 libdir="$save_libdir"
10218 for dep in $dependency_libs; do
10219 case "$dep" in
10220 -L*)
10221 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10222 if test "X$additional_libdir" != "X/usr/lib"; then
10223 haveit=
10224 if test "X$additional_libdir" = "X/usr/local/lib"; then
10225 if test -n "$GCC"; then
10226 case $host_os in
10227 linux*) haveit=yes;;
10228 esac
10229 fi
10230 fi
10231 if test -z "$haveit"; then
10232 haveit=
10233 for x in $LDFLAGS $LIBEXPAT; do
10234
10235 acl_save_prefix="$prefix"
10236 prefix="$acl_final_prefix"
10237 acl_save_exec_prefix="$exec_prefix"
10238 exec_prefix="$acl_final_exec_prefix"
10239 eval x=\"$x\"
10240 exec_prefix="$acl_save_exec_prefix"
10241 prefix="$acl_save_prefix"
10242
10243 if test "X$x" = "X-L$additional_libdir"; then
10244 haveit=yes
10245 break
10246 fi
10247 done
10248 if test -z "$haveit"; then
10249 if test -d "$additional_libdir"; then
10250 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10251 fi
10252 fi
10253 haveit=
10254 for x in $LDFLAGS $LTLIBEXPAT; do
10255
10256 acl_save_prefix="$prefix"
10257 prefix="$acl_final_prefix"
10258 acl_save_exec_prefix="$exec_prefix"
10259 exec_prefix="$acl_final_exec_prefix"
10260 eval x=\"$x\"
10261 exec_prefix="$acl_save_exec_prefix"
10262 prefix="$acl_save_prefix"
10263
10264 if test "X$x" = "X-L$additional_libdir"; then
10265 haveit=yes
10266 break
10267 fi
10268 done
10269 if test -z "$haveit"; then
10270 if test -d "$additional_libdir"; then
10271 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10272 fi
10273 fi
10274 fi
10275 fi
10276 ;;
10277 -R*)
10278 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10279 if test "$enable_rpath" != no; then
10280 haveit=
10281 for x in $rpathdirs; do
10282 if test "X$x" = "X$dir"; then
10283 haveit=yes
10284 break
10285 fi
10286 done
10287 if test -z "$haveit"; then
10288 rpathdirs="$rpathdirs $dir"
10289 fi
10290 haveit=
10291 for x in $ltrpathdirs; do
10292 if test "X$x" = "X$dir"; then
10293 haveit=yes
10294 break
10295 fi
10296 done
10297 if test -z "$haveit"; then
10298 ltrpathdirs="$ltrpathdirs $dir"
10299 fi
10300 fi
10301 ;;
10302 -l*)
10303 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10304 ;;
10305 *.la)
10306 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10307 ;;
10308 *)
10309 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10310 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10311 ;;
81ecdfbb
RW
10312 esac
10313 done
10314 fi
10315 else
10316 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10317 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10318 fi
10319 fi
10320 fi
10321 done
10322 done
10323 if test "X$rpathdirs" != "X"; then
10324 if test -n "$hardcode_libdir_separator"; then
10325 alldirs=
10326 for found_dir in $rpathdirs; do
10327 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10328 done
10329 acl_save_libdir="$libdir"
10330 libdir="$alldirs"
10331 eval flag=\"$hardcode_libdir_flag_spec\"
10332 libdir="$acl_save_libdir"
10333 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10334 else
10335 for found_dir in $rpathdirs; do
10336 acl_save_libdir="$libdir"
10337 libdir="$found_dir"
10338 eval flag=\"$hardcode_libdir_flag_spec\"
10339 libdir="$acl_save_libdir"
10340 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10341 done
10342 fi
10343 fi
10344 if test "X$ltrpathdirs" != "X"; then
10345 for found_dir in $ltrpathdirs; do
10346 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10347 done
10348 fi
a9322a30
TT
10349
10350
81ecdfbb 10351 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10352
81ecdfbb
RW
10353 for element in $INCEXPAT; do
10354 haveit=
10355 for x in $CPPFLAGS; do
a9322a30 10356
81ecdfbb
RW
10357 acl_save_prefix="$prefix"
10358 prefix="$acl_final_prefix"
10359 acl_save_exec_prefix="$exec_prefix"
10360 exec_prefix="$acl_final_exec_prefix"
10361 eval x=\"$x\"
10362 exec_prefix="$acl_save_exec_prefix"
10363 prefix="$acl_save_prefix"
a8111142 10364
81ecdfbb
RW
10365 if test "X$x" = "X$element"; then
10366 haveit=yes
10367 break
10368 fi
10369 done
10370 if test -z "$haveit"; then
10371 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10372 fi
10373 done
a9322a30
TT
10374
10375
81ecdfbb
RW
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10377$as_echo_n "checking for libexpat... " >&6; }
10378if test "${ac_cv_libexpat+set}" = set; then :
10379 $as_echo_n "(cached) " >&6
bec39cab 10380else
bec39cab 10381
81ecdfbb
RW
10382 ac_save_LIBS="$LIBS"
10383 LIBS="$LIBS $LIBEXPAT"
10384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10385/* end confdefs.h. */
81ecdfbb
RW
10386#include "expat.h"
10387int
10388main ()
10389{
10390XML_Parser p = XML_ParserCreate (0);
10391 ;
10392 return 0;
10393}
bec39cab 10394_ACEOF
81ecdfbb
RW
10395if ac_fn_c_try_link "$LINENO"; then :
10396 ac_cv_libexpat=yes
c906108c 10397else
81ecdfbb 10398 ac_cv_libexpat=no
bec39cab 10399fi
81ecdfbb
RW
10400rm -f core conftest.err conftest.$ac_objext \
10401 conftest$ac_exeext conftest.$ac_ext
10402 LIBS="$ac_save_LIBS"
c906108c 10403
95ca63c4 10404fi
81ecdfbb
RW
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10406$as_echo "$ac_cv_libexpat" >&6; }
10407 if test "$ac_cv_libexpat" = yes; then
10408 HAVE_LIBEXPAT=yes
bec39cab 10409
81ecdfbb 10410$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10411
81ecdfbb
RW
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10413$as_echo_n "checking how to link with libexpat... " >&6; }
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10415$as_echo "$LIBEXPAT" >&6; }
10416 else
10417 HAVE_LIBEXPAT=no
10418 CPPFLAGS="$ac_save_CPPFLAGS"
10419 LIBEXPAT=
10420 LTLIBEXPAT=
10421 fi
95ca63c4
CF
10422
10423
10424
7cb9022a
MK
10425
10426
bec39cab 10427
81ecdfbb
RW
10428 if test "$HAVE_LIBEXPAT" != yes; then
10429 if test "$with_expat" = yes; then
10430 as_fn_error "expat is missing or unusable" "$LINENO" 5
10431 else
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10433$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10434 fi
10435 else
10436 save_LIBS=$LIBS
10437 LIBS="$LIBS $LIBEXPAT"
10438 for ac_func in XML_StopParser
10439do :
10440 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10441if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10442 cat >>confdefs.h <<_ACEOF
81ecdfbb 10443#define HAVE_XML_STOPPARSER 1
bec39cab 10444_ACEOF
95ca63c4 10445
bec39cab 10446fi
bec39cab 10447done
95ca63c4 10448
81ecdfbb
RW
10449 LIBS=$save_LIBS
10450 fi
a9322a30
TT
10451fi
10452
a9322a30 10453
a9322a30
TT
10454
10455
ec685c5e 10456
0c4a4063 10457
81ecdfbb
RW
10458# Check whether --with-python was given.
10459if test "${with_python+set}" = set; then :
10460 withval=$with_python;
bec39cab 10461else
81ecdfbb 10462 with_python=auto
bec39cab 10463fi
bec39cab 10464
81ecdfbb
RW
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10466$as_echo_n "checking whether to use python... " >&6; }
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10468$as_echo "$with_python" >&6; }
9a156167 10469
81ecdfbb
RW
10470if test "${with_python}" = no; then
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10472$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10473 have_libpython=no
bec39cab 10474else
81ecdfbb 10475 case "${with_python}" in
81ecdfbb 10476 /*)
ec685c5e
DE
10477 if test -d ${with_python}; then
10478 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10479 python_prog="${with_python}/bin/python"
0c4a4063 10480 python_prefix=
9c4ea6c5
JB
10481 # If python does not exit ${with_python}/bin, then try in
10482 # ${with_python}. On Windows/MinGW, this is where the Python
10483 # executable is.
10484 if test ! -x "${python_prog}"; then
10485 python_prog="${with_python}/python"
10486 python_prefix=
10487 fi
e7a30f46 10488 if test ! -x "${python_prog}"; then
ec685c5e
DE
10489 # Fall back to gdb 7.0/7.1 behaviour.
10490 python_prog=missing
0c4a4063 10491 python_prefix=${with_python}
ec685c5e 10492 fi
e7a30f46 10493 elif test -x "${with_python}"; then
ec685c5e
DE
10494 # While we can't run python compiled for $host (unless host == build),
10495 # the user could write a script that provides the needed information,
10496 # so we support that.
ec685c5e 10497 python_prog=${with_python}
0c4a4063 10498 python_prefix=
ec685c5e
DE
10499 else
10500 as_fn_error "invalid value for --with-python" "$LINENO" 5
10501 fi
81ecdfbb 10502 ;;
ec685c5e
DE
10503 */*)
10504 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10505 as_fn_error "invalid value for --with-python" "$LINENO" 5
10506 ;;
ec685c5e
DE
10507 *)
10508 # The user has either specified auto, yes, or the name of the python
10509 # program assumed to be in $PATH.
10510 python_prefix=
10511 case "${with_python}" in
10512 yes | auto)
10513 if test ${build} = ${host}; then
10514 # Extract the first word of "python", so it can be a program name with args.
10515set dummy python; ac_word=$2
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517$as_echo_n "checking for $ac_word... " >&6; }
10518if test "${ac_cv_path_python_prog_path+set}" = set; then :
10519 $as_echo_n "(cached) " >&6
10520else
10521 case $python_prog_path in
10522 [\\/]* | ?:[\\/]*)
10523 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10524 ;;
10525 *)
10526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527for as_dir in $PATH
10528do
10529 IFS=$as_save_IFS
10530 test -z "$as_dir" && as_dir=.
10531 for ac_exec_ext in '' $ac_executable_extensions; do
10532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10533 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10535 break 2
10536 fi
10537done
10538 done
10539IFS=$as_save_IFS
10540
10541 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10542 ;;
10543esac
10544fi
10545python_prog_path=$ac_cv_path_python_prog_path
10546if test -n "$python_prog_path"; then
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10548$as_echo "$python_prog_path" >&6; }
10549else
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551$as_echo "no" >&6; }
10552fi
10553
10554
10555 if test "${python_prog_path}" = missing; then
10556 python_prog=missing
10557 else
10558 python_prog=${python_prog_path}
10559 fi
10560 else
10561 # Not much we can do except assume the cross-compiler will find the
10562 # right files.
10563 python_prog=missing
10564 fi
10565 ;;
10566 *)
10567 # While we can't run python compiled for $host (unless host == build),
10568 # the user could write a script that provides the needed information,
10569 # so we support that.
10570 python_prog="${with_python}"
10571 # Extract the first word of "${python_prog}", so it can be a program name with args.
10572set dummy ${python_prog}; ac_word=$2
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10574$as_echo_n "checking for $ac_word... " >&6; }
10575if test "${ac_cv_path_python_prog_path+set}" = set; then :
10576 $as_echo_n "(cached) " >&6
10577else
10578 case $python_prog_path in
10579 [\\/]* | ?:[\\/]*)
10580 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10581 ;;
10582 *)
10583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10584for as_dir in $PATH
10585do
10586 IFS=$as_save_IFS
10587 test -z "$as_dir" && as_dir=.
10588 for ac_exec_ext in '' $ac_executable_extensions; do
10589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10590 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10592 break 2
10593 fi
10594done
10595 done
10596IFS=$as_save_IFS
10597
10598 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10599 ;;
10600esac
10601fi
10602python_prog_path=$ac_cv_path_python_prog_path
10603if test -n "$python_prog_path"; then
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10605$as_echo "$python_prog_path" >&6; }
10606else
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
10609fi
10610
10611
10612 if test "${python_prog_path}" = missing; then
10613 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10614 fi
10615 ;;
10616 esac
81ecdfbb
RW
10617 esac
10618
ec685c5e 10619 if test "${python_prog}" != missing; then
e7a30f46
DE
10620 # We have a python program to use, but it may be too old.
10621 # Don't flag an error for --with-python=auto (the default).
10622 have_python_config=yes
ec685c5e
DE
10623 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10624 if test $? != 0; then
e7a30f46
DE
10625 have_python_config=failed
10626 if test "${with_python}" != auto; then
10627 as_fn_error "failure running python-config --includes" "$LINENO" 5
10628 fi
ec685c5e
DE
10629 fi
10630 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10631 if test $? != 0; then
e7a30f46
DE
10632 have_python_config=failed
10633 if test "${with_python}" != auto; then
10634 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10635 fi
ec685c5e 10636 fi
0c4a4063
DE
10637 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10638 if test $? != 0; then
e7a30f46
DE
10639 have_python_config=failed
10640 if test "${with_python}" != auto; then
10641 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10642 fi
0c4a4063 10643 fi
ec685c5e 10644 else
ac534cba
JB
10645 # We do not have a python executable we can use to determine where
10646 # to find the Python headers and libs. We cannot guess the include
10647 # path from the python_prefix either, because that include path
10648 # depends on the Python version. So, there is nothing much we can
10649 # do except assume that the compiler will be able to find those files.
10650 python_includes=
10651 python_libs=
0c4a4063 10652 have_python_config=no
ec685c5e 10653 fi
bec39cab 10654
ec685c5e
DE
10655 # If we have python-config, only try the configuration it provides.
10656 # Otherwise fallback on the old way of trying different versions of
10657 # python in turn.
81ecdfbb 10658
ec685c5e
DE
10659 have_libpython=no
10660 if test "${have_python_config}" = yes; then
c1039e3c
JB
10661 # Determine the Python version by extracting "-lpython<version>"
10662 # part of the python_libs. <version> is usually X.Y with X and Y
10663 # being decimal numbers, but can also be XY (seen on Windows).
10664 #
10665 # The extraction is performed using sed with a regular expression.
10666 # Initially, the regexp used was using the '?' quantifier to make
10667 # the dot in the version number optional. Unfortunately, this
10668 # does not work with non-GNU versions of sed because, because of
10669 # what looks like a limitation (the '?' quantifier does not work
10670 # with back-references). We work around this limitation by using
10671 # the '*' quantifier instead. It means that, in theory, we might
10672 # match unexpected version strings such as "-lpython2..7", but
10673 # this seems unlikely in practice. And even if that happens,
10674 # an error will be triggered later on, when checking that version
10675 # number.
ec685c5e 10676 python_version=`echo " ${python_libs} " \
c1039e3c 10677 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10678 case "${python_version}" in
10679 python*)
ec685c5e
DE
10680
10681 version=${python_version}
10682
10683 new_CPPFLAGS=${python_includes}
10684 new_LIBS=${python_libs}
81ecdfbb
RW
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10686$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10687 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10688 save_LIBS=$LIBS
ec685c5e
DE
10689 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10690 LIBS="$LIBS $new_LIBS"
10691 found_usable_python=no
81ecdfbb 10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10693/* end confdefs.h. */
ac534cba 10694#include "Python.h"
81ecdfbb
RW
10695int
10696main ()
10697{
10698Py_Initialize ();
10699 ;
10700 return 0;
10701}
bec39cab 10702_ACEOF
81ecdfbb 10703if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10704 have_libpython=${version}
10705 found_usable_python=yes
ac534cba
JB
10706 PYTHON_CPPFLAGS=$new_CPPFLAGS
10707 PYTHON_LIBS=$new_LIBS
9a156167 10708fi
81ecdfbb
RW
10709rm -f core conftest.err conftest.$ac_objext \
10710 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10711 CPPFLAGS=$save_CPPFLAGS
10712 LIBS=$save_LIBS
ec685c5e
DE
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10714$as_echo "${found_usable_python}" >&6; }
9a156167 10715
0c4a4063
DE
10716 ;;
10717 *)
ec685c5e 10718 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10719 ;;
10720 esac
e7a30f46 10721 elif test "${have_python_config}" != failed; then
ec685c5e 10722 if test "${have_libpython}" = no; then
9a156167 10723
420697bb
TT
10724 version=python2.7
10725
10726 new_CPPFLAGS=${python_includes}
10727 new_LIBS="${python_libs} -lpython2.7"
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10729$as_echo_n "checking for ${version}... " >&6; }
10730 save_CPPFLAGS=$CPPFLAGS
10731 save_LIBS=$LIBS
10732 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10733 LIBS="$LIBS $new_LIBS"
10734 found_usable_python=no
10735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10736/* end confdefs.h. */
ac534cba 10737#include "Python.h"
420697bb
TT
10738int
10739main ()
10740{
10741Py_Initialize ();
10742 ;
10743 return 0;
10744}
10745_ACEOF
10746if ac_fn_c_try_link "$LINENO"; then :
10747 have_libpython=${version}
10748 found_usable_python=yes
ac534cba
JB
10749 PYTHON_CPPFLAGS=$new_CPPFLAGS
10750 PYTHON_LIBS=$new_LIBS
420697bb
TT
10751fi
10752rm -f core conftest.err conftest.$ac_objext \
10753 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10754 CPPFLAGS=$save_CPPFLAGS
10755 LIBS=$save_LIBS
420697bb
TT
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10757$as_echo "${found_usable_python}" >&6; }
10758
10759 fi
10760 if test "${have_libpython}" = no; then
10761
ec685c5e
DE
10762 version=python2.6
10763
10764 new_CPPFLAGS=${python_includes}
10765 new_LIBS="${python_libs} -lpython2.6"
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10767$as_echo_n "checking for ${version}... " >&6; }
10768 save_CPPFLAGS=$CPPFLAGS
10769 save_LIBS=$LIBS
10770 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10771 LIBS="$LIBS $new_LIBS"
10772 found_usable_python=no
10773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10774/* end confdefs.h. */
ac534cba 10775#include "Python.h"
ec685c5e
DE
10776int
10777main ()
10778{
10779Py_Initialize ();
10780 ;
10781 return 0;
10782}
10783_ACEOF
10784if ac_fn_c_try_link "$LINENO"; then :
10785 have_libpython=${version}
10786 found_usable_python=yes
ac534cba
JB
10787 PYTHON_CPPFLAGS=$new_CPPFLAGS
10788 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10789fi
10790rm -f core conftest.err conftest.$ac_objext \
10791 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10792 CPPFLAGS=$save_CPPFLAGS
10793 LIBS=$save_LIBS
ec685c5e
DE
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10795$as_echo "${found_usable_python}" >&6; }
9a156167 10796
81ecdfbb 10797 fi
ec685c5e 10798 if test ${have_libpython} = no; then
9a156167 10799
81ecdfbb 10800 version=python2.5
9a156167 10801
ec685c5e
DE
10802 new_CPPFLAGS=${python_includes}
10803 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10805$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10806 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10807 save_LIBS=$LIBS
ec685c5e
DE
10808 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10809 LIBS="$LIBS $new_LIBS"
10810 found_usable_python=no
81ecdfbb 10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10812/* end confdefs.h. */
ac534cba 10813#include "Python.h"
81ecdfbb
RW
10814int
10815main ()
10816{
10817Py_Initialize ();
10818 ;
10819 return 0;
10820}
436868fb 10821_ACEOF
81ecdfbb 10822if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10823 have_libpython=${version}
10824 found_usable_python=yes
ac534cba
JB
10825 PYTHON_CPPFLAGS=$new_CPPFLAGS
10826 PYTHON_LIBS=$new_LIBS
436868fb 10827fi
81ecdfbb
RW
10828rm -f core conftest.err conftest.$ac_objext \
10829 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10830 CPPFLAGS=$save_CPPFLAGS
10831 LIBS=$save_LIBS
ec685c5e
DE
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10833$as_echo "${found_usable_python}" >&6; }
a9322a30 10834
81ecdfbb 10835 fi
ec685c5e 10836 if test ${have_libpython} = no; then
a9322a30 10837
81ecdfbb 10838 version=python2.4
a9322a30 10839
ec685c5e
DE
10840 new_CPPFLAGS=${python_includes}
10841 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10843$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10844 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10845 save_LIBS=$LIBS
ec685c5e
DE
10846 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10847 LIBS="$LIBS $new_LIBS"
10848 found_usable_python=no
81ecdfbb 10849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10850/* end confdefs.h. */
ac534cba 10851#include "Python.h"
a9322a30
TT
10852int
10853main ()
10854{
81ecdfbb 10855Py_Initialize ();
a9322a30
TT
10856 ;
10857 return 0;
10858}
436868fb 10859_ACEOF
81ecdfbb 10860if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10861 have_libpython=${version}
10862 found_usable_python=yes
ac534cba
JB
10863 PYTHON_CPPFLAGS=$new_CPPFLAGS
10864 PYTHON_LIBS=$new_LIBS
436868fb 10865fi
81ecdfbb
RW
10866rm -f core conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10868 CPPFLAGS=$save_CPPFLAGS
10869 LIBS=$save_LIBS
ec685c5e
DE
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10871$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10872
ec685c5e
DE
10873 fi
10874 fi
9c4ea6c5 10875 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10876
10877$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10878
9c4ea6c5 10879 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10880
10881$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10882
9c4ea6c5 10883 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10884
10885$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10886
9c4ea6c5 10887 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10888
10889$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10890
81ecdfbb 10891 fi
ec685c5e
DE
10892
10893 if test "${have_libpython}" = no; then
81ecdfbb
RW
10894 case "${with_python}" in
10895 yes)
10896 as_fn_error "python is missing or unusable" "$LINENO" 5
10897 ;;
10898 auto)
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10900$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10901 ;;
10902 *)
10903 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10904 ;;
10905 esac
0c4a4063
DE
10906 else
10907 if test -n "${python_prefix}"; then
10908
10909cat >>confdefs.h <<_ACEOF
10910#define WITH_PYTHON_PATH "${python_prefix}"
10911_ACEOF
10912
10913
10914 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10915 if test "x$prefix" = xNONE; then
10916 test_prefix=/usr/local
10917 else
10918 test_prefix=$prefix
10919 fi
10920 else
10921 test_prefix=$exec_prefix
10922 fi
10923 value=0
10924 case ${python_prefix} in
10925 "${test_prefix}"|"${test_prefix}/"*|\
10926 '${exec_prefix}'|'${exec_prefix}/'*)
10927 value=1
10928 ;;
10929 esac
10930
10931cat >>confdefs.h <<_ACEOF
10932#define PYTHON_PATH_RELOCATABLE $value
10933_ACEOF
10934
10935
10936 fi
81ecdfbb 10937 fi
436868fb 10938fi
436868fb 10939
ec685c5e 10940if test "${have_libpython}" != no; then
436868fb 10941
81ecdfbb 10942$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10943
81ecdfbb
RW
10944 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10945 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10946 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10947 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10948 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10949
81ecdfbb
RW
10950 # Flags needed to compile Python code (taken from python-config --cflags).
10951 # We cannot call python-config directly because it will output whatever was
10952 # used when compiling the Python interpreter itself, including flags which
10953 # would make the python-related objects be compiled differently from the
10954 # rest of GDB (e.g., -O2 and -fPIC).
10955 if test "${GCC}" = yes; then
10956 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10957 fi
436868fb 10958
81ecdfbb
RW
10959 if test "x${tentative_python_cflags}" != x; then
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10961$as_echo_n "checking compiler flags for python code... " >&6; }
10962 for flag in ${tentative_python_cflags}; do
10963 # Check that the compiler accepts it
10964 saved_CFLAGS="$CFLAGS"
10965 CFLAGS="$CFLAGS $flag"
10966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10967/* end confdefs.h. */
81ecdfbb 10968
a9322a30
TT
10969int
10970main ()
10971{
a9322a30
TT
10972
10973 ;
10974 return 0;
10975}
bec39cab 10976_ACEOF
81ecdfbb
RW
10977if ac_fn_c_try_compile "$LINENO"; then :
10978 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10979fi
81ecdfbb
RW
10980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981 CFLAGS="$saved_CFLAGS"
10982 done
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10984$as_echo "${PYTHON_CFLAGS}" >&6; }
10985 fi
043b6510
JB
10986
10987 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
10988 # #if _SGIAPI
10989 # #define siginfo __siginfo
10990 # #endif
10991 # The problem is that including Python causes some XOPEN macros to be
10992 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
10993 # to false. So, we work around this issue by defining siginfo ourself
10994 # though the command-line.
10995 case "$gdb_host" in
10996 irix*) if test "${GCC}" = yes; then
10997 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
10998 fi
10999 ;;
11000 esac
81ecdfbb
RW
11001else
11002 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11003 # included.
11004 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11005 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11006 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11007fi
9a156167 11008
9a156167 11009
ac534cba
JB
11010
11011
81ecdfbb
RW
11012# ------------------------- #
11013# Checks for header files. #
11014# ------------------------- #
c890192f 11015
81ecdfbb
RW
11016ac_header_dirent=no
11017for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11018 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11020$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11021if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11022 $as_echo_n "(cached) " >&6
bec39cab 11023else
81ecdfbb 11024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11025/* end confdefs.h. */
81ecdfbb
RW
11026#include <sys/types.h>
11027#include <$ac_hdr>
11028
a9322a30
TT
11029int
11030main ()
11031{
81ecdfbb
RW
11032if ((DIR *) 0)
11033return 0;
a9322a30
TT
11034 ;
11035 return 0;
11036}
bec39cab 11037_ACEOF
81ecdfbb
RW
11038if ac_fn_c_try_compile "$LINENO"; then :
11039 eval "$as_ac_Header=yes"
bec39cab 11040else
81ecdfbb 11041 eval "$as_ac_Header=no"
bec39cab 11042fi
81ecdfbb 11043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11044fi
81ecdfbb
RW
11045eval ac_res=\$$as_ac_Header
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11047$as_echo "$ac_res" >&6; }
11048eval as_val=\$$as_ac_Header
11049 if test "x$as_val" = x""yes; then :
11050 cat >>confdefs.h <<_ACEOF
11051#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11052_ACEOF
bec39cab 11053
81ecdfbb
RW
11054ac_header_dirent=$ac_hdr; break
11055fi
bec39cab 11056
81ecdfbb
RW
11057done
11058# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11059if test $ac_header_dirent = dirent.h; then
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11061$as_echo_n "checking for library containing opendir... " >&6; }
11062if test "${ac_cv_search_opendir+set}" = set; then :
11063 $as_echo_n "(cached) " >&6
c890192f 11064else
81ecdfbb
RW
11065 ac_func_search_save_LIBS=$LIBS
11066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067/* end confdefs.h. */
11068
11069/* Override any GCC internal prototype to avoid an error.
11070 Use char because int might match the return type of a GCC
11071 builtin and then its argument prototype would still apply. */
11072#ifdef __cplusplus
11073extern "C"
11074#endif
11075char opendir ();
11076int
11077main ()
11078{
11079return opendir ();
11080 ;
11081 return 0;
11082}
bec39cab 11083_ACEOF
81ecdfbb
RW
11084for ac_lib in '' dir; do
11085 if test -z "$ac_lib"; then
11086 ac_res="none required"
11087 else
11088 ac_res=-l$ac_lib
11089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11090 fi
11091 if ac_fn_c_try_link "$LINENO"; then :
11092 ac_cv_search_opendir=$ac_res
11093fi
11094rm -f core conftest.err conftest.$ac_objext \
11095 conftest$ac_exeext
11096 if test "${ac_cv_search_opendir+set}" = set; then :
11097 break
11098fi
11099done
11100if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11101
81ecdfbb
RW
11102else
11103 ac_cv_search_opendir=no
11104fi
11105rm conftest.$ac_ext
11106LIBS=$ac_func_search_save_LIBS
11107fi
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11109$as_echo "$ac_cv_search_opendir" >&6; }
11110ac_res=$ac_cv_search_opendir
11111if test "$ac_res" != no; then :
11112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11113
bec39cab 11114fi
81ecdfbb 11115
bec39cab 11116else
81ecdfbb
RW
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11118$as_echo_n "checking for library containing opendir... " >&6; }
11119if test "${ac_cv_search_opendir+set}" = set; then :
11120 $as_echo_n "(cached) " >&6
11121else
11122 ac_func_search_save_LIBS=$LIBS
11123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11124/* end confdefs.h. */
81ecdfbb
RW
11125
11126/* Override any GCC internal prototype to avoid an error.
11127 Use char because int might match the return type of a GCC
11128 builtin and then its argument prototype would still apply. */
11129#ifdef __cplusplus
11130extern "C"
11131#endif
11132char opendir ();
a9322a30
TT
11133int
11134main ()
11135{
81ecdfbb 11136return opendir ();
a9322a30
TT
11137 ;
11138 return 0;
11139}
bec39cab 11140_ACEOF
81ecdfbb
RW
11141for ac_lib in '' x; do
11142 if test -z "$ac_lib"; then
11143 ac_res="none required"
11144 else
11145 ac_res=-l$ac_lib
11146 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11147 fi
11148 if ac_fn_c_try_link "$LINENO"; then :
11149 ac_cv_search_opendir=$ac_res
11150fi
11151rm -f core conftest.err conftest.$ac_objext \
11152 conftest$ac_exeext
11153 if test "${ac_cv_search_opendir+set}" = set; then :
11154 break
11155fi
11156done
11157if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11158
81ecdfbb
RW
11159else
11160 ac_cv_search_opendir=no
bec39cab 11161fi
81ecdfbb
RW
11162rm conftest.$ac_ext
11163LIBS=$ac_func_search_save_LIBS
a9322a30 11164fi
81ecdfbb
RW
11165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11166$as_echo "$ac_cv_search_opendir" >&6; }
11167ac_res=$ac_cv_search_opendir
11168if test "$ac_res" != no; then :
11169 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11170
81ecdfbb 11171fi
bec39cab 11172
81ecdfbb 11173fi
bec39cab 11174
81ecdfbb
RW
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11176$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11177if test "${ac_cv_header_stat_broken+set}" = set; then :
11178 $as_echo_n "(cached) " >&6
9a156167 11179else
81ecdfbb
RW
11180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11181/* end confdefs.h. */
11182#include <sys/types.h>
11183#include <sys/stat.h>
11184
11185#if defined S_ISBLK && defined S_IFDIR
11186extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11187#endif
11188
11189#if defined S_ISBLK && defined S_IFCHR
11190extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11191#endif
11192
11193#if defined S_ISLNK && defined S_IFREG
11194extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11195#endif
11196
11197#if defined S_ISSOCK && defined S_IFREG
11198extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11199#endif
11200
bec39cab 11201_ACEOF
81ecdfbb
RW
11202if ac_fn_c_try_compile "$LINENO"; then :
11203 ac_cv_header_stat_broken=no
11204else
11205 ac_cv_header_stat_broken=yes
11206fi
11207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11208fi
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11210$as_echo "$ac_cv_header_stat_broken" >&6; }
11211if test $ac_cv_header_stat_broken = yes; then
9a156167 11212
81ecdfbb 11213$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11214
bec39cab 11215fi
81ecdfbb
RW
11216
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11218$as_echo_n "checking for ANSI C header files... " >&6; }
11219if test "${ac_cv_header_stdc+set}" = set; then :
11220 $as_echo_n "(cached) " >&6
bec39cab 11221else
81ecdfbb 11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11223/* end confdefs.h. */
81ecdfbb
RW
11224#include <stdlib.h>
11225#include <stdarg.h>
11226#include <string.h>
11227#include <float.h>
11228
a9322a30
TT
11229int
11230main ()
11231{
a9322a30
TT
11232
11233 ;
11234 return 0;
11235}
bec39cab 11236_ACEOF
81ecdfbb
RW
11237if ac_fn_c_try_compile "$LINENO"; then :
11238 ac_cv_header_stdc=yes
bec39cab 11239else
81ecdfbb 11240 ac_cv_header_stdc=no
a9322a30 11241fi
81ecdfbb 11242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11243
81ecdfbb
RW
11244if test $ac_cv_header_stdc = yes; then
11245 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247/* end confdefs.h. */
11248#include <string.h>
bec39cab 11249
81ecdfbb
RW
11250_ACEOF
11251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11252 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11253
bec39cab 11254else
81ecdfbb
RW
11255 ac_cv_header_stdc=no
11256fi
11257rm -f conftest*
11258
11259fi
11260
11261if test $ac_cv_header_stdc = yes; then
11262 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h. */
11265#include <stdlib.h>
11266
bec39cab 11267_ACEOF
81ecdfbb
RW
11268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11269 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11270
81ecdfbb
RW
11271else
11272 ac_cv_header_stdc=no
11273fi
11274rm -f conftest*
bec39cab 11275
bec39cab 11276fi
81ecdfbb
RW
11277
11278if test $ac_cv_header_stdc = yes; then
11279 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11280 if test "$cross_compiling" = yes; then :
11281 :
bec39cab 11282else
81ecdfbb 11283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11284/* end confdefs.h. */
81ecdfbb
RW
11285#include <ctype.h>
11286#include <stdlib.h>
11287#if ((' ' & 0x0FF) == 0x020)
11288# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11289# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11290#else
11291# define ISLOWER(c) \
11292 (('a' <= (c) && (c) <= 'i') \
11293 || ('j' <= (c) && (c) <= 'r') \
11294 || ('s' <= (c) && (c) <= 'z'))
11295# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11296#endif
11297
11298#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11299int
11300main ()
11301{
81ecdfbb
RW
11302 int i;
11303 for (i = 0; i < 256; i++)
11304 if (XOR (islower (i), ISLOWER (i))
11305 || toupper (i) != TOUPPER (i))
11306 return 2;
a9322a30
TT
11307 return 0;
11308}
bec39cab 11309_ACEOF
81ecdfbb
RW
11310if ac_fn_c_try_run "$LINENO"; then :
11311
bec39cab 11312else
81ecdfbb
RW
11313 ac_cv_header_stdc=no
11314fi
11315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11316 conftest.$ac_objext conftest.beam conftest.$ac_ext
11317fi
bec39cab 11318
bec39cab 11319fi
a9322a30 11320fi
81ecdfbb
RW
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11322$as_echo "$ac_cv_header_stdc" >&6; }
11323if test $ac_cv_header_stdc = yes; then
bec39cab 11324
81ecdfbb 11325$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11326
81ecdfbb 11327fi
bec39cab 11328
81ecdfbb
RW
11329# elf_hp.h is for HP/UX 64-bit shared library support.
11330# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11331# unconditionally, so what's the point in checking these?
11332for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11333 thread_db.h gnu/libc-version.h signal.h stddef.h \
11334 stdlib.h string.h memory.h strings.h sys/fault.h \
11335 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11336 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11337 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11338 sys/types.h sys/wait.h wait.h termios.h termio.h \
11339 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11340do :
11341 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11342ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11343eval as_val=\$$as_ac_Header
11344 if test "x$as_val" = x""yes; then :
bec39cab 11345 cat >>confdefs.h <<_ACEOF
81ecdfbb 11346#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11347_ACEOF
c906108c 11348
bec39cab 11349fi
81ecdfbb
RW
11350
11351done
11352
11353for ac_header in link.h
11354do :
11355 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11356# include <sys/types.h>
11357#endif
11358#if HAVE_NLIST_H
11359# include <nlist.h>
a9322a30
TT
11360#endif
11361
81ecdfbb
RW
11362"
11363if test "x$ac_cv_header_link_h" = x""yes; then :
11364 cat >>confdefs.h <<_ACEOF
11365#define HAVE_LINK_H 1
bec39cab 11366_ACEOF
bec39cab 11367
a9322a30 11368fi
bec39cab 11369
81ecdfbb 11370done
c906108c 11371
81ecdfbb
RW
11372for ac_header in sys/proc.h
11373do :
11374 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11375# include <sys/param.h>
11376#endif
c906108c 11377
81ecdfbb
RW
11378"
11379if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11380 cat >>confdefs.h <<_ACEOF
81ecdfbb 11381#define HAVE_SYS_PROC_H 1
bec39cab 11382_ACEOF
5ee754fc 11383
bec39cab 11384fi
81ecdfbb
RW
11385
11386done
11387
11388for ac_header in sys/user.h
11389do :
11390 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11391# include <sys/param.h>
a9322a30
TT
11392#endif
11393
81ecdfbb
RW
11394"
11395if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11396 cat >>confdefs.h <<_ACEOF
11397#define HAVE_SYS_USER_H 1
bec39cab 11398_ACEOF
bec39cab 11399
a9322a30 11400fi
bec39cab 11401
81ecdfbb 11402done
5ee754fc 11403
5ee754fc 11404
81ecdfbb
RW
11405# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11406# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11407# think that we don't have <curses.h> if we're using GCC.
11408case $host_os in
11409 solaris2.[789])
11410 if test "$GCC" = yes; then
11411
11412$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11413
11414 fi ;;
11415esac
11416for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11417do :
11418 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11419ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11420eval as_val=\$$as_ac_Header
11421 if test "x$as_val" = x""yes; then :
bec39cab 11422 cat >>confdefs.h <<_ACEOF
81ecdfbb 11423#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11424_ACEOF
5ee754fc
MK
11425
11426fi
11427
81ecdfbb 11428done
bec39cab 11429
81ecdfbb
RW
11430for ac_header in term.h
11431do :
11432 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11433# include <curses.h>
11434#endif
bec39cab 11435
81ecdfbb
RW
11436"
11437if test "x$ac_cv_header_term_h" = x""yes; then :
11438 cat >>confdefs.h <<_ACEOF
11439#define HAVE_TERM_H 1
a8111142 11440_ACEOF
a8111142 11441
a8111142 11442fi
a8111142 11443
81ecdfbb 11444done
a8111142
TT
11445
11446
81ecdfbb
RW
11447# ------------------------- #
11448# Checks for declarations. #
11449# ------------------------- #
a9322a30 11450
81ecdfbb
RW
11451ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11452if test "x$ac_cv_have_decl_free" = x""yes; then :
11453 ac_have_decl=1
bec39cab 11454else
81ecdfbb
RW
11455 ac_have_decl=0
11456fi
11457
11458cat >>confdefs.h <<_ACEOF
11459#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11460_ACEOF
81ecdfbb
RW
11461ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11462if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11463 ac_have_decl=1
11464else
11465 ac_have_decl=0
11466fi
11467
11468cat >>confdefs.h <<_ACEOF
11469#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11470_ACEOF
81ecdfbb
RW
11471ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11472if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11473 ac_have_decl=1
bec39cab 11474else
81ecdfbb
RW
11475 ac_have_decl=0
11476fi
bec39cab 11477
81ecdfbb
RW
11478cat >>confdefs.h <<_ACEOF
11479#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11480_ACEOF
81ecdfbb
RW
11481ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11482if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11483 ac_have_decl=1
11484else
11485 ac_have_decl=0
11486fi
11487
11488cat >>confdefs.h <<_ACEOF
11489#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11490_ACEOF
81ecdfbb
RW
11491ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11492if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11493 ac_have_decl=1
bec39cab 11494else
81ecdfbb
RW
11495 ac_have_decl=0
11496fi
5ee754fc 11497
81ecdfbb
RW
11498cat >>confdefs.h <<_ACEOF
11499#define HAVE_DECL_STRSTR $ac_have_decl
11500_ACEOF
11501ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11502if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11503 ac_have_decl=1
11504else
11505 ac_have_decl=0
5ee754fc 11506fi
81ecdfbb
RW
11507
11508cat >>confdefs.h <<_ACEOF
11509#define HAVE_DECL_GETOPT $ac_have_decl
11510_ACEOF
11511ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11512if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11513 ac_have_decl=1
11514else
11515 ac_have_decl=0
5ee754fc 11516fi
81ecdfbb
RW
11517
11518cat >>confdefs.h <<_ACEOF
11519#define HAVE_DECL_SNPRINTF $ac_have_decl
11520_ACEOF
11521ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11522if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11523 ac_have_decl=1
11524else
11525 ac_have_decl=0
5ee754fc
MK
11526fi
11527
a9322a30 11528cat >>confdefs.h <<_ACEOF
81ecdfbb 11529#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11530_ACEOF
5ee754fc 11531
5ee754fc 11532
81ecdfbb
RW
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11534$as_echo_n "checking for LC_MESSAGES... " >&6; }
11535if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11536 $as_echo_n "(cached) " >&6
bec39cab 11537else
81ecdfbb 11538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11539/* end confdefs.h. */
81ecdfbb 11540#include <locale.h>
a9322a30
TT
11541int
11542main ()
11543{
81ecdfbb 11544return LC_MESSAGES
a9322a30
TT
11545 ;
11546 return 0;
11547}
bec39cab 11548_ACEOF
81ecdfbb
RW
11549if ac_fn_c_try_link "$LINENO"; then :
11550 am_cv_val_LC_MESSAGES=yes
bec39cab 11551else
81ecdfbb
RW
11552 am_cv_val_LC_MESSAGES=no
11553fi
11554rm -f core conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext conftest.$ac_ext
11556fi
11557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11558$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11559 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11560
81ecdfbb
RW
11561$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11562
11563 fi
11564
11565
11566# ----------------------- #
11567# Checks for structures. #
11568# ----------------------- #
11569
11570ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11571if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11572
11573cat >>confdefs.h <<_ACEOF
11574#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11575_ACEOF
7eb368b3 11576
81ecdfbb 11577
7eb368b3 11578fi
81ecdfbb
RW
11579ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11580if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11581
a9322a30
TT
11582cat >>confdefs.h <<_ACEOF
11583#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11584_ACEOF
11585
a9322a30 11586
7eb368b3
NR
11587fi
11588
7eb368b3 11589
a9322a30
TT
11590# ------------------ #
11591# Checks for types. #
11592# ------------------ #
7eb368b3 11593
81ecdfbb
RW
11594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11595$as_echo_n "checking return type of signal handlers... " >&6; }
11596if test "${ac_cv_type_signal+set}" = set; then :
11597 $as_echo_n "(cached) " >&6
bec39cab 11598else
81ecdfbb 11599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11600/* end confdefs.h. */
a9322a30
TT
11601#include <sys/types.h>
11602#include <signal.h>
7cb9022a 11603
a9322a30
TT
11604int
11605main ()
11606{
81ecdfbb 11607return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11608 ;
11609 return 0;
11610}
bec39cab 11611_ACEOF
81ecdfbb
RW
11612if ac_fn_c_try_compile "$LINENO"; then :
11613 ac_cv_type_signal=int
bec39cab 11614else
81ecdfbb 11615 ac_cv_type_signal=void
bec39cab 11616fi
81ecdfbb 11617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11618fi
81ecdfbb
RW
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11620$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11621
a9322a30
TT
11622cat >>confdefs.h <<_ACEOF
11623#define RETSIGTYPE $ac_cv_type_signal
11624_ACEOF
5ee754fc 11625
bec39cab 11626
81ecdfbb 11627ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11628#include <sys/socket.h>
11629
81ecdfbb
RW
11630"
11631if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11632
a9322a30
TT
11633cat >>confdefs.h <<_ACEOF
11634#define HAVE_SOCKLEN_T 1
11635_ACEOF
11636
11637
11638fi
11639
11640
11641# ------------------------------------- #
11642# Checks for compiler characteristics. #
11643# ------------------------------------- #
11644
81ecdfbb
RW
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11646$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11647if test "${ac_cv_c_const+set}" = set; then :
11648 $as_echo_n "(cached) " >&6
a9322a30 11649else
81ecdfbb 11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11651/* end confdefs.h. */
a9322a30
TT
11652
11653int
11654main ()
11655{
11656/* FIXME: Include the comments suggested by Paul. */
11657#ifndef __cplusplus
11658 /* Ultrix mips cc rejects this. */
11659 typedef int charset[2];
81ecdfbb 11660 const charset cs;
a9322a30 11661 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11662 char const *const *pcpcc;
11663 char **ppc;
a9322a30
TT
11664 /* NEC SVR4.0.2 mips cc rejects this. */
11665 struct point {int x, y;};
11666 static struct point const zero = {0,0};
11667 /* AIX XL C 1.02.0.0 rejects this.
11668 It does not let you subtract one const X* pointer from another in
11669 an arm of an if-expression whose if-part is not a constant
11670 expression */
11671 const char *g = "string";
81ecdfbb 11672 pcpcc = &g + (g ? g-g : 0);
a9322a30 11673 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11674 ++pcpcc;
11675 ppc = (char**) pcpcc;
11676 pcpcc = (char const *const *) ppc;
a9322a30
TT
11677 { /* SCO 3.2v4 cc rejects this. */
11678 char *t;
11679 char const *s = 0 ? (char *) 0 : (char const *) 0;
11680
11681 *t++ = 0;
81ecdfbb 11682 if (s) return 0;
a9322a30
TT
11683 }
11684 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11685 int x[] = {25, 17};
11686 const int *foo = &x[0];
11687 ++foo;
11688 }
11689 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11690 typedef const int *iptr;
11691 iptr p = 0;
11692 ++p;
11693 }
11694 { /* AIX XL C 1.02.0.0 rejects this saying
11695 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11696 struct s { int j; const int *ap[3]; };
11697 struct s *b; b->j = 5;
11698 }
11699 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11700 const int foo = 10;
81ecdfbb 11701 if (!foo) return 0;
a9322a30 11702 }
81ecdfbb 11703 return !cs[0] && !zero.x;
a9322a30
TT
11704#endif
11705
11706 ;
11707 return 0;
11708}
bec39cab 11709_ACEOF
81ecdfbb 11710if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11711 ac_cv_c_const=yes
5ee754fc 11712else
81ecdfbb 11713 ac_cv_c_const=no
5ee754fc 11714fi
81ecdfbb 11715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11716fi
81ecdfbb
RW
11717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11718$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11719if test $ac_cv_c_const = no; then
bec39cab 11720
81ecdfbb 11721$as_echo "#define const /**/" >>confdefs.h
bec39cab 11722
5ee754fc 11723fi
bec39cab 11724
81ecdfbb
RW
11725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11726$as_echo_n "checking for inline... " >&6; }
11727if test "${ac_cv_c_inline+set}" = set; then :
11728 $as_echo_n "(cached) " >&6
bec39cab 11729else
a9322a30
TT
11730 ac_cv_c_inline=no
11731for ac_kw in inline __inline__ __inline; do
81ecdfbb 11732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11733/* end confdefs.h. */
a9322a30
TT
11734#ifndef __cplusplus
11735typedef int foo_t;
11736static $ac_kw foo_t static_foo () {return 0; }
11737$ac_kw foo_t foo () {return 0; }
11738#endif
11739
bec39cab 11740_ACEOF
81ecdfbb
RW
11741if ac_fn_c_try_compile "$LINENO"; then :
11742 ac_cv_c_inline=$ac_kw
bec39cab 11743fi
81ecdfbb
RW
11744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11745 test "$ac_cv_c_inline" != no && break
a9322a30 11746done
bec39cab 11747
5ee754fc 11748fi
81ecdfbb
RW
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11750$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11751
a9322a30
TT
11752case $ac_cv_c_inline in
11753 inline | yes) ;;
11754 *)
11755 case $ac_cv_c_inline in
11756 no) ac_val=;;
11757 *) ac_val=$ac_cv_c_inline;;
11758 esac
11759 cat >>confdefs.h <<_ACEOF
11760#ifndef __cplusplus
11761#define inline $ac_val
11762#endif
11763_ACEOF
bec39cab
AC
11764 ;;
11765esac
bec39cab 11766
81ecdfbb
RW
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11768$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11769if test "${ac_cv_c_bigendian+set}" = set; then :
11770 $as_echo_n "(cached) " >&6
bec39cab 11771else
81ecdfbb
RW
11772 ac_cv_c_bigendian=unknown
11773 # See if we're dealing with a universal compiler.
11774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775/* end confdefs.h. */
11776#ifndef __APPLE_CC__
11777 not a universal capable compiler
11778 #endif
11779 typedef int dummy;
11780
11781_ACEOF
11782if ac_fn_c_try_compile "$LINENO"; then :
11783
11784 # Check for potential -arch flags. It is not universal unless
11785 # there are at least two -arch flags with different values.
11786 ac_arch=
11787 ac_prev=
11788 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11789 if test -n "$ac_prev"; then
11790 case $ac_word in
11791 i?86 | x86_64 | ppc | ppc64)
11792 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11793 ac_arch=$ac_word
11794 else
11795 ac_cv_c_bigendian=universal
11796 break
11797 fi
11798 ;;
11799 esac
11800 ac_prev=
11801 elif test "x$ac_word" = "x-arch"; then
11802 ac_prev=arch
11803 fi
11804 done
11805fi
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807 if test $ac_cv_c_bigendian = unknown; then
11808 # See if sys/param.h defines the BYTE_ORDER macro.
11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11810/* end confdefs.h. */
a9322a30 11811#include <sys/types.h>
81ecdfbb 11812 #include <sys/param.h>
a9322a30
TT
11813
11814int
11815main ()
11816{
81ecdfbb
RW
11817#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11818 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11819 && LITTLE_ENDIAN)
11820 bogus endian macros
11821 #endif
a9322a30
TT
11822
11823 ;
11824 return 0;
11825}
bec39cab 11826_ACEOF
81ecdfbb 11827if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11828 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11830/* end confdefs.h. */
a9322a30 11831#include <sys/types.h>
81ecdfbb 11832 #include <sys/param.h>
a9322a30
TT
11833
11834int
11835main ()
11836{
11837#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11838 not big endian
11839 #endif
a9322a30
TT
11840
11841 ;
11842 return 0;
11843}
bec39cab 11844_ACEOF
81ecdfbb 11845if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11846 ac_cv_c_bigendian=yes
5ee754fc 11847else
81ecdfbb 11848 ac_cv_c_bigendian=no
5ee754fc 11849fi
81ecdfbb
RW
11850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11851fi
11852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11853 fi
11854 if test $ac_cv_c_bigendian = unknown; then
11855 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11857/* end confdefs.h. */
11858#include <limits.h>
bec39cab 11859
81ecdfbb
RW
11860int
11861main ()
11862{
11863#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11864 bogus endian macros
11865 #endif
11866
11867 ;
11868 return 0;
11869}
7eb368b3 11870_ACEOF
81ecdfbb
RW
11871if ac_fn_c_try_compile "$LINENO"; then :
11872 # It does; now see whether it defined to _BIG_ENDIAN or not.
11873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11874/* end confdefs.h. */
81ecdfbb
RW
11875#include <limits.h>
11876
7eb368b3
NR
11877int
11878main ()
11879{
81ecdfbb
RW
11880#ifndef _BIG_ENDIAN
11881 not big endian
11882 #endif
11883
7eb368b3
NR
11884 ;
11885 return 0;
11886}
11887_ACEOF
81ecdfbb 11888if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11889 ac_cv_c_bigendian=yes
81ecdfbb
RW
11890else
11891 ac_cv_c_bigendian=no
a9322a30 11892fi
81ecdfbb 11893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11894fi
81ecdfbb
RW
11895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11896 fi
11897 if test $ac_cv_c_bigendian = unknown; then
11898 # Compile a test program.
11899 if test "$cross_compiling" = yes; then :
11900 # Try to guess by grepping values from an object file.
11901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903short int ascii_mm[] =
11904 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11905 short int ascii_ii[] =
11906 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11907 int use_ascii (int i) {
11908 return ascii_mm[i] + ascii_ii[i];
11909 }
11910 short int ebcdic_ii[] =
11911 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11912 short int ebcdic_mm[] =
11913 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11914 int use_ebcdic (int i) {
11915 return ebcdic_mm[i] + ebcdic_ii[i];
11916 }
11917 extern int foo;
7eb368b3 11918
81ecdfbb
RW
11919int
11920main ()
11921{
11922return use_ascii (foo) == use_ebcdic (foo);
11923 ;
11924 return 0;
11925}
11926_ACEOF
11927if ac_fn_c_try_compile "$LINENO"; then :
11928 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11929 ac_cv_c_bigendian=yes
11930 fi
11931 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11932 if test "$ac_cv_c_bigendian" = unknown; then
11933 ac_cv_c_bigendian=no
11934 else
11935 # finding both strings is unlikely to happen, but who knows?
11936 ac_cv_c_bigendian=unknown
11937 fi
11938 fi
7eb368b3 11939fi
81ecdfbb 11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11941else
81ecdfbb 11942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11943/* end confdefs.h. */
81ecdfbb 11944$ac_includes_default
d3ea6809
MM
11945int
11946main ()
11947{
81ecdfbb
RW
11948
11949 /* Are we little or big endian? From Harbison&Steele. */
11950 union
11951 {
11952 long int l;
11953 char c[sizeof (long int)];
11954 } u;
11955 u.l = 1;
11956 return u.c[sizeof (long int) - 1] == 1;
11957
11958 ;
11959 return 0;
d3ea6809
MM
11960}
11961_ACEOF
81ecdfbb 11962if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11963 ac_cv_c_bigendian=no
d3ea6809 11964else
81ecdfbb 11965 ac_cv_c_bigendian=yes
d3ea6809 11966fi
81ecdfbb
RW
11967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11968 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11969fi
a9322a30 11970
81ecdfbb
RW
11971 fi
11972fi
11973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11974$as_echo "$ac_cv_c_bigendian" >&6; }
11975 case $ac_cv_c_bigendian in #(
11976 yes)
11977 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11978;; #(
11979 no)
11980 ;; #(
11981 universal)
11982
11983$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11984
11985 ;; #(
11986 *)
11987 as_fn_error "unknown endianness
11988 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11989 esac
d3ea6809
MM
11990
11991
a9322a30
TT
11992# ------------------------------ #
11993# Checks for library functions. #
11994# ------------------------------ #
d3ea6809 11995
a9322a30
TT
11996# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11997# for constant arguments. Useless!
81ecdfbb
RW
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11999$as_echo_n "checking for working alloca.h... " >&6; }
12000if test "${ac_cv_working_alloca_h+set}" = set; then :
12001 $as_echo_n "(cached) " >&6
d3ea6809 12002else
81ecdfbb 12003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12004/* end confdefs.h. */
a9322a30 12005#include <alloca.h>
bec39cab
AC
12006int
12007main ()
12008{
a9322a30 12009char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12010 if (p) return 0;
bec39cab
AC
12011 ;
12012 return 0;
12013}
12014_ACEOF
81ecdfbb 12015if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12016 ac_cv_working_alloca_h=yes
bec39cab 12017else
81ecdfbb 12018 ac_cv_working_alloca_h=no
bec39cab 12019fi
81ecdfbb
RW
12020rm -f core conftest.err conftest.$ac_objext \
12021 conftest$ac_exeext conftest.$ac_ext
bec39cab 12022fi
81ecdfbb
RW
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12024$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12025if test $ac_cv_working_alloca_h = yes; then
12026
81ecdfbb 12027$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12028
c906108c 12029fi
bec39cab 12030
81ecdfbb
RW
12031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12032$as_echo_n "checking for alloca... " >&6; }
12033if test "${ac_cv_func_alloca_works+set}" = set; then :
12034 $as_echo_n "(cached) " >&6
bec39cab 12035else
81ecdfbb 12036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12037/* end confdefs.h. */
a9322a30
TT
12038#ifdef __GNUC__
12039# define alloca __builtin_alloca
b4e70030 12040#else
a9322a30
TT
12041# ifdef _MSC_VER
12042# include <malloc.h>
12043# define alloca _alloca
12044# else
81ecdfbb 12045# ifdef HAVE_ALLOCA_H
a9322a30
TT
12046# include <alloca.h>
12047# else
12048# ifdef _AIX
12049 #pragma alloca
12050# else
12051# ifndef alloca /* predefined by HP cc +Olibcalls */
12052char *alloca ();
12053# endif
12054# endif
12055# endif
12056# endif
c906108c 12057#endif
97bf5e38 12058
bec39cab
AC
12059int
12060main ()
12061{
a9322a30 12062char *p = (char *) alloca (1);
81ecdfbb 12063 if (p) return 0;
bec39cab
AC
12064 ;
12065 return 0;
12066}
12067_ACEOF
81ecdfbb 12068if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12069 ac_cv_func_alloca_works=yes
bec39cab 12070else
81ecdfbb 12071 ac_cv_func_alloca_works=no
bec39cab 12072fi
81ecdfbb
RW
12073rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext conftest.$ac_ext
bec39cab 12075fi
81ecdfbb
RW
12076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12077$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12078
12079if test $ac_cv_func_alloca_works = yes; then
12080
81ecdfbb 12081$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12082
a9322a30
TT
12083else
12084 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12085# that cause trouble. Some versions do not even contain alloca or
12086# contain a buggy version. If you still want to use their alloca,
12087# use ar to extract alloca.o from them instead of compiling alloca.c.
12088
81ecdfbb 12089ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12090
81ecdfbb 12091$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12092
bec39cab 12093
81ecdfbb
RW
12094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12095$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12096if test "${ac_cv_os_cray+set}" = set; then :
12097 $as_echo_n "(cached) " >&6
a9322a30 12098else
81ecdfbb 12099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12100/* end confdefs.h. */
81ecdfbb 12101#if defined CRAY && ! defined CRAY2
a9322a30
TT
12102webecray
12103#else
12104wenotbecray
12105#endif
12106
12107_ACEOF
12108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12109 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12110 ac_cv_os_cray=yes
12111else
81ecdfbb 12112 ac_cv_os_cray=no
bec39cab 12113fi
81ecdfbb
RW
12114rm -f conftest*
12115
bec39cab 12116fi
81ecdfbb
RW
12117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12118$as_echo "$ac_cv_os_cray" >&6; }
12119if test $ac_cv_os_cray = yes; then
12120 for ac_func in _getb67 GETB67 getb67; do
12121 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12122ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12123eval as_val=\$$as_ac_var
12124 if test "x$as_val" = x""yes; then :
a9322a30
TT
12125
12126cat >>confdefs.h <<_ACEOF
12127#define CRAY_STACKSEG_END $ac_func
bec39cab 12128_ACEOF
c906108c 12129
a9322a30 12130 break
c906108c
SS
12131fi
12132
a9322a30
TT
12133 done
12134fi
bec39cab 12135
81ecdfbb
RW
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12137$as_echo_n "checking stack direction for C alloca... " >&6; }
12138if test "${ac_cv_c_stack_direction+set}" = set; then :
12139 $as_echo_n "(cached) " >&6
a9322a30 12140else
81ecdfbb 12141 if test "$cross_compiling" = yes; then :
a9322a30 12142 ac_cv_c_stack_direction=0
bec39cab 12143else
81ecdfbb 12144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12145/* end confdefs.h. */
81ecdfbb 12146$ac_includes_default
a9322a30
TT
12147int
12148find_stack_direction ()
b4e70030 12149{
a9322a30
TT
12150 static char *addr = 0;
12151 auto char dummy;
12152 if (addr == 0)
12153 {
12154 addr = &dummy;
12155 return find_stack_direction ();
12156 }
12157 else
12158 return (&dummy > addr) ? 1 : -1;
b4e70030 12159}
b757528f 12160
bec39cab
AC
12161int
12162main ()
12163{
81ecdfbb 12164 return find_stack_direction () < 0;
bec39cab
AC
12165}
12166_ACEOF
81ecdfbb 12167if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12168 ac_cv_c_stack_direction=1
12169else
81ecdfbb 12170 ac_cv_c_stack_direction=-1
a9322a30 12171fi
81ecdfbb
RW
12172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12173 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12174fi
a9322a30 12175
81ecdfbb
RW
12176fi
12177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12178$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12179cat >>confdefs.h <<_ACEOF
12180#define STACK_DIRECTION $ac_cv_c_stack_direction
12181_ACEOF
12182
12183
12184fi
12185
a9322a30 12186for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12187do :
12188 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12189ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12190eval as_val=\$$as_ac_Header
12191 if test "x$as_val" = x""yes; then :
bec39cab 12192 cat >>confdefs.h <<_ACEOF
81ecdfbb 12193#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12194_ACEOF
b757528f 12195
b757528f 12196fi
bec39cab 12197
a9322a30 12198done
a3828db0 12199
a9322a30 12200for ac_func in getpagesize
81ecdfbb
RW
12201do :
12202 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12203if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12204 cat >>confdefs.h <<_ACEOF
81ecdfbb 12205#define HAVE_GETPAGESIZE 1
bec39cab 12206_ACEOF
bcb3dc3d 12207
bcb3dc3d
MK
12208fi
12209done
12210
81ecdfbb
RW
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12212$as_echo_n "checking for working mmap... " >&6; }
12213if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12214 $as_echo_n "(cached) " >&6
a9322a30 12215else
81ecdfbb 12216 if test "$cross_compiling" = yes; then :
a9322a30 12217 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12218else
81ecdfbb 12219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12220/* end confdefs.h. */
a9322a30
TT
12221$ac_includes_default
12222/* malloc might have been renamed as rpl_malloc. */
12223#undef malloc
bec39cab 12224
a9322a30
TT
12225/* Thanks to Mike Haertel and Jim Avera for this test.
12226 Here is a matrix of mmap possibilities:
12227 mmap private not fixed
12228 mmap private fixed at somewhere currently unmapped
12229 mmap private fixed at somewhere already mapped
12230 mmap shared not fixed
12231 mmap shared fixed at somewhere currently unmapped
12232 mmap shared fixed at somewhere already mapped
12233 For private mappings, we should verify that changes cannot be read()
12234 back from the file, nor mmap's back from the file at a different
12235 address. (There have been systems where private was not correctly
12236 implemented like the infamous i386 svr4.0, and systems where the
12237 VM page cache was not coherent with the file system buffer cache
12238 like early versions of FreeBSD and possibly contemporary NetBSD.)
12239 For shared mappings, we should conversely verify that changes get
12240 propagated back to all the places they're supposed to be.
bec39cab 12241
a9322a30
TT
12242 Grep wants private fixed already mapped.
12243 The main things grep needs to know about mmap are:
12244 * does it exist and is it safe to write into the mmap'd area
12245 * how to use it (BSD variants) */
8b9cf735 12246
a9322a30
TT
12247#include <fcntl.h>
12248#include <sys/mman.h>
8b9cf735 12249
81ecdfbb 12250#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12251char *malloc ();
a3828db0
MK
12252#endif
12253
a9322a30 12254/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12255#ifndef HAVE_GETPAGESIZE
a9322a30 12256/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12257# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12258# define HAVE_SYS_PARAM_H 1
12259# endif
12260
12261# ifdef _SC_PAGESIZE
12262# define getpagesize() sysconf(_SC_PAGESIZE)
12263# else /* no _SC_PAGESIZE */
81ecdfbb 12264# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12265# include <sys/param.h>
12266# ifdef EXEC_PAGESIZE
12267# define getpagesize() EXEC_PAGESIZE
12268# else /* no EXEC_PAGESIZE */
12269# ifdef NBPG
12270# define getpagesize() NBPG * CLSIZE
12271# ifndef CLSIZE
12272# define CLSIZE 1
12273# endif /* no CLSIZE */
12274# else /* no NBPG */
12275# ifdef NBPC
12276# define getpagesize() NBPC
12277# else /* no NBPC */
12278# ifdef PAGESIZE
12279# define getpagesize() PAGESIZE
12280# endif /* PAGESIZE */
12281# endif /* no NBPC */
12282# endif /* no NBPG */
12283# endif /* no EXEC_PAGESIZE */
12284# else /* no HAVE_SYS_PARAM_H */
12285# define getpagesize() 8192 /* punt totally */
12286# endif /* no HAVE_SYS_PARAM_H */
12287# endif /* no _SC_PAGESIZE */
12288
12289#endif /* no HAVE_GETPAGESIZE */
12290
bec39cab
AC
12291int
12292main ()
12293{
a9322a30
TT
12294 char *data, *data2, *data3;
12295 int i, pagesize;
12296 int fd;
12297
12298 pagesize = getpagesize ();
12299
12300 /* First, make a file with some known garbage in it. */
12301 data = (char *) malloc (pagesize);
12302 if (!data)
81ecdfbb 12303 return 1;
a9322a30
TT
12304 for (i = 0; i < pagesize; ++i)
12305 *(data + i) = rand ();
12306 umask (0);
12307 fd = creat ("conftest.mmap", 0600);
12308 if (fd < 0)
81ecdfbb 12309 return 1;
a9322a30 12310 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12311 return 1;
a9322a30
TT
12312 close (fd);
12313
12314 /* Next, try to mmap the file at a fixed address which already has
12315 something else allocated at it. If we can, also make sure that
12316 we see the same garbage. */
12317 fd = open ("conftest.mmap", O_RDWR);
12318 if (fd < 0)
81ecdfbb 12319 return 1;
a9322a30
TT
12320 data2 = (char *) malloc (2 * pagesize);
12321 if (!data2)
81ecdfbb
RW
12322 return 1;
12323 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12324 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12325 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12326 return 1;
a9322a30
TT
12327 for (i = 0; i < pagesize; ++i)
12328 if (*(data + i) != *(data2 + i))
81ecdfbb 12329 return 1;
a9322a30
TT
12330
12331 /* Finally, make sure that changes to the mapped area do not
12332 percolate back to the file as seen by read(). (This is a bug on
12333 some variants of i386 svr4.0.) */
12334 for (i = 0; i < pagesize; ++i)
12335 *(data2 + i) = *(data2 + i) + 1;
12336 data3 = (char *) malloc (pagesize);
12337 if (!data3)
81ecdfbb 12338 return 1;
a9322a30 12339 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12340 return 1;
a9322a30
TT
12341 for (i = 0; i < pagesize; ++i)
12342 if (*(data + i) != *(data3 + i))
81ecdfbb 12343 return 1;
a9322a30 12344 close (fd);
81ecdfbb 12345 return 0;
bec39cab
AC
12346}
12347_ACEOF
81ecdfbb 12348if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12349 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12350else
81ecdfbb 12351 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12352fi
81ecdfbb
RW
12353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12354 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12355fi
81ecdfbb 12356
a9322a30 12357fi
81ecdfbb
RW
12358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12359$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12360if test $ac_cv_func_mmap_fixed_mapped = yes; then
12361
81ecdfbb 12362$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12363
086ec9eb 12364fi
a9322a30 12365rm -f conftest.mmap
a3828db0 12366
81ecdfbb
RW
12367ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12368if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12369
a9322a30
TT
12370else
12371
12372cat >>confdefs.h <<_ACEOF
12373#define pid_t int
bec39cab 12374_ACEOF
086ec9eb
MK
12375
12376fi
12377
81ecdfbb
RW
12378for ac_header in vfork.h
12379do :
12380 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12381if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12382 cat >>confdefs.h <<_ACEOF
81ecdfbb 12383#define HAVE_VFORK_H 1
bec39cab 12384_ACEOF
c906108c
SS
12385
12386fi
a9322a30 12387
a3828db0 12388done
c906108c 12389
a9322a30 12390for ac_func in fork vfork
81ecdfbb
RW
12391do :
12392 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12393ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12394eval as_val=\$$as_ac_var
12395 if test "x$as_val" = x""yes; then :
a3828db0 12396 cat >>confdefs.h <<_ACEOF
81ecdfbb 12397#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12398_ACEOF
b83266a0 12399
97bf5e38 12400fi
a3828db0 12401done
b83266a0 12402
a9322a30 12403if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12405$as_echo_n "checking for working fork... " >&6; }
12406if test "${ac_cv_func_fork_works+set}" = set; then :
12407 $as_echo_n "(cached) " >&6
a9322a30 12408else
81ecdfbb 12409 if test "$cross_compiling" = yes; then :
a9322a30
TT
12410 ac_cv_func_fork_works=cross
12411else
81ecdfbb
RW
12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413/* end confdefs.h. */
12414$ac_includes_default
12415int
12416main ()
12417{
12418
12419 /* By Ruediger Kuhlmann. */
12420 return fork () < 0;
12421
12422 ;
12423 return 0;
12424}
a9322a30 12425_ACEOF
81ecdfbb 12426if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12427 ac_cv_func_fork_works=yes
12428else
81ecdfbb 12429 ac_cv_func_fork_works=no
a9322a30 12430fi
81ecdfbb
RW
12431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12432 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12433fi
81ecdfbb 12434
a9322a30 12435fi
81ecdfbb
RW
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12437$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12438
12439else
12440 ac_cv_func_fork_works=$ac_cv_func_fork
12441fi
12442if test "x$ac_cv_func_fork_works" = xcross; then
12443 case $host in
12444 *-*-amigaos* | *-*-msdosdjgpp*)
12445 # Override, as these systems have only a dummy fork() stub
12446 ac_cv_func_fork_works=no
12447 ;;
12448 *)
12449 ac_cv_func_fork_works=yes
12450 ;;
12451 esac
81ecdfbb
RW
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12453$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12454fi
12455ac_cv_func_vfork_works=$ac_cv_func_vfork
12456if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12458$as_echo_n "checking for working vfork... " >&6; }
12459if test "${ac_cv_func_vfork_works+set}" = set; then :
12460 $as_echo_n "(cached) " >&6
a9322a30 12461else
81ecdfbb 12462 if test "$cross_compiling" = yes; then :
a9322a30
TT
12463 ac_cv_func_vfork_works=cross
12464else
81ecdfbb 12465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12466/* end confdefs.h. */
12467/* Thanks to Paul Eggert for this test. */
81ecdfbb 12468$ac_includes_default
a9322a30 12469#include <sys/wait.h>
81ecdfbb 12470#ifdef HAVE_VFORK_H
a9322a30
TT
12471# include <vfork.h>
12472#endif
12473/* On some sparc systems, changes by the child to local and incoming
12474 argument registers are propagated back to the parent. The compiler
12475 is told about this with #include <vfork.h>, but some compilers
12476 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12477 static variable whose address is put into a register that is
12478 clobbered by the vfork. */
12479static void
12480#ifdef __cplusplus
12481sparc_address_test (int arg)
12482# else
12483sparc_address_test (arg) int arg;
12484#endif
12485{
12486 static pid_t child;
12487 if (!child) {
12488 child = vfork ();
12489 if (child < 0) {
12490 perror ("vfork");
12491 _exit(2);
12492 }
12493 if (!child) {
12494 arg = getpid();
12495 write(-1, "", 0);
12496 _exit (arg);
12497 }
12498 }
12499}
12500
12501int
12502main ()
12503{
12504 pid_t parent = getpid ();
12505 pid_t child;
12506
12507 sparc_address_test (0);
12508
12509 child = vfork ();
12510
12511 if (child == 0) {
12512 /* Here is another test for sparc vfork register problems. This
12513 test uses lots of local variables, at least as many local
12514 variables as main has allocated so far including compiler
12515 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12516 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12517 reuse the register of parent for one of the local variables,
12518 since it will think that parent can't possibly be used any more
12519 in this routine. Assigning to the local variable will thus
12520 munge parent in the parent process. */
12521 pid_t
12522 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12523 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12524 /* Convince the compiler that p..p7 are live; otherwise, it might
12525 use the same hardware register for all 8 local variables. */
12526 if (p != p1 || p != p2 || p != p3 || p != p4
12527 || p != p5 || p != p6 || p != p7)
12528 _exit(1);
12529
12530 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12531 from child file descriptors. If the child closes a descriptor
12532 before it execs or exits, this munges the parent's descriptor
12533 as well. Test for this by closing stdout in the child. */
12534 _exit(close(fileno(stdout)) != 0);
12535 } else {
12536 int status;
12537 struct stat st;
12538
12539 while (wait(&status) != child)
12540 ;
81ecdfbb 12541 return (
a9322a30
TT
12542 /* Was there some problem with vforking? */
12543 child < 0
12544
12545 /* Did the child fail? (This shouldn't happen.) */
12546 || status
12547
12548 /* Did the vfork/compiler bug occur? */
12549 || parent != getpid()
12550
12551 /* Did the file descriptor bug occur? */
12552 || fstat(fileno(stdout), &st) != 0
12553 );
12554 }
12555}
12556_ACEOF
81ecdfbb 12557if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12558 ac_cv_func_vfork_works=yes
12559else
81ecdfbb 12560 ac_cv_func_vfork_works=no
a9322a30 12561fi
81ecdfbb
RW
12562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12563 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12564fi
81ecdfbb 12565
a9322a30 12566fi
81ecdfbb
RW
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12568$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12569
12570fi;
12571if test "x$ac_cv_func_fork_works" = xcross; then
12572 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12574$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12575fi
12576
12577if test "x$ac_cv_func_vfork_works" = xyes; then
12578
81ecdfbb 12579$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12580
12581else
12582
81ecdfbb 12583$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12584
12585fi
12586if test "x$ac_cv_func_fork_works" = xyes; then
12587
81ecdfbb 12588$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12589
12590fi
12591
a9322a30 12592for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12593 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12594 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12595 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12596 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12597do :
12598 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12599ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12600eval as_val=\$$as_ac_var
12601 if test "x$as_val" = x""yes; then :
6c7a06a3 12602 cat >>confdefs.h <<_ACEOF
81ecdfbb 12603#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12604_ACEOF
12605
12606fi
12607done
12608
12609
81ecdfbb
RW
12610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12611$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12612if test "${am_cv_langinfo_codeset+set}" = set; then :
12613 $as_echo_n "(cached) " >&6
6c7a06a3 12614else
81ecdfbb 12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12616/* end confdefs.h. */
12617#include <langinfo.h>
12618int
12619main ()
12620{
12621char* cs = nl_langinfo(CODESET);
bec39cab
AC
12622 ;
12623 return 0;
12624}
12625_ACEOF
81ecdfbb 12626if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12627 am_cv_langinfo_codeset=yes
a4db0f07 12628else
81ecdfbb 12629 am_cv_langinfo_codeset=no
a4db0f07 12630fi
81ecdfbb
RW
12631rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12633
a4db0f07 12634fi
81ecdfbb
RW
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12636$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12637 if test $am_cv_langinfo_codeset = yes; then
12638
81ecdfbb 12639$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12640
6c7a06a3 12641 fi
c906108c 12642
06825bd1 12643
a3828db0
MK
12644# Check the return and argument types of ptrace. No canned test for
12645# this, so roll our own.
12646gdb_ptrace_headers='
12647#if HAVE_SYS_TYPES_H
12648# include <sys/types.h>
12649#endif
12650#if HAVE_SYS_PTRACE_H
12651# include <sys/ptrace.h>
12652#endif
12653#if HAVE_UNISTD_H
12654# include <unistd.h>
12655#endif
12656'
12657# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12658ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12659"
12660if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12661 ac_have_decl=1
06825bd1 12662else
81ecdfbb 12663 ac_have_decl=0
06825bd1 12664fi
06825bd1 12665
a3828db0 12666cat >>confdefs.h <<_ACEOF
81ecdfbb 12667#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12668_ACEOF
81ecdfbb 12669if test $ac_have_decl = 1; then :
bec39cab 12670
a3828db0 12671else
a3828db0
MK
12672
12673 : ${gdb_cv_func_ptrace_ret='int'}
12674 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12675
06825bd1
MK
12676fi
12677
064ef605
DJ
12678# Check return type. Varargs (used on GNU/Linux) conflict with the
12679# empty argument list, so check for that explicitly.
81ecdfbb
RW
12680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12681$as_echo_n "checking return type of ptrace... " >&6; }
12682if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12683 $as_echo_n "(cached) " >&6
bec39cab 12684else
81ecdfbb 12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12686/* end confdefs.h. */
a3828db0 12687$gdb_ptrace_headers
bec39cab
AC
12688int
12689main ()
12690{
064ef605
DJ
12691extern long ptrace (enum __ptrace_request, ...);
12692 ;
12693 return 0;
12694}
12695_ACEOF
81ecdfbb 12696if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12697 gdb_cv_func_ptrace_ret='long'
12698else
81ecdfbb 12699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12700/* end confdefs.h. */
12701$gdb_ptrace_headers
12702int
12703main ()
12704{
a3828db0 12705extern int ptrace ();
bec39cab
AC
12706 ;
12707 return 0;
12708}
12709_ACEOF
81ecdfbb 12710if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12711 gdb_cv_func_ptrace_ret='int'
70f9f479 12712else
81ecdfbb 12713 gdb_cv_func_ptrace_ret='long'
70f9f479 12714fi
81ecdfbb 12715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12716fi
81ecdfbb 12717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12718fi
81ecdfbb
RW
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12720$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12721
a3828db0
MK
12722cat >>confdefs.h <<_ACEOF
12723#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12724_ACEOF
70f9f479 12725
a3828db0 12726# Check argument types.
81ecdfbb
RW
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12728$as_echo_n "checking types of arguments for ptrace... " >&6; }
12729if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12730 $as_echo_n "(cached) " >&6
bec39cab 12731else
a3828db0 12732
81ecdfbb 12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12734/* end confdefs.h. */
12735$gdb_ptrace_headers
12736int
12737main ()
12738{
12739extern long ptrace (enum __ptrace_request, ...);
12740 ;
12741 return 0;
12742}
12743_ACEOF
81ecdfbb 12744if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12745 gdb_cv_func_ptrace_args='int,int,long,long'
12746else
064ef605 12747
a3828db0
MK
12748for gdb_arg1 in 'int' 'long'; do
12749 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12750 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12751 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12753/* end confdefs.h. */
a3828db0 12754$gdb_ptrace_headers
bec39cab
AC
12755int
12756main ()
12757{
a3828db0
MK
12758
12759extern $gdb_cv_func_ptrace_ret
12760 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12761
bec39cab
AC
12762 ;
12763 return 0;
12764}
12765_ACEOF
81ecdfbb 12766if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12767 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12768 break 4;
5c7f2947 12769fi
81ecdfbb 12770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12771 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12773/* end confdefs.h. */
a3828db0 12774$gdb_ptrace_headers
bec39cab
AC
12775int
12776main ()
12777{
a3828db0
MK
12778
12779extern $gdb_cv_func_ptrace_ret
12780 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12781
bec39cab
AC
12782 ;
12783 return 0;
12784}
12785_ACEOF
81ecdfbb 12786if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12787
12788gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12789 break 5;
78434e59 12790fi
81ecdfbb 12791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12792 done
12793 done
12794 done
12795 done
12796done
12797# Provide a safe default value.
12798: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12799
064ef605 12800fi
81ecdfbb 12801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12802fi
81ecdfbb
RW
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12804$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12805ac_save_IFS=$IFS; IFS=','
12806set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12807IFS=$ac_save_IFS
12808shift
bec39cab 12809
a3828db0
MK
12810cat >>confdefs.h <<_ACEOF
12811#define PTRACE_TYPE_ARG3 $3
12812_ACEOF
12813
12814if test -n "$5"; then
12815
12816cat >>confdefs.h <<_ACEOF
12817#define PTRACE_TYPE_ARG5 $5
bec39cab 12818_ACEOF
78434e59
MK
12819
12820fi
12821
a3828db0 12822if test "$cross_compiling" = no; then
81ecdfbb
RW
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12824$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12825if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12826 $as_echo_n "(cached) " >&6
a3828db0 12827else
81ecdfbb
RW
12828 if test "$cross_compiling" = yes; then :
12829 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12830else
81ecdfbb 12831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12832/* end confdefs.h. */
81ecdfbb 12833$ac_includes_default
bec39cab
AC
12834int
12835main ()
12836{
a3828db0
MK
12837/* If this system has a BSD-style setpgrp which takes arguments,
12838 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12839 exit successfully. */
81ecdfbb 12840 return setpgrp (1,1) != -1;
bec39cab
AC
12841 ;
12842 return 0;
12843}
12844_ACEOF
81ecdfbb 12845if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12846 ac_cv_func_setpgrp_void=no
c906108c 12847else
81ecdfbb 12848 ac_cv_func_setpgrp_void=yes
c906108c 12849fi
81ecdfbb
RW
12850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12851 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12852fi
81ecdfbb 12853
a3828db0 12854fi
81ecdfbb
RW
12855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12856$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12857if test $ac_cv_func_setpgrp_void = yes; then
12858
81ecdfbb 12859$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12860
12861fi
a3828db0
MK
12862
12863else
81ecdfbb
RW
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12865$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12866if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12867 $as_echo_n "(cached) " >&6
97bf5e38 12868else
81ecdfbb 12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12870/* end confdefs.h. */
a3828db0
MK
12871
12872#include <unistd.h>
12873
bec39cab
AC
12874int
12875main ()
12876{
a3828db0
MK
12877
12878 if (setpgrp(1,1) == -1)
12879 exit (0);
12880 else
12881 exit (1);
12882
bec39cab
AC
12883 ;
12884 return 0;
12885}
12886_ACEOF
81ecdfbb 12887if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12888 ac_cv_func_setpgrp_void=no
c906108c 12889else
81ecdfbb 12890 ac_cv_func_setpgrp_void=yes
c906108c 12891fi
81ecdfbb 12892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12893fi
81ecdfbb
RW
12894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12895$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12896if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12897 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12898
a3828db0 12899fi
c906108c
SS
12900fi
12901
a3828db0
MK
12902# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
12903# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
12904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12905$as_echo_n "checking for sigsetjmp... " >&6; }
12906if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12907 $as_echo_n "(cached) " >&6
bec39cab 12908else
81ecdfbb 12909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12910/* end confdefs.h. */
a3828db0
MK
12911
12912#include <setjmp.h>
12913
bec39cab
AC
12914int
12915main ()
12916{
a3828db0 12917sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
12918 ;
12919 return 0;
12920}
12921_ACEOF
81ecdfbb 12922if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12923 gdb_cv_func_sigsetjmp=yes
c906108c 12924else
81ecdfbb 12925 gdb_cv_func_sigsetjmp=no
c906108c 12926fi
81ecdfbb 12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12928fi
81ecdfbb
RW
12929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12930$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 12931if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 12932
81ecdfbb 12933$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 12934
97bf5e38 12935fi
c906108c 12936
a3828db0
MK
12937# Assume we'll default to using the included libiberty regex.
12938gdb_use_included_regex=yes
12939
12940# However, if the system regex is GNU regex, then default to *not*
12941# using the included regex.
81ecdfbb
RW
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12943$as_echo_n "checking for GNU regex... " >&6; }
12944if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12945 $as_echo_n "(cached) " >&6
bec39cab 12946else
81ecdfbb 12947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12948/* end confdefs.h. */
a3828db0 12949#include <gnu-versions.h>
bec39cab
AC
12950int
12951main ()
12952{
81ecdfbb
RW
12953#define REGEX_INTERFACE_VERSION 1
12954#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12955# error "Version mismatch"
12956#endif
5c45e068
MK
12957 ;
12958 return 0;
12959}
12960_ACEOF
81ecdfbb
RW
12961if ac_fn_c_try_compile "$LINENO"; then :
12962 gdb_cv_have_gnu_regex=yes
5c45e068 12963else
81ecdfbb
RW
12964 gdb_cv_have_gnu_regex=no
12965fi
12966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12967fi
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12969$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12970if test $gdb_cv_have_gnu_regex = yes; then
12971 gdb_use_included_regex=no
5c45e068 12972fi
81ecdfbb
RW
12973
12974
12975# Check whether --with-included-regex was given.
12976if test "${with_included_regex+set}" = set; then :
12977 withval=$with_included_regex; gdb_with_regex=$withval
12978else
12979 gdb_with_regex=$gdb_use_included_regex
c906108c 12980fi
81ecdfbb
RW
12981
12982if test "$gdb_with_regex" = yes; then
12983
12984$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12985
c906108c 12986fi
81ecdfbb
RW
12987
12988# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12989ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12990#include <sys/proc.h>
12991
12992"
12993if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12994
5c45e068 12995cat >>confdefs.h <<_ACEOF
a3828db0 12996#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12997_ACEOF
c906108c 12998
5c45e068 12999
97bf5e38 13000fi
c906108c 13001
5c45e068 13002
a3828db0 13003# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13005$as_echo_n "checking for struct lwp... " >&6; }
13006if test "${gdb_cv_struct_lwp+set}" = set; then :
13007 $as_echo_n "(cached) " >&6
bec39cab 13008else
81ecdfbb 13009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13010/* end confdefs.h. */
a3828db0
MK
13011#include <sys/param.h>
13012#include <sys/lwp.h>
bec39cab
AC
13013int
13014main ()
13015{
a3828db0 13016struct lwp l;
bec39cab
AC
13017 ;
13018 return 0;
13019}
13020_ACEOF
81ecdfbb 13021if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13022 gdb_cv_struct_lwp=yes
c906108c 13023else
81ecdfbb 13024 gdb_cv_struct_lwp=no
c906108c 13025fi
81ecdfbb 13026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13027fi
81ecdfbb
RW
13028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13029$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13030if test $gdb_cv_struct_lwp = yes; then
c906108c 13031
81ecdfbb 13032$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13033
97bf5e38 13034fi
c906108c 13035
a3828db0 13036# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13038$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13039if test "${gdb_cv_struct_reg+set}" = set; then :
13040 $as_echo_n "(cached) " >&6
bec39cab 13041else
81ecdfbb 13042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13043/* end confdefs.h. */
a3828db0
MK
13044#include <sys/types.h>
13045#include <machine/reg.h>
bec39cab
AC
13046int
13047main ()
13048{
a3828db0 13049struct reg r;
bec39cab
AC
13050 ;
13051 return 0;
13052}
13053_ACEOF
81ecdfbb 13054if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13055 gdb_cv_struct_reg=yes
27ca5dad 13056else
81ecdfbb 13057 gdb_cv_struct_reg=no
27ca5dad 13058fi
81ecdfbb 13059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13060fi
81ecdfbb
RW
13061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13062$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13063if test $gdb_cv_struct_reg = yes; then
bec39cab 13064
81ecdfbb 13065$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13066
13067fi
97bf5e38 13068
a3828db0
MK
13069# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13070# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13071ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13072"
13073if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13074
13075cat >>confdefs.h <<_ACEOF
a3828db0 13076#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13077_ACEOF
3862412b 13078
5c45e068 13079
97bf5e38 13080fi
81ecdfbb
RW
13081ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13082"
13083if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13084
13085cat >>confdefs.h <<_ACEOF
a3828db0 13086#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13087_ACEOF
3862412b 13088
5c45e068 13089
97bf5e38 13090fi
3862412b 13091
5c45e068 13092
a3828db0 13093# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13095$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13096if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13097 $as_echo_n "(cached) " >&6
451928c5 13098else
81ecdfbb 13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13100/* end confdefs.h. */
a3828db0 13101#include <sys/ptrace.h>
bec39cab
AC
13102int
13103main ()
13104{
a3828db0 13105PTRACE_GETREGS;
bec39cab
AC
13106 ;
13107 return 0;
13108}
13109_ACEOF
81ecdfbb 13110if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13111 gdb_cv_have_ptrace_getregs=yes
451928c5 13112else
81ecdfbb 13113 gdb_cv_have_ptrace_getregs=no
451928c5 13114fi
81ecdfbb 13115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13116fi
13117
81ecdfbb
RW
13118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13119$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13120if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13121
81ecdfbb 13122$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13123
97bf5e38 13124fi
451928c5 13125
a3828db0 13126# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13128$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13129if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13130 $as_echo_n "(cached) " >&6
451928c5 13131else
81ecdfbb 13132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13133/* end confdefs.h. */
a3828db0 13134#include <sys/ptrace.h>
bec39cab
AC
13135int
13136main ()
13137{
a3828db0 13138PTRACE_GETFPXREGS;
bec39cab
AC
13139 ;
13140 return 0;
13141}
13142_ACEOF
81ecdfbb 13143if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13144 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13145else
81ecdfbb 13146 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13147fi
81ecdfbb 13148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13149fi
13150
81ecdfbb
RW
13151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13152$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13153if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13154
81ecdfbb 13155$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13156
97bf5e38 13157fi
451928c5 13158
a3828db0 13159# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13161$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13162if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13163 $as_echo_n "(cached) " >&6
3862412b 13164else
81ecdfbb 13165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13166/* end confdefs.h. */
a3828db0
MK
13167#include <sys/types.h>
13168#include <sys/ptrace.h>
bec39cab
AC
13169int
13170main ()
13171{
a3828db0 13172PT_GETDBREGS;
bec39cab
AC
13173 ;
13174 return 0;
13175}
13176_ACEOF
81ecdfbb 13177if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13178 gdb_cv_have_pt_getdbregs=yes
3862412b 13179else
81ecdfbb 13180 gdb_cv_have_pt_getdbregs=no
3862412b 13181fi
81ecdfbb 13182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13183fi
13184
81ecdfbb
RW
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13186$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13187if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13188
81ecdfbb 13189$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13190
97bf5e38 13191fi
3862412b 13192
a3828db0 13193# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13195$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13196if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13197 $as_echo_n "(cached) " >&6
3862412b 13198else
81ecdfbb 13199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13200/* end confdefs.h. */
a3828db0
MK
13201#include <sys/types.h>
13202#include <sys/ptrace.h>
bec39cab
AC
13203int
13204main ()
13205{
a3828db0 13206PT_GETXMMREGS;
bec39cab
AC
13207 ;
13208 return 0;
13209}
13210_ACEOF
81ecdfbb 13211if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13212 gdb_cv_have_pt_getxmmregs=yes
3862412b 13213else
81ecdfbb 13214 gdb_cv_have_pt_getxmmregs=no
3862412b 13215fi
81ecdfbb 13216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13217fi
13218
81ecdfbb
RW
13219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13220$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13221if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13222
81ecdfbb 13223$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13224
97bf5e38 13225fi
3862412b 13226
eb368090 13227# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13228
13229if test "${target}" = "${host}"; then
13230 case "${host}" in
97bf5e38 13231 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13232
81ecdfbb 13233$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13234
13235 ;;
c162e8c9 13236 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13237
81ecdfbb 13238$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13239
13240 ;;
13241 mips-sgi-irix5*)
13242 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13243
81ecdfbb 13244$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13245
13246 ;;
13247 esac
13248fi
13249
13250if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13252$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13253 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13254 $as_echo_n "(cached) " >&6
bec39cab 13255else
81ecdfbb 13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13257/* end confdefs.h. */
596c9d4b
KB
13258
13259#define _SYSCALL32
d30c5336
JK
13260/* Needed for new procfs interface on sparc-solaris. */
13261#define _STRUCTURED_PROC 1
596c9d4b 13262#include <sys/procfs.h>
bec39cab
AC
13263int
13264main ()
13265{
97bf5e38 13266pstatus_t avar
bec39cab
AC
13267 ;
13268 return 0;
13269}
13270_ACEOF
81ecdfbb 13271if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13272 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13273else
81ecdfbb 13274 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13275
596c9d4b 13276fi
81ecdfbb 13277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13278fi
13279
97bf5e38 13280 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13281
81ecdfbb 13282$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13283
13284 fi
81ecdfbb
RW
13285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13286$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13287
81ecdfbb
RW
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13289$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13290 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13291 $as_echo_n "(cached) " >&6
596c9d4b 13292else
81ecdfbb 13293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13294/* end confdefs.h. */
596c9d4b
KB
13295
13296#define _SYSCALL32
d30c5336
JK
13297/* Needed for new procfs interface on sparc-solaris. */
13298#define _STRUCTURED_PROC 1
596c9d4b 13299#include <sys/procfs.h>
bec39cab
AC
13300int
13301main ()
13302{
97bf5e38 13303prrun_t avar
bec39cab
AC
13304 ;
13305 return 0;
13306}
13307_ACEOF
81ecdfbb 13308if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13309 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13310else
81ecdfbb 13311 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13312
596c9d4b 13313fi
81ecdfbb 13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13315fi
13316
97bf5e38 13317 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13318
81ecdfbb 13319$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13320
13321 fi
81ecdfbb
RW
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13323$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13324
81ecdfbb
RW
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13326$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13327 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13328 $as_echo_n "(cached) " >&6
596c9d4b 13329else
81ecdfbb 13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13331/* end confdefs.h. */
596c9d4b
KB
13332
13333#define _SYSCALL32
d30c5336
JK
13334/* Needed for new procfs interface on sparc-solaris. */
13335#define _STRUCTURED_PROC 1
596c9d4b 13336#include <sys/procfs.h>
bec39cab
AC
13337int
13338main ()
13339{
97bf5e38 13340gregset_t avar
bec39cab
AC
13341 ;
13342 return 0;
13343}
13344_ACEOF
81ecdfbb 13345if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13346 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13347else
81ecdfbb 13348 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13349
596c9d4b 13350fi
81ecdfbb 13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13352fi
13353
97bf5e38 13354 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13355
81ecdfbb 13356$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13357
13358 fi
81ecdfbb
RW
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13360$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13361
81ecdfbb
RW
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13363$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13364 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13365 $as_echo_n "(cached) " >&6
d84dd0c5 13366else
81ecdfbb 13367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13368/* end confdefs.h. */
97bf5e38
MK
13369
13370#define _SYSCALL32
d30c5336
JK
13371/* Needed for new procfs interface on sparc-solaris. */
13372#define _STRUCTURED_PROC 1
d84dd0c5 13373#include <sys/procfs.h>
bec39cab
AC
13374int
13375main ()
13376{
97bf5e38 13377fpregset_t avar
bec39cab
AC
13378 ;
13379 return 0;
13380}
13381_ACEOF
81ecdfbb 13382if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13383 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13384else
81ecdfbb 13385 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13386
d84dd0c5 13387fi
81ecdfbb 13388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13389fi
13390
97bf5e38 13391 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13392
81ecdfbb 13393$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13394
97bf5e38 13395 fi
81ecdfbb
RW
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13397$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13398
81ecdfbb
RW
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13400$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13401 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13402 $as_echo_n "(cached) " >&6
c906108c 13403else
81ecdfbb 13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13405/* end confdefs.h. */
c906108c 13406
97bf5e38 13407#define _SYSCALL32
d30c5336
JK
13408/* Needed for new procfs interface on sparc-solaris. */
13409#define _STRUCTURED_PROC 1
97bf5e38 13410#include <sys/procfs.h>
bec39cab
AC
13411int
13412main ()
13413{
97bf5e38 13414prgregset_t avar
bec39cab
AC
13415 ;
13416 return 0;
13417}
13418_ACEOF
81ecdfbb 13419if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13420 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13421else
81ecdfbb 13422 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13423
c906108c 13424fi
81ecdfbb 13425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13426fi
13427
97bf5e38 13428 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13429
81ecdfbb 13430$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13431
97bf5e38 13432 fi
81ecdfbb
RW
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13434$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13435
81ecdfbb
RW
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13437$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13438 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13439 $as_echo_n "(cached) " >&6
d45fe813 13440else
81ecdfbb 13441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13442/* end confdefs.h. */
97bf5e38
MK
13443
13444#define _SYSCALL32
d30c5336
JK
13445/* Needed for new procfs interface on sparc-solaris. */
13446#define _STRUCTURED_PROC 1
97bf5e38 13447#include <sys/procfs.h>
bec39cab
AC
13448int
13449main ()
13450{
97bf5e38 13451prfpregset_t avar
bec39cab
AC
13452 ;
13453 return 0;
13454}
13455_ACEOF
81ecdfbb 13456if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13457 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13458else
81ecdfbb 13459 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13460
d45fe813 13461fi
81ecdfbb 13462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13463fi
13464
97bf5e38 13465 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13466
81ecdfbb 13467$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13468
97bf5e38 13469 fi
81ecdfbb
RW
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13471$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13472
81ecdfbb
RW
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13474$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13475 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13476 $as_echo_n "(cached) " >&6
d45fe813 13477else
81ecdfbb 13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13479/* end confdefs.h. */
97bf5e38
MK
13480
13481#define _SYSCALL32
d30c5336
JK
13482/* Needed for new procfs interface on sparc-solaris. */
13483#define _STRUCTURED_PROC 1
97bf5e38 13484#include <sys/procfs.h>
bec39cab
AC
13485int
13486main ()
13487{
97bf5e38 13488prgregset32_t avar
bec39cab
AC
13489 ;
13490 return 0;
13491}
13492_ACEOF
81ecdfbb 13493if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13494 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13495else
81ecdfbb 13496 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13497
d45fe813 13498fi
81ecdfbb 13499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13500fi
13501
97bf5e38 13502 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13503
81ecdfbb 13504$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13505
97bf5e38 13506 fi
81ecdfbb
RW
13507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13508$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13509
81ecdfbb
RW
13510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13511$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13512 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13513 $as_echo_n "(cached) " >&6
d45fe813 13514else
81ecdfbb 13515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13516/* end confdefs.h. */
97bf5e38
MK
13517
13518#define _SYSCALL32
d30c5336
JK
13519/* Needed for new procfs interface on sparc-solaris. */
13520#define _STRUCTURED_PROC 1
97bf5e38 13521#include <sys/procfs.h>
bec39cab
AC
13522int
13523main ()
13524{
97bf5e38 13525prfpregset32_t avar
bec39cab
AC
13526 ;
13527 return 0;
13528}
13529_ACEOF
81ecdfbb 13530if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13531 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13532else
81ecdfbb 13533 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13534
d45fe813 13535fi
81ecdfbb 13536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13537fi
13538
97bf5e38 13539 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13540
81ecdfbb 13541$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13542
97bf5e38 13543 fi
81ecdfbb
RW
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13545$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13546
81ecdfbb
RW
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13548$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13549 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13550 $as_echo_n "(cached) " >&6
d45fe813 13551else
81ecdfbb 13552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13553/* end confdefs.h. */
97bf5e38 13554
d45fe813 13555#define _SYSCALL32
d30c5336
JK
13556/* Needed for new procfs interface on sparc-solaris. */
13557#define _STRUCTURED_PROC 1
97bf5e38 13558#include <sys/procfs.h>
bec39cab
AC
13559int
13560main ()
13561{
97bf5e38 13562lwpid_t avar
bec39cab
AC
13563 ;
13564 return 0;
13565}
13566_ACEOF
81ecdfbb 13567if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13568 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13569else
81ecdfbb 13570 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13571
d45fe813 13572fi
81ecdfbb 13573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13574fi
13575
97bf5e38 13576 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13577
81ecdfbb 13578$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13579
97bf5e38 13580 fi
81ecdfbb
RW
13581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13582$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13583
81ecdfbb
RW
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13585$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13586 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13587 $as_echo_n "(cached) " >&6
c906108c 13588else
81ecdfbb 13589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13590/* end confdefs.h. */
c906108c 13591
97bf5e38 13592#define _SYSCALL32
d30c5336
JK
13593/* Needed for new procfs interface on sparc-solaris. */
13594#define _STRUCTURED_PROC 1
97bf5e38 13595#include <sys/procfs.h>
bec39cab
AC
13596int
13597main ()
13598{
97bf5e38 13599psaddr_t avar
bec39cab
AC
13600 ;
13601 return 0;
13602}
13603_ACEOF
81ecdfbb 13604if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13605 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13606else
81ecdfbb 13607 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13608
c906108c 13609fi
81ecdfbb 13610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13611fi
13612
97bf5e38 13613 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13614
81ecdfbb 13615$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13616
97bf5e38 13617 fi
81ecdfbb
RW
13618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13619$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13620
81ecdfbb
RW
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13622$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13623 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13624 $as_echo_n "(cached) " >&6
c906108c 13625else
81ecdfbb 13626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13627/* end confdefs.h. */
c906108c 13628
97bf5e38 13629#define _SYSCALL32
d30c5336
JK
13630/* Needed for new procfs interface on sparc-solaris. */
13631#define _STRUCTURED_PROC 1
97bf5e38 13632#include <sys/procfs.h>
bec39cab
AC
13633int
13634main ()
13635{
97bf5e38 13636prsysent_t avar
bec39cab
AC
13637 ;
13638 return 0;
13639}
13640_ACEOF
81ecdfbb 13641if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13642 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13643else
81ecdfbb 13644 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13645
c906108c 13646fi
81ecdfbb 13647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13648fi
13649
97bf5e38 13650 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13651
81ecdfbb 13652$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13653
97bf5e38 13654 fi
81ecdfbb
RW
13655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13656$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13657
81ecdfbb
RW
13658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13659$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13660 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13661 $as_echo_n "(cached) " >&6
c906108c 13662else
81ecdfbb 13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13664/* end confdefs.h. */
c906108c 13665
97bf5e38 13666#define _SYSCALL32
d30c5336
JK
13667/* Needed for new procfs interface on sparc-solaris. */
13668#define _STRUCTURED_PROC 1
97bf5e38 13669#include <sys/procfs.h>
bec39cab
AC
13670int
13671main ()
13672{
97bf5e38 13673pr_sigset_t avar
bec39cab
AC
13674 ;
13675 return 0;
13676}
13677_ACEOF
81ecdfbb 13678if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13679 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13680else
81ecdfbb 13681 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13682
c906108c 13683fi
81ecdfbb 13684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13685fi
13686
97bf5e38 13687 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13688
81ecdfbb 13689$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13690
97bf5e38 13691 fi
81ecdfbb
RW
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13693$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13694
81ecdfbb
RW
13695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13696$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13697 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13698 $as_echo_n "(cached) " >&6
c906108c 13699else
81ecdfbb 13700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13701/* end confdefs.h. */
c906108c 13702
97bf5e38 13703#define _SYSCALL32
d30c5336
JK
13704/* Needed for new procfs interface on sparc-solaris. */
13705#define _STRUCTURED_PROC 1
97bf5e38 13706#include <sys/procfs.h>
bec39cab
AC
13707int
13708main ()
13709{
97bf5e38 13710pr_sigaction64_t avar
bec39cab
AC
13711 ;
13712 return 0;
13713}
13714_ACEOF
81ecdfbb 13715if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13716 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13717else
81ecdfbb 13718 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13719
c906108c 13720fi
81ecdfbb 13721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13722fi
13723
97bf5e38 13724 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13725
81ecdfbb 13726$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13727
97bf5e38 13728 fi
81ecdfbb
RW
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13730$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13731
81ecdfbb
RW
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13733$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13734 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13735 $as_echo_n "(cached) " >&6
97bf5e38 13736else
81ecdfbb 13737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13738/* end confdefs.h. */
97bf5e38
MK
13739
13740#define _SYSCALL32
d30c5336
JK
13741/* Needed for new procfs interface on sparc-solaris. */
13742#define _STRUCTURED_PROC 1
97bf5e38 13743#include <sys/procfs.h>
bec39cab
AC
13744int
13745main ()
13746{
97bf5e38 13747pr_siginfo64_t avar
bec39cab
AC
13748 ;
13749 return 0;
13750}
13751_ACEOF
81ecdfbb 13752if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13753 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13754else
81ecdfbb 13755 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13756
97bf5e38 13757fi
81ecdfbb 13758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13759fi
c906108c 13760
97bf5e38 13761 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13762
81ecdfbb 13763$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13764
97bf5e38 13765 fi
81ecdfbb
RW
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13767$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13768
13769
97bf5e38
MK
13770
13771
13772
97bf5e38 13773 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13775$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13776 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13777 $as_echo_n "(cached) " >&6
c906108c 13778else
81ecdfbb 13779 if test "$cross_compiling" = yes; then :
97bf5e38 13780 gdb_cv_prfpregset_t_broken=yes
c906108c 13781else
81ecdfbb 13782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13783/* end confdefs.h. */
97bf5e38
MK
13784#include <sys/procfs.h>
13785 int main ()
13786 {
13787 if (sizeof (prfpregset_t) == sizeof (void *))
13788 return 1;
13789 return 0;
13790 }
bec39cab 13791_ACEOF
81ecdfbb 13792if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13793 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13794else
13795 gdb_cv_prfpregset_t_broken=yes
c906108c 13796fi
81ecdfbb
RW
13797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13798 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13799fi
81ecdfbb 13800
c906108c
SS
13801fi
13802
81ecdfbb
RW
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13804$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13805 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13806
81ecdfbb 13807$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13808
97bf5e38
MK
13809 fi
13810 fi
c906108c 13811
bec39cab 13812
81ecdfbb
RW
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13814$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13815 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
13816 $as_echo_n "(cached) " >&6
c906108c 13817else
81ecdfbb 13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13819/* end confdefs.h. */
97bf5e38
MK
13820#include <unistd.h>
13821#include <sys/types.h>
13822#include <sys/procfs.h>
13823
bec39cab
AC
13824int
13825main ()
13826{
97bf5e38
MK
13827
13828 int dummy;;
13829 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13830
13831 ;
13832 return 0;
13833}
13834_ACEOF
81ecdfbb 13835if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13836 gdb_cv_have_procfs_piocset=yes
c906108c 13837else
81ecdfbb 13838 gdb_cv_have_procfs_piocset=no
c906108c 13839fi
81ecdfbb 13840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13841fi
97bf5e38 13842
81ecdfbb
RW
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13844$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13845 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13846
81ecdfbb 13847$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13848
13849 fi
c906108c 13850fi
c906108c 13851
97bf5e38 13852if test ${host} = ${target} ; then
bec39cab 13853
81ecdfbb
RW
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13855$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13856 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13857 $as_echo_n "(cached) " >&6
bec39cab 13858else
81ecdfbb 13859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13860/* end confdefs.h. */
97bf5e38 13861#include <link.h>
bec39cab
AC
13862int
13863main ()
13864{
97bf5e38 13865struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13866 ;
13867 return 0;
13868}
13869_ACEOF
81ecdfbb 13870if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13871 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13872else
81ecdfbb 13873 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13874fi
81ecdfbb 13875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13876fi
13877
81ecdfbb
RW
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13879$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13880 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13881
81ecdfbb 13882$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13883
13884 fi
13885
bec39cab 13886
81ecdfbb
RW
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13888$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13889 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13890 $as_echo_n "(cached) " >&6
c906108c 13891else
81ecdfbb 13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13893/* end confdefs.h. */
97bf5e38
MK
13894#include <sys/types.h>
13895#include <link.h>
bec39cab
AC
13896int
13897main ()
13898{
97bf5e38 13899struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13900 ;
13901 return 0;
13902}
13903_ACEOF
81ecdfbb 13904if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13905 gdb_cv_have_struct_link_map_with_lm_members=yes
13906else
81ecdfbb 13907 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 13908fi
81ecdfbb 13909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13910fi
c906108c 13911
81ecdfbb
RW
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
13913$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 13914 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 13915
81ecdfbb 13916$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13917
13918 fi
13919
bec39cab 13920
81ecdfbb
RW
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
13922$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
13923 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
13924 $as_echo_n "(cached) " >&6
c906108c 13925else
81ecdfbb 13926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13927/* end confdefs.h. */
97bf5e38
MK
13928#include <sys/types.h>
13929#ifdef HAVE_NLIST_H
13930#include <nlist.h>
13931#endif
13932#include <link.h>
bec39cab
AC
13933int
13934main ()
13935{
97bf5e38 13936struct so_map lm; (void) lm.som_addr;
bec39cab
AC
13937 ;
13938 return 0;
13939}
13940_ACEOF
81ecdfbb 13941if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13942 gdb_cv_have_struct_so_map_with_som_members=yes
13943else
81ecdfbb 13944 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 13945fi
81ecdfbb 13946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13947fi
c906108c 13948
81ecdfbb
RW
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
13950$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 13951 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 13952
81ecdfbb 13953$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 13954
97bf5e38 13955 fi
c906108c 13956
bec39cab 13957
81ecdfbb
RW
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
13959$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
13960 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
13961 $as_echo_n "(cached) " >&6
97bf5e38 13962else
81ecdfbb 13963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13964/* end confdefs.h. */
97bf5e38
MK
13965#define _SYSCALL32
13966#include <sys/link.h>
bec39cab
AC
13967int
13968main ()
13969{
97bf5e38 13970struct link_map32 l;
bec39cab
AC
13971 ;
13972 return 0;
13973}
13974_ACEOF
81ecdfbb 13975if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13976 gdb_cv_have_struct_link_map32=yes
13977else
81ecdfbb 13978 gdb_cv_have_struct_link_map32=no
97bf5e38 13979fi
81ecdfbb 13980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13981fi
c906108c 13982
81ecdfbb
RW
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
13984$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 13985 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 13986
81ecdfbb 13987$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 13988
60ca704f 13989
81ecdfbb 13990$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 13991
97bf5e38
MK
13992 fi
13993fi
c906108c 13994
bc8bcb4b 13995# Check if the compiler supports the `long long' type.
c906108c 13996
81ecdfbb
RW
13997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13998$as_echo_n "checking for long long support in compiler... " >&6; }
13999if test "${gdb_cv_c_long_long+set}" = set; then :
14000 $as_echo_n "(cached) " >&6
97bf5e38 14001else
81ecdfbb 14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14003/* end confdefs.h. */
bc8bcb4b 14004extern long long foo;
bec39cab
AC
14005int
14006main ()
14007{
bc8bcb4b 14008switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14009 ;
14010 return 0;
14011}
14012_ACEOF
81ecdfbb 14013if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14014 gdb_cv_c_long_long=yes
14015else
81ecdfbb 14016 gdb_cv_c_long_long=no
97bf5e38 14017fi
81ecdfbb 14018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14019fi
81ecdfbb
RW
14020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14021$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14022if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14023
81ecdfbb 14024$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14025
14026fi
14027
bc8bcb4b 14028# Check if the compiler and runtime support printing long longs.
97bf5e38 14029
81ecdfbb
RW
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14031$as_echo_n "checking for long long support in printf... " >&6; }
14032if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14033 $as_echo_n "(cached) " >&6
97bf5e38 14034else
81ecdfbb 14035 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14036 gdb_cv_printf_has_long_long=no
14037else
81ecdfbb 14038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14039/* end confdefs.h. */
bc8bcb4b
MK
14040$ac_includes_default
14041int
14042main ()
14043{
14044char buf[32];
97bf5e38
MK
14045 long long l = 0;
14046 l = (l << 16) + 0x0123;
14047 l = (l << 16) + 0x4567;
14048 l = (l << 16) + 0x89ab;
14049 l = (l << 16) + 0xcdef;
14050 sprintf (buf, "0x%016llx", l);
14051 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14052 ;
14053 return 0;
c906108c 14054}
bec39cab 14055_ACEOF
81ecdfbb 14056if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14057 gdb_cv_printf_has_long_long=yes
14058else
81ecdfbb 14059 gdb_cv_printf_has_long_long=no
97bf5e38 14060fi
81ecdfbb
RW
14061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14062 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14063fi
81ecdfbb 14064
97bf5e38 14065fi
81ecdfbb
RW
14066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14067$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14068if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14069
81ecdfbb 14070$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14071
14072fi
97bf5e38 14073
1a619819
LM
14074# Check if the compiler and runtime support printing decfloats.
14075
81ecdfbb
RW
14076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14077$as_echo_n "checking for decfloat support in printf... " >&6; }
14078if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14079 $as_echo_n "(cached) " >&6
1a619819 14080else
81ecdfbb 14081 if test "$cross_compiling" = yes; then :
1a619819
LM
14082 gdb_cv_printf_has_decfloat=no
14083else
81ecdfbb 14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14085/* end confdefs.h. */
14086$ac_includes_default
14087int
14088main ()
14089{
14090char buf[64];
14091 _Decimal32 d32 = 1.2345df;
14092 _Decimal64 d64 = 1.2345dd;
14093 _Decimal128 d128 = 1.2345dl;
14094 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14095 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14096 ;
14097 return 0;
14098}
14099_ACEOF
81ecdfbb 14100if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14101 gdb_cv_printf_has_decfloat=yes
14102else
81ecdfbb 14103 gdb_cv_printf_has_decfloat=no
1a619819 14104fi
81ecdfbb
RW
14105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14106 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14107fi
81ecdfbb 14108
1a619819 14109fi
81ecdfbb
RW
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14111$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14112if test $gdb_cv_printf_has_decfloat = yes; then
14113
81ecdfbb 14114$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14115
14116fi
14117
bc8bcb4b
MK
14118# Check if the compiler supports the `long double' type. We can't use
14119# AC_C_LONG_DOUBLE because that one does additional checks on the
14120# constants defined in <float.h> that fail on some systems,
14121# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14122
81ecdfbb
RW
14123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14124$as_echo_n "checking for long double support in compiler... " >&6; }
14125if test "${gdb_cv_c_long_double+set}" = set; then :
14126 $as_echo_n "(cached) " >&6
97bf5e38 14127else
81ecdfbb 14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14129/* end confdefs.h. */
97bf5e38 14130long double foo;
bec39cab 14131_ACEOF
81ecdfbb 14132if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14133 gdb_cv_c_long_double=yes
97bf5e38 14134else
81ecdfbb 14135 gdb_cv_c_long_double=no
97bf5e38 14136fi
81ecdfbb 14137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14138fi
81ecdfbb
RW
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14140$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14141if test $gdb_cv_c_long_double = yes; then
c906108c 14142
81ecdfbb 14143$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14144
14145fi
14146
bc8bcb4b 14147# Check if the compiler and runtime support printing long doubles.
97bf5e38 14148
81ecdfbb
RW
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14150$as_echo_n "checking for long double support in printf... " >&6; }
14151if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14152 $as_echo_n "(cached) " >&6
97bf5e38 14153else
81ecdfbb 14154 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14155 gdb_cv_printf_has_long_double=no
14156else
81ecdfbb 14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14158/* end confdefs.h. */
bc8bcb4b
MK
14159$ac_includes_default
14160int
14161main ()
14162{
14163char buf[16];
97bf5e38
MK
14164 long double f = 3.141592653;
14165 sprintf (buf, "%Lg", f);
14166 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14167 ;
14168 return 0;
97bf5e38 14169}
bec39cab 14170_ACEOF
81ecdfbb 14171if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14172 gdb_cv_printf_has_long_double=yes
c906108c 14173else
81ecdfbb 14174 gdb_cv_printf_has_long_double=no
c906108c 14175fi
81ecdfbb
RW
14176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14177 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14178fi
81ecdfbb 14179
c906108c 14180fi
81ecdfbb
RW
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14182$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14183if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14184
81ecdfbb 14185$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14186
14187fi
97bf5e38 14188
bc8bcb4b 14189# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14190
81ecdfbb
RW
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14192$as_echo_n "checking for long double support in scanf... " >&6; }
14193if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14194 $as_echo_n "(cached) " >&6
97bf5e38 14195else
81ecdfbb 14196 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14197 gdb_cv_scanf_has_long_double=no
14198else
81ecdfbb 14199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14200/* end confdefs.h. */
bc8bcb4b
MK
14201#include <stdio.h>
14202int
14203main ()
14204{
14205char *buf = "3.141592653";
97bf5e38
MK
14206 long double f = 0;
14207 sscanf (buf, "%Lg", &f);
14208 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14209 ;
14210 return 0;
97bf5e38 14211}
bec39cab 14212_ACEOF
81ecdfbb 14213if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14214 gdb_cv_scanf_has_long_double=yes
14215else
81ecdfbb 14216 gdb_cv_scanf_has_long_double=no
97bf5e38 14217fi
81ecdfbb
RW
14218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14219 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14220fi
81ecdfbb 14221
c906108c 14222fi
81ecdfbb
RW
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14224$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14225if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14226
81ecdfbb 14227$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14228
14229fi
c906108c 14230
438013df
AO
14231case ${host_os} in
14232aix*)
81ecdfbb
RW
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14234$as_echo_n "checking for -bbigtoc option... " >&6; }
14235if test "${gdb_cv_bigtoc+set}" = set; then :
14236 $as_echo_n "(cached) " >&6
438013df 14237else
bec39cab 14238
438013df
AO
14239 SAVE_LDFLAGS=$LDFLAGS
14240
14241 case $GCC in
14242 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14243 *) gdb_cv_bigtoc=-bbigtoc ;;
14244 esac
14245
14246 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14248/* end confdefs.h. */
438013df 14249
bec39cab
AC
14250int
14251main ()
14252{
438013df 14253int i;
bec39cab
AC
14254 ;
14255 return 0;
14256}
14257_ACEOF
81ecdfbb 14258if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14259
81ecdfbb
RW
14260else
14261 gdb_cv_bigtoc=
438013df 14262fi
81ecdfbb
RW
14263rm -f core conftest.err conftest.$ac_objext \
14264 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14265 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14266
bec39cab 14267fi
81ecdfbb
RW
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14269$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14270 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14271 ;;
14272esac
14273
38f6b338 14274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14275$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14276dynamic_list=false
14277if test "${gdb_native}" = yes; then
14278 # The dynamically loaded libthread_db needs access to symbols in the gdb
14279 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14280 # may not be supported there.
14281 old_LDFLAGS="$LDFLAGS"
14282 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14283 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14284 LDFLAGS="$LDFLAGS $RDYNAMIC"
14285 if test "${have_libpython}" = no; then
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14287/* end confdefs.h. */
14288
14289int
14290main ()
14291{
14292
14293 ;
14294 return 0;
14295}
14296_ACEOF
14297if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14298 dynamic_list=true
14299fi
14300rm -f core conftest.err conftest.$ac_objext \
14301 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14302 else
14303 # Workaround http://bugs.python.org/issue4434 where static
14304 # libpythonX.Y.a would get its symbols required for
14305 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14306 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14307 old_CFLAGS="$CFLAGS"
14308 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14309 if test "$cross_compiling" = yes; then :
3bebe2f2 14310 true
f6528abd 14311else
3bebe2f2
JK
14312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14313/* end confdefs.h. */
14314#include "${have_libpython}/Python.h"
14315int
14316main ()
14317{
14318int err;
38f6b338
JK
14319 Py_Initialize ();
14320 err = PyRun_SimpleString ("import itertools\n");
14321 Py_Finalize ();
14322 return err == 0 ? 0 : 1;
3bebe2f2
JK
14323 ;
14324 return 0;
14325}
14326_ACEOF
14327if ac_fn_c_try_run "$LINENO"; then :
14328 dynamic_list=true
14329fi
14330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14331 conftest.$ac_objext conftest.beam conftest.$ac_ext
14332fi
14333
38f6b338
JK
14334 CFLAGS="$old_CFLAGS"
14335 fi
14336 LDFLAGS="$old_LDFLAGS"
14337fi
14338if $dynamic_list; then
14339 found="-Wl,--dynamic-list"
14340 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14341else
38f6b338
JK
14342 found="-rdynamic"
14343 RDYNAMIC="-rdynamic"
f6528abd 14344fi
f6528abd 14345
38f6b338 14346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14347$as_echo "$found" >&6; }
0407b3f1 14348
f6528abd 14349
0407b3f1 14350if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14351 case ${host_os} in
c906108c 14352 solaris*)
d92419e5
JB
14353 # See if thread_db library is around for Solaris thread debugging.
14354 # Note that we must explicitly test for version 1 of the library
14355 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14356 # the same API.
81ecdfbb
RW
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14358$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14359 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14361$as_echo "yes" >&6; }
60ca704f 14362
81ecdfbb 14363$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14364
3483b318 14365 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14366 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14368$as_echo_n "checking for dlopen in -ldl... " >&6; }
14369if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14370 $as_echo_n "(cached) " >&6
c906108c 14371else
bec39cab 14372 ac_check_lib_save_LIBS=$LIBS
c906108c 14373LIBS="-ldl $LIBS"
81ecdfbb 14374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14375/* end confdefs.h. */
14376
81ecdfbb
RW
14377/* Override any GCC internal prototype to avoid an error.
14378 Use char because int might match the return type of a GCC
14379 builtin and then its argument prototype would still apply. */
bec39cab
AC
14380#ifdef __cplusplus
14381extern "C"
14382#endif
bec39cab
AC
14383char dlopen ();
14384int
14385main ()
14386{
81ecdfbb 14387return dlopen ();
bec39cab
AC
14388 ;
14389 return 0;
14390}
14391_ACEOF
81ecdfbb 14392if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14393 ac_cv_lib_dl_dlopen=yes
14394else
81ecdfbb 14395 ac_cv_lib_dl_dlopen=no
bec39cab 14396fi
81ecdfbb
RW
14397rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14399LIBS=$ac_check_lib_save_LIBS
14400fi
81ecdfbb
RW
14401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14402$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14403if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14404 cat >>confdefs.h <<_ACEOF
14405#define HAVE_LIBDL 1
14406_ACEOF
c906108c
SS
14407
14408 LIBS="-ldl $LIBS"
14409
c906108c
SS
14410fi
14411
f6528abd 14412 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14413 # Sun randomly tweaked the prototypes in <proc_service.h>
14414 # at one point.
81ecdfbb
RW
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14416$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14417 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14418 $as_echo_n "(cached) " >&6
c906108c 14419else
bec39cab 14420
81ecdfbb 14421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14422/* end confdefs.h. */
c906108c
SS
14423
14424 #include <proc_service.h>
14425 ps_err_e ps_pdwrite
14426 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14427
bec39cab
AC
14428int
14429main ()
14430{
14431
14432 ;
14433 return 0;
14434}
14435_ACEOF
81ecdfbb 14436if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14437 gdb_cv_proc_service_is_old=no
14438else
81ecdfbb 14439 gdb_cv_proc_service_is_old=yes
c906108c 14440fi
81ecdfbb 14441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14442
c906108c
SS
14443fi
14444
81ecdfbb
RW
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14446$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14447 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14448
81ecdfbb 14449$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14450
14451 fi
14452 else
81ecdfbb
RW
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14454$as_echo "no" >&6; }
c906108c
SS
14455 fi
14456 ;;
d92419e5 14457 aix*)
81ecdfbb
RW
14458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14459$as_echo_n "checking for AiX thread debugging library... " >&6; }
14460 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14461 $as_echo_n "(cached) " >&6
bec39cab 14462else
81ecdfbb 14463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14464/* end confdefs.h. */
d92419e5 14465#include <sys/pthdebug.h>
bec39cab
AC
14466int
14467main ()
14468{
d92419e5
JB
14469#ifndef PTHDB_VERSION_3
14470 #error
14471 #endif
bec39cab
AC
14472 ;
14473 return 0;
14474}
14475_ACEOF
81ecdfbb 14476if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14477 gdb_cv_have_aix_thread_debug=yes
14478else
81ecdfbb 14479 gdb_cv_have_aix_thread_debug=no
d92419e5 14480fi
81ecdfbb 14481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14482fi
14483
81ecdfbb
RW
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14485$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14486 if test $gdb_cv_have_aix_thread_debug = yes; then
14487 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14488 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5 14489 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
d645e32e
JB
14490
14491 # Older versions of AIX do not provide the declaration for
14492 # the getthrds function (it appears that it was introduced
14493 # with AIX 6.x).
14494 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14495"
14496if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14497 ac_have_decl=1
14498else
14499 ac_have_decl=0
14500fi
14501
14502cat >>confdefs.h <<_ACEOF
14503#define HAVE_DECL_GETTHRDS $ac_have_decl
14504_ACEOF
14505
d92419e5
JB
14506 fi
14507 ;;
c906108c 14508 esac
bec39cab 14509
c906108c
SS
14510fi
14511
3f47be5c 14512if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14514$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14515if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14516 $as_echo_n "(cached) " >&6
bec39cab 14517else
81ecdfbb 14518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14519/* end confdefs.h. */
3f47be5c 14520#include <thread_db.h>
bec39cab
AC
14521int
14522main ()
14523{
3f47be5c 14524int i = TD_NOTALLOC;
bec39cab
AC
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14530 gdb_cv_thread_db_h_has_td_notalloc=yes
14531else
81ecdfbb 14532 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14533
3f47be5c 14534fi
81ecdfbb 14535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14536
bec39cab 14537fi
81ecdfbb
RW
14538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14539$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14541$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14542if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14543 $as_echo_n "(cached) " >&6
59f80f10 14544else
81ecdfbb 14545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14546/* end confdefs.h. */
14547#include <thread_db.h>
14548int
14549main ()
14550{
14551int i = TD_VERSION;
14552 ;
14553 return 0;
14554}
14555_ACEOF
81ecdfbb 14556if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14557 gdb_cv_thread_db_h_has_td_version=yes
14558else
81ecdfbb 14559 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14560
14561fi
81ecdfbb 14562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14563
14564fi
81ecdfbb
RW
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14566$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14568$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14569if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14570 $as_echo_n "(cached) " >&6
59f80f10 14571else
81ecdfbb 14572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14573/* end confdefs.h. */
14574#include <thread_db.h>
14575int
14576main ()
14577{
14578int i = TD_NOTLS;
14579 ;
14580 return 0;
14581}
14582_ACEOF
81ecdfbb 14583if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14584 gdb_cv_thread_db_h_has_td_notls=yes
14585else
81ecdfbb 14586 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14587
14588fi
81ecdfbb 14589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14590
14591fi
81ecdfbb
RW
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14593$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14594fi
14595if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14596
81ecdfbb 14597$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14598
59f80f10
DJ
14599fi
14600if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14601
81ecdfbb 14602$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14603
14604fi
14605if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14606
81ecdfbb 14607$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14608
3f47be5c
EZ
14609fi
14610
b757528f 14611if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14613$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14614if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14615 $as_echo_n "(cached) " >&6
bec39cab 14616else
81ecdfbb 14617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14618/* end confdefs.h. */
b757528f 14619#include <sys/syscall.h>
bec39cab
AC
14620int
14621main ()
14622{
b757528f 14623int i = __NR_tkill;
bec39cab
AC
14624 ;
14625 return 0;
14626}
14627_ACEOF
81ecdfbb 14628if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14629 gdb_cv_sys_syscall_h_has_tkill=yes
14630else
81ecdfbb 14631 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14632
b757528f 14633fi
81ecdfbb 14634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14635
bec39cab 14636fi
81ecdfbb
RW
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14638$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14639fi
14640if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14641
81ecdfbb 14642$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14643
14644fi
14645
81ecdfbb
RW
14646ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14647"
14648if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14649 ac_have_decl=1
10568435 14650else
81ecdfbb 14651 ac_have_decl=0
10568435 14652fi
10568435
JK
14653
14654cat >>confdefs.h <<_ACEOF
81ecdfbb 14655#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14656_ACEOF
14657
14658
81ecdfbb
RW
14659if test "$cross_compiling" = yes; then :
14660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14661/* end confdefs.h. */
14662#include <sys/personality.h>
14663int
14664main ()
14665{
14666
14667# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14668# define ADDR_NO_RANDOMIZE 0x0040000
14669# endif
14670 /* Test the flag could be set and stays set. */
14671 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14672 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14673 return 1
14674 ;
14675 return 0;
14676}
14677_ACEOF
81ecdfbb 14678if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14679 have_personality=true
14680else
81ecdfbb 14681 have_personality=false
10568435 14682fi
81ecdfbb
RW
14683rm -f core conftest.err conftest.$ac_objext \
14684 conftest$ac_exeext conftest.$ac_ext
10568435 14685else
81ecdfbb 14686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14687/* end confdefs.h. */
14688#include <sys/personality.h>
14689int
14690main ()
14691{
14692
14693# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14694# define ADDR_NO_RANDOMIZE 0x0040000
14695# endif
14696 /* Test the flag could be set and stays set. */
14697 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14698 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14699 return 1
14700 ;
14701 return 0;
14702}
14703_ACEOF
81ecdfbb 14704if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14705 have_personality=true
14706else
81ecdfbb 14707 have_personality=false
10568435 14708fi
81ecdfbb
RW
14709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14711fi
81ecdfbb 14712
10568435
JK
14713if $have_personality
14714then
14715
81ecdfbb 14716$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14717
14718fi
14719
fb40c209 14720
b14b1491 14721target_sysroot_reloc=0
bec39cab 14722
81ecdfbb
RW
14723# Check whether --with-sysroot was given.
14724if test "${with_sysroot+set}" = set; then :
14725 withval=$with_sysroot;
030292b7 14726 case ${with_sysroot} in
715d1656 14727 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14728 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14729 esac
14730
14731 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14732
07abfebf
RS
14733 if test "x$prefix" = xNONE; then
14734 test_prefix=/usr/local
14735 else
14736 test_prefix=$prefix
14737 fi
aa28a74e 14738 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14739 test_exec_prefix=$test_prefix
030292b7 14740 else
07abfebf 14741 test_exec_prefix=$exec_prefix
030292b7
DJ
14742 fi
14743 case ${TARGET_SYSTEM_ROOT} in
715d1656 14744 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14745 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14746 '${prefix}'|'${prefix}/'*|\
715d1656 14747 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14748 target_sysroot_reloc=1
030292b7
DJ
14749 ;;
14750 esac
14751
14752else
bec39cab 14753
030292b7
DJ
14754 TARGET_SYSTEM_ROOT=
14755 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14756
81ecdfbb 14757fi
b14b1491 14758
81ecdfbb 14759TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14760
14761
14762
16e7150e 14763
16e7150e 14764
81ecdfbb
RW
14765# Check whether --with-system-gdbinit was given.
14766if test "${with_system_gdbinit+set}" = set; then :
14767 withval=$with_system_gdbinit;
b14b1491
TT
14768 SYSTEM_GDBINIT=$withval
14769else
14770 SYSTEM_GDBINIT=
81ecdfbb
RW
14771fi
14772
16e7150e
JG
14773
14774 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14775 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14776 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14777 ac_define_dir=`eval echo $ac_define_dir`
14778
14779cat >>confdefs.h <<_ACEOF
14780#define SYSTEM_GDBINIT "$ac_define_dir"
14781_ACEOF
14782
14783
14784
0c4a4063 14785
b14b1491
TT
14786 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14787 if test "x$prefix" = xNONE; then
14788 test_prefix=/usr/local
14789 else
14790 test_prefix=$prefix
14791 fi
14792 else
14793 test_prefix=$exec_prefix
14794 fi
14795 value=0
14796 case ${ac_define_dir} in
14797 "${test_prefix}"|"${test_prefix}/"*|\
14798 '${exec_prefix}'|'${exec_prefix}/'*)
14799 value=1
14800 ;;
14801 esac
16e7150e 14802
b14b1491
TT
14803cat >>confdefs.h <<_ACEOF
14804#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14805_ACEOF
14806
b14b1491 14807
16e7150e 14808
0c4a4063 14809
81ecdfbb
RW
14810# Check whether --enable-werror was given.
14811if test "${enable_werror+set}" = set; then :
14812 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14813 yes | y) ERROR_ON_WARNING="yes" ;;
14814 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14815 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14816 esac
81ecdfbb
RW
14817fi
14818
094a342e
MK
14819
14820# Enable -Werror by default when using gcc
14821if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14822 ERROR_ON_WARNING=yes
14823fi
14824
14825WERROR_CFLAGS=""
14826if test "${ERROR_ON_WARNING}" = yes ; then
14827 WERROR_CFLAGS="-Werror"
14828fi
14829
aa79a185
DJ
14830# The entries after -Wno-pointer-sign are disabled warnings which may
14831# be enabled in the future, which can not currently be used to build
14832# GDB.
14833# NOTE: If you change this list, remember to update
3b851bce 14834# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14835build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14836-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14837-Wno-unused -Wunused-value -Wunused-function \
14838-Wno-switch -Wno-char-subscripts"
a3b362c4 14839
3526781e
DJ
14840# Enable -Wno-format by default when using gcc on mingw since many
14841# GCC versions complain about %I64.
14842case "${host}" in
14843 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14844esac
14845
81ecdfbb
RW
14846# Check whether --enable-build-warnings was given.
14847if test "${enable_build_warnings+set}" = set; then :
14848 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14849 yes) ;;
14850 no) build_warnings="-w";;
14851 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14852 build_warnings="${build_warnings} ${t}";;
14853 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14854 build_warnings="${t} ${build_warnings}";;
14855 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14856esac
d4f3574e 14857if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14858 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14859fi
81ecdfbb
RW
14860fi
14861# Check whether --enable-gdb-build-warnings was given.
14862if test "${enable_gdb_build_warnings+set}" = set; then :
14863 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14864 yes) ;;
14865 no) build_warnings="-w";;
14866 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14867 build_warnings="${build_warnings} ${t}";;
14868 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14869 build_warnings="${t} ${build_warnings}";;
14870 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14871esac
14872if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14873 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14874fi
81ecdfbb
RW
14875fi
14876WARN_CFLAGS=""
c906108c
SS
14877if test "x${build_warnings}" != x -a "x$GCC" = xyes
14878then
81ecdfbb
RW
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14880$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14881 # Separate out the -Werror flag as some files just cannot be
14882 # compiled with it enabled.
14883 for w in ${build_warnings}; do
14884 case $w in
14885 -Werr*) WERROR_CFLAGS=-Werror ;;
14886 *) # Check that GCC accepts it
4536bbc6
AC
14887 saved_CFLAGS="$CFLAGS"
14888 CFLAGS="$CFLAGS $w"
81ecdfbb 14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14890/* end confdefs.h. */
4536bbc6 14891
bec39cab
AC
14892int
14893main ()
14894{
4536bbc6 14895
bec39cab
AC
14896 ;
14897 return 0;
14898}
14899_ACEOF
81ecdfbb 14900if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14901 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14902fi
81ecdfbb 14903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14904 CFLAGS="$saved_CFLAGS"
746a987d
AC
14905 esac
14906 done
81ecdfbb
RW
14907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14908$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14909fi
14910
14911
104c1213 14912
7a292a7a 14913# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14915$as_echo_n "checking for cygwin... " >&6; }
14916if test "${gdb_cv_os_cygwin+set}" = set; then :
14917 $as_echo_n "(cached) " >&6
bec39cab 14918else
81ecdfbb 14919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14920/* end confdefs.h. */
7a292a7a
SS
14921
14922#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14923lose
14924#endif
bec39cab 14925_ACEOF
7a292a7a 14926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 14927 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
14928 gdb_cv_os_cygwin=yes
14929else
7a292a7a
SS
14930 gdb_cv_os_cygwin=no
14931fi
14932rm -f conftest*
14933
14934fi
81ecdfbb
RW
14935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14936$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14937
aff38e61 14938
3eb25fda 14939SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14940case ${host} in
95cbc983
AC
14941 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14942 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14943 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14944esac
14945
14946
cd0fc7c3
SS
14947# libreadline needs libuser32.a in a cygwin environment
14948WIN32LIBS=
14949if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14950 WIN32LIBS="-luser32"
14951 case "${target}" in
14952 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14953 ;;
14954 esac
cd0fc7c3 14955fi
c906108c 14956
b4505029
MM
14957# The ser-tcp.c module requires sockets.
14958case ${host} in
14959 *mingw32*)
14960
81ecdfbb 14961$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14962
14963 WIN32LIBS="$WIN32LIBS -lws2_32"
14964 ;;
14965esac
14966
7a292a7a 14967
31d99776
DJ
14968# Add ELF support to GDB, but only if BFD includes ELF support.
14969OLD_CFLAGS=$CFLAGS
14970OLD_LDFLAGS=$LDFLAGS
14971OLD_LIBS=$LIBS
cab58a69 14972CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 14973LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 14974intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
14975# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14976if test "$plugins" = "yes"; then
14977 LIBS="-ldl $LIBS"
14978fi
0f72fb1c 14979LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
14980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
14981$as_echo_n "checking for ELF support in BFD... " >&6; }
14982if test "${gdb_cv_var_elf+set}" = set; then :
14983 $as_echo_n "(cached) " >&6
31d99776 14984else
81ecdfbb 14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14986/* end confdefs.h. */
14987#include <stdlib.h>
14988#include "bfd.h"
14989#include "elf-bfd.h"
14990
14991int
14992main ()
14993{
14994bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
14995 ;
14996 return 0;
14997}
14998_ACEOF
81ecdfbb 14999if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15000 gdb_cv_var_elf=yes
15001else
81ecdfbb 15002 gdb_cv_var_elf=no
31d99776 15003fi
81ecdfbb
RW
15004rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
31d99776 15006fi
81ecdfbb
RW
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15008$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
15009if test $gdb_cv_var_elf = yes; then
15010 CONFIG_OBS="$CONFIG_OBS elfread.o"
15011
81ecdfbb 15012$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15013
075ff26d
JK
15014 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15015 if test "$plugins" = "yes"; then
15016 OLD_LIBS="-ldl $OLD_LIBS"
15017 fi
31d99776
DJ
15018fi
15019CFLAGS=$OLD_CFLAGS
15020LDFLAGS=$OLD_LDFLAGS
15021LIBS=$OLD_LIBS
15022
121ce6e5
DJ
15023# Add any host-specific objects to GDB.
15024CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15025
3fc11d3e
JM
15026LIBGUI="../libgui/src/libgui.a"
15027GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15028
15029
7a292a7a 15030
3fc11d3e
JM
15031WIN32LDAPP=
15032
15033
15034
d91670b9 15035case "${host}" in
686a5eed 15036*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15037 configdir="win"
15038 ;;
15039*)
15040 configdir="unix"
15041 ;;
15042esac
3fc11d3e
JM
15043
15044GDBTKLIBS=
15045if test "${enable_gdbtk}" = "yes"; then
15046
d1c3b63a
KS
15047 # Gdbtk must have an absolute path to srcdir in order to run
15048 # properly when not installed.
15049 here=`pwd`
15050 cd ${srcdir}
15051 GDBTK_SRC_DIR=`pwd`
15052 cd $here
15053
bec39cab 15054
5062cc19
KS
15055 #
15056 # Ok, lets find the tcl configuration
15057 # First, look for one uninstalled.
15058 # the alternative search directory is invoked by --with-tcl
15059 #
3fc11d3e 15060
5062cc19
KS
15061 if test x"${no_tcl}" = x ; then
15062 # we reset no_tcl in case something fails here
15063 no_tcl=true
bec39cab 15064
81ecdfbb
RW
15065# Check whether --with-tcl was given.
15066if test "${with_tcl+set}" = set; then :
15067 withval=$with_tcl; with_tclconfig=${withval}
15068fi
15069
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15071$as_echo_n "checking for Tcl configuration... " >&6; }
15072 if test "${ac_cv_c_tclconfig+set}" = set; then :
15073 $as_echo_n "(cached) " >&6
3fc11d3e 15074else
bec39cab 15075
3fc11d3e 15076
5062cc19
KS
15077 # First check to see if --with-tcl was specified.
15078 case "${host}" in
15079 *-*-cygwin*) platDir="win" ;;
15080 *) platDir="unix" ;;
15081 esac
15082 if test x"${with_tclconfig}" != x ; then
15083 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15084 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15085 else
81ecdfbb 15086 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15087 fi
15088 fi
15089
15090 # then check for a private Tcl installation
15091 if test x"${ac_cv_c_tclconfig}" = x ; then
15092 for i in \
15093 ../tcl \
15094 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15095 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15096 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15097 ../../tcl \
15098 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15099 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15100 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15101 ../../../tcl \
15102 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15103 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15104 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15105 if test -f "$i/$platDir/tclConfig.sh" ; then
15106 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15107 break
15108 fi
15109 done
15110 fi
15111
15112 # on Darwin, check in Framework installation locations
15113 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15114 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15115 `ls -d /Library/Frameworks 2>/dev/null` \
15116 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15117 `ls -d /System/Library/Frameworks 2>/dev/null` \
15118 ; do
15119 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15120 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15121 break
15122 fi
15123 done
15124 fi
15125
15126 # check in a few common install locations
15127 if test x"${ac_cv_c_tclconfig}" = x ; then
15128 for i in `ls -d ${libdir} 2>/dev/null` \
15129 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15130 `ls -d ${prefix}/lib 2>/dev/null` \
15131 `ls -d /usr/local/lib 2>/dev/null` \
15132 `ls -d /usr/contrib/lib 2>/dev/null` \
15133 `ls -d /usr/lib 2>/dev/null` \
15134 ; do
15135 if test -f "$i/tclConfig.sh" ; then
15136 ac_cv_c_tclconfig=`(cd $i; pwd)`
15137 break
15138 fi
15139 done
15140 fi
3fc11d3e 15141
5062cc19
KS
15142 # check in a few other private locations
15143 if test x"${ac_cv_c_tclconfig}" = x ; then
15144 for i in \
15145 ${srcdir}/../tcl \
15146 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15147 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15148 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15149 if test -f "$i/$platDir/tclConfig.sh" ; then
15150 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15151 break
15152 fi
15153 done
15154 fi
bec39cab 15155
3fc11d3e
JM
15156fi
15157
5062cc19
KS
15158
15159 if test x"${ac_cv_c_tclconfig}" = x ; then
15160 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15162$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15163 else
15164 no_tcl=
15165 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15167$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15168 fi
15169 fi
3fc11d3e 15170
bec39cab 15171
85541719
DE
15172 # If $no_tk is nonempty, then we can't do Tk, and there is no
15173 # point to doing Tcl.
bec39cab 15174
5062cc19
KS
15175 #
15176 # Ok, lets find the tk configuration
15177 # First, look for one uninstalled.
15178 # the alternative search directory is invoked by --with-tk
15179 #
3fc11d3e 15180
5062cc19
KS
15181 if test x"${no_tk}" = x ; then
15182 # we reset no_tk in case something fails here
15183 no_tk=true
bec39cab 15184
81ecdfbb
RW
15185# Check whether --with-tk was given.
15186if test "${with_tk+set}" = set; then :
15187 withval=$with_tk; with_tkconfig=${withval}
15188fi
15189
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15191$as_echo_n "checking for Tk configuration... " >&6; }
15192 if test "${ac_cv_c_tkconfig+set}" = set; then :
15193 $as_echo_n "(cached) " >&6
bec39cab 15194else
3fc11d3e
JM
15195
15196
5062cc19
KS
15197 # First check to see if --with-tkconfig was specified.
15198 if test x"${with_tkconfig}" != x ; then
15199 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15200 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15201 else
81ecdfbb 15202 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15203 fi
15204 fi
3fc11d3e 15205
5062cc19
KS
15206 # then check for a private Tk library
15207 case "${host}" in
15208 *-*-cygwin*) platDir="win" ;;
15209 *) platDir="unix" ;;
15210 esac
15211 if test x"${ac_cv_c_tkconfig}" = x ; then
15212 for i in \
15213 ../tk \
15214 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15215 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15216 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15217 ../../tk \
15218 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15219 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15220 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15221 ../../../tk \
15222 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15223 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15224 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15225 if test -f "$i/$platDir/tkConfig.sh" ; then
15226 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15227 break
15228 fi
15229 done
15230 fi
15231
15232 # on Darwin, check in Framework installation locations
15233 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15234 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15235 `ls -d /Library/Frameworks 2>/dev/null` \
15236 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15237 `ls -d /System/Library/Frameworks 2>/dev/null` \
15238 ; do
15239 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15240 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15241 break
15242 fi
15243 done
15244 fi
15245
15246 # check in a few common install locations
15247 if test x"${ac_cv_c_tkconfig}" = x ; then
15248 for i in `ls -d ${libdir} 2>/dev/null` \
15249 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15250 `ls -d ${prefix}/lib 2>/dev/null` \
15251 `ls -d /usr/local/lib 2>/dev/null` \
15252 `ls -d /usr/contrib/lib 2>/dev/null` \
15253 `ls -d /usr/lib 2>/dev/null` \
15254 ; do
15255 if test -f "$i/tkConfig.sh" ; then
15256 ac_cv_c_tkconfig=`(cd $i; pwd)`
15257 break
15258 fi
15259 done
15260 fi
15261 # check in a few other private locations
15262 if test x"${ac_cv_c_tkconfig}" = x ; then
15263 for i in \
15264 ${srcdir}/../tk \
15265 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15266 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15267 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15268 if test -f "$i/$platDir/tkConfig.sh" ; then
15269 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15270 break
15271 fi
15272 done
15273 fi
3fc11d3e 15274
3fc11d3e
JM
15275fi
15276
15277
5062cc19
KS
15278 if test x"${ac_cv_c_tkconfig}" = x ; then
15279 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15281$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15282 else
15283 no_tk=
15284 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15286$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15287 fi
3fc11d3e 15288 fi
dd2504ab 15289
dd2504ab 15290
85541719
DE
15291 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15292
81ecdfbb
RW
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15294$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15295
15296 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15298$as_echo "loading" >&6; }
85541719
DE
15299 . ${TCL_BIN_DIR}/tclConfig.sh
15300 else
81ecdfbb
RW
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15302$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15303 fi
15304
15305 # eval is required to do the TCL_DBGX substitution
15306 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15307 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15308
15309 # If the TCL_BIN_DIR is the build directory (not the install directory),
15310 # then set the common variable name to the value of the build variables.
15311 # For example, the variable TCL_LIB_SPEC will be set to the value
15312 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15313 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15314 # installed and uninstalled version of Tcl.
15315 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15316 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15317 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15318 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15319 elif test "`uname -s`" = "Darwin"; then
15320 # If Tcl was built as a framework, attempt to use the libraries
15321 # from the framework at the given location so that linking works
15322 # against Tcl.framework installed in an arbitary location.
15323 case ${TCL_DEFS} in
15324 *TCL_FRAMEWORK*)
15325 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15326 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15327 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15328 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15329 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15330 break
15331 fi
15332 done
15333 fi
15334 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15335 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15336 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15337 fi
15338 ;;
15339 esac
15340 fi
15341
15342 # eval is required to do the TCL_DBGX substitution
15343 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15344 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15345 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15346 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362 # Check for in-tree tcl
15363 here=`pwd`
15364 cd ${srcdir}/..
15365 topdir=`pwd`
15366 cd ${here}
15367
15368 intree="no"
15369 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15370 intree="yes"
15371 fi
15372
15373 # Find Tcl private headers
15374 if test x"${intree}" = xno; then
15375
81ecdfbb
RW
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15377$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15378 private_dir=""
15379 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15380 if test -f ${dir}/tclInt.h ; then
15381 private_dir=${dir}
15382 fi
15383
15384 if test x"${private_dir}" = x; then
81ecdfbb 15385 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15386 else
15387 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15389$as_echo "${private_dir}" >&6; }
85541719
DE
15390 fi
15391
15392 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15393 TCL_LIBRARY="${TCL_LIB_SPEC}"
15394 TCL_DEPS=""
15395 else
15396 # If building tcl in the same src tree, private headers
15397 # are not needed, but we need to be sure to use the right
15398 # headers library
15399 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15400 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15401 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15402 fi
15403
15404
15405
15406
15407
81ecdfbb
RW
15408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15409$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15410
5062cc19 15411 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15413$as_echo "loading" >&6; }
5062cc19 15414 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15415 else
81ecdfbb
RW
15416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15417$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15418 fi
bec39cab 15419
5062cc19
KS
15420 # eval is required to do the TK_DBGX substitution
15421 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15422 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15423
15424 # If the TK_BIN_DIR is the build directory (not the install directory),
15425 # then set the common variable name to the value of the build variables.
15426 # For example, the variable TK_LIB_SPEC will be set to the value
15427 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15428 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15429 # installed and uninstalled version of Tcl.
85541719 15430 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15431 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15432 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15433 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15434 elif test "`uname -s`" = "Darwin"; then
15435 # If Tk was built as a framework, attempt to use the libraries
15436 # from the framework at the given location so that linking works
15437 # against Tk.framework installed in an arbitary location.
15438 case ${TK_DEFS} in
15439 *TK_FRAMEWORK*)
85541719 15440 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15441 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15442 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15443 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15444 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15445 break
15446 fi
15447 done
15448 fi
85541719 15449 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15450 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15451 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15452 fi
15453 ;;
15454 esac
3fc11d3e
JM
15455 fi
15456
5062cc19
KS
15457 # eval is required to do the TK_DBGX substitution
15458 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15459 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15460 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15461 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15462
3fc11d3e
JM
15463
15464
bec39cab
AC
15465
15466
15467
15468
15469
15470
15471
3fc11d3e 15472
3fc11d3e 15473
bec39cab 15474
bec39cab 15475
85541719
DE
15476 # Check for in-tree Tk
15477 intree="no"
15478 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15479 intree="yes"
15480 fi
3fc11d3e 15481
85541719
DE
15482 # Find Tk private headers
15483 if test x"${intree}" = xno; then
3fc11d3e 15484
81ecdfbb
RW
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15486$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15487 private_dir=""
15488 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15489 if test -f ${dir}/tkInt.h; then
15490 private_dir=${dir}
3fc11d3e 15491 fi
bec39cab 15492
5062cc19 15493 if test x"${private_dir}" = x; then
81ecdfbb 15494 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15495 else
5062cc19 15496 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15498$as_echo "${private_dir}" >&6; }
3fc11d3e 15499 fi
3fc11d3e 15500
85541719
DE
15501 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15502 TK_LIBRARY=${TK_LIB_SPEC}
15503 TK_DEPS=""
15504 else
15505 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15506 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15507 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15508 fi
3fc11d3e
JM
15509
15510
3fc11d3e
JM
15511
15512
3fc11d3e 15513
85541719 15514 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15515
85541719
DE
15516 # Include some libraries that Tcl and Tk want.
15517 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15518 # Yes, the ordering seems wrong here. But it isn't.
15519 # TK_LIBS is the list of libraries that need to be linked
15520 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15521 # were in LIBS then any link tests after this point would
15522 # try to include things like `$(LIBGUI)', which wouldn't work.
15523 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15524
85541719
DE
15525 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15526 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15527 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15528 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15529 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15530 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15531 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15532
85541719
DE
15533 if test x$gdb_cv_os_cygwin = xyes; then
15534 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15535 WIN32LDAPP="-Wl,--subsystem,console"
15536 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15537 fi
ffc6a242 15538
81ecdfbb 15539 subdirs="$subdirs gdbtk"
3ace7edb 15540
85541719 15541 fi
3fc11d3e
JM
15542fi
15543
15544
15545
15546
15547
15548
15549
15550
81ecdfbb
RW
15551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15552$as_echo_n "checking for X... " >&6; }
bec39cab 15553
c906108c 15554
81ecdfbb
RW
15555# Check whether --with-x was given.
15556if test "${with_x+set}" = set; then :
15557 withval=$with_x;
15558fi
c906108c
SS
15559
15560# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15561if test "x$with_x" = xno; then
15562 # The user explicitly disabled X.
15563 have_x=disabled
15564else
81ecdfbb
RW
15565 case $x_includes,$x_libraries in #(
15566 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15567 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15568 $as_echo_n "(cached) " >&6
c906108c
SS
15569else
15570 # One or both of the vars are not set, and there is no cached value.
bec39cab 15571ac_x_includes=no ac_x_libraries=no
81ecdfbb 15572rm -f -r conftest.dir
bec39cab
AC
15573if mkdir conftest.dir; then
15574 cd conftest.dir
bec39cab 15575 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15576incroot:
15577 @echo incroot='${INCROOT}'
15578usrlibdir:
15579 @echo usrlibdir='${USRLIBDIR}'
15580libdir:
15581 @echo libdir='${LIBDIR}'
15582_ACEOF
15583 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15584 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15585 for ac_var in incroot usrlibdir libdir; do
15586 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15587 done
c906108c 15588 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15589 for ac_extension in a so sl dylib la dll; do
15590 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15591 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15592 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15593 fi
15594 done
15595 # Screen out bogus values from the imake configuration. They are
15596 # bogus both because they are the default anyway, and because
15597 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15598 case $ac_im_incroot in
81ecdfbb 15599 /usr/include) ac_x_includes= ;;
bec39cab 15600 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15601 esac
bec39cab 15602 case $ac_im_usrlibdir in
81ecdfbb 15603 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15604 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15605 esac
15606 fi
15607 cd ..
81ecdfbb 15608 rm -f -r conftest.dir
c906108c
SS
15609fi
15610
bec39cab
AC
15611# Standard set of common directories for X headers.
15612# Check X11 before X11Rn because it is often a symlink to the current release.
15613ac_x_header_dirs='
15614/usr/X11/include
81ecdfbb 15615/usr/X11R7/include
bec39cab
AC
15616/usr/X11R6/include
15617/usr/X11R5/include
15618/usr/X11R4/include
15619
15620/usr/include/X11
81ecdfbb 15621/usr/include/X11R7
bec39cab
AC
15622/usr/include/X11R6
15623/usr/include/X11R5
15624/usr/include/X11R4
15625
15626/usr/local/X11/include
81ecdfbb 15627/usr/local/X11R7/include
bec39cab
AC
15628/usr/local/X11R6/include
15629/usr/local/X11R5/include
15630/usr/local/X11R4/include
15631
15632/usr/local/include/X11
81ecdfbb 15633/usr/local/include/X11R7
bec39cab
AC
15634/usr/local/include/X11R6
15635/usr/local/include/X11R5
15636/usr/local/include/X11R4
15637
15638/usr/X386/include
15639/usr/x386/include
15640/usr/XFree86/include/X11
15641
15642/usr/include
15643/usr/local/include
15644/usr/unsupported/include
15645/usr/athena/include
15646/usr/local/x11r5/include
15647/usr/lpp/Xamples/include
15648
15649/usr/openwin/include
15650/usr/openwin/share/include'
15651
15652if test "$ac_x_includes" = no; then
81ecdfbb 15653 # Guess where to find include files, by looking for Xlib.h.
c906108c 15654 # First, try using that file with no special directory specified.
81ecdfbb 15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15656/* end confdefs.h. */
81ecdfbb 15657#include <X11/Xlib.h>
bec39cab 15658_ACEOF
81ecdfbb 15659if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15660 # We can compile using X headers with no special include directory.
15661ac_x_includes=
15662else
bec39cab 15663 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15664 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15665 ac_x_includes=$ac_dir
15666 break
15667 fi
15668done
c906108c 15669fi
bec39cab
AC
15670rm -f conftest.err conftest.$ac_ext
15671fi # $ac_x_includes = no
c906108c 15672
bec39cab 15673if test "$ac_x_libraries" = no; then
c906108c 15674 # Check for the libraries.
c906108c
SS
15675 # See if we find them without any special options.
15676 # Don't add to $LIBS permanently.
bec39cab 15677 ac_save_LIBS=$LIBS
81ecdfbb
RW
15678 LIBS="-lX11 $LIBS"
15679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15680/* end confdefs.h. */
81ecdfbb 15681#include <X11/Xlib.h>
bec39cab
AC
15682int
15683main ()
15684{
81ecdfbb 15685XrmInitialize ()
bec39cab
AC
15686 ;
15687 return 0;
15688}
15689_ACEOF
81ecdfbb 15690if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15691 LIBS=$ac_save_LIBS
c906108c
SS
15692# We can link X programs with no special library path.
15693ac_x_libraries=
15694else
81ecdfbb
RW
15695 LIBS=$ac_save_LIBS
15696for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15697do
bec39cab 15698 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15699 for ac_extension in a so sl dylib la dll; do
15700 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15701 ac_x_libraries=$ac_dir
15702 break 2
15703 fi
15704 done
15705done
15706fi
81ecdfbb
RW
15707rm -f core conftest.err conftest.$ac_objext \
15708 conftest$ac_exeext conftest.$ac_ext
bec39cab 15709fi # $ac_x_libraries = no
c906108c 15710
81ecdfbb
RW
15711case $ac_x_includes,$ac_x_libraries in #(
15712 no,* | *,no | *\'*)
15713 # Didn't find X, or a directory has "'" in its name.
15714 ac_cv_have_x="have_x=no";; #(
15715 *)
15716 # Record where we found X for the cache.
15717 ac_cv_have_x="have_x=yes\
15718 ac_x_includes='$ac_x_includes'\
15719 ac_x_libraries='$ac_x_libraries'"
15720esac
c906108c 15721fi
81ecdfbb
RW
15722;; #(
15723 *) have_x=yes;;
15724 esac
c906108c
SS
15725 eval "$ac_cv_have_x"
15726fi # $with_x != no
15727
15728if test "$have_x" != yes; then
81ecdfbb
RW
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15730$as_echo "$have_x" >&6; }
c906108c
SS
15731 no_x=yes
15732else
15733 # If each of the values was on the command line, it overrides each guess.
15734 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15735 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15736 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15737 ac_cv_have_x="have_x=yes\
15738 ac_x_includes='$x_includes'\
15739 ac_x_libraries='$x_libraries'"
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15741$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15742fi
15743
15744
bec39cab 15745# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15746# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15747# This code just checks for a few cases where we'd like to ignore those
15748# definitions, even when they're present in the '.mt' file. These cases
15749# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15750# not part of the source tree.
7a292a7a 15751#
81ecdfbb
RW
15752# Check whether --enable-sim was given.
15753if test "${enable_sim+set}" = set; then :
15754 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15755 echo "enableval = ${enableval}";
15756 case "${enableval}" in
15757 yes) ignore_sim=false ;;
15758 no) ignore_sim=true ;;
15759 *) ignore_sim=false ;;
15760 esac
15761else
15762 ignore_sim=false
81ecdfbb
RW
15763fi
15764
7a292a7a
SS
15765
15766if test ! -d "${srcdir}/../sim"; then
15767 ignore_sim=true
15768fi
15769
9b624dbe
UW
15770SIM=
15771SIM_OBS=
15772if test "${ignore_sim}" = "false"; then
15773 if test x"${gdb_sim}" != x ; then
15774 SIM="${gdb_sim}"
15775 SIM_OBS="remote-sim.o"
60ca704f 15776
81ecdfbb 15777$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15778
9b624dbe 15779 fi
7a292a7a
SS
15780fi
15781
15782
15783
c906108c
SS
15784
15785
15786
15787
15788
15789
dfcd3bfb 15790
e56ac5c3
AC
15791
15792
b3a90332
AC
15793
15794
c35f4ffc 15795# List of host floatformats.
bec39cab
AC
15796
15797cat >>confdefs.h <<_ACEOF
c35f4ffc 15798#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15799_ACEOF
c35f4ffc 15800
bec39cab
AC
15801
15802cat >>confdefs.h <<_ACEOF
c35f4ffc 15803#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15804_ACEOF
15805
c35f4ffc 15806
bec39cab 15807cat >>confdefs.h <<_ACEOF
c35f4ffc 15808#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15809_ACEOF
c35f4ffc
AC
15810
15811
c906108c
SS
15812# target_subdir is used by the testsuite to find the target libraries.
15813target_subdir=
15814if test "${host}" != "${target}"; then
15815 target_subdir="${target_alias}/"
15816fi
15817
15818
15819frags=
771b4502 15820if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15821 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15822 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15823 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15824 fi
15825 frags="$frags $host_makefile_frag"
15826else
15827 host_makefile_frag=/dev/null
c906108c 15828fi
c906108c 15829
c906108c
SS
15830
15831
15832
771b4502 15833if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15834# We pick this up from the host configuration file (.mh) because we
15835# do not have a native configuration Makefile fragment.
c906108c
SS
15836nativefile=`sed -n '
15837s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15838' ${host_makefile_frag}`
c906108c
SS
15839fi
15840
15841
b00a8037 15842if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15843
15844cat >>confdefs.h <<_ACEOF
b00a8037 15845#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15846_ACEOF
b00a8037
DJ
15847
15848fi
15849
8dcde887 15850# Enable multi-ice-gdb-server.
81ecdfbb
RW
15851# Check whether --enable-multi-ice was given.
15852if test "${enable_multi_ice+set}" = set; then :
15853 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15854 yes | no)
15855 ;;
81ecdfbb 15856 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15857 esac
81ecdfbb 15858fi
b4e70030 15859
81ecdfbb
RW
15860if test "x$enable_multi_ice" = xyes; then
15861 subdirs="$subdirs multi-ice"
3ace7edb 15862
a85f51e7
DJ
15863fi
15864
496c0e1b
JB
15865# Check whether --enable-gdbserver was given.
15866if test "${enable_gdbserver+set}" = set; then :
15867 enableval=$enable_gdbserver; case "${enableval}" in
15868 yes| no|auto) ;;
15869 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15870esac
15871else
15872 enable_gdbserver=auto
15873fi
15874
15875
15876# We only build gdbserver automatically in a native configuration, and
15877# only if the user did not explicitly disable its build.
15878if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15880$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15881 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15883$as_echo "yes" >&6; }
15884 subdirs="$subdirs gdbserver"
3ace7edb 15885
496c0e1b 15886 gdbserver_build_enabled=yes
8dcde887 15887 else
81ecdfbb
RW
15888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15889$as_echo "no" >&6; }
8dcde887
MK
15890 fi
15891fi
15892
496c0e1b
JB
15893# If the user explicitly request the gdbserver to be built, verify that
15894# we were in fact able to enable it.
15895if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15896 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15897fi
15898
db985757 15899# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15900# to an empty version.
c906108c
SS
15901
15902files=
15903links=
5a2402b8 15904
c906108c
SS
15905rm -f nm.h
15906if test "${nativefile}" != ""; then
0f475e27
AC
15907 case "${nativefile}" in
15908 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15909 * ) GDB_NM_FILE="${nativefile}"
15910 esac
5a2402b8
AC
15911 files="${files} ${GDB_NM_FILE}"
15912 links="${links} nm.h"
60ca704f
SE
15913
15914cat >>confdefs.h <<_ACEOF
b78960be 15915#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15916_ACEOF
5a2402b8 15917
c906108c 15918fi
5a2402b8
AC
15919
15920
bec39cab
AC
15921ac_sources="$files"
15922ac_dests="$links"
15923while test -n "$ac_sources"; do
15924 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15925 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15926 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15927done
81ecdfbb 15928ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15929
15930
c906108c
SS
15931
15932
c906108c 15933
81ecdfbb 15934$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15935
bec39cab 15936
5ae98d25 15937ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
15938
15939ac_config_commands="$ac_config_commands default"
89a34d1b 15940
bec39cab
AC
15941cat >confcache <<\_ACEOF
15942# This file is a shell script that caches the results of configure
15943# tests run on this system so they can be shared between configure
15944# scripts and configure runs, see configure's option --config-cache.
15945# It is not useful on other systems. If it contains results you don't
15946# want to keep, you may remove or edit it.
15947#
15948# config.status only pays attention to the cache file if you give it
15949# the --recheck option to rerun configure.
15950#
15951# `ac_cv_env_foo' variables (set or unset) will be overridden when
15952# loading this file, other *unset* `ac_cv_foo' will be assigned the
15953# following values.
15954
15955_ACEOF
15956
15957# The following way of writing the cache mishandles newlines in values,
15958# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15959# So, we kill variables containing newlines.
bec39cab
AC
15960# Ultrix sh set writes to stderr and can't be redirected directly,
15961# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15962(
15963 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15964 eval ac_val=\$$ac_var
15965 case $ac_val in #(
15966 *${as_nl}*)
15967 case $ac_var in #(
15968 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15969$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15970 esac
15971 case $ac_var in #(
15972 _ | IFS | as_nl) ;; #(
15973 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15974 *) { eval $ac_var=; unset $ac_var;} ;;
15975 esac ;;
15976 esac
15977 done
15978
bec39cab 15979 (set) 2>&1 |
81ecdfbb
RW
15980 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15981 *${as_nl}ac_space=\ *)
15982 # `set' does not quote correctly, so add quotes: double-quote
15983 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15984 sed -n \
15985 "s/'/'\\\\''/g;
15986 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15987 ;; #(
bec39cab
AC
15988 *)
15989 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15990 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15991 ;;
81ecdfbb
RW
15992 esac |
15993 sort
15994) |
bec39cab 15995 sed '
81ecdfbb 15996 /^ac_cv_env_/b end
bec39cab 15997 t clear
81ecdfbb 15998 :clear
bec39cab
AC
15999 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16000 t end
81ecdfbb
RW
16001 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16002 :end' >>confcache
16003if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16004 if test -w "$cache_file"; then
16005 test "x$cache_file" != "x/dev/null" &&
16006 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16007$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16008 cat confcache >$cache_file
16009 else
81ecdfbb
RW
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16011$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16012 fi
16013fi
16014rm -f confcache
16015
16016test "x$prefix" = xNONE && prefix=$ac_default_prefix
16017# Let make expand exec_prefix.
16018test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16019
bec39cab
AC
16020DEFS=-DHAVE_CONFIG_H
16021
16022ac_libobjs=
16023ac_ltlibobjs=
16024for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16025 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16026 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16027 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16028 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16029 # will be set to the directory where LIBOBJS objects are built.
16030 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16031 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16032done
16033LIBOBJS=$ac_libobjs
16034
16035LTLIBOBJS=$ac_ltlibobjs
16036
16037
85981d60 16038if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16039 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16040Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16041fi
a417dc56 16042if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16043 as_fn_error "conditional \"GMAKE\" was never defined.
16044Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16045fi
783e057b 16046if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16047 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16048Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16049fi
16050
16051 gl_libobjs=
16052 gl_ltlibobjs=
16053 if test -n "$gl_LIBOBJS"; then
16054 # Remove the extension.
16055 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16056 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16057 gl_libobjs="$gl_libobjs $i.$ac_objext"
16058 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16059 done
16060 fi
16061 gl_LIBOBJS=$gl_libobjs
16062
16063 gl_LTLIBOBJS=$gl_ltlibobjs
16064
16065
16066
16067 gltests_libobjs=
16068 gltests_ltlibobjs=
16069 if test -n "$gltests_LIBOBJS"; then
16070 # Remove the extension.
16071 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16072 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16073 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16074 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16075 done
16076 fi
16077 gltests_LIBOBJS=$gltests_libobjs
16078
16079 gltests_LTLIBOBJS=$gltests_ltlibobjs
16080
16081
e28b3332 16082if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16083 as_fn_error "conditional \"AMDEP\" was never defined.
16084Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16085fi
16086if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16087 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16088Usually this means the macro was only invoked conditionally." "$LINENO" 5
16089fi
16090 if test -n "$EXEEXT"; then
16091 am__EXEEXT_TRUE=
16092 am__EXEEXT_FALSE='#'
16093else
16094 am__EXEEXT_TRUE='#'
16095 am__EXEEXT_FALSE=
e28b3332 16096fi
bec39cab 16097
81ecdfbb
RW
16098
16099
bec39cab 16100: ${CONFIG_STATUS=./config.status}
81ecdfbb 16101ac_write_fail=0
bec39cab
AC
16102ac_clean_files_save=$ac_clean_files
16103ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16104{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16105$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16106as_write_fail=0
16107cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16108#! $SHELL
16109# Generated by $as_me.
16110# Run this file to recreate the current configuration.
16111# Compiler output produced by configure, useful for debugging
16112# configure, is in config.log if it exists.
16113
16114debug=false
16115ac_cs_recheck=false
16116ac_cs_silent=false
bec39cab 16117
81ecdfbb
RW
16118SHELL=\${CONFIG_SHELL-$SHELL}
16119export SHELL
16120_ASEOF
16121cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16122## -------------------- ##
16123## M4sh Initialization. ##
16124## -------------------- ##
16125
16126# Be more Bourne compatible
16127DUALCASE=1; export DUALCASE # for MKS sh
16128if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16129 emulate sh
16130 NULLCMD=:
81ecdfbb 16131 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16132 # is contrary to our usage. Disable this feature.
16133 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16134 setopt NO_GLOB_SUBST
16135else
16136 case `(set -o) 2>/dev/null` in #(
16137 *posix*) :
16138 set -o posix ;; #(
16139 *) :
16140 ;;
16141esac
bec39cab 16142fi
bec39cab 16143
81ecdfbb
RW
16144
16145as_nl='
16146'
16147export as_nl
16148# Printing a long string crashes Solaris 7 /usr/bin/printf.
16149as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16150as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16151as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16152# Prefer a ksh shell builtin over an external printf program on Solaris,
16153# but without wasting forks for bash or zsh.
16154if test -z "$BASH_VERSION$ZSH_VERSION" \
16155 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16156 as_echo='print -r --'
16157 as_echo_n='print -rn --'
16158elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16159 as_echo='printf %s\n'
16160 as_echo_n='printf %s'
16161else
16162 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16163 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16164 as_echo_n='/usr/ucb/echo -n'
16165 else
16166 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16167 as_echo_n_body='eval
16168 arg=$1;
16169 case $arg in #(
16170 *"$as_nl"*)
16171 expr "X$arg" : "X\\(.*\\)$as_nl";
16172 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16173 esac;
16174 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16175 '
16176 export as_echo_n_body
16177 as_echo_n='sh -c $as_echo_n_body as_echo'
16178 fi
16179 export as_echo_body
16180 as_echo='sh -c $as_echo_body as_echo'
16181fi
16182
16183# The user is always right.
16184if test "${PATH_SEPARATOR+set}" != set; then
16185 PATH_SEPARATOR=:
16186 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16187 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16188 PATH_SEPARATOR=';'
16189 }
bec39cab
AC
16190fi
16191
16192
81ecdfbb
RW
16193# IFS
16194# We need space, tab and new line, in precisely that order. Quoting is
16195# there to prevent editors from complaining about space-tab.
16196# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16197# splitting by setting IFS to empty value.)
16198IFS=" "" $as_nl"
16199
16200# Find who we are. Look in the path if we contain no directory separator.
16201case $0 in #((
16202 *[\\/]* ) as_myself=$0 ;;
16203 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16204for as_dir in $PATH
16205do
16206 IFS=$as_save_IFS
16207 test -z "$as_dir" && as_dir=.
16208 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16209 done
16210IFS=$as_save_IFS
16211
16212 ;;
16213esac
16214# We did not find ourselves, most probably we were run as `sh COMMAND'
16215# in which case we are not to be found in the path.
16216if test "x$as_myself" = x; then
16217 as_myself=$0
16218fi
16219if test ! -f "$as_myself"; then
16220 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16221 exit 1
16222fi
16223
16224# Unset variables that we do not need and which cause bugs (e.g. in
16225# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16226# suppresses any "Segmentation fault" message there. '((' could
16227# trigger a bug in pdksh 5.2.14.
16228for as_var in BASH_ENV ENV MAIL MAILPATH
16229do eval test x\${$as_var+set} = xset \
16230 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16231done
bec39cab
AC
16232PS1='$ '
16233PS2='> '
16234PS4='+ '
16235
16236# NLS nuisances.
81ecdfbb
RW
16237LC_ALL=C
16238export LC_ALL
16239LANGUAGE=C
16240export LANGUAGE
16241
16242# CDPATH.
16243(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16244
16245
16246# as_fn_error ERROR [LINENO LOG_FD]
16247# ---------------------------------
16248# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16249# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16250# script with status $?, using 1 if that was 0.
16251as_fn_error ()
16252{
16253 as_status=$?; test $as_status -eq 0 && as_status=1
16254 if test "$3"; then
16255 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16256 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16257 fi
16258 $as_echo "$as_me: error: $1" >&2
16259 as_fn_exit $as_status
16260} # as_fn_error
16261
16262
16263# as_fn_set_status STATUS
16264# -----------------------
16265# Set $? to STATUS, without forking.
16266as_fn_set_status ()
16267{
16268 return $1
16269} # as_fn_set_status
16270
16271# as_fn_exit STATUS
16272# -----------------
16273# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16274as_fn_exit ()
16275{
16276 set +e
16277 as_fn_set_status $1
16278 exit $1
16279} # as_fn_exit
16280
16281# as_fn_unset VAR
16282# ---------------
16283# Portably unset VAR.
16284as_fn_unset ()
16285{
16286 { eval $1=; unset $1;}
16287}
16288as_unset=as_fn_unset
16289# as_fn_append VAR VALUE
16290# ----------------------
16291# Append the text in VALUE to the end of the definition contained in VAR. Take
16292# advantage of any shell optimizations that allow amortized linear growth over
16293# repeated appends, instead of the typical quadratic growth present in naive
16294# implementations.
16295if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16296 eval 'as_fn_append ()
16297 {
16298 eval $1+=\$2
16299 }'
16300else
16301 as_fn_append ()
16302 {
16303 eval $1=\$$1\$2
16304 }
16305fi # as_fn_append
16306
16307# as_fn_arith ARG...
16308# ------------------
16309# Perform arithmetic evaluation on the ARGs, and store the result in the
16310# global $as_val. Take advantage of shells that can avoid forks. The arguments
16311# must be portable across $(()) and expr.
16312if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16313 eval 'as_fn_arith ()
16314 {
16315 as_val=$(( $* ))
16316 }'
16317else
16318 as_fn_arith ()
16319 {
16320 as_val=`expr "$@" || test $? -eq 1`
16321 }
16322fi # as_fn_arith
bec39cab 16323
81ecdfbb
RW
16324
16325if expr a : '\(a\)' >/dev/null 2>&1 &&
16326 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16327 as_expr=expr
16328else
16329 as_expr=false
16330fi
16331
81ecdfbb 16332if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16333 as_basename=basename
16334else
16335 as_basename=false
16336fi
16337
81ecdfbb
RW
16338if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16339 as_dirname=dirname
16340else
16341 as_dirname=false
16342fi
bec39cab 16343
81ecdfbb 16344as_me=`$as_basename -- "$0" ||
bec39cab
AC
16345$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16346 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16347 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16348$as_echo X/"$0" |
16349 sed '/^.*\/\([^/][^/]*\)\/*$/{
16350 s//\1/
16351 q
16352 }
16353 /^X\/\(\/\/\)$/{
16354 s//\1/
16355 q
16356 }
16357 /^X\/\(\/\).*/{
16358 s//\1/
16359 q
16360 }
16361 s/.*/./; q'`
b4e70030 16362
b4e70030
JB
16363# Avoid depending upon Character Ranges.
16364as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16365as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16366as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16367as_cr_digits='0123456789'
16368as_cr_alnum=$as_cr_Letters$as_cr_digits
16369
81ecdfbb
RW
16370ECHO_C= ECHO_N= ECHO_T=
16371case `echo -n x` in #(((((
16372-n*)
16373 case `echo 'xy\c'` in
16374 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16375 xy) ECHO_C='\c';;
16376 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16377 ECHO_T=' ';;
16378 esac;;
16379*)
16380 ECHO_N='-n';;
bec39cab
AC
16381esac
16382
81ecdfbb
RW
16383rm -f conf$$ conf$$.exe conf$$.file
16384if test -d conf$$.dir; then
16385 rm -f conf$$.dir/conf$$.file
bec39cab 16386else
81ecdfbb
RW
16387 rm -f conf$$.dir
16388 mkdir conf$$.dir 2>/dev/null
bec39cab 16389fi
81ecdfbb
RW
16390if (echo >conf$$.file) 2>/dev/null; then
16391 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16392 as_ln_s='ln -s'
81ecdfbb
RW
16393 # ... but there are two gotchas:
16394 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16395 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16396 # In both cases, we have to default to `cp -p'.
16397 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16398 as_ln_s='cp -p'
16399 elif ln conf$$.file conf$$ 2>/dev/null; then
16400 as_ln_s=ln
16401 else
16402 as_ln_s='cp -p'
b4e70030 16403 fi
bec39cab
AC
16404else
16405 as_ln_s='cp -p'
16406fi
81ecdfbb
RW
16407rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16408rmdir conf$$.dir 2>/dev/null
16409
16410
16411# as_fn_mkdir_p
16412# -------------
16413# Create "$as_dir" as a directory, including parents if necessary.
16414as_fn_mkdir_p ()
16415{
16416
16417 case $as_dir in #(
16418 -*) as_dir=./$as_dir;;
16419 esac
16420 test -d "$as_dir" || eval $as_mkdir_p || {
16421 as_dirs=
16422 while :; do
16423 case $as_dir in #(
16424 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16425 *) as_qdir=$as_dir;;
16426 esac
16427 as_dirs="'$as_qdir' $as_dirs"
16428 as_dir=`$as_dirname -- "$as_dir" ||
16429$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16430 X"$as_dir" : 'X\(//\)[^/]' \| \
16431 X"$as_dir" : 'X\(//\)$' \| \
16432 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16433$as_echo X"$as_dir" |
16434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16435 s//\1/
16436 q
16437 }
16438 /^X\(\/\/\)[^/].*/{
16439 s//\1/
16440 q
16441 }
16442 /^X\(\/\/\)$/{
16443 s//\1/
16444 q
16445 }
16446 /^X\(\/\).*/{
16447 s//\1/
16448 q
16449 }
16450 s/.*/./; q'`
16451 test -d "$as_dir" && break
16452 done
16453 test -z "$as_dirs" || eval "mkdir $as_dirs"
16454 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16455
bec39cab 16456
81ecdfbb 16457} # as_fn_mkdir_p
bec39cab 16458if mkdir -p . 2>/dev/null; then
81ecdfbb 16459 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16460else
16461 test -d ./-p && rmdir ./-p
16462 as_mkdir_p=false
16463fi
16464
81ecdfbb
RW
16465if test -x / >/dev/null 2>&1; then
16466 as_test_x='test -x'
16467else
16468 if ls -dL / >/dev/null 2>&1; then
16469 as_ls_L_option=L
16470 else
16471 as_ls_L_option=
16472 fi
16473 as_test_x='
16474 eval sh -c '\''
16475 if test -d "$1"; then
16476 test -d "$1/.";
16477 else
16478 case $1 in #(
16479 -*)set "./$1";;
16480 esac;
16481 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16482 ???[sx]*):;;*)false;;esac;fi
16483 '\'' sh
16484 '
16485fi
16486as_executable_p=$as_test_x
bec39cab
AC
16487
16488# Sed expression to map a string onto a valid CPP name.
16489as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16490
16491# Sed expression to map a string onto a valid variable name.
16492as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16493
16494
bec39cab 16495exec 6>&1
81ecdfbb
RW
16496## ----------------------------------- ##
16497## Main body of $CONFIG_STATUS script. ##
16498## ----------------------------------- ##
16499_ASEOF
16500test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16501
16502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16503# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16504# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16505# values after options handling.
16506ac_log="
bec39cab 16507This file was extended by $as_me, which was
81ecdfbb 16508generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16509
16510 CONFIG_FILES = $CONFIG_FILES
16511 CONFIG_HEADERS = $CONFIG_HEADERS
16512 CONFIG_LINKS = $CONFIG_LINKS
16513 CONFIG_COMMANDS = $CONFIG_COMMANDS
16514 $ $0 $@
16515
81ecdfbb
RW
16516on `(hostname || uname -n) 2>/dev/null | sed 1q`
16517"
16518
bec39cab
AC
16519_ACEOF
16520
81ecdfbb
RW
16521case $ac_config_files in *"
16522"*) set x $ac_config_files; shift; ac_config_files=$*;;
16523esac
234b45d4 16524
81ecdfbb
RW
16525case $ac_config_headers in *"
16526"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16527esac
b4e70030 16528
b4e70030 16529
81ecdfbb
RW
16530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16531# Files that config.status was made for.
16532config_files="$ac_config_files"
16533config_headers="$ac_config_headers"
16534config_links="$ac_config_links"
16535config_commands="$ac_config_commands"
234b45d4 16536
81ecdfbb 16537_ACEOF
b4e70030 16538
81ecdfbb 16539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16540ac_cs_usage="\
81ecdfbb
RW
16541\`$as_me' instantiates files and other configuration actions
16542from templates according to the current configuration. Unless the files
16543and actions are specified as TAGs, all are instantiated by default.
234b45d4 16544
81ecdfbb 16545Usage: $0 [OPTION]... [TAG]...
234b45d4 16546
bec39cab 16547 -h, --help print this help, then exit
81ecdfbb
RW
16548 -V, --version print version number and configuration settings, then exit
16549 -q, --quiet, --silent
16550 do not print progress messages
bec39cab
AC
16551 -d, --debug don't remove temporary files
16552 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16553 --file=FILE[:TEMPLATE]
16554 instantiate the configuration file FILE
16555 --header=FILE[:TEMPLATE]
16556 instantiate the configuration header FILE
234b45d4 16557
bec39cab
AC
16558Configuration files:
16559$config_files
234b45d4 16560
bec39cab
AC
16561Configuration headers:
16562$config_headers
234b45d4 16563
bec39cab
AC
16564Configuration links:
16565$config_links
234b45d4 16566
bec39cab
AC
16567Configuration commands:
16568$config_commands
16569
81ecdfbb 16570Report bugs to the package provider."
b4e70030 16571
81ecdfbb
RW
16572_ACEOF
16573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16574ac_cs_version="\\
16575config.status
81ecdfbb
RW
16576configured by $0, generated by GNU Autoconf 2.64,
16577 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16578
81ecdfbb 16579Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16580This config.status script is free software; the Free Software Foundation
16581gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16582
16583ac_pwd='$ac_pwd'
16584srcdir='$srcdir'
16585INSTALL='$INSTALL'
16586MKDIR_P='$MKDIR_P'
16587AWK='$AWK'
16588test -n "\$AWK" || AWK=awk
bec39cab
AC
16589_ACEOF
16590
81ecdfbb
RW
16591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16592# The default lists apply if the user does not specify any file.
bec39cab
AC
16593ac_need_defaults=:
16594while test $# != 0
16595do
16596 case $1 in
16597 --*=*)
81ecdfbb
RW
16598 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16599 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16600 ac_shift=:
c906108c 16601 ;;
81ecdfbb 16602 *)
bec39cab
AC
16603 ac_option=$1
16604 ac_optarg=$2
16605 ac_shift=shift
c906108c 16606 ;;
bec39cab 16607 esac
c906108c 16608
bec39cab
AC
16609 case $ac_option in
16610 # Handling of the options.
bec39cab
AC
16611 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16612 ac_cs_recheck=: ;;
81ecdfbb
RW
16613 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16614 $as_echo "$ac_cs_version"; exit ;;
16615 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16616 debug=: ;;
16617 --file | --fil | --fi | --f )
16618 $ac_shift
81ecdfbb
RW
16619 case $ac_optarg in
16620 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16621 esac
16622 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16623 ac_need_defaults=false;;
16624 --header | --heade | --head | --hea )
16625 $ac_shift
81ecdfbb
RW
16626 case $ac_optarg in
16627 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16628 esac
16629 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16630 ac_need_defaults=false;;
81ecdfbb
RW
16631 --he | --h)
16632 # Conflict between --help and --header
16633 as_fn_error "ambiguous option: \`$1'
16634Try \`$0 --help' for more information.";;
16635 --help | --hel | -h )
16636 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16637 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16638 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16639 ac_cs_silent=: ;;
c906108c 16640
bec39cab 16641 # This is an error.
81ecdfbb
RW
16642 -*) as_fn_error "unrecognized option: \`$1'
16643Try \`$0 --help' for more information." ;;
c906108c 16644
81ecdfbb
RW
16645 *) as_fn_append ac_config_targets " $1"
16646 ac_need_defaults=false ;;
c906108c 16647
bec39cab
AC
16648 esac
16649 shift
16650done
c906108c 16651
bec39cab 16652ac_configure_extra_args=
c906108c 16653
bec39cab
AC
16654if $ac_cs_silent; then
16655 exec 6>/dev/null
16656 ac_configure_extra_args="$ac_configure_extra_args --silent"
16657fi
c906108c 16658
bec39cab 16659_ACEOF
81ecdfbb 16660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16661if \$ac_cs_recheck; then
81ecdfbb
RW
16662 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16663 shift
16664 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16665 CONFIG_SHELL='$SHELL'
16666 export CONFIG_SHELL
16667 exec "\$@"
bec39cab
AC
16668fi
16669
16670_ACEOF
81ecdfbb
RW
16671cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16672exec 5>>config.log
16673{
16674 echo
16675 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16676## Running $as_me. ##
16677_ASBOX
16678 $as_echo "$ac_log"
16679} >&5
bec39cab 16680
81ecdfbb
RW
16681_ACEOF
16682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16683#
81ecdfbb 16684# INIT-COMMANDS
c906108c 16685#
a417dc56 16686ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16687AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16688
bec39cab
AC
16689_ACEOF
16690
81ecdfbb 16691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16692
81ecdfbb 16693# Handling of arguments.
bec39cab 16694for ac_config_target in $ac_config_targets
c906108c 16695do
81ecdfbb
RW
16696 case $ac_config_target in
16697 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16698 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16699 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16700 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16701 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16702 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16703 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16704 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16705 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16706 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16707
16708 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16709 esac
16710done
16711
81ecdfbb 16712
bec39cab
AC
16713# If the user did not use the arguments to specify the items to instantiate,
16714# then the envvar interface is used. Set only those that are not.
16715# We use the long form for the default assignment because of an extremely
16716# bizarre bug on SunOS 4.1.3.
16717if $ac_need_defaults; then
16718 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16719 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16720 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16721 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16722fi
16723
b4e70030 16724# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16725# simply because there is no reason against having it here, and in addition,
b4e70030 16726# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16727# Hook for its removal unless debugging.
16728# Note that there is a small window in which the directory will not be cleaned:
16729# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16730$debug ||
16731{
81ecdfbb
RW
16732 tmp=
16733 trap 'exit_status=$?
16734 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16735' 0
16736 trap 'as_fn_exit 1' 1 2 13 15
16737}
16738# Create a (secure) tmp directory for tmp files.
16739
16740{
16741 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16742 test -n "$tmp" && test -d "$tmp"
16743} ||
16744{
16745 tmp=./conf$$-$RANDOM
16746 (umask 077 && mkdir "$tmp")
16747} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16748
16749# Set up the scripts for CONFIG_FILES section.
16750# No need to generate them if there are no CONFIG_FILES.
16751# This happens for instance with `./config.status config.h'.
16752if test -n "$CONFIG_FILES"; then
16753
16754if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16755 ac_cs_awk_getline=:
16756 ac_cs_awk_pipe_init=
16757 ac_cs_awk_read_file='
16758 while ((getline aline < (F[key])) > 0)
16759 print(aline)
16760 close(F[key])'
16761 ac_cs_awk_pipe_fini=
16762else
16763 ac_cs_awk_getline=false
16764 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16765 ac_cs_awk_read_file='
16766 print "|#_!!_#|"
16767 print "cat " F[key] " &&"
16768 '$ac_cs_awk_pipe_init
16769 # The final `:' finishes the AND list.
16770 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16771fi
16772ac_cr=`echo X | tr X '\015'`
16773# On cygwin, bash can eat \r inside `` if the user requested igncr.
16774# But we know of no other shell where ac_cr would be empty at this
16775# point, so we can use a bashism as a fallback.
16776if test "x$ac_cr" = x; then
16777 eval ac_cr=\$\'\\r\'
16778fi
16779ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16780if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16781 ac_cs_awk_cr='\r'
16782else
16783 ac_cs_awk_cr=$ac_cr
16784fi
16785
16786echo 'BEGIN {' >"$tmp/subs1.awk" &&
16787_ACEOF
16788
16789# Create commands to substitute file output variables.
16790{
16791 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16792 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16793 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16794 echo "_ACAWK" &&
16795 echo "_ACEOF"
16796} >conf$$files.sh &&
16797. ./conf$$files.sh ||
16798 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16799rm -f conf$$files.sh
16800
16801{
16802 echo "cat >conf$$subs.awk <<_ACEOF" &&
16803 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16804 echo "_ACEOF"
16805} >conf$$subs.sh ||
16806 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16807ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16808ac_delim='%!_!# '
16809for ac_last_try in false false false false false :; do
16810 . ./conf$$subs.sh ||
16811 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16812
16813 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16814 if test $ac_delim_n = $ac_delim_num; then
16815 break
16816 elif $ac_last_try; then
16817 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16818 else
16819 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16820 fi
16821done
16822rm -f conf$$subs.sh
16823
16824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16825cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16826_ACEOF
16827sed -n '
16828h
16829s/^/S["/; s/!.*/"]=/
16830p
16831g
16832s/^[^!]*!//
16833:repl
16834t repl
16835s/'"$ac_delim"'$//
16836t delim
16837:nl
16838h
16839s/\(.\{148\}\).*/\1/
16840t more1
16841s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16842p
16843n
16844b repl
16845:more1
16846s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16847p
16848g
16849s/.\{148\}//
16850t nl
16851:delim
16852h
16853s/\(.\{148\}\).*/\1/
16854t more2
16855s/["\\]/\\&/g; s/^/"/; s/$/"/
16856p
16857b
16858:more2
16859s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16860p
16861g
16862s/.\{148\}//
16863t delim
16864' <conf$$subs.awk | sed '
16865/^[^""]/{
16866 N
16867 s/\n//
16868}
16869' >>$CONFIG_STATUS || ac_write_fail=1
16870rm -f conf$$subs.awk
16871cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16872_ACAWK
16873cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16874 for (key in S) S_is_set[key] = 1
16875 FS = "\a"
16876 \$ac_cs_awk_pipe_init
16877}
16878{
16879 line = $ 0
16880 nfields = split(line, field, "@")
16881 substed = 0
16882 len = length(field[1])
16883 for (i = 2; i < nfields; i++) {
16884 key = field[i]
16885 keylen = length(key)
16886 if (S_is_set[key]) {
16887 value = S[key]
16888 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16889 len += length(value) + length(field[++i])
16890 substed = 1
16891 } else
16892 len += 1 + keylen
16893 }
16894 if (nfields == 3 && !substed) {
16895 key = field[2]
16896 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16897 \$ac_cs_awk_read_file
16898 next
16899 }
16900 }
16901 print line
b4e70030 16902}
81ecdfbb
RW
16903\$ac_cs_awk_pipe_fini
16904_ACAWK
16905_ACEOF
16906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16907if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16908 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16909else
16910 cat
16911fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16912 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16913_ACEOF
16914
16915# VPATH may cause trouble with some makes, so we remove $(srcdir),
16916# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16917# trailing colons and then remove the whole line if VPATH becomes empty
16918# (actually we leave an empty line to preserve line numbers).
16919if test "x$srcdir" = x.; then
16920 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16921s/:*\$(srcdir):*/:/
16922s/:*\${srcdir}:*/:/
16923s/:*@srcdir@:*/:/
16924s/^\([^=]*=[ ]*\):*/\1/
16925s/:*$//
16926s/^[^=]*=[ ]*$//
16927}'
16928fi
16929
16930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16931fi # test -n "$CONFIG_FILES"
16932
16933# Set up the scripts for CONFIG_HEADERS section.
16934# No need to generate them if there are no CONFIG_HEADERS.
16935# This happens for instance with `./config.status Makefile'.
16936if test -n "$CONFIG_HEADERS"; then
16937cat >"$tmp/defines.awk" <<\_ACAWK ||
16938BEGIN {
16939_ACEOF
16940
16941# Transform confdefs.h into an awk script `defines.awk', embedded as
16942# here-document in config.status, that substitutes the proper values into
16943# config.h.in to produce config.h.
4e8d927d 16944
81ecdfbb
RW
16945# Create a delimiter string that does not exist in confdefs.h, to ease
16946# handling of long lines.
16947ac_delim='%!_!# '
16948for ac_last_try in false false :; do
16949 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16950 if test -z "$ac_t"; then
16951 break
16952 elif $ac_last_try; then
16953 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16954 else
16955 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16956 fi
16957done
4e8d927d 16958
81ecdfbb
RW
16959# For the awk script, D is an array of macro values keyed by name,
16960# likewise P contains macro parameters if any. Preserve backslash
16961# newline sequences.
16962
16963ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16964sed -n '
16965s/.\{148\}/&'"$ac_delim"'/g
16966t rset
16967:rset
16968s/^[ ]*#[ ]*define[ ][ ]*/ /
16969t def
16970d
16971:def
16972s/\\$//
16973t bsnl
16974s/["\\]/\\&/g
16975s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16976D["\1"]=" \3"/p
16977s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16978d
16979:bsnl
16980s/["\\]/\\&/g
16981s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16982D["\1"]=" \3\\\\\\n"\\/p
16983t cont
16984s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16985t cont
16986d
16987:cont
16988n
16989s/.\{148\}/&'"$ac_delim"'/g
16990t clear
16991:clear
16992s/\\$//
16993t bsnlc
16994s/["\\]/\\&/g; s/^/"/; s/$/"/p
16995d
16996:bsnlc
16997s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16998b cont
16999' <confdefs.h | sed '
17000s/'"$ac_delim"'/"\\\
17001"/g' >>$CONFIG_STATUS || ac_write_fail=1
17002
17003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17004 for (key in D) D_is_set[key] = 1
17005 FS = "\a"
17006}
17007/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17008 line = \$ 0
17009 split(line, arg, " ")
17010 if (arg[1] == "#") {
17011 defundef = arg[2]
17012 mac1 = arg[3]
17013 } else {
17014 defundef = substr(arg[1], 2)
17015 mac1 = arg[2]
17016 }
17017 split(mac1, mac2, "(") #)
17018 macro = mac2[1]
17019 prefix = substr(line, 1, index(line, defundef) - 1)
17020 if (D_is_set[macro]) {
17021 # Preserve the white space surrounding the "#".
17022 print prefix "define", macro P[macro] D[macro]
17023 next
17024 } else {
17025 # Replace #undef with comments. This is necessary, for example,
17026 # in the case of _POSIX_SOURCE, which is predefined and required
17027 # on some systems where configure will not decide to define it.
17028 if (defundef == "undef") {
17029 print "/*", prefix defundef, macro, "*/"
17030 next
17031 }
17032 }
b4e70030 17033}
81ecdfbb
RW
17034{ print }
17035_ACAWK
b4e70030 17036_ACEOF
81ecdfbb
RW
17037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17038 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17039fi # test -n "$CONFIG_HEADERS"
4e8d927d 17040
4e8d927d 17041
81ecdfbb
RW
17042eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17043shift
17044for ac_tag
17045do
17046 case $ac_tag in
17047 :[FHLC]) ac_mode=$ac_tag; continue;;
17048 esac
17049 case $ac_mode$ac_tag in
17050 :[FHL]*:*);;
17051 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17052 :[FH]-) ac_tag=-:-;;
17053 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17054 esac
17055 ac_save_IFS=$IFS
17056 IFS=:
17057 set x $ac_tag
17058 IFS=$ac_save_IFS
17059 shift
17060 ac_file=$1
17061 shift
4e8d927d 17062
81ecdfbb
RW
17063 case $ac_mode in
17064 :L) ac_source=$1;;
17065 :[FH])
17066 ac_file_inputs=
17067 for ac_f
17068 do
17069 case $ac_f in
17070 -) ac_f="$tmp/stdin";;
17071 *) # Look for the file first in the build tree, then in the source tree
17072 # (if the path is not absolute). The absolute path cannot be DOS-style,
17073 # because $ac_f cannot contain `:'.
17074 test -f "$ac_f" ||
17075 case $ac_f in
17076 [\\/$]*) false;;
17077 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17078 esac ||
17079 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17080 esac
17081 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17082 as_fn_append ac_file_inputs " '$ac_f'"
17083 done
17084
17085 # Let's still pretend it is `configure' which instantiates (i.e., don't
17086 # use $as_me), people would be surprised to read:
17087 # /* config.h. Generated by config.status. */
17088 configure_input='Generated from '`
17089 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17090 `' by configure.'
17091 if test x"$ac_file" != x-; then
17092 configure_input="$ac_file. $configure_input"
17093 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17094$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17095 fi
81ecdfbb
RW
17096 # Neutralize special characters interpreted by sed in replacement strings.
17097 case $configure_input in #(
17098 *\&* | *\|* | *\\* )
17099 ac_sed_conf_input=`$as_echo "$configure_input" |
17100 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17101 *) ac_sed_conf_input=$configure_input;;
17102 esac
4e8d927d 17103
81ecdfbb
RW
17104 case $ac_tag in
17105 *:-:* | *:-) cat >"$tmp/stdin" \
17106 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17107 esac
17108 ;;
c906108c
SS
17109 esac
17110
81ecdfbb 17111 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17112$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17113 X"$ac_file" : 'X\(//\)[^/]' \| \
17114 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17115 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17116$as_echo X"$ac_file" |
17117 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17118 s//\1/
17119 q
17120 }
17121 /^X\(\/\/\)[^/].*/{
17122 s//\1/
17123 q
17124 }
17125 /^X\(\/\/\)$/{
17126 s//\1/
17127 q
17128 }
17129 /^X\(\/\).*/{
17130 s//\1/
17131 q
17132 }
17133 s/.*/./; q'`
17134 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17135 ac_builddir=.
17136
81ecdfbb
RW
17137case "$ac_dir" in
17138.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17139*)
17140 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17141 # A ".." for each directory in $ac_dir_suffix.
17142 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17143 case $ac_top_builddir_sub in
17144 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17145 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17146 esac ;;
17147esac
17148ac_abs_top_builddir=$ac_pwd
17149ac_abs_builddir=$ac_pwd$ac_dir_suffix
17150# for backward compatibility:
17151ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17152
17153case $srcdir in
81ecdfbb 17154 .) # We are building in place.
bec39cab 17155 ac_srcdir=.
81ecdfbb
RW
17156 ac_top_srcdir=$ac_top_builddir_sub
17157 ac_abs_top_srcdir=$ac_pwd ;;
17158 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17159 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17160 ac_top_srcdir=$srcdir
17161 ac_abs_top_srcdir=$srcdir ;;
17162 *) # Relative name.
17163 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17164 ac_top_srcdir=$ac_top_build_prefix$srcdir
17165 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17166esac
81ecdfbb 17167ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17168
c906108c 17169
81ecdfbb
RW
17170 case $ac_mode in
17171 :F)
17172 #
17173 # CONFIG_FILE
17174 #
c906108c 17175
bec39cab
AC
17176 case $INSTALL in
17177 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17178 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17179 esac
81ecdfbb
RW
17180 ac_MKDIR_P=$MKDIR_P
17181 case $MKDIR_P in
17182 [\\/$]* | ?:[\\/]* ) ;;
17183 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17184 esac
17185_ACEOF
121ce6e5 17186
81ecdfbb
RW
17187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17188# If the template does not know about datarootdir, expand it.
17189# FIXME: This hack should be removed a few years after 2.60.
17190ac_datarootdir_hack=; ac_datarootdir_seen=
17191ac_sed_dataroot='
17192/datarootdir/ {
17193 p
17194 q
17195}
17196/@datadir@/p
17197/@docdir@/p
17198/@infodir@/p
17199/@localedir@/p
17200/@mandir@/p'
17201case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17202*datarootdir*) ac_datarootdir_seen=yes;;
17203*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17205$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17206_ACEOF
17207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17208 ac_datarootdir_hack='
17209 s&@datadir@&$datadir&g
17210 s&@docdir@&$docdir&g
17211 s&@infodir@&$infodir&g
17212 s&@localedir@&$localedir&g
17213 s&@mandir@&$mandir&g
17214 s&\\\${datarootdir}&$datarootdir&g' ;;
17215esac
4e8d927d 17216_ACEOF
81ecdfbb
RW
17217
17218# Neutralize VPATH when `$srcdir' = `.'.
17219# Shell code in configure.ac might set extrasub.
17220# FIXME: do we really want to maintain this feature?
17221cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17222ac_sed_extra="$ac_vpsub
bec39cab
AC
17223$extrasub
17224_ACEOF
81ecdfbb 17225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17226:t
17227/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17228s|@configure_input@|$ac_sed_conf_input|;t t
17229s&@top_builddir@&$ac_top_builddir_sub&;t t
17230s&@top_build_prefix@&$ac_top_build_prefix&;t t
17231s&@srcdir@&$ac_srcdir&;t t
17232s&@abs_srcdir@&$ac_abs_srcdir&;t t
17233s&@top_srcdir@&$ac_top_srcdir&;t t
17234s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17235s&@builddir@&$ac_builddir&;t t
17236s&@abs_builddir@&$ac_abs_builddir&;t t
17237s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17238s&@INSTALL@&$ac_INSTALL&;t t
17239s&@MKDIR_P@&$ac_MKDIR_P&;t t
17240$ac_datarootdir_hack
17241"
17242eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17243if $ac_cs_awk_getline; then
17244 $AWK -f "$tmp/subs.awk"
17245else
17246 $AWK -f "$tmp/subs.awk" | $SHELL
17247fi >$tmp/out \
17248 || as_fn_error "could not create $ac_file" "$LINENO" 5
17249
17250test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17251 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17252 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17254which seems to be undefined. Please make sure it is defined." >&5
17255$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17256which seems to be undefined. Please make sure it is defined." >&2;}
17257
17258 rm -f "$tmp/stdin"
bec39cab 17259 case $ac_file in
81ecdfbb
RW
17260 -) cat "$tmp/out" && rm -f "$tmp/out";;
17261 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17262 esac \
17263 || as_fn_error "could not create $ac_file" "$LINENO" 5
17264 ;;
17265 :H)
17266 #
17267 # CONFIG_HEADER
17268 #
bec39cab 17269 if test x"$ac_file" != x-; then
81ecdfbb
RW
17270 {
17271 $as_echo "/* $configure_input */" \
17272 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17273 } >"$tmp/config.h" \
17274 || as_fn_error "could not create $ac_file" "$LINENO" 5
17275 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17277$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17278 else
81ecdfbb
RW
17279 rm -f "$ac_file"
17280 mv "$tmp/config.h" "$ac_file" \
17281 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17282 fi
17283 else
81ecdfbb
RW
17284 $as_echo "/* $configure_input */" \
17285 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17286 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17287 fi
81ecdfbb
RW
17288# Compute "$ac_file"'s index in $config_headers.
17289_am_arg="$ac_file"
e28b3332
DJ
17290_am_stamp_count=1
17291for _am_header in $config_headers :; do
17292 case $_am_header in
81ecdfbb 17293 $_am_arg | $_am_arg:* )
e28b3332
DJ
17294 break ;;
17295 * )
17296 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17297 esac
17298done
81ecdfbb
RW
17299echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17300$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17301 X"$_am_arg" : 'X\(//\)[^/]' \| \
17302 X"$_am_arg" : 'X\(//\)$' \| \
17303 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17304$as_echo X"$_am_arg" |
17305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17306 s//\1/
17307 q
17308 }
17309 /^X\(\/\/\)[^/].*/{
17310 s//\1/
17311 q
17312 }
17313 /^X\(\/\/\)$/{
17314 s//\1/
17315 q
17316 }
17317 /^X\(\/\).*/{
17318 s//\1/
17319 q
17320 }
17321 s/.*/./; q'`/stamp-h$_am_stamp_count
17322 ;;
17323 :L)
17324 #
17325 # CONFIG_LINK
17326 #
c906108c 17327
81ecdfbb
RW
17328 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17329 :
b4e70030 17330 else
81ecdfbb
RW
17331 # Prefer the file from the source tree if names are identical.
17332 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17333 ac_source=$srcdir/$ac_source
17334 fi
b4e70030 17335
81ecdfbb
RW
17336 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17337$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17338
81ecdfbb
RW
17339 if test ! -r "$ac_source"; then
17340 as_fn_error "$ac_source: file not found" "$LINENO" 5
17341 fi
17342 rm -f "$ac_file"
bec39cab 17343
81ecdfbb
RW
17344 # Try a relative symlink, then a hard link, then a copy.
17345 case $srcdir in
17346 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17347 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17348 esac
17349 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17350 ln "$ac_source" "$ac_file" 2>/dev/null ||
17351 cp -p "$ac_source" "$ac_file" ||
17352 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17353 fi
17354 ;;
17355 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17356$as_echo "$as_me: executing $ac_file commands" >&6;}
17357 ;;
c906108c 17358 esac
b4e70030 17359
bec39cab 17360
81ecdfbb
RW
17361 case $ac_file$ac_mode in
17362 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17363 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17364 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17365 # are listed without --file. Let's play safe and only enable the eval
17366 # if we detect the quoting.
17367 case $CONFIG_FILES in
17368 *\'*) eval set x "$CONFIG_FILES" ;;
17369 *) set x $CONFIG_FILES ;;
17370 esac
17371 shift
17372 for mf
17373 do
17374 # Strip MF so we end up with the name of the file.
17375 mf=`echo "$mf" | sed -e 's/:.*$//'`
17376 # Check whether this is an Automake generated Makefile or not.
17377 # We used to match only the files named `Makefile.in', but
17378 # some people rename them; so instead we look at the file content.
17379 # Grep'ing the first line is not enough: some people post-process
17380 # each Makefile.in and add a new line on top of each file to say so.
17381 # Grep'ing the whole file is not good either: AIX grep has a line
17382 # limit of 2048, but all sed's we know have understand at least 4000.
17383 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17384 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17385$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17386 X"$mf" : 'X\(//\)[^/]' \| \
17387 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17388 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17389$as_echo X"$mf" |
17390 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17391 s//\1/
17392 q
17393 }
17394 /^X\(\/\/\)[^/].*/{
17395 s//\1/
17396 q
17397 }
17398 /^X\(\/\/\)$/{
17399 s//\1/
17400 q
17401 }
17402 /^X\(\/\).*/{
17403 s//\1/
17404 q
17405 }
17406 s/.*/./; q'`
17407 else
17408 continue
17409 fi
17410 # Extract the definition of DEPDIR, am__include, and am__quote
17411 # from the Makefile without running `make'.
17412 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17413 test -z "$DEPDIR" && continue
17414 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17415 test -z "am__include" && continue
17416 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17417 # When using ansi2knr, U may be empty or an underscore; expand it
17418 U=`sed -n 's/^U = //p' < "$mf"`
17419 # Find all dependency output files, they are included files with
17420 # $(DEPDIR) in their names. We invoke sed twice because it is the
17421 # simplest approach to changing $(DEPDIR) to its actual value in the
17422 # expansion.
17423 for file in `sed -n "
17424 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17425 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17426 # Make sure the directory exists.
17427 test -f "$dirpart/$file" && continue
17428 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17429$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17430 X"$file" : 'X\(//\)[^/]' \| \
17431 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17432 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17433$as_echo X"$file" |
17434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17435 s//\1/
17436 q
17437 }
17438 /^X\(\/\/\)[^/].*/{
17439 s//\1/
17440 q
17441 }
17442 /^X\(\/\/\)$/{
17443 s//\1/
17444 q
17445 }
17446 /^X\(\/\).*/{
17447 s//\1/
17448 q
17449 }
17450 s/.*/./; q'`
17451 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17452 # echo "creating $dirpart/$file"
17453 echo '# dummy' > "$dirpart/$file"
e28b3332 17454 done
e28b3332 17455 done
81ecdfbb 17456}
4e8d927d 17457 ;;
81ecdfbb 17458 "default":C)
c906108c
SS
17459case x$CONFIG_HEADERS in
17460xconfig.h:config.in)
17461echo > stamp-h ;;
17462esac
bec39cab 17463 ;;
81ecdfbb 17464
bec39cab 17465 esac
81ecdfbb 17466done # for ac_tag
c906108c 17467
bec39cab 17468
81ecdfbb 17469as_fn_exit 0
bec39cab 17470_ACEOF
bec39cab
AC
17471ac_clean_files=$ac_clean_files_save
17472
81ecdfbb
RW
17473test $ac_write_fail = 0 ||
17474 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17475
bec39cab
AC
17476
17477# configure is writing to config.log, and then calls config.status.
17478# config.status does its own redirection, appending to config.log.
17479# Unfortunately, on DOS this fails, as config.log is still kept open
17480# by configure, so config.status won't be able to write to it; its
17481# output is simply discarded. So we exec the FD to /dev/null,
17482# effectively closing config.log, so it can be properly (re)opened and
17483# appended to by config.status. When coming back to configure, we
17484# need to make the FD available again.
17485if test "$no_create" != yes; then
17486 ac_cs_success=:
17487 ac_config_status_args=
17488 test "$silent" = yes &&
17489 ac_config_status_args="$ac_config_status_args --quiet"
17490 exec 5>/dev/null
17491 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17492 exec 5>>config.log
17493 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17494 # would make configure fail if this is the last instruction.
81ecdfbb 17495 $ac_cs_success || as_fn_exit $?
bec39cab 17496fi
c906108c 17497
bec39cab 17498#
81ecdfbb 17499# CONFIG_SUBDIRS section.
bec39cab 17500#
c906108c
SS
17501if test "$no_recursion" != yes; then
17502
81ecdfbb
RW
17503 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17504 # so they do not pile up.
c906108c
SS
17505 ac_sub_configure_args=
17506 ac_prev=
fdc59709
PB
17507 eval "set x $ac_configure_args"
17508 shift
17509 for ac_arg
17510 do
c906108c
SS
17511 if test -n "$ac_prev"; then
17512 ac_prev=
17513 continue
17514 fi
bec39cab 17515 case $ac_arg in
c906108c
SS
17516 -cache-file | --cache-file | --cache-fil | --cache-fi \
17517 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17518 ac_prev=cache_file ;;
17519 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17520 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17521 | --c=*)
17522 ;;
17523 --config-cache | -C)
c906108c
SS
17524 ;;
17525 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17526 ac_prev=srcdir ;;
17527 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17528 ;;
bec39cab
AC
17529 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17530 ac_prev=prefix ;;
17531 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17532 ;;
81ecdfbb
RW
17533 --disable-option-checking)
17534 ;;
fdc59709
PB
17535 *)
17536 case $ac_arg in
81ecdfbb 17537 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17538 esac
81ecdfbb 17539 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17540 esac
17541 done
17542
bec39cab
AC
17543 # Always prepend --prefix to ensure using the same prefix
17544 # in subdir configurations.
fdc59709
PB
17545 ac_arg="--prefix=$prefix"
17546 case $ac_arg in
81ecdfbb 17547 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17548 esac
81ecdfbb
RW
17549 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17550
17551 # Pass --silent
17552 if test "$silent" = yes; then
17553 ac_sub_configure_args="--silent $ac_sub_configure_args"
17554 fi
17555
17556 # Always prepend --disable-option-checking to silence warnings, since
17557 # different subdirs can have different --enable and --with options.
17558 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17559
b4e70030 17560 ac_popdir=`pwd`
bec39cab 17561 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17562
17563 # Do not complain, so a configure script can configure whichever
17564 # parts of a large source tree are present.
fdc59709 17565 test -d "$srcdir/$ac_dir" || continue
c906108c 17566
81ecdfbb
RW
17567 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17568 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17569 $as_echo "$ac_msg" >&6
17570 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17571 ac_builddir=.
17572
81ecdfbb
RW
17573case "$ac_dir" in
17574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17575*)
17576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17577 # A ".." for each directory in $ac_dir_suffix.
17578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17579 case $ac_top_builddir_sub in
17580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17582 esac ;;
17583esac
17584ac_abs_top_builddir=$ac_pwd
17585ac_abs_builddir=$ac_pwd$ac_dir_suffix
17586# for backward compatibility:
17587ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17588
17589case $srcdir in
81ecdfbb 17590 .) # We are building in place.
bec39cab 17591 ac_srcdir=.
81ecdfbb
RW
17592 ac_top_srcdir=$ac_top_builddir_sub
17593 ac_abs_top_srcdir=$ac_pwd ;;
17594 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17595 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17596 ac_top_srcdir=$srcdir
17597 ac_abs_top_srcdir=$srcdir ;;
17598 *) # Relative name.
17599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17600 ac_top_srcdir=$ac_top_build_prefix$srcdir
17601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17602esac
81ecdfbb 17603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17604
c906108c 17605
fdc59709 17606 cd "$ac_dir"
c906108c
SS
17607
17608 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17609 if test -f "$ac_srcdir/configure.gnu"; then
17610 ac_sub_configure=$ac_srcdir/configure.gnu
17611 elif test -f "$ac_srcdir/configure"; then
17612 ac_sub_configure=$ac_srcdir/configure
17613 elif test -f "$ac_srcdir/configure.in"; then
17614 # This should be Cygnus configure.
17615 ac_sub_configure=$ac_aux_dir/configure
c906108c 17616 else
81ecdfbb
RW
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17618$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17619 ac_sub_configure=
17620 fi
17621
17622 # The recursion is here.
17623 if test -n "$ac_sub_configure"; then
c906108c 17624 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17625 case $cache_file in
17626 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17627 *) # Relative name.
17628 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17629 esac
c906108c 17630
81ecdfbb
RW
17631 { $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
17632$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17633 # The eval makes quoting arguments work.
fdc59709
PB
17634 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17635 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17636 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17637 fi
17638
fdc59709 17639 cd "$ac_popdir"
c906108c
SS
17640 done
17641fi
81ecdfbb
RW
17642if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17644$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17645fi
c906108c
SS
17646
17647
17648exit 0
This page took 2.181408 seconds and 4 git commands to generate.