2011-02-21 Hui Zhu <teawater@gmail.com>
[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
4f3e6fb7 996common
81ecdfbb
RW
997gdbtk
998multi-ice
999gdbserver'
c906108c
SS
1000
1001# Initialize some variables set by options.
bec39cab
AC
1002ac_init_help=
1003ac_init_version=false
81ecdfbb
RW
1004ac_unrecognized_opts=
1005ac_unrecognized_sep=
c906108c
SS
1006# The variables have the same names as the options, with
1007# dashes changed to underlines.
bec39cab 1008cache_file=/dev/null
c906108c 1009exec_prefix=NONE
c906108c 1010no_create=
c906108c
SS
1011no_recursion=
1012prefix=NONE
1013program_prefix=NONE
1014program_suffix=NONE
1015program_transform_name=s,x,x,
1016silent=
1017site=
1018srcdir=
c906108c
SS
1019verbose=
1020x_includes=NONE
1021x_libraries=NONE
bec39cab
AC
1022
1023# Installation directory options.
1024# These are left unexpanded so users can "make install exec_prefix=/foo"
1025# and all the variables that are supposed to be based on exec_prefix
1026# by default will actually change.
1027# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1028# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1029bindir='${exec_prefix}/bin'
1030sbindir='${exec_prefix}/sbin'
1031libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1032datarootdir='${prefix}/share'
1033datadir='${datarootdir}'
c906108c
SS
1034sysconfdir='${prefix}/etc'
1035sharedstatedir='${prefix}/com'
1036localstatedir='${prefix}/var'
c906108c
SS
1037includedir='${prefix}/include'
1038oldincludedir='/usr/include'
81ecdfbb
RW
1039docdir='${datarootdir}/doc/${PACKAGE}'
1040infodir='${datarootdir}/info'
1041htmldir='${docdir}'
1042dvidir='${docdir}'
1043pdfdir='${docdir}'
1044psdir='${docdir}'
1045libdir='${exec_prefix}/lib'
1046localedir='${datarootdir}/locale'
1047mandir='${datarootdir}/man'
c906108c 1048
c906108c 1049ac_prev=
81ecdfbb 1050ac_dashdash=
c906108c
SS
1051for ac_option
1052do
c906108c
SS
1053 # If the previous option needs an argument, assign it.
1054 if test -n "$ac_prev"; then
81ecdfbb 1055 eval $ac_prev=\$ac_option
c906108c
SS
1056 ac_prev=
1057 continue
1058 fi
1059
81ecdfbb
RW
1060 case $ac_option in
1061 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1062 *) ac_optarg=yes ;;
1063 esac
c906108c
SS
1064
1065 # Accept the important Cygnus configure options, so we can diagnose typos.
1066
81ecdfbb
RW
1067 case $ac_dashdash$ac_option in
1068 --)
1069 ac_dashdash=yes ;;
c906108c
SS
1070
1071 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1072 ac_prev=bindir ;;
1073 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1074 bindir=$ac_optarg ;;
c906108c
SS
1075
1076 -build | --build | --buil | --bui | --bu)
bec39cab 1077 ac_prev=build_alias ;;
c906108c 1078 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1079 build_alias=$ac_optarg ;;
c906108c
SS
1080
1081 -cache-file | --cache-file | --cache-fil | --cache-fi \
1082 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1083 ac_prev=cache_file ;;
1084 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1085 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1086 cache_file=$ac_optarg ;;
1087
1088 --config-cache | -C)
1089 cache_file=config.cache ;;
c906108c 1090
81ecdfbb 1091 -datadir | --datadir | --datadi | --datad)
c906108c 1092 ac_prev=datadir ;;
81ecdfbb 1093 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1094 datadir=$ac_optarg ;;
c906108c 1095
81ecdfbb
RW
1096 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1097 | --dataroo | --dataro | --datar)
1098 ac_prev=datarootdir ;;
1099 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1100 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1101 datarootdir=$ac_optarg ;;
1102
c906108c 1103 -disable-* | --disable-*)
81ecdfbb 1104 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1105 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1107 as_fn_error "invalid feature name: $ac_useropt"
1108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"enable_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval enable_$ac_useropt=no ;;
1118
1119 -docdir | --docdir | --docdi | --doc | --do)
1120 ac_prev=docdir ;;
1121 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1122 docdir=$ac_optarg ;;
1123
1124 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1125 ac_prev=dvidir ;;
1126 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1127 dvidir=$ac_optarg ;;
c906108c
SS
1128
1129 -enable-* | --enable-*)
81ecdfbb 1130 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1131 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1133 as_fn_error "invalid feature name: $ac_useropt"
1134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138"enable_$ac_useropt"
1139"*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
b4e70030 1142 esac
81ecdfbb 1143 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1144
1145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1147 | --exec | --exe | --ex)
1148 ac_prev=exec_prefix ;;
1149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1151 | --exec=* | --exe=* | --ex=*)
bec39cab 1152 exec_prefix=$ac_optarg ;;
c906108c
SS
1153
1154 -gas | --gas | --ga | --g)
1155 # Obsolete; use --with-gas.
1156 with_gas=yes ;;
1157
bec39cab
AC
1158 -help | --help | --hel | --he | -h)
1159 ac_init_help=long ;;
1160 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1161 ac_init_help=recursive ;;
1162 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1163 ac_init_help=short ;;
c906108c
SS
1164
1165 -host | --host | --hos | --ho)
bec39cab 1166 ac_prev=host_alias ;;
c906108c 1167 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1168 host_alias=$ac_optarg ;;
c906108c 1169
81ecdfbb
RW
1170 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1171 ac_prev=htmldir ;;
1172 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1173 | --ht=*)
1174 htmldir=$ac_optarg ;;
1175
c906108c
SS
1176 -includedir | --includedir | --includedi | --included | --include \
1177 | --includ | --inclu | --incl | --inc)
1178 ac_prev=includedir ;;
1179 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1180 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1181 includedir=$ac_optarg ;;
c906108c
SS
1182
1183 -infodir | --infodir | --infodi | --infod | --info | --inf)
1184 ac_prev=infodir ;;
1185 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1186 infodir=$ac_optarg ;;
c906108c
SS
1187
1188 -libdir | --libdir | --libdi | --libd)
1189 ac_prev=libdir ;;
1190 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1191 libdir=$ac_optarg ;;
c906108c
SS
1192
1193 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1194 | --libexe | --libex | --libe)
1195 ac_prev=libexecdir ;;
1196 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1197 | --libexe=* | --libex=* | --libe=*)
bec39cab 1198 libexecdir=$ac_optarg ;;
c906108c 1199
81ecdfbb
RW
1200 -localedir | --localedir | --localedi | --localed | --locale)
1201 ac_prev=localedir ;;
1202 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1203 localedir=$ac_optarg ;;
1204
c906108c 1205 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1206 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1207 ac_prev=localstatedir ;;
1208 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1209 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1210 localstatedir=$ac_optarg ;;
c906108c
SS
1211
1212 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1213 ac_prev=mandir ;;
1214 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1215 mandir=$ac_optarg ;;
c906108c
SS
1216
1217 -nfp | --nfp | --nf)
1218 # Obsolete; use --without-fp.
1219 with_fp=no ;;
1220
1221 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1222 | --no-cr | --no-c | -n)
c906108c
SS
1223 no_create=yes ;;
1224
1225 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1226 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1227 no_recursion=yes ;;
1228
1229 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1230 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1231 | --oldin | --oldi | --old | --ol | --o)
1232 ac_prev=oldincludedir ;;
1233 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1234 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1235 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1236 oldincludedir=$ac_optarg ;;
c906108c
SS
1237
1238 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1239 ac_prev=prefix ;;
1240 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1241 prefix=$ac_optarg ;;
c906108c
SS
1242
1243 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1244 | --program-pre | --program-pr | --program-p)
1245 ac_prev=program_prefix ;;
1246 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1247 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1248 program_prefix=$ac_optarg ;;
c906108c
SS
1249
1250 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1251 | --program-suf | --program-su | --program-s)
1252 ac_prev=program_suffix ;;
1253 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1254 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1255 program_suffix=$ac_optarg ;;
c906108c
SS
1256
1257 -program-transform-name | --program-transform-name \
1258 | --program-transform-nam | --program-transform-na \
1259 | --program-transform-n | --program-transform- \
1260 | --program-transform | --program-transfor \
1261 | --program-transfo | --program-transf \
1262 | --program-trans | --program-tran \
1263 | --progr-tra | --program-tr | --program-t)
1264 ac_prev=program_transform_name ;;
1265 -program-transform-name=* | --program-transform-name=* \
1266 | --program-transform-nam=* | --program-transform-na=* \
1267 | --program-transform-n=* | --program-transform-=* \
1268 | --program-transform=* | --program-transfor=* \
1269 | --program-transfo=* | --program-transf=* \
1270 | --program-trans=* | --program-tran=* \
1271 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1272 program_transform_name=$ac_optarg ;;
c906108c 1273
81ecdfbb
RW
1274 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1275 ac_prev=pdfdir ;;
1276 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1277 pdfdir=$ac_optarg ;;
1278
1279 -psdir | --psdir | --psdi | --psd | --ps)
1280 ac_prev=psdir ;;
1281 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1282 psdir=$ac_optarg ;;
1283
c906108c
SS
1284 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1285 | -silent | --silent | --silen | --sile | --sil)
1286 silent=yes ;;
1287
1288 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1289 ac_prev=sbindir ;;
1290 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1291 | --sbi=* | --sb=*)
bec39cab 1292 sbindir=$ac_optarg ;;
c906108c
SS
1293
1294 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1295 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1296 | --sharedst | --shareds | --shared | --share | --shar \
1297 | --sha | --sh)
1298 ac_prev=sharedstatedir ;;
1299 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1300 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1301 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1302 | --sha=* | --sh=*)
bec39cab 1303 sharedstatedir=$ac_optarg ;;
c906108c
SS
1304
1305 -site | --site | --sit)
1306 ac_prev=site ;;
1307 -site=* | --site=* | --sit=*)
bec39cab 1308 site=$ac_optarg ;;
3ace7edb 1309
c906108c
SS
1310 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1311 ac_prev=srcdir ;;
1312 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1313 srcdir=$ac_optarg ;;
c906108c
SS
1314
1315 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1316 | --syscon | --sysco | --sysc | --sys | --sy)
1317 ac_prev=sysconfdir ;;
1318 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1319 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1320 sysconfdir=$ac_optarg ;;
c906108c
SS
1321
1322 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1323 ac_prev=target_alias ;;
c906108c 1324 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1325 target_alias=$ac_optarg ;;
c906108c
SS
1326
1327 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1328 verbose=yes ;;
1329
bec39cab
AC
1330 -version | --version | --versio | --versi | --vers | -V)
1331 ac_init_version=: ;;
c906108c
SS
1332
1333 -with-* | --with-*)
81ecdfbb 1334 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1335 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1336 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1337 as_fn_error "invalid package name: $ac_useropt"
1338 ac_useropt_orig=$ac_useropt
1339 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1340 case $ac_user_opts in
1341 *"
1342"with_$ac_useropt"
1343"*) ;;
1344 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1345 ac_unrecognized_sep=', ';;
b4e70030 1346 esac
81ecdfbb 1347 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1348
1349 -without-* | --without-*)
81ecdfbb 1350 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1351 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1352 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1353 as_fn_error "invalid package name: $ac_useropt"
1354 ac_useropt_orig=$ac_useropt
1355 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1356 case $ac_user_opts in
1357 *"
1358"with_$ac_useropt"
1359"*) ;;
1360 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1361 ac_unrecognized_sep=', ';;
1362 esac
1363 eval with_$ac_useropt=no ;;
c906108c
SS
1364
1365 --x)
1366 # Obsolete; use --with-x.
1367 with_x=yes ;;
1368
1369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1370 | --x-incl | --x-inc | --x-in | --x-i)
1371 ac_prev=x_includes ;;
1372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1374 x_includes=$ac_optarg ;;
c906108c
SS
1375
1376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1378 ac_prev=x_libraries ;;
1379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1381 x_libraries=$ac_optarg ;;
c906108c 1382
81ecdfbb
RW
1383 -*) as_fn_error "unrecognized option: \`$ac_option'
1384Try \`$0 --help' for more information."
c906108c
SS
1385 ;;
1386
bec39cab
AC
1387 *=*)
1388 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1389 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1390 case $ac_envvar in #(
1391 '' | [0-9]* | *[!_$as_cr_alnum]* )
1392 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1393 esac
1394 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1395 export $ac_envvar ;;
1396
c906108c 1397 *)
bec39cab 1398 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1399 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1400 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1401 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1402 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1403 ;;
1404
1405 esac
1406done
1407
1408if test -n "$ac_prev"; then
bec39cab 1409 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1410 as_fn_error "missing argument to $ac_option"
c906108c 1411fi
c906108c 1412
81ecdfbb
RW
1413if test -n "$ac_unrecognized_opts"; then
1414 case $enable_option_checking in
1415 no) ;;
1416 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1417 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1418 esac
81ecdfbb 1419fi
b4e70030 1420
81ecdfbb
RW
1421# Check all directory arguments for consistency.
1422for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1423 datadir sysconfdir sharedstatedir localstatedir includedir \
1424 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1425 libdir localedir mandir
b4e70030 1426do
81ecdfbb
RW
1427 eval ac_val=\$$ac_var
1428 # Remove trailing slashes.
1429 case $ac_val in
1430 */ )
1431 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1432 eval $ac_var=\$ac_val;;
1433 esac
1434 # Be sure to have absolute directory names.
b4e70030 1435 case $ac_val in
81ecdfbb
RW
1436 [\\/$]* | ?:[\\/]* ) continue;;
1437 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1438 esac
81ecdfbb 1439 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1440done
1441
bec39cab
AC
1442# There might be people who depend on the old broken behavior: `$host'
1443# used to hold the argument of --host etc.
1444# FIXME: To remove some day.
1445build=$build_alias
1446host=$host_alias
1447target=$target_alias
1448
1449# FIXME: To remove some day.
1450if test "x$host_alias" != x; then
1451 if test "x$build_alias" = x; then
1452 cross_compiling=maybe
81ecdfbb 1453 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1454 If a cross compiler is detected then cross compile mode will be used." >&2
1455 elif test "x$build_alias" != "x$host_alias"; then
1456 cross_compiling=yes
1457 fi
1458fi
c906108c 1459
bec39cab
AC
1460ac_tool_prefix=
1461test -n "$host_alias" && ac_tool_prefix=$host_alias-
1462
1463test "$silent" = yes && exec 6>/dev/null
c906108c 1464
c906108c 1465
81ecdfbb
RW
1466ac_pwd=`pwd` && test -n "$ac_pwd" &&
1467ac_ls_di=`ls -di .` &&
1468ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1469 as_fn_error "working directory cannot be determined"
1470test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1471 as_fn_error "pwd does not report name of working directory"
1472
1473
c906108c
SS
1474# Find the source files, if location was not specified.
1475if test -z "$srcdir"; then
1476 ac_srcdir_defaulted=yes
81ecdfbb
RW
1477 # Try the directory containing this script, then the parent directory.
1478 ac_confdir=`$as_dirname -- "$as_myself" ||
1479$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1480 X"$as_myself" : 'X\(//\)[^/]' \| \
1481 X"$as_myself" : 'X\(//\)$' \| \
1482 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1483$as_echo X"$as_myself" |
1484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1485 s//\1/
1486 q
1487 }
1488 /^X\(\/\/\)[^/].*/{
1489 s//\1/
1490 q
1491 }
1492 /^X\(\/\/\)$/{
1493 s//\1/
1494 q
1495 }
1496 /^X\(\/\).*/{
1497 s//\1/
1498 q
1499 }
1500 s/.*/./; q'`
c906108c 1501 srcdir=$ac_confdir
81ecdfbb 1502 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1503 srcdir=..
1504 fi
1505else
1506 ac_srcdir_defaulted=no
1507fi
81ecdfbb
RW
1508if test ! -r "$srcdir/$ac_unique_file"; then
1509 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1510 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1511fi
1512ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1513ac_abs_confdir=`(
1514 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1515 pwd)`
1516# When building in place, set srcdir=.
1517if test "$ac_abs_confdir" = "$ac_pwd"; then
1518 srcdir=.
1519fi
1520# Remove unnecessary trailing slashes from srcdir.
1521# Double slashes in file names in object file debugging info
1522# mess up M-x gdb in Emacs.
1523case $srcdir in
1524*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1525esac
1526for ac_var in $ac_precious_vars; do
1527 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1528 eval ac_env_${ac_var}_value=\$${ac_var}
1529 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1530 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1531done
c906108c 1532
bec39cab
AC
1533#
1534# Report the --help message.
1535#
1536if test "$ac_init_help" = "long"; then
1537 # Omit some internal or obsolete options to make the list less imposing.
1538 # This message is too long to be a string in the A/UX 3.1 sh.
1539 cat <<_ACEOF
1540\`configure' configures this package to adapt to many kinds of systems.
1541
1542Usage: $0 [OPTION]... [VAR=VALUE]...
1543
1544To assign environment variables (e.g., CC, CFLAGS...), specify them as
1545VAR=VALUE. See below for descriptions of some of the useful variables.
1546
1547Defaults for the options are specified in brackets.
1548
1549Configuration:
1550 -h, --help display this help and exit
1551 --help=short display options specific to this package
1552 --help=recursive display the short help of all the included packages
1553 -V, --version display version information and exit
1554 -q, --quiet, --silent do not print \`checking...' messages
1555 --cache-file=FILE cache test results in FILE [disabled]
1556 -C, --config-cache alias for \`--cache-file=config.cache'
1557 -n, --no-create do not create output files
1558 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1559
bec39cab
AC
1560Installation directories:
1561 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1562 [$ac_default_prefix]
bec39cab 1563 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1564 [PREFIX]
bec39cab
AC
1565
1566By default, \`make install' will install all the files in
1567\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1568an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1569for instance \`--prefix=\$HOME'.
1570
1571For better control, use the options below.
1572
1573Fine tuning of the installation directories:
81ecdfbb
RW
1574 --bindir=DIR user executables [EPREFIX/bin]
1575 --sbindir=DIR system admin executables [EPREFIX/sbin]
1576 --libexecdir=DIR program executables [EPREFIX/libexec]
1577 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1578 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1579 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1580 --libdir=DIR object code libraries [EPREFIX/lib]
1581 --includedir=DIR C header files [PREFIX/include]
1582 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1583 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1584 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1585 --infodir=DIR info documentation [DATAROOTDIR/info]
1586 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1587 --mandir=DIR man documentation [DATAROOTDIR/man]
1588 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1589 --htmldir=DIR html documentation [DOCDIR]
1590 --dvidir=DIR dvi documentation [DOCDIR]
1591 --pdfdir=DIR pdf documentation [DOCDIR]
1592 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1593_ACEOF
1594
1595 cat <<\_ACEOF
1596
1597Program names:
1598 --program-prefix=PREFIX prepend PREFIX to installed program names
1599 --program-suffix=SUFFIX append SUFFIX to installed program names
1600 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1601
1602X features:
1603 --x-includes=DIR X include files are in DIR
1604 --x-libraries=DIR X library files are in DIR
1605
1606System types:
1607 --build=BUILD configure for building on BUILD [guessed]
1608 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1609 --target=TARGET configure for building compilers for TARGET [HOST]
1610_ACEOF
1611fi
1612
1613if test -n "$ac_init_help"; then
1614
1615 cat <<\_ACEOF
1616
1617Optional Features:
81ecdfbb 1618 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1619 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1620 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1621 --enable-maintainer-mode enable make rules and dependencies not useful
1622 (and sometimes confusing) to the casual installer
da2f07f1
JK
1623 --enable-plugins Enable support for plugins (defaults no)
1624 --disable-largefile omit support for large files
e28b3332
DJ
1625 --disable-dependency-tracking speeds up one-time build
1626 --enable-dependency-tracking do not reject slow dependency extractors
a1220294
TT
1627 --enable-targets=TARGETS
1628 alternative target configurations
c0993dbe 1629 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1630 --disable-gdbcli disable command-line interface (CLI)
1631 --disable-gdbmi disable machine-interface (MI)
1632 --enable-tui enable full-screen terminal user interface (TUI)
1633 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1634 --enable-profiling enable profiling of GDB
3841debe 1635 --disable-rpath do not hardcode runtime library paths
a1220294 1636 --enable-werror treat compile warnings as errors
32c1c914 1637 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1638 --enable-gdb-build-warnings
32c1c914 1639 enable GDB specific build-time compiler warnings if
a1220294 1640 gcc is used
32c1c914 1641 --enable-sim link gdb with simulator
bec39cab 1642 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1643 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1644 is auto)
bec39cab
AC
1645
1646Optional Packages:
1647 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1648 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1649 --with-separate-debug-dir=PATH
32c1c914 1650 look for global separate debug info in this path
62e4f60c 1651 [LIBDIR/debug]
b14b1491
TT
1652 --with-gdb-datadir=PATH look for global separate data files in this path
1653 [DATADIR/gdb]
29b0e8a2 1654 --with-relocated-sources=PATH
32c1c914
TT
1655 automatically relocate this path for source files
1656 --with-libunwind use libunwind frame unwinding support
cb01cfba
JB
1657 --with-curses use the curses library instead of the termcap
1658 library
c16158bc
JM
1659 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1660 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1661 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1662 --with-libiconv-prefix=DIR
1663 search for libiconv in DIR/include and DIR/lib
6a30b0a5 1664 --with-system-readline use installed readline library
5c39566f 1665 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1666 --with-gnu-ld assume the C compiler uses GNU ld default=no
1667 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1668 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1669 --with-python[=PYTHON] include python support
1670 (auto/yes/no/<python-program>)
a1220294
TT
1671 --without-included-regex
1672 don't use included regex; this is the default on
1673 systems with version 2 of the GNU C library (use
1674 with caution on other system)
81ecdfbb 1675 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1676 --with-system-gdbinit=PATH
32c1c914 1677 automatically load a system-wide gdbinit file
5062cc19
KS
1678 --with-tcl directory containing tcl configuration (tclConfig.sh)
1679 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1680 --with-x use the X Window System
bec39cab
AC
1681
1682Some influential environment variables:
1683 CC C compiler command
1684 CFLAGS C compiler flags
1685 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1686 nonstandard directory <lib dir>
81ecdfbb
RW
1687 LIBS libraries to pass to the linker, e.g. -l<library>
1688 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1689 you have headers in a nonstandard directory <include dir>
bec39cab 1690 CPP C preprocessor
81ecdfbb
RW
1691 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1692 the first program found out of: `bison -y', `byacc', `yacc'.
1693 YFLAGS The list of arguments that will be passed by default to $YACC.
1694 This script will default YFLAGS to the empty string to avoid a
1695 default value of `-d' given by some make applications.
1696 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1697
1698Use these variables to override the choices made by `configure' or to help
1699it to find libraries and programs with nonstandard names/locations.
1700
81ecdfbb 1701Report bugs to the package provider.
bec39cab 1702_ACEOF
81ecdfbb 1703ac_status=$?
bec39cab
AC
1704fi
1705
1706if test "$ac_init_help" = "recursive"; then
1707 # If there are subdirs, report their specific --help.
bec39cab 1708 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1709 test -d "$ac_dir" ||
1710 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1711 continue
bec39cab
AC
1712 ac_builddir=.
1713
81ecdfbb
RW
1714case "$ac_dir" in
1715.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1716*)
1717 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1718 # A ".." for each directory in $ac_dir_suffix.
1719 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1720 case $ac_top_builddir_sub in
1721 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1722 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1723 esac ;;
1724esac
1725ac_abs_top_builddir=$ac_pwd
1726ac_abs_builddir=$ac_pwd$ac_dir_suffix
1727# for backward compatibility:
1728ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1729
1730case $srcdir in
81ecdfbb 1731 .) # We are building in place.
bec39cab 1732 ac_srcdir=.
81ecdfbb
RW
1733 ac_top_srcdir=$ac_top_builddir_sub
1734 ac_abs_top_srcdir=$ac_pwd ;;
1735 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1736 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1737 ac_top_srcdir=$srcdir
1738 ac_abs_top_srcdir=$srcdir ;;
1739 *) # Relative name.
1740 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1741 ac_top_srcdir=$ac_top_build_prefix$srcdir
1742 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1743esac
81ecdfbb 1744ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1745
81ecdfbb
RW
1746 cd "$ac_dir" || { ac_status=$?; continue; }
1747 # Check for guested configure.
1748 if test -f "$ac_srcdir/configure.gnu"; then
1749 echo &&
1750 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1751 elif test -f "$ac_srcdir/configure"; then
1752 echo &&
1753 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1754 else
81ecdfbb
RW
1755 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1756 fi || ac_status=$?
1757 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1758 done
1759fi
1760
81ecdfbb 1761test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1762if $ac_init_version; then
1763 cat <<\_ACEOF
81ecdfbb
RW
1764configure
1765generated by GNU Autoconf 2.64
bec39cab 1766
81ecdfbb 1767Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1768This configure script is free software; the Free Software Foundation
1769gives unlimited permission to copy, distribute and modify it.
1770_ACEOF
81ecdfbb 1771 exit
bec39cab 1772fi
bec39cab 1773
81ecdfbb
RW
1774## ------------------------ ##
1775## Autoconf initialization. ##
1776## ------------------------ ##
bec39cab 1777
81ecdfbb
RW
1778# ac_fn_c_try_compile LINENO
1779# --------------------------
1780# Try to compile conftest.$ac_ext, and return whether this succeeded.
1781ac_fn_c_try_compile ()
1782{
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1784 rm -f conftest.$ac_objext
1785 if { { ac_try="$ac_compile"
1786case "(($ac_try" in
1787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1788 *) ac_try_echo=$ac_try;;
1789esac
1790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1791$as_echo "$ac_try_echo"; } >&5
1792 (eval "$ac_compile") 2>conftest.err
1793 ac_status=$?
1794 if test -s conftest.err; then
1795 grep -v '^ *+' conftest.err >conftest.er1
1796 cat conftest.er1 >&5
1797 mv -f conftest.er1 conftest.err
1798 fi
1799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1800 test $ac_status = 0; } && {
1801 test -z "$ac_c_werror_flag" ||
1802 test ! -s conftest.err
1803 } && test -s conftest.$ac_objext; then :
1804 ac_retval=0
1805else
1806 $as_echo "$as_me: failed program was:" >&5
1807sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1808
81ecdfbb
RW
1809 ac_retval=1
1810fi
1811 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1812 return $ac_retval
1813
1814} # ac_fn_c_try_compile
1815
1816# ac_fn_c_try_cpp LINENO
1817# ----------------------
1818# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1819ac_fn_c_try_cpp ()
bec39cab 1820{
81ecdfbb
RW
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822 if { { ac_try="$ac_cpp conftest.$ac_ext"
1823case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826esac
1827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1828$as_echo "$ac_try_echo"; } >&5
1829 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1830 ac_status=$?
1831 if test -s conftest.err; then
1832 grep -v '^ *+' conftest.err >conftest.er1
1833 cat conftest.er1 >&5
1834 mv -f conftest.er1 conftest.err
1835 fi
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; } >/dev/null && {
1838 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1839 test ! -s conftest.err
1840 }; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: failed program was:" >&5
1844sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1845
81ecdfbb
RW
1846 ac_retval=1
1847fi
1848 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1849 return $ac_retval
bec39cab 1850
81ecdfbb 1851} # ac_fn_c_try_cpp
bec39cab 1852
81ecdfbb
RW
1853# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1854# -------------------------------------------------------
1855# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1856# the include files in INCLUDES and setting the cache variable VAR
1857# accordingly.
1858ac_fn_c_check_header_mongrel ()
1859{
1860 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1861 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
1864if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1865 $as_echo_n "(cached) " >&6
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
1870else
1871 # Is the header compilable?
1872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1873$as_echo_n "checking $2 usability... " >&6; }
1874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$4
1877#include <$2>
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880 ac_header_compiler=yes
1881else
1882 ac_header_compiler=no
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1886$as_echo "$ac_header_compiler" >&6; }
bec39cab 1887
81ecdfbb
RW
1888# Is the header present?
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1890$as_echo_n "checking $2 presence... " >&6; }
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893#include <$2>
1894_ACEOF
1895if ac_fn_c_try_cpp "$LINENO"; then :
1896 ac_header_preproc=yes
1897else
1898 ac_header_preproc=no
1899fi
1900rm -f conftest.err conftest.$ac_ext
1901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1902$as_echo "$ac_header_preproc" >&6; }
bec39cab 1903
81ecdfbb
RW
1904# So? What about this header?
1905case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1906 yes:no: )
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1908$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1910$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1911 ;;
1912 no:yes:* )
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1914$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1916$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1918$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1920$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1923 ;;
1924esac
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926$as_echo_n "checking for $2... " >&6; }
1927if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=\$ac_header_compiler"
1931fi
1932eval ac_res=\$$3
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1934$as_echo "$ac_res" >&6; }
1935fi
1936 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1937
81ecdfbb 1938} # ac_fn_c_check_header_mongrel
bec39cab 1939
81ecdfbb
RW
1940# ac_fn_c_try_run LINENO
1941# ----------------------
1942# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1943# that executables *can* be run.
1944ac_fn_c_try_run ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 if { { ac_try="$ac_link"
1948case "(($ac_try" in
1949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950 *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954 (eval "$ac_link") 2>&5
1955 ac_status=$?
1956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1957 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1958 { { case "(($ac_try" in
1959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960 *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964 (eval "$ac_try") 2>&5
1965 ac_status=$?
1966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967 test $ac_status = 0; }; }; then :
1968 ac_retval=0
1969else
1970 $as_echo "$as_me: program exited with status $ac_status" >&5
1971 $as_echo "$as_me: failed program was:" >&5
1972sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1973
81ecdfbb
RW
1974 ac_retval=$ac_status
1975fi
1976 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1977 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1978 return $ac_retval
bec39cab 1979
81ecdfbb 1980} # ac_fn_c_try_run
bec39cab 1981
81ecdfbb
RW
1982# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1983# -------------------------------------------------------
1984# Tests whether HEADER exists and can be compiled using the include files in
1985# INCLUDES, setting the cache variable VAR accordingly.
1986ac_fn_c_check_header_compile ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990$as_echo_n "checking for $2... " >&6; }
1991if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1992 $as_echo_n "(cached) " >&6
1993else
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997#include <$2>
bec39cab 1998_ACEOF
81ecdfbb
RW
1999if ac_fn_c_try_compile "$LINENO"; then :
2000 eval "$3=yes"
2001else
2002 eval "$3=no"
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2005fi
2006eval ac_res=\$$3
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2008$as_echo "$ac_res" >&6; }
2009 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2010
81ecdfbb 2011} # ac_fn_c_check_header_compile
bec39cab 2012
81ecdfbb
RW
2013# ac_fn_c_try_link LINENO
2014# -----------------------
2015# Try to link conftest.$ac_ext, and return whether this succeeded.
2016ac_fn_c_try_link ()
b4e70030 2017{
81ecdfbb
RW
2018 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2019 rm -f conftest.$ac_objext conftest$ac_exeext
2020 if { { ac_try="$ac_link"
2021case "(($ac_try" in
2022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2023 *) ac_try_echo=$ac_try;;
2024esac
2025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2026$as_echo "$ac_try_echo"; } >&5
2027 (eval "$ac_link") 2>conftest.err
2028 ac_status=$?
2029 if test -s conftest.err; then
2030 grep -v '^ *+' conftest.err >conftest.er1
2031 cat conftest.er1 >&5
2032 mv -f conftest.er1 conftest.err
2033 fi
2034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2035 test $ac_status = 0; } && {
2036 test -z "$ac_c_werror_flag" ||
2037 test ! -s conftest.err
2038 } && test -s conftest$ac_exeext && {
2039 test "$cross_compiling" = yes ||
2040 $as_test_x conftest$ac_exeext
2041 }; then :
2042 ac_retval=0
2043else
2044 $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2046
81ecdfbb
RW
2047 ac_retval=1
2048fi
2049 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2050 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2051 # interfere with the next link command; also delete a directory that is
2052 # left behind by Apple's compiler. We do this before executing the actions.
2053 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2054 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055 return $ac_retval
bec39cab 2056
81ecdfbb 2057} # ac_fn_c_try_link
bec39cab 2058
81ecdfbb
RW
2059# ac_fn_c_check_func LINENO FUNC VAR
2060# ----------------------------------
2061# Tests whether FUNC exists, setting the cache variable VAR accordingly
2062ac_fn_c_check_func ()
2063{
2064 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2066$as_echo_n "checking for $2... " >&6; }
2067if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2068 $as_echo_n "(cached) " >&6
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2073 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2074#define $2 innocuous_$2
bec39cab 2075
81ecdfbb
RW
2076/* System header to define __stub macros and hopefully few prototypes,
2077 which can conflict with char $2 (); below.
2078 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2079 <limits.h> exists even on freestanding compilers. */
bec39cab 2080
81ecdfbb
RW
2081#ifdef __STDC__
2082# include <limits.h>
2083#else
2084# include <assert.h>
2085#endif
bec39cab 2086
81ecdfbb 2087#undef $2
bec39cab 2088
81ecdfbb
RW
2089/* Override any GCC internal prototype to avoid an error.
2090 Use char because int might match the return type of a GCC
2091 builtin and then its argument prototype would still apply. */
2092#ifdef __cplusplus
2093extern "C"
2094#endif
2095char $2 ();
2096/* The GNU C library defines this for functions which it implements
2097 to always fail with ENOSYS. Some functions are actually named
2098 something starting with __ and the normal name is an alias. */
2099#if defined __stub_$2 || defined __stub___$2
2100choke me
2101#endif
bec39cab 2102
81ecdfbb
RW
2103int
2104main ()
2105{
2106return $2 ();
2107 ;
2108 return 0;
2109}
bec39cab 2110_ACEOF
81ecdfbb
RW
2111if ac_fn_c_try_link "$LINENO"; then :
2112 eval "$3=yes"
2113else
2114 eval "$3=no"
2115fi
2116rm -f core conftest.err conftest.$ac_objext \
2117 conftest$ac_exeext conftest.$ac_ext
2118fi
2119eval ac_res=\$$3
2120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2121$as_echo "$ac_res" >&6; }
2122 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2123
81ecdfbb 2124} # ac_fn_c_check_func
bec39cab 2125
81ecdfbb
RW
2126# ac_fn_c_check_decl LINENO SYMBOL VAR
2127# ------------------------------------
2128# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2129ac_fn_c_check_decl ()
2130{
2131 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
e7a30f46
DE
2132 as_decl_name=`echo $2|sed 's/ *(.*//'`
2133 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2135$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
81ecdfbb
RW
2136if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2137 $as_echo_n "(cached) " >&6
2138else
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h. */
2141$4
2142int
2143main ()
2144{
e7a30f46
DE
2145#ifndef $as_decl_name
2146#ifdef __cplusplus
2147 (void) $as_decl_use;
2148#else
2149 (void) $as_decl_name;
2150#endif
81ecdfbb 2151#endif
bec39cab 2152
81ecdfbb
RW
2153 ;
2154 return 0;
2155}
bec39cab 2156_ACEOF
81ecdfbb
RW
2157if ac_fn_c_try_compile "$LINENO"; then :
2158 eval "$3=yes"
2159else
2160 eval "$3=no"
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163fi
2164eval ac_res=\$$3
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2166$as_echo "$ac_res" >&6; }
2167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2168
81ecdfbb 2169} # ac_fn_c_check_decl
bec39cab 2170
81ecdfbb
RW
2171# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2172# --------------------------------------------
2173# Tries to find the compile-time value of EXPR in a program that includes
2174# INCLUDES, setting VAR accordingly. Returns whether the value could be
2175# computed
2176ac_fn_c_compute_int ()
2177{
2178 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2179 if test "$cross_compiling" = yes; then
2180 # Depending upon the size, compute the lo and hi bounds.
2181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184int
2185main ()
2186{
2187static int test_array [1 - 2 * !(($2) >= 0)];
2188test_array [0] = 0
bec39cab 2189
81ecdfbb
RW
2190 ;
2191 return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_compile "$LINENO"; then :
2195 ac_lo=0 ac_mid=0
2196 while :; do
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2204test_array [0] = 0
bec39cab 2205
81ecdfbb
RW
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"; then :
2211 ac_hi=$ac_mid; break
2212else
2213 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2214 if test $ac_lo -le $ac_mid; then
2215 ac_lo= ac_hi=
2216 break
2217 fi
2218 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2219fi
81ecdfbb
RW
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 done
c906108c 2222else
81ecdfbb
RW
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226int
2227main ()
2228{
2229static int test_array [1 - 2 * !(($2) < 0)];
2230test_array [0] = 0
bec39cab 2231
81ecdfbb
RW
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_compile "$LINENO"; then :
2237 ac_hi=-1 ac_mid=-1
2238 while :; do
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242int
2243main ()
2244{
2245static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2246test_array [0] = 0
bec39cab 2247
81ecdfbb
RW
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_compile "$LINENO"; then :
2253 ac_lo=$ac_mid; break
2254else
2255 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2256 if test $ac_mid -le $ac_hi; then
2257 ac_lo= ac_hi=
2258 break
2259 fi
2260 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2261fi
2262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2263 done
2264else
2265 ac_lo= ac_hi=
2266fi
2267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270# Binary search between lo and hi bounds.
2271while test "x$ac_lo" != "x$ac_hi"; do
2272 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h. */
2275$4
2276int
2277main ()
2278{
2279static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2280test_array [0] = 0
bec39cab 2281
81ecdfbb
RW
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287 ac_hi=$ac_mid
2288else
2289 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292done
2293case $ac_lo in #((
2294?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2295'') ac_retval=1 ;;
2296esac
2297 else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300$4
2301static long int longval () { return $2; }
2302static unsigned long int ulongval () { return $2; }
2303#include <stdio.h>
2304#include <stdlib.h>
2305int
2306main ()
2307{
bec39cab 2308
81ecdfbb
RW
2309 FILE *f = fopen ("conftest.val", "w");
2310 if (! f)
2311 return 1;
2312 if (($2) < 0)
2313 {
2314 long int i = longval ();
2315 if (i != ($2))
2316 return 1;
2317 fprintf (f, "%ld", i);
2318 }
2319 else
2320 {
2321 unsigned long int i = ulongval ();
2322 if (i != ($2))
2323 return 1;
2324 fprintf (f, "%lu", i);
2325 }
2326 /* Do not output a trailing newline, as this causes \r\n confusion
2327 on some platforms. */
2328 return ferror (f) || fclose (f) != 0;
bec39cab 2329
81ecdfbb
RW
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_run "$LINENO"; then :
2335 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2336else
2337 ac_retval=1
2338fi
2339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2340 conftest.$ac_objext conftest.beam conftest.$ac_ext
2341rm -f conftest.val
bec39cab 2342
81ecdfbb
RW
2343 fi
2344 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2345 return $ac_retval
bec39cab 2346
81ecdfbb 2347} # ac_fn_c_compute_int
bec39cab 2348
81ecdfbb
RW
2349# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2350# ----------------------------------------------------
2351# Tries to find if the field MEMBER exists in type AGGR, after including
2352# INCLUDES, setting cache variable VAR accordingly.
2353ac_fn_c_check_member ()
2354{
2355 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2357$as_echo_n "checking for $2.$3... " >&6; }
2358if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2359 $as_echo_n "(cached) " >&6
2360else
2361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h. */
2363$5
2364int
2365main ()
2366{
2367static $2 ac_aggr;
2368if (ac_aggr.$3)
2369return 0;
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"; then :
2375 eval "$4=yes"
2376else
2377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h. */
2379$5
2380int
2381main ()
2382{
2383static $2 ac_aggr;
2384if (sizeof ac_aggr.$3)
2385return 0;
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391 eval "$4=yes"
2392else
2393 eval "$4=no"
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399eval ac_res=\$$4
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 2403
81ecdfbb 2404} # ac_fn_c_check_member
bec39cab 2405
81ecdfbb
RW
2406# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2407# -------------------------------------------
2408# Tests whether TYPE exists after having included INCLUDES, setting cache
2409# variable VAR accordingly.
2410ac_fn_c_check_type ()
2411{
2412 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2414$as_echo_n "checking for $2... " >&6; }
2415if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2416 $as_echo_n "(cached) " >&6
2417else
2418 eval "$3=no"
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$4
2422int
2423main ()
2424{
2425if (sizeof ($2))
2426 return 0;
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2433/* end confdefs.h. */
2434$4
2435int
2436main ()
2437{
2438if (sizeof (($2)))
2439 return 0;
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2445
81ecdfbb
RW
2446else
2447 eval "$3=yes"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$3
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
2456 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2457
81ecdfbb
RW
2458} # ac_fn_c_check_type
2459cat >config.log <<_ACEOF
2460This file contains any messages produced by compilers while
2461running configure, to aid debugging if configure makes a mistake.
d5af19ba 2462
81ecdfbb
RW
2463It was created by $as_me, which was
2464generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2465
81ecdfbb 2466 $ $0 $@
413ccac7 2467
81ecdfbb
RW
2468_ACEOF
2469exec 5>>config.log
2470{
2471cat <<_ASUNAME
2472## --------- ##
2473## Platform. ##
2474## --------- ##
413ccac7 2475
81ecdfbb
RW
2476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2477uname -m = `(uname -m) 2>/dev/null || echo unknown`
2478uname -r = `(uname -r) 2>/dev/null || echo unknown`
2479uname -s = `(uname -s) 2>/dev/null || echo unknown`
2480uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2481
81ecdfbb
RW
2482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2483/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2484
81ecdfbb
RW
2485/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2486/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2488/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2489/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2490/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2491/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2492
81ecdfbb 2493_ASUNAME
bec39cab 2494
bec39cab
AC
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2500 $as_echo "PATH: $as_dir"
2501 done
2502IFS=$as_save_IFS
bec39cab 2503
81ecdfbb 2504} >&5
bec39cab 2505
81ecdfbb 2506cat >&5 <<_ACEOF
bec39cab 2507
bec39cab 2508
81ecdfbb
RW
2509## ----------- ##
2510## Core tests. ##
2511## ----------- ##
2512
2513_ACEOF
2514
2515
2516# Keep a trace of the command line.
2517# Strip out --no-create and --no-recursion so they do not pile up.
2518# Strip out --silent because we don't want to record it for future runs.
2519# Also quote any args containing shell meta-characters.
2520# Make two passes to allow for proper duplicate-argument suppression.
2521ac_configure_args=
2522ac_configure_args0=
2523ac_configure_args1=
2524ac_must_keep_next=false
2525for ac_pass in 1 2
2526do
2527 for ac_arg
2528 do
2529 case $ac_arg in
2530 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2532 | -silent | --silent | --silen | --sile | --sil)
2533 continue ;;
2534 *\'*)
2535 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2536 esac
2537 case $ac_pass in
2538 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2539 2)
2540 as_fn_append ac_configure_args1 " '$ac_arg'"
2541 if test $ac_must_keep_next = true; then
2542 ac_must_keep_next=false # Got value, back to normal.
2543 else
2544 case $ac_arg in
2545 *=* | --config-cache | -C | -disable-* | --disable-* \
2546 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2547 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2548 | -with-* | --with-* | -without-* | --without-* | --x)
2549 case "$ac_configure_args0 " in
2550 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2551 esac
2552 ;;
2553 -* ) ac_must_keep_next=true ;;
2554 esac
2555 fi
2556 as_fn_append ac_configure_args " '$ac_arg'"
2557 ;;
2558 esac
2559 done
2560done
2561{ ac_configure_args0=; unset ac_configure_args0;}
2562{ ac_configure_args1=; unset ac_configure_args1;}
2563
2564# When interrupted or exit'd, cleanup temporary files, and complete
2565# config.log. We remove comments because anyway the quotes in there
2566# would cause problems or look ugly.
2567# WARNING: Use '\'' to represent an apostrophe within the trap.
2568# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2569trap 'exit_status=$?
2570 # Save into config.log some information that might help in debugging.
2571 {
2572 echo
2573
2574 cat <<\_ASBOX
2575## ---------------- ##
2576## Cache variables. ##
2577## ---------------- ##
2578_ASBOX
2579 echo
2580 # The following way of writing the cache mishandles newlines in values,
2581(
2582 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2583 eval ac_val=\$$ac_var
2584 case $ac_val in #(
2585 *${as_nl}*)
2586 case $ac_var in #(
2587 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2588$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2589 esac
2590 case $ac_var in #(
2591 _ | IFS | as_nl) ;; #(
2592 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2593 *) { eval $ac_var=; unset $ac_var;} ;;
2594 esac ;;
2595 esac
2596 done
2597 (set) 2>&1 |
2598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2599 *${as_nl}ac_space=\ *)
2600 sed -n \
2601 "s/'\''/'\''\\\\'\'''\''/g;
2602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2603 ;; #(
2604 *)
2605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2606 ;;
2607 esac |
2608 sort
2609)
2610 echo
2611
2612 cat <<\_ASBOX
2613## ----------------- ##
2614## Output variables. ##
2615## ----------------- ##
2616_ASBOX
2617 echo
2618 for ac_var in $ac_subst_vars
2619 do
2620 eval ac_val=\$$ac_var
2621 case $ac_val in
2622 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2623 esac
2624 $as_echo "$ac_var='\''$ac_val'\''"
2625 done | sort
2626 echo
2627
2628 if test -n "$ac_subst_files"; then
2629 cat <<\_ASBOX
2630## ------------------- ##
2631## File substitutions. ##
2632## ------------------- ##
2633_ASBOX
2634 echo
2635 for ac_var in $ac_subst_files
2636 do
2637 eval ac_val=\$$ac_var
2638 case $ac_val in
2639 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2640 esac
2641 $as_echo "$ac_var='\''$ac_val'\''"
2642 done | sort
2643 echo
2644 fi
2645
2646 if test -s confdefs.h; then
2647 cat <<\_ASBOX
2648## ----------- ##
2649## confdefs.h. ##
2650## ----------- ##
2651_ASBOX
2652 echo
2653 cat confdefs.h
2654 echo
2655 fi
2656 test "$ac_signal" != 0 &&
2657 $as_echo "$as_me: caught signal $ac_signal"
2658 $as_echo "$as_me: exit $exit_status"
2659 } >&5
2660 rm -f core *.core core.conftest.* &&
2661 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2662 exit $exit_status
2663' 0
2664for ac_signal in 1 2 13 15; do
2665 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2666done
2667ac_signal=0
2668
2669# confdefs.h avoids OS command line length limits that DEFS can exceed.
2670rm -f -r conftest* confdefs.h
2671
2672$as_echo "/* confdefs.h */" > confdefs.h
2673
2674# Predefined preprocessor variables.
2675
2676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_NAME "$PACKAGE_NAME"
2678_ACEOF
2679
2680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2682_ACEOF
2683
2684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_VERSION "$PACKAGE_VERSION"
2686_ACEOF
2687
2688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_STRING "$PACKAGE_STRING"
2690_ACEOF
2691
2692cat >>confdefs.h <<_ACEOF
2693#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2694_ACEOF
2695
2696cat >>confdefs.h <<_ACEOF
2697#define PACKAGE_URL "$PACKAGE_URL"
2698_ACEOF
2699
2700
2701# Let the site file select an alternate cache file if it wants to.
2702# Prefer an explicitly selected file to automatically selected ones.
2703ac_site_file1=NONE
2704ac_site_file2=NONE
2705if test -n "$CONFIG_SITE"; then
2706 ac_site_file1=$CONFIG_SITE
2707elif test "x$prefix" != xNONE; then
2708 ac_site_file1=$prefix/share/config.site
2709 ac_site_file2=$prefix/etc/config.site
2710else
2711 ac_site_file1=$ac_default_prefix/share/config.site
2712 ac_site_file2=$ac_default_prefix/etc/config.site
2713fi
2714for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2715do
2716 test "x$ac_site_file" = xNONE && continue
2717 if test -r "$ac_site_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2719$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2720 sed 's/^/| /' "$ac_site_file" >&5
2721 . "$ac_site_file"
2722 fi
2723done
2724
2725if test -r "$cache_file"; then
2726 # Some versions of bash will fail to source /dev/null (special
2727 # files actually), so we avoid doing that.
2728 if test -f "$cache_file"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2730$as_echo "$as_me: loading cache $cache_file" >&6;}
2731 case $cache_file in
2732 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2733 *) . "./$cache_file";;
2734 esac
2735 fi
2736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2738$as_echo "$as_me: creating cache $cache_file" >&6;}
2739 >$cache_file
bec39cab
AC
2740fi
2741
f434ba03
PA
2742gl_header_list="$gl_header_list sys/mman.h"
2743gl_func_list="$gl_func_list mprotect"
2744gl_func_list="$gl_func_list memchr"
2745gl_header_list="$gl_header_list stddef.h"
81ecdfbb
RW
2746gl_header_list="$gl_header_list stdint.h"
2747gl_header_list="$gl_header_list wchar.h"
2748gl_header_list="$gl_header_list string.h"
2749# Check that the precious variables saved in the cache have kept the same
2750# value.
2751ac_cache_corrupted=false
2752for ac_var in $ac_precious_vars; do
2753 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2754 eval ac_new_set=\$ac_env_${ac_var}_set
2755 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2756 eval ac_new_val=\$ac_env_${ac_var}_value
2757 case $ac_old_set,$ac_new_set in
2758 set,)
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2760$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2761 ac_cache_corrupted=: ;;
2762 ,set)
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2764$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2765 ac_cache_corrupted=: ;;
2766 ,);;
2767 *)
2768 if test "x$ac_old_val" != "x$ac_new_val"; then
2769 # differences in whitespace do not lead to failure.
2770 ac_old_val_w=`echo x $ac_old_val`
2771 ac_new_val_w=`echo x $ac_new_val`
2772 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2774$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2775 ac_cache_corrupted=:
2776 else
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2778$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2779 eval $ac_var=\$ac_old_val
2780 fi
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2782$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2784$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2785 fi;;
2786 esac
2787 # Pass precious variables to config.status.
2788 if test "$ac_new_set" = set; then
2789 case $ac_new_val in
2790 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2791 *) ac_arg=$ac_var=$ac_new_val ;;
2792 esac
2793 case " $ac_configure_args " in
2794 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2795 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2796 esac
2797 fi
2798done
2799if $ac_cache_corrupted; then
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2803$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2804 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2805fi
2806## -------------------- ##
2807## Main body of script. ##
2808## -------------------- ##
2809
2810ac_ext=c
2811ac_cpp='$CPP $CPPFLAGS'
2812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2814ac_compiler_gnu=$ac_cv_c_compiler_gnu
2815
2816
2817
2818
2819
2820ac_config_headers="$ac_config_headers config.h:config.in"
2821
2822
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2824$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2825 # Check whether --enable-maintainer-mode was given.
2826if test "${enable_maintainer_mode+set}" = set; then :
2827 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2828else
2829 USE_MAINTAINER_MODE=no
2830fi
2831
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2833$as_echo "$USE_MAINTAINER_MODE" >&6; }
2834 if test $USE_MAINTAINER_MODE = yes; then
2835 MAINTAINER_MODE_TRUE=
2836 MAINTAINER_MODE_FALSE='#'
2837else
2838 MAINTAINER_MODE_TRUE='#'
2839 MAINTAINER_MODE_FALSE=
2840fi
2841
2842 MAINT=$MAINTAINER_MODE_TRUE
2843
2844
2845
2846ac_ext=c
2847ac_cpp='$CPP $CPPFLAGS'
2848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850ac_compiler_gnu=$ac_cv_c_compiler_gnu
2851if test -n "$ac_tool_prefix"; then
2852 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2853set dummy ${ac_tool_prefix}gcc; ac_word=$2
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2855$as_echo_n "checking for $ac_word... " >&6; }
2856if test "${ac_cv_prog_CC+set}" = set; then :
2857 $as_echo_n "(cached) " >&6
c906108c
SS
2858else
2859 if test -n "$CC"; then
2860 ac_cv_prog_CC="$CC" # Let the user override the test.
2861else
bec39cab
AC
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2869 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2871 break 2
2872 fi
2873done
81ecdfbb
RW
2874 done
2875IFS=$as_save_IFS
bec39cab 2876
c906108c
SS
2877fi
2878fi
bec39cab 2879CC=$ac_cv_prog_CC
c906108c 2880if test -n "$CC"; then
81ecdfbb
RW
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2882$as_echo "$CC" >&6; }
c906108c 2883else
81ecdfbb
RW
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2885$as_echo "no" >&6; }
c906108c
SS
2886fi
2887
81ecdfbb 2888
b4e70030
JB
2889fi
2890if test -z "$ac_cv_prog_CC"; then
2891 ac_ct_CC=$CC
81ecdfbb
RW
2892 # Extract the first word of "gcc", so it can be a program name with args.
2893set dummy gcc; ac_word=$2
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2895$as_echo_n "checking for $ac_word... " >&6; }
2896if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2897 $as_echo_n "(cached) " >&6
b4e70030
JB
2898else
2899 if test -n "$ac_ct_CC"; then
2900 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2901else
2902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2903for as_dir in $PATH
2904do
2905 IFS=$as_save_IFS
2906 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2907 for ac_exec_ext in '' $ac_executable_extensions; do
2908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2909 ac_cv_prog_ac_ct_CC="gcc"
2910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2911 break 2
4e8d927d 2912 fi
b4e70030 2913done
81ecdfbb
RW
2914 done
2915IFS=$as_save_IFS
b4e70030
JB
2916
2917fi
2918fi
2919ac_ct_CC=$ac_cv_prog_ac_ct_CC
2920if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2922$as_echo "$ac_ct_CC" >&6; }
b4e70030 2923else
81ecdfbb
RW
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2925$as_echo "no" >&6; }
b4e70030
JB
2926fi
2927
81ecdfbb
RW
2928 if test "x$ac_ct_CC" = x; then
2929 CC=""
2930 else
2931 case $cross_compiling:$ac_tool_warned in
2932yes:)
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2935ac_tool_warned=yes ;;
2936esac
2937 CC=$ac_ct_CC
2938 fi
b4e70030
JB
2939else
2940 CC="$ac_cv_prog_CC"
2941fi
2942
c906108c 2943if test -z "$CC"; then
81ecdfbb
RW
2944 if test -n "$ac_tool_prefix"; then
2945 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2946set dummy ${ac_tool_prefix}cc; ac_word=$2
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2948$as_echo_n "checking for $ac_word... " >&6; }
2949if test "${ac_cv_prog_CC+set}" = set; then :
2950 $as_echo_n "(cached) " >&6
c906108c
SS
2951else
2952 if test -n "$CC"; then
2953 ac_cv_prog_CC="$CC" # Let the user override the test.
2954else
bec39cab
AC
2955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2956for as_dir in $PATH
2957do
2958 IFS=$as_save_IFS
2959 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2960 for ac_exec_ext in '' $ac_executable_extensions; do
2961 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2962 ac_cv_prog_CC="${ac_tool_prefix}cc"
2963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2964 break 2
2965 fi
2966done
81ecdfbb
RW
2967 done
2968IFS=$as_save_IFS
2969
2970fi
2971fi
2972CC=$ac_cv_prog_CC
2973if test -n "$CC"; then
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2975$as_echo "$CC" >&6; }
2976else
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978$as_echo "no" >&6; }
2979fi
2980
2981
2982 fi
2983fi
2984if test -z "$CC"; then
2985 # Extract the first word of "cc", so it can be a program name with args.
2986set dummy cc; ac_word=$2
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
2989if test "${ac_cv_prog_CC+set}" = set; then :
2990 $as_echo_n "(cached) " >&6
2991else
2992 if test -n "$CC"; then
2993 ac_cv_prog_CC="$CC" # Let the user override the test.
2994else
2995 ac_prog_rejected=no
2996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997for as_dir in $PATH
2998do
2999 IFS=$as_save_IFS
3000 test -z "$as_dir" && as_dir=.
3001 for ac_exec_ext in '' $ac_executable_extensions; do
3002 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3003 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3004 ac_prog_rejected=yes
3005 continue
3006 fi
3007 ac_cv_prog_CC="cc"
3008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3009 break 2
3010 fi
3011done
3012 done
3013IFS=$as_save_IFS
bec39cab 3014
c906108c
SS
3015if test $ac_prog_rejected = yes; then
3016 # We found a bogon in the path, so make sure we never use it.
3017 set dummy $ac_cv_prog_CC
3018 shift
bec39cab 3019 if test $# != 0; then
c906108c
SS
3020 # We chose a different compiler from the bogus one.
3021 # However, it has the same basename, so the bogon will be chosen
3022 # first if we set CC to just the basename; use the full file name.
3023 shift
bec39cab 3024 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3025 fi
3026fi
3027fi
3028fi
bec39cab 3029CC=$ac_cv_prog_CC
c906108c 3030if test -n "$CC"; then
81ecdfbb
RW
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3032$as_echo "$CC" >&6; }
c906108c 3033else
81ecdfbb
RW
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3035$as_echo "no" >&6; }
c906108c
SS
3036fi
3037
81ecdfbb 3038
bec39cab
AC
3039fi
3040if test -z "$CC"; then
3041 if test -n "$ac_tool_prefix"; then
81ecdfbb 3042 for ac_prog in cl.exe
bec39cab
AC
3043 do
3044 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3047$as_echo_n "checking for $ac_word... " >&6; }
3048if test "${ac_cv_prog_CC+set}" = set; then :
3049 $as_echo_n "(cached) " >&6
c906108c
SS
3050else
3051 if test -n "$CC"; then
3052 ac_cv_prog_CC="$CC" # Let the user override the test.
3053else
bec39cab
AC
3054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3055for as_dir in $PATH
3056do
3057 IFS=$as_save_IFS
3058 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3059 for ac_exec_ext in '' $ac_executable_extensions; do
3060 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3061 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3063 break 2
3064 fi
3065done
81ecdfbb
RW
3066 done
3067IFS=$as_save_IFS
bec39cab 3068
c906108c
SS
3069fi
3070fi
bec39cab 3071CC=$ac_cv_prog_CC
c906108c 3072if test -n "$CC"; then
81ecdfbb
RW
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3074$as_echo "$CC" >&6; }
c906108c 3075else
81ecdfbb
RW
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3077$as_echo "no" >&6; }
c906108c 3078fi
bec39cab 3079
81ecdfbb 3080
bec39cab
AC
3081 test -n "$CC" && break
3082 done
3083fi
3084if test -z "$CC"; then
3085 ac_ct_CC=$CC
81ecdfbb 3086 for ac_prog in cl.exe
bec39cab
AC
3087do
3088 # Extract the first word of "$ac_prog", so it can be a program name with args.
3089set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3091$as_echo_n "checking for $ac_word... " >&6; }
3092if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3093 $as_echo_n "(cached) " >&6
bec39cab
AC
3094else
3095 if test -n "$ac_ct_CC"; then
3096 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3097else
3098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099for as_dir in $PATH
3100do
3101 IFS=$as_save_IFS
3102 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3103 for ac_exec_ext in '' $ac_executable_extensions; do
3104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3105 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3107 break 2
c906108c 3108 fi
bec39cab 3109done
81ecdfbb
RW
3110 done
3111IFS=$as_save_IFS
bec39cab
AC
3112
3113fi
3114fi
3115ac_ct_CC=$ac_cv_prog_ac_ct_CC
3116if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3118$as_echo "$ac_ct_CC" >&6; }
bec39cab 3119else
81ecdfbb
RW
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3121$as_echo "no" >&6; }
c906108c
SS
3122fi
3123
81ecdfbb 3124
bec39cab
AC
3125 test -n "$ac_ct_CC" && break
3126done
c906108c 3127
81ecdfbb
RW
3128 if test "x$ac_ct_CC" = x; then
3129 CC=""
3130 else
3131 case $cross_compiling:$ac_tool_warned in
3132yes:)
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3135ac_tool_warned=yes ;;
3136esac
3137 CC=$ac_ct_CC
3138 fi
bec39cab
AC
3139fi
3140
3141fi
3142
3143
81ecdfbb
RW
3144test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3146as_fn_error "no acceptable C compiler found in \$PATH
3147See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3148
3149# Provide some information about the compiler.
81ecdfbb
RW
3150$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3151set X $ac_compile
3152ac_compiler=$2
3153for ac_option in --version -v -V -qversion; do
3154 { { ac_try="$ac_compiler $ac_option >&5"
3155case "(($ac_try" in
3156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3157 *) ac_try_echo=$ac_try;;
3158esac
3159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3160$as_echo "$ac_try_echo"; } >&5
3161 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3162 ac_status=$?
81ecdfbb
RW
3163 if test -s conftest.err; then
3164 sed '10a\
3165... rest of stderr output deleted ...
3166 10q' conftest.err >conftest.er1
3167 cat conftest.er1 >&5
3168 rm -f conftest.er1 conftest.err
3169 fi
3170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3171 test $ac_status = 0; }
3172done
bec39cab 3173
81ecdfbb 3174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3175/* end confdefs.h. */
3176
3177int
3178main ()
3179{
3180
3181 ;
3182 return 0;
3183}
3184_ACEOF
3185ac_clean_files_save=$ac_clean_files
81ecdfbb 3186ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3187# Try to create an executable without -o first, disregard a.out.
3188# It will help us diagnose broken compilers, and finding out an intuition
3189# of exeext.
81ecdfbb
RW
3190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3191$as_echo_n "checking for C compiler default output file name... " >&6; }
3192ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3193
3194# The possible output files:
3195ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3196
3197ac_rmfiles=
3198for ac_file in $ac_files
3199do
3200 case $ac_file in
3201 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3202 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3203 esac
3204done
3205rm -f $ac_rmfiles
3206
3207if { { ac_try="$ac_link_default"
3208case "(($ac_try" in
3209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3210 *) ac_try_echo=$ac_try;;
3211esac
3212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3213$as_echo "$ac_try_echo"; } >&5
3214 (eval "$ac_link_default") 2>&5
3215 ac_status=$?
3216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3217 test $ac_status = 0; }; then :
3218 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3219# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3220# in a Makefile. We should not override ac_cv_exeext if it was cached,
3221# so that the user can short-circuit this test for compilers unknown to
3222# Autoconf.
3223for ac_file in $ac_files ''
bec39cab
AC
3224do
3225 test -f "$ac_file" || continue
3226 case $ac_file in
81ecdfbb 3227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3228 ;;
3229 [ab].out )
3230 # We found the default executable, but exeext='' is most
3231 # certainly right.
3232 break;;
3233 *.* )
81ecdfbb
RW
3234 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3235 then :; else
3236 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3237 fi
3238 # We set ac_cv_exeext here because the later test for it is not
3239 # safe: cross compilers may not add the suffix if given an `-o'
3240 # argument, so we may need to know it at that point already.
3241 # Even if this section looks crufty: it has the advantage of
3242 # actually working.
b4e70030
JB
3243 break;;
3244 * )
3245 break;;
bec39cab
AC
3246 esac
3247done
81ecdfbb
RW
3248test "$ac_cv_exeext" = no && ac_cv_exeext=
3249
bec39cab 3250else
81ecdfbb
RW
3251 ac_file=''
3252fi
3253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3254$as_echo "$ac_file" >&6; }
3255if test -z "$ac_file"; then :
3256 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3257sed 's/^/| /' conftest.$ac_ext >&5
3258
81ecdfbb
RW
3259{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3261{ as_fn_set_status 77
3262as_fn_error "C compiler cannot create executables
3263See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3264fi
b4e70030 3265ac_exeext=$ac_cv_exeext
b4e70030 3266
81ecdfbb 3267# Check that the compiler produces executables we can run. If not, either
bec39cab 3268# the compiler is broken, or we cross compile.
81ecdfbb
RW
3269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3270$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3271# If not cross compiling, check that we can run a simple program.
3272if test "$cross_compiling" != yes; then
3273 if { ac_try='./$ac_file'
81ecdfbb
RW
3274 { { case "(($ac_try" in
3275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3276 *) ac_try_echo=$ac_try;;
3277esac
3278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3279$as_echo "$ac_try_echo"; } >&5
3280 (eval "$ac_try") 2>&5
bec39cab 3281 ac_status=$?
81ecdfbb
RW
3282 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3283 test $ac_status = 0; }; }; then
bec39cab 3284 cross_compiling=no
c906108c 3285 else
bec39cab
AC
3286 if test "$cross_compiling" = maybe; then
3287 cross_compiling=yes
3288 else
81ecdfbb
RW
3289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3291as_fn_error "cannot run C compiled programs.
bec39cab 3292If you meant to cross compile, use \`--host'.
81ecdfbb 3293See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3294 fi
c906108c 3295 fi
bec39cab 3296fi
81ecdfbb
RW
3297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3298$as_echo "yes" >&6; }
bec39cab 3299
81ecdfbb 3300rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3301ac_clean_files=$ac_clean_files_save
81ecdfbb 3302# Check that the compiler produces executables we can run. If not, either
b4e70030 3303# the compiler is broken, or we cross compile.
81ecdfbb
RW
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3305$as_echo_n "checking whether we are cross compiling... " >&6; }
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3307$as_echo "$cross_compiling" >&6; }
3308
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3310$as_echo_n "checking for suffix of executables... " >&6; }
3311if { { ac_try="$ac_link"
3312case "(($ac_try" in
3313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3314 *) ac_try_echo=$ac_try;;
3315esac
3316eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3317$as_echo "$ac_try_echo"; } >&5
3318 (eval "$ac_link") 2>&5
bec39cab 3319 ac_status=$?
81ecdfbb
RW
3320 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3321 test $ac_status = 0; }; then :
b4e70030
JB
3322 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3323# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3324# work properly (i.e., refer to `conftest.exe'), while it won't with
3325# `rm'.
3326for ac_file in conftest.exe conftest conftest.*; do
3327 test -f "$ac_file" || continue
3328 case $ac_file in
81ecdfbb 3329 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3330 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3331 break;;
3332 * ) break;;
3333 esac
3334done
c906108c 3335else
81ecdfbb
RW
3336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3338as_fn_error "cannot compute suffix of executables: cannot compile and link
3339See \`config.log' for more details." "$LINENO" 5; }
c906108c 3340fi
b4e70030 3341rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3343$as_echo "$ac_cv_exeext" >&6; }
c906108c 3344
b4e70030 3345rm -f conftest.$ac_ext
bec39cab
AC
3346EXEEXT=$ac_cv_exeext
3347ac_exeext=$EXEEXT
81ecdfbb
RW
3348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3349$as_echo_n "checking for suffix of object files... " >&6; }
3350if test "${ac_cv_objext+set}" = set; then :
3351 $as_echo_n "(cached) " >&6
bec39cab 3352else
81ecdfbb 3353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3354/* end confdefs.h. */
3355
3356int
3357main ()
3358{
3359
3360 ;
3361 return 0;
3362}
3363_ACEOF
3364rm -f conftest.o conftest.obj
81ecdfbb
RW
3365if { { ac_try="$ac_compile"
3366case "(($ac_try" in
3367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3368 *) ac_try_echo=$ac_try;;
3369esac
3370eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3371$as_echo "$ac_try_echo"; } >&5
3372 (eval "$ac_compile") 2>&5
3373 ac_status=$?
3374 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3375 test $ac_status = 0; }; then :
3376 for ac_file in conftest.o conftest.obj conftest.*; do
3377 test -f "$ac_file" || continue;
bec39cab 3378 case $ac_file in
81ecdfbb 3379 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3380 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3381 break;;
3382 esac
3383done
c906108c 3384else
81ecdfbb 3385 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3386sed 's/^/| /' conftest.$ac_ext >&5
3387
81ecdfbb
RW
3388{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3390as_fn_error "cannot compute suffix of object files: cannot compile
3391See \`config.log' for more details." "$LINENO" 5; }
c906108c 3392fi
b4e70030 3393rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3394fi
81ecdfbb
RW
3395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3396$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3397OBJEXT=$ac_cv_objext
3398ac_objext=$OBJEXT
81ecdfbb
RW
3399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3400$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3401if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3402 $as_echo_n "(cached) " >&6
c906108c 3403else
81ecdfbb 3404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3405/* end confdefs.h. */
3406
3407int
3408main ()
3409{
3410#ifndef __GNUC__
3411 choke me
3412#endif
3413
3414 ;
3415 return 0;
3416}
3417_ACEOF
81ecdfbb 3418if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3419 ac_compiler_gnu=yes
3420else
81ecdfbb 3421 ac_compiler_gnu=no
bec39cab 3422fi
81ecdfbb 3423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3424ac_cv_c_compiler_gnu=$ac_compiler_gnu
3425
3426fi
81ecdfbb
RW
3427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3428$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3429if test $ac_compiler_gnu = yes; then
3430 GCC=yes
3431else
3432 GCC=
3433fi
bec39cab
AC
3434ac_test_CFLAGS=${CFLAGS+set}
3435ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3437$as_echo_n "checking whether $CC accepts -g... " >&6; }
3438if test "${ac_cv_prog_cc_g+set}" = set; then :
3439 $as_echo_n "(cached) " >&6
bec39cab 3440else
81ecdfbb
RW
3441 ac_save_c_werror_flag=$ac_c_werror_flag
3442 ac_c_werror_flag=yes
3443 ac_cv_prog_cc_g=no
3444 CFLAGS="-g"
3445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3446/* end confdefs.h. */
3447
3448int
3449main ()
3450{
3451
3452 ;
3453 return 0;
3454}
3455_ACEOF
81ecdfbb 3456if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3457 ac_cv_prog_cc_g=yes
3458else
81ecdfbb
RW
3459 CFLAGS=""
3460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3461/* end confdefs.h. */
3462
3463int
3464main ()
3465{
3466
3467 ;
3468 return 0;
3469}
3470_ACEOF
3471if ac_fn_c_try_compile "$LINENO"; then :
3472
3473else
3474 ac_c_werror_flag=$ac_save_c_werror_flag
3475 CFLAGS="-g"
3476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3477/* end confdefs.h. */
3478
3479int
3480main ()
3481{
c906108c 3482
81ecdfbb
RW
3483 ;
3484 return 0;
3485}
3486_ACEOF
3487if ac_fn_c_try_compile "$LINENO"; then :
3488 ac_cv_prog_cc_g=yes
3489fi
3490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3491fi
3492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3493fi
81ecdfbb
RW
3494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3495 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3496fi
81ecdfbb
RW
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3498$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3499if test "$ac_test_CFLAGS" = set; then
bec39cab 3500 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3501elif test $ac_cv_prog_cc_g = yes; then
3502 if test "$GCC" = yes; then
3503 CFLAGS="-g -O2"
3504 else
3505 CFLAGS="-g"
3506 fi
3507else
3508 if test "$GCC" = yes; then
3509 CFLAGS="-O2"
3510 else
3511 CFLAGS=
3512 fi
3513fi
81ecdfbb
RW
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3515$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3516if test "${ac_cv_prog_cc_c89+set}" = set; then :
3517 $as_echo_n "(cached) " >&6
bec39cab 3518else
81ecdfbb 3519 ac_cv_prog_cc_c89=no
bec39cab 3520ac_save_CC=$CC
81ecdfbb 3521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3522/* end confdefs.h. */
c906108c
SS
3523#include <stdarg.h>
3524#include <stdio.h>
3525#include <sys/types.h>
3526#include <sys/stat.h>
3527/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3528struct buf { int x; };
3529FILE * (*rcsopen) (struct buf *, struct stat *, int);
3530static char *e (p, i)
3531 char **p;
3532 int i;
3533{
3534 return p[i];
3535}
3536static char *f (char * (*g) (char **, int), char **p, ...)
3537{
3538 char *s;
3539 va_list v;
3540 va_start (v,p);
3541 s = g (p, va_arg (v,int));
3542 va_end (v);
3543 return s;
3544}
bec39cab
AC
3545
3546/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3547 function prototypes and stuff, but not '\xHH' hex character constants.
3548 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3549 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3550 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3551 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3552 that's true only with -std. */
bec39cab
AC
3553int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3554
81ecdfbb
RW
3555/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3556 inside strings and character constants. */
3557#define FOO(x) 'x'
3558int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3559
c906108c
SS
3560int test (int i, double x);
3561struct s1 {int (*f) (int a);};
3562struct s2 {int (*f) (double a);};
3563int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3564int argc;
3565char **argv;
bec39cab
AC
3566int
3567main ()
3568{
c906108c 3569return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3570 ;
3571 return 0;
3572}
3573_ACEOF
81ecdfbb
RW
3574for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3575 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3576do
3577 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3578 if ac_fn_c_try_compile "$LINENO"; then :
3579 ac_cv_prog_cc_c89=$ac_arg
c906108c 3580fi
81ecdfbb
RW
3581rm -f core conftest.err conftest.$ac_objext
3582 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3583done
81ecdfbb 3584rm -f conftest.$ac_ext
bec39cab 3585CC=$ac_save_CC
c906108c
SS
3586
3587fi
81ecdfbb
RW
3588# AC_CACHE_VAL
3589case "x$ac_cv_prog_cc_c89" in
3590 x)
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3592$as_echo "none needed" >&6; } ;;
3593 xno)
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3595$as_echo "unsupported" >&6; } ;;
bec39cab 3596 *)
81ecdfbb
RW
3597 CC="$CC $ac_cv_prog_cc_c89"
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3599$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3600esac
81ecdfbb 3601if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3602
b4e70030
JB
3603fi
3604
bec39cab
AC
3605ac_ext=c
3606ac_cpp='$CPP $CPPFLAGS'
3607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3609ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3610
f434ba03
PA
3611ac_aux_dir=
3612for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3613 for ac_t in install-sh install.sh shtool; do
3614 if test -f "$ac_dir/$ac_t"; then
3615 ac_aux_dir=$ac_dir
3616 ac_install_sh="$ac_aux_dir/$ac_t -c"
3617 break 2
3618 fi
3619 done
3620done
3621if test -z "$ac_aux_dir"; then
3622 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3623fi
3624
3625# These three variables are undocumented and unsupported,
3626# and are intended to be withdrawn in a future Autoconf release.
3627# They can cause serious problems if a builder's source tree is in a directory
3628# whose full name contains unusual characters.
3629ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3630ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3631ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3632
3633
3634# Make sure we can run config.sub.
3635$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3636 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3637
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3639$as_echo_n "checking build system type... " >&6; }
3640if test "${ac_cv_build+set}" = set; then :
3641 $as_echo_n "(cached) " >&6
3642else
3643 ac_build_alias=$build_alias
3644test "x$ac_build_alias" = x &&
3645 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3646test "x$ac_build_alias" = x &&
3647 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3648ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3649 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3650
3651fi
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3653$as_echo "$ac_cv_build" >&6; }
3654case $ac_cv_build in
3655*-*-*) ;;
3656*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3657esac
3658build=$ac_cv_build
3659ac_save_IFS=$IFS; IFS='-'
3660set x $ac_cv_build
3661shift
3662build_cpu=$1
3663build_vendor=$2
3664shift; shift
3665# Remember, the first character of IFS is used to create $*,
3666# except with old shells:
3667build_os=$*
3668IFS=$ac_save_IFS
3669case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3670
3671
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3673$as_echo_n "checking host system type... " >&6; }
3674if test "${ac_cv_host+set}" = set; then :
3675 $as_echo_n "(cached) " >&6
3676else
3677 if test "x$host_alias" = x; then
3678 ac_cv_host=$ac_cv_build
3679else
3680 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3681 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3682fi
3683
3684fi
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3686$as_echo "$ac_cv_host" >&6; }
3687case $ac_cv_host in
3688*-*-*) ;;
3689*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3690esac
3691host=$ac_cv_host
3692ac_save_IFS=$IFS; IFS='-'
3693set x $ac_cv_host
3694shift
3695host_cpu=$1
3696host_vendor=$2
3697shift; shift
3698# Remember, the first character of IFS is used to create $*,
3699# except with old shells:
3700host_os=$*
3701IFS=$ac_save_IFS
3702case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3703
3704
60ca704f 3705
bec39cab
AC
3706ac_ext=c
3707ac_cpp='$CPP $CPPFLAGS'
3708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3710ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3712$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3713# On Suns, sometimes $CPP names a directory.
3714if test -n "$CPP" && test -d "$CPP"; then
3715 CPP=
8bb2c122 3716fi
bec39cab 3717if test -z "$CPP"; then
81ecdfbb
RW
3718 if test "${ac_cv_prog_CPP+set}" = set; then :
3719 $as_echo_n "(cached) " >&6
bec39cab
AC
3720else
3721 # Double quotes because CPP needs to be expanded
3722 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3723 do
3724 ac_preproc_ok=false
3725for ac_c_preproc_warn_flag in '' yes
3726do
3727 # Use a header file that comes with gcc, so configuring glibc
3728 # with a fresh cross-compiler works.
3729 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3730 # <limits.h> exists even on freestanding compilers.
3731 # On the NeXT, cc -E runs the code through the compiler's parser,
3732 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3734/* end confdefs.h. */
3735#ifdef __STDC__
3736# include <limits.h>
3737#else
3738# include <assert.h>
3739#endif
3740 Syntax error
3741_ACEOF
81ecdfbb 3742if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3743
81ecdfbb 3744else
bec39cab
AC
3745 # Broken: fails on valid input.
3746continue
3747fi
3748rm -f conftest.err conftest.$ac_ext
3749
81ecdfbb 3750 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3751 # can be detected and how.
81ecdfbb 3752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3753/* end confdefs.h. */
3754#include <ac_nonexistent.h>
3755_ACEOF
81ecdfbb 3756if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3757 # Broken: success on invalid input.
3758continue
8bb2c122 3759else
bec39cab
AC
3760 # Passes both tests.
3761ac_preproc_ok=:
3762break
8bb2c122 3763fi
bec39cab 3764rm -f conftest.err conftest.$ac_ext
8bb2c122 3765
bec39cab
AC
3766done
3767# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3768rm -f conftest.err conftest.$ac_ext
81ecdfbb 3769if $ac_preproc_ok; then :
bec39cab
AC
3770 break
3771fi
8bb2c122 3772
bec39cab
AC
3773 done
3774 ac_cv_prog_CPP=$CPP
ddc9cd0f 3775
c906108c 3776fi
bec39cab
AC
3777 CPP=$ac_cv_prog_CPP
3778else
3779 ac_cv_prog_CPP=$CPP
c906108c 3780fi
81ecdfbb
RW
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3782$as_echo "$CPP" >&6; }
bec39cab
AC
3783ac_preproc_ok=false
3784for ac_c_preproc_warn_flag in '' yes
3785do
3786 # Use a header file that comes with gcc, so configuring glibc
3787 # with a fresh cross-compiler works.
3788 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3789 # <limits.h> exists even on freestanding compilers.
3790 # On the NeXT, cc -E runs the code through the compiler's parser,
3791 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3793/* end confdefs.h. */
3794#ifdef __STDC__
3795# include <limits.h>
3796#else
3797# include <assert.h>
3798#endif
3799 Syntax error
3800_ACEOF
81ecdfbb 3801if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3802
81ecdfbb 3803else
bec39cab
AC
3804 # Broken: fails on valid input.
3805continue
3806fi
3807rm -f conftest.err conftest.$ac_ext
3808
81ecdfbb 3809 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3810 # can be detected and how.
81ecdfbb 3811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3812/* end confdefs.h. */
3813#include <ac_nonexistent.h>
3814_ACEOF
81ecdfbb 3815if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3816 # Broken: success on invalid input.
3817continue
c906108c 3818else
bec39cab
AC
3819 # Passes both tests.
3820ac_preproc_ok=:
3821break
c906108c 3822fi
bec39cab 3823rm -f conftest.err conftest.$ac_ext
c906108c 3824
bec39cab
AC
3825done
3826# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3827rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3828if $ac_preproc_ok; then :
3829
c906108c 3830else
81ecdfbb
RW
3831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3833as_fn_error "C preprocessor \"$CPP\" fails sanity check
3834See \`config.log' for more details." "$LINENO" 5; }
c906108c 3835fi
c906108c 3836
bec39cab
AC
3837ac_ext=c
3838ac_cpp='$CPP $CPPFLAGS'
3839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842
3843
81ecdfbb
RW
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3845$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3846if test "${ac_cv_path_GREP+set}" = set; then :
3847 $as_echo_n "(cached) " >&6
4e8d927d 3848else
81ecdfbb
RW
3849 if test -z "$GREP"; then
3850 ac_path_GREP_found=false
3851 # Loop through the user's path and test for each of PROGNAME-LIST
3852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3854do
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
3857 for ac_prog in grep ggrep; do
3858 for ac_exec_ext in '' $ac_executable_extensions; do
3859 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3860 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3861# Check for GNU ac_path_GREP and select it if it is found.
3862 # Check for GNU $ac_path_GREP
3863case `"$ac_path_GREP" --version 2>&1` in
3864*GNU*)
3865 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3866*)
3867 ac_count=0
3868 $as_echo_n 0123456789 >"conftest.in"
3869 while :
3870 do
3871 cat "conftest.in" "conftest.in" >"conftest.tmp"
3872 mv "conftest.tmp" "conftest.in"
3873 cp "conftest.in" "conftest.nl"
3874 $as_echo 'GREP' >> "conftest.nl"
3875 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3876 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3877 as_fn_arith $ac_count + 1 && ac_count=$as_val
3878 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3879 # Best one so far, save it but keep looking for a better one
3880 ac_cv_path_GREP="$ac_path_GREP"
3881 ac_path_GREP_max=$ac_count
bec39cab 3882 fi
81ecdfbb
RW
3883 # 10*(2^10) chars as input seems more than enough
3884 test $ac_count -gt 10 && break
3885 done
3886 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3887esac
bec39cab 3888
81ecdfbb
RW
3889 $ac_path_GREP_found && break 3
3890 done
3891 done
3892 done
3893IFS=$as_save_IFS
3894 if test -z "$ac_cv_path_GREP"; then
3895 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3896 fi
c906108c 3897else
81ecdfbb 3898 ac_cv_path_GREP=$GREP
c906108c 3899fi
c906108c 3900
81ecdfbb
RW
3901fi
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3903$as_echo "$ac_cv_path_GREP" >&6; }
3904 GREP="$ac_cv_path_GREP"
c906108c 3905
c906108c 3906
81ecdfbb
RW
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3908$as_echo_n "checking for egrep... " >&6; }
3909if test "${ac_cv_path_EGREP+set}" = set; then :
3910 $as_echo_n "(cached) " >&6
783e057b 3911else
81ecdfbb
RW
3912 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3913 then ac_cv_path_EGREP="$GREP -E"
3914 else
3915 if test -z "$EGREP"; then
3916 ac_path_EGREP_found=false
3917 # Loop through the user's path and test for each of PROGNAME-LIST
3918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3920do
3921 IFS=$as_save_IFS
3922 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3923 for ac_prog in egrep; do
3924 for ac_exec_ext in '' $ac_executable_extensions; do
3925 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3926 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3927# Check for GNU ac_path_EGREP and select it if it is found.
3928 # Check for GNU $ac_path_EGREP
3929case `"$ac_path_EGREP" --version 2>&1` in
3930*GNU*)
3931 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3932*)
3933 ac_count=0
3934 $as_echo_n 0123456789 >"conftest.in"
3935 while :
3936 do
3937 cat "conftest.in" "conftest.in" >"conftest.tmp"
3938 mv "conftest.tmp" "conftest.in"
3939 cp "conftest.in" "conftest.nl"
3940 $as_echo 'EGREP' >> "conftest.nl"
3941 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3942 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3943 as_fn_arith $ac_count + 1 && ac_count=$as_val
3944 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3945 # Best one so far, save it but keep looking for a better one
3946 ac_cv_path_EGREP="$ac_path_EGREP"
3947 ac_path_EGREP_max=$ac_count
3948 fi
3949 # 10*(2^10) chars as input seems more than enough
3950 test $ac_count -gt 10 && break
3951 done
3952 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3953esac
bec39cab 3954
81ecdfbb
RW
3955 $ac_path_EGREP_found && break 3
3956 done
3957 done
3958 done
3959IFS=$as_save_IFS
3960 if test -z "$ac_cv_path_EGREP"; then
3961 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3962 fi
783e057b 3963else
81ecdfbb 3964 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3965fi
3966
81ecdfbb 3967 fi
783e057b 3968fi
81ecdfbb
RW
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3970$as_echo "$ac_cv_path_EGREP" >&6; }
3971 EGREP="$ac_cv_path_EGREP"
3972
783e057b 3973
81ecdfbb
RW
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3975$as_echo_n "checking for ANSI C header files... " >&6; }
3976if test "${ac_cv_header_stdc+set}" = set; then :
3977 $as_echo_n "(cached) " >&6
783e057b 3978else
81ecdfbb 3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3980/* end confdefs.h. */
783e057b 3981#include <stdlib.h>
bec39cab 3982#include <stdarg.h>
783e057b
DJ
3983#include <string.h>
3984#include <float.h>
c906108c 3985
bec39cab
AC
3986int
3987main ()
3988{
c906108c 3989
bec39cab
AC
3990 ;
3991 return 0;
3992}
3993_ACEOF
81ecdfbb 3994if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3995 ac_cv_header_stdc=yes
c906108c 3996else
81ecdfbb 3997 ac_cv_header_stdc=no
c906108c 3998fi
81ecdfbb 3999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4000
783e057b
DJ
4001if test $ac_cv_header_stdc = yes; then
4002 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4004/* end confdefs.h. */
4005#include <string.h>
c906108c 4006
783e057b
DJ
4007_ACEOF
4008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4009 $EGREP "memchr" >/dev/null 2>&1; then :
4010
c906108c 4011else
783e057b 4012 ac_cv_header_stdc=no
c906108c 4013fi
783e057b 4014rm -f conftest*
c906108c
SS
4015
4016fi
4017
783e057b
DJ
4018if test $ac_cv_header_stdc = yes; then
4019 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4021/* end confdefs.h. */
4022#include <stdlib.h>
bec39cab 4023
783e057b
DJ
4024_ACEOF
4025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4026 $EGREP "free" >/dev/null 2>&1; then :
4027
bec39cab 4028else
783e057b 4029 ac_cv_header_stdc=no
bec39cab 4030fi
783e057b 4031rm -f conftest*
bec39cab
AC
4032
4033fi
bec39cab 4034
783e057b
DJ
4035if test $ac_cv_header_stdc = yes; then
4036 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4037 if test "$cross_compiling" = yes; then :
783e057b 4038 :
bec39cab 4039else
81ecdfbb 4040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4041/* end confdefs.h. */
4042#include <ctype.h>
81ecdfbb 4043#include <stdlib.h>
783e057b
DJ
4044#if ((' ' & 0x0FF) == 0x020)
4045# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4046# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4047#else
4048# define ISLOWER(c) \
4049 (('a' <= (c) && (c) <= 'i') \
4050 || ('j' <= (c) && (c) <= 'r') \
4051 || ('s' <= (c) && (c) <= 'z'))
4052# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4053#endif
4054
4055#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4056int
4057main ()
4058{
4059 int i;
4060 for (i = 0; i < 256; i++)
4061 if (XOR (islower (i), ISLOWER (i))
4062 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4063 return 2;
4064 return 0;
783e057b
DJ
4065}
4066_ACEOF
81ecdfbb 4067if ac_fn_c_try_run "$LINENO"; then :
783e057b 4068
81ecdfbb
RW
4069else
4070 ac_cv_header_stdc=no
783e057b 4071fi
81ecdfbb
RW
4072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4073 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4074fi
81ecdfbb 4075
783e057b
DJ
4076fi
4077fi
81ecdfbb
RW
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4079$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4080if test $ac_cv_header_stdc = yes; then
4081
81ecdfbb 4082$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4083
4084fi
4085
4086# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4087for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4088 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4089do :
4090 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4091ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4092"
4093eval as_val=\$$as_ac_Header
4094 if test "x$as_val" = x""yes; then :
783e057b 4095 cat >>confdefs.h <<_ACEOF
81ecdfbb 4096#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4097_ACEOF
4098
4099fi
4100
4101done
4102
4103
4104
f434ba03
PA
4105
4106
81ecdfbb
RW
4107 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4108if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4109 MINIX=yes
4110else
4111 MINIX=
4112fi
4113
4114
4115 if test "$MINIX" = yes; then
4116
81ecdfbb 4117$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4118
4119
81ecdfbb 4120$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4121
4122
81ecdfbb 4123$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4124
4125 fi
4126
f434ba03
PA
4127 case "$host_os" in
4128 hpux*)
4129
4130$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4131
4132 ;;
4133 esac
4134
783e057b 4135
81ecdfbb
RW
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4137$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4138if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4139 $as_echo_n "(cached) " >&6
783e057b 4140else
81ecdfbb 4141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4142/* end confdefs.h. */
4143
f434ba03
PA
4144# define __EXTENSIONS__ 1
4145 $ac_includes_default
783e057b
DJ
4146int
4147main ()
4148{
4149
4150 ;
4151 return 0;
4152}
4153_ACEOF
81ecdfbb 4154if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4155 ac_cv_safe_to_define___extensions__=yes
4156else
81ecdfbb 4157 ac_cv_safe_to_define___extensions__=no
783e057b 4158fi
81ecdfbb 4159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4160fi
81ecdfbb
RW
4161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4162$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4163 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4164 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4165
81ecdfbb 4166 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4167
81ecdfbb 4168 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4169
81ecdfbb 4170 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4171
81ecdfbb 4172 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4173
4174
81ecdfbb
RW
4175if test -n "$ac_tool_prefix"; then
4176 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4177set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4179$as_echo_n "checking for $ac_word... " >&6; }
4180if test "${ac_cv_prog_RANLIB+set}" = set; then :
4181 $as_echo_n "(cached) " >&6
4182else
4183 if test -n "$RANLIB"; then
4184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4185else
4186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195 break 2
4196 fi
4197done
4198 done
4199IFS=$as_save_IFS
783e057b 4200
81ecdfbb
RW
4201fi
4202fi
4203RANLIB=$ac_cv_prog_RANLIB
4204if test -n "$RANLIB"; then
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4206$as_echo "$RANLIB" >&6; }
4207else
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
783e057b
DJ
4211
4212
81ecdfbb
RW
4213fi
4214if test -z "$ac_cv_prog_RANLIB"; then
4215 ac_ct_RANLIB=$RANLIB
4216 # Extract the first word of "ranlib", so it can be a program name with args.
4217set dummy ranlib; ac_word=$2
4218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4219$as_echo_n "checking for $ac_word... " >&6; }
4220if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4221 $as_echo_n "(cached) " >&6
783e057b 4222else
81ecdfbb
RW
4223 if test -n "$ac_ct_RANLIB"; then
4224 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4225else
4226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4227for as_dir in $PATH
4228do
4229 IFS=$as_save_IFS
4230 test -z "$as_dir" && as_dir=.
4231 for ac_exec_ext in '' $ac_executable_extensions; do
4232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4233 ac_cv_prog_ac_ct_RANLIB="ranlib"
4234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4235 break 2
4236 fi
4237done
4238 done
4239IFS=$as_save_IFS
4240
4241fi
4242fi
4243ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4244if test -n "$ac_ct_RANLIB"; then
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4246$as_echo "$ac_ct_RANLIB" >&6; }
4247else
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249$as_echo "no" >&6; }
4250fi
4251
4252 if test "x$ac_ct_RANLIB" = x; then
4253 RANLIB=":"
4254 else
4255 case $cross_compiling:$ac_tool_warned in
4256yes:)
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4259ac_tool_warned=yes ;;
4260esac
4261 RANLIB=$ac_ct_RANLIB
4262 fi
4263else
4264 RANLIB="$ac_cv_prog_RANLIB"
4265fi
4266
4267
4268
4269
4270
4271
3388710e
JM
4272
4273
3388710e 4274
f434ba03
PA
4275 # Code from module arg-nonnull:
4276 # Code from module c++defs:
4277 # Code from module extensions:
3388710e 4278
f434ba03
PA
4279 # Code from module include_next:
4280 # Code from module memchr:
4281 # Code from module memmem:
4282 # Code from module memmem-simple:
4283 # Code from module multiarch:
4284 # Code from module stddef:
4285 # Code from module stdint:
4286 # Code from module string:
4287 # Code from module warn-on-use:
4288 # Code from module wchar:
3388710e
JM
4289
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4291$as_echo_n "checking target system type... " >&6; }
4292if test "${ac_cv_target+set}" = set; then :
4293 $as_echo_n "(cached) " >&6
4294else
4295 if test "x$target_alias" = x; then
4296 ac_cv_target=$ac_cv_host
4297else
4298 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4299 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4300fi
4301
4302fi
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4304$as_echo "$ac_cv_target" >&6; }
4305case $ac_cv_target in
4306*-*-*) ;;
4307*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4308esac
4309target=$ac_cv_target
4310ac_save_IFS=$IFS; IFS='-'
4311set x $ac_cv_target
4312shift
4313target_cpu=$1
4314target_vendor=$2
4315shift; shift
4316# Remember, the first character of IFS is used to create $*,
4317# except with old shells:
4318target_os=$*
4319IFS=$ac_save_IFS
4320case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4321
4322
4323# The aliases save the names the user supplied, while $host etc.
4324# will get canonicalized.
4325test -n "$target_alias" &&
4326 test "$program_prefix$program_suffix$program_transform_name" = \
4327 NONENONEs,x,x, &&
4328 program_prefix=${target_alias}-
4329
4330# The tests for host and target for $enable_largefile require
4331# canonical names.
4332
4333
81ecdfbb 4334
da2f07f1
JK
4335# As the $enable_largefile decision depends on --enable-plugins we must set it
4336# even in directories otherwise not depending on the $plugins option.
4337
4338
4339# Check whether --enable-plugins was given.
4340if test "${enable_plugins+set}" = set; then :
4341 enableval=$enable_plugins; case "${enableval}" in
4342 yes | "") plugins=yes ;;
4343 no) plugins=no ;;
4344 *) plugins=yes ;;
4345 esac
4346else
4347 plugins=no
4348fi
4349
4350
4351
4352case "${host}" in
4353 sparc-*-solaris*|i[3-7]86-*-solaris*)
4354 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4355 # are mutually exclusive; and without procfs support, the bfd/ elf module
4356 # cannot provide certain routines such as elfcore_write_prpsinfo
4357 # or elfcore_write_prstatus. So unless the user explicitly requested
4358 # large-file support through the --enable-largefile switch, disable
4359 # large-file support in favor of procfs support.
4360 test "${target}" = "${host}" -a "x$plugins" = xno \
4361 && : ${enable_largefile="no"}
4362 ;;
4363esac
4364
4365# Check whether --enable-largefile was given.
4366if test "${enable_largefile+set}" = set; then :
4367 enableval=$enable_largefile;
4368fi
4369
4370if test "$enable_largefile" != no; then
4371
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4373$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4374if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4375 $as_echo_n "(cached) " >&6
4376else
4377 ac_cv_sys_largefile_CC=no
4378 if test "$GCC" != yes; then
4379 ac_save_CC=$CC
4380 while :; do
4381 # IRIX 6.2 and later do not support large files by default,
4382 # so use the C compiler's -n32 option if that helps.
4383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4384/* end confdefs.h. */
4385#include <sys/types.h>
4386 /* Check that off_t can represent 2**63 - 1 correctly.
4387 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4388 since some C++ compilers masquerading as C compilers
4389 incorrectly reject 9223372036854775807. */
4390#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4391 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4392 && LARGE_OFF_T % 2147483647 == 1)
4393 ? 1 : -1];
4394int
4395main ()
4396{
4397
4398 ;
4399 return 0;
4400}
4401_ACEOF
4402 if ac_fn_c_try_compile "$LINENO"; then :
4403 break
4404fi
4405rm -f core conftest.err conftest.$ac_objext
4406 CC="$CC -n32"
4407 if ac_fn_c_try_compile "$LINENO"; then :
4408 ac_cv_sys_largefile_CC=' -n32'; break
4409fi
4410rm -f core conftest.err conftest.$ac_objext
4411 break
4412 done
4413 CC=$ac_save_CC
4414 rm -f conftest.$ac_ext
4415 fi
4416fi
4417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4418$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4419 if test "$ac_cv_sys_largefile_CC" != no; then
4420 CC=$CC$ac_cv_sys_largefile_CC
4421 fi
4422
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4424$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4425if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4426 $as_echo_n "(cached) " >&6
4427else
4428 while :; do
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430/* end confdefs.h. */
4431#include <sys/types.h>
4432 /* Check that off_t can represent 2**63 - 1 correctly.
4433 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4434 since some C++ compilers masquerading as C compilers
4435 incorrectly reject 9223372036854775807. */
4436#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4437 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4438 && LARGE_OFF_T % 2147483647 == 1)
4439 ? 1 : -1];
4440int
4441main ()
4442{
4443
4444 ;
4445 return 0;
4446}
4447_ACEOF
4448if ac_fn_c_try_compile "$LINENO"; then :
4449 ac_cv_sys_file_offset_bits=no; break
4450fi
4451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4453/* end confdefs.h. */
4454#define _FILE_OFFSET_BITS 64
4455#include <sys/types.h>
4456 /* Check that off_t can represent 2**63 - 1 correctly.
4457 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4458 since some C++ compilers masquerading as C compilers
4459 incorrectly reject 9223372036854775807. */
4460#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4461 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4462 && LARGE_OFF_T % 2147483647 == 1)
4463 ? 1 : -1];
4464int
4465main ()
4466{
4467
4468 ;
4469 return 0;
4470}
4471_ACEOF
4472if ac_fn_c_try_compile "$LINENO"; then :
4473 ac_cv_sys_file_offset_bits=64; break
4474fi
4475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4476 ac_cv_sys_file_offset_bits=unknown
4477 break
4478done
4479fi
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4481$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4482case $ac_cv_sys_file_offset_bits in #(
4483 no | unknown) ;;
4484 *)
4485cat >>confdefs.h <<_ACEOF
4486#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4487_ACEOF
4488;;
4489esac
4490rm -rf conftest*
4491 if test $ac_cv_sys_file_offset_bits = unknown; then
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4493$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4494if test "${ac_cv_sys_large_files+set}" = set; then :
4495 $as_echo_n "(cached) " >&6
4496else
4497 while :; do
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500#include <sys/types.h>
4501 /* Check that off_t can represent 2**63 - 1 correctly.
4502 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4503 since some C++ compilers masquerading as C compilers
4504 incorrectly reject 9223372036854775807. */
4505#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4506 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4507 && LARGE_OFF_T % 2147483647 == 1)
4508 ? 1 : -1];
4509int
4510main ()
4511{
4512
4513 ;
4514 return 0;
4515}
4516_ACEOF
4517if ac_fn_c_try_compile "$LINENO"; then :
4518 ac_cv_sys_large_files=no; break
4519fi
4520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522/* end confdefs.h. */
4523#define _LARGE_FILES 1
4524#include <sys/types.h>
4525 /* Check that off_t can represent 2**63 - 1 correctly.
4526 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4527 since some C++ compilers masquerading as C compilers
4528 incorrectly reject 9223372036854775807. */
4529#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4530 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4531 && LARGE_OFF_T % 2147483647 == 1)
4532 ? 1 : -1];
4533int
4534main ()
4535{
4536
4537 ;
4538 return 0;
4539}
4540_ACEOF
4541if ac_fn_c_try_compile "$LINENO"; then :
4542 ac_cv_sys_large_files=1; break
4543fi
4544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4545 ac_cv_sys_large_files=unknown
4546 break
4547done
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4550$as_echo "$ac_cv_sys_large_files" >&6; }
4551case $ac_cv_sys_large_files in #(
4552 no | unknown) ;;
4553 *)
4554cat >>confdefs.h <<_ACEOF
4555#define _LARGE_FILES $ac_cv_sys_large_files
4556_ACEOF
4557;;
4558esac
4559rm -rf conftest*
4560 fi
4561fi
4562
4563
4564
81ecdfbb
RW
4565
4566
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4568$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4569if test "${am_cv_prog_cc_stdc+set}" = set; then :
4570 $as_echo_n "(cached) " >&6
4571else
4572 am_cv_prog_cc_stdc=no
4573ac_save_CC="$CC"
4574# Don't try gcc -ansi; that turns off useful extensions and
4575# breaks some systems' header files.
4576# AIX -qlanglvl=ansi
4577# Ultrix and OSF/1 -std1
4578# HP-UX 10.20 and later -Ae
4579# HP-UX older versions -Aa -D_HPUX_SOURCE
4580# SVR4 -Xc -D__EXTENSIONS__
4581for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4582do
783e057b 4583 CC="$ac_save_CC $ac_arg"
81ecdfbb 4584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4585/* end confdefs.h. */
4586#include <stdarg.h>
4587#include <stdio.h>
4588#include <sys/types.h>
4589#include <sys/stat.h>
4590/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4591struct buf { int x; };
4592FILE * (*rcsopen) (struct buf *, struct stat *, int);
4593static char *e (p, i)
4594 char **p;
4595 int i;
4596{
4597 return p[i];
4598}
4599static char *f (char * (*g) (char **, int), char **p, ...)
4600{
4601 char *s;
4602 va_list v;
4603 va_start (v,p);
4604 s = g (p, va_arg (v,int));
4605 va_end (v);
4606 return s;
4607}
4608int test (int i, double x);
4609struct s1 {int (*f) (int a);};
4610struct s2 {int (*f) (double a);};
4611int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4612int argc;
4613char **argv;
4614
4615int
4616main ()
4617{
4618
4619return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4620
4621 ;
4622 return 0;
4623}
4624_ACEOF
81ecdfbb 4625if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4626 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4627fi
81ecdfbb 4628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4629done
4630CC="$ac_save_CC"
4631
4632fi
4633
4634if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4636$as_echo "none needed" >&6; }
783e057b 4637else
81ecdfbb
RW
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4639$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4640fi
4641case "x$am_cv_prog_cc_stdc" in
4642 x|xno) ;;
4643 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4644esac
4645
4646
4647ac_aux_dir=
81ecdfbb
RW
4648for ac_dir in .. "$srcdir"/..; do
4649 for ac_t in install-sh install.sh shtool; do
4650 if test -f "$ac_dir/$ac_t"; then
4651 ac_aux_dir=$ac_dir
4652 ac_install_sh="$ac_aux_dir/$ac_t -c"
4653 break 2
4654 fi
4655 done
783e057b
DJ
4656done
4657if test -z "$ac_aux_dir"; then
81ecdfbb 4658 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4659fi
81ecdfbb
RW
4660
4661# These three variables are undocumented and unsupported,
4662# and are intended to be withdrawn in a future Autoconf release.
4663# They can cause serious problems if a builder's source tree is in a directory
4664# whose full name contains unusual characters.
4665ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4666ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4667ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4668
783e057b 4669
783e057b 4670
81ecdfbb 4671
a417dc56
RW
4672# Dependency checking.
4673rm -rf .tst 2>/dev/null
4674mkdir .tst 2>/dev/null
4675if test -d .tst; then
4676 am__leading_dot=.
4677else
4678 am__leading_dot=_
4679fi
4680rmdir .tst 2>/dev/null
4681
4682DEPDIR="${am__leading_dot}deps"
4683
81ecdfbb 4684ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4685
4686
4687depcc="$CC" am_compiler_list=
4688
4689am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4691$as_echo_n "checking dependency style of $depcc... " >&6; }
4692if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4693 $as_echo_n "(cached) " >&6
a417dc56
RW
4694else
4695 if test -f "$am_depcomp"; then
4696 # We make a subdir and do the tests there. Otherwise we can end up
4697 # making bogus files that we don't know about and never remove. For
4698 # instance it was reported that on HP-UX the gcc test will end up
4699 # making a dummy file named `D' -- because `-MD' means `put the output
4700 # in D'.
4701 mkdir conftest.dir
4702 # Copy depcomp to subdir because otherwise we won't find it if we're
4703 # using a relative directory.
4704 cp "$am_depcomp" conftest.dir
4705 cd conftest.dir
4706 # We will build objects and dependencies in a subdirectory because
4707 # it helps to detect inapplicable dependency modes. For instance
4708 # both Tru64's cc and ICC support -MD to output dependencies as a
4709 # side effect of compilation, but ICC will put the dependencies in
4710 # the current directory while Tru64 will put them in the object
4711 # directory.
4712 mkdir sub
4713
4714 am_cv_CC_dependencies_compiler_type=none
4715 if test "$am_compiler_list" = ""; then
4716 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4717 fi
4718 for depmode in $am_compiler_list; do
4719 if test $depmode = none; then break; fi
4720
81ecdfbb 4721 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4722 # Setup a source with many dependencies, because some compilers
4723 # like to wrap large dependency lists on column 80 (with \), and
4724 # we should not choose a depcomp mode which is confused by this.
4725 #
4726 # We need to recreate these files for each test, as the compiler may
4727 # overwrite some of them when testing with obscure command lines.
4728 # This happens at least with the AIX C compiler.
4729 : > sub/conftest.c
4730 for i in 1 2 3 4 5 6; do
4731 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4732 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4733 # Solaris 8's {/usr,}/bin/sh.
4734 touch sub/conftst$i.h
4735 done
4736 echo "include sub/conftest.Po" > confmf
4737
4738 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4739 # mode. It turns out that the SunPro C++ compiler does not properly
4740 # handle `-M -o', and we need to detect this.
4741 depcmd="depmode=$depmode \
4742 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4743 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4744 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4745 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4746 if env $depcmd > conftest.err 2>&1 &&
4747 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4748 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4749 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4750 # icc doesn't choke on unknown options, it will just issue warnings
4751 # or remarks (even with -Werror). So we grep stderr for any message
4752 # that says an option was ignored or not supported.
4753 # When given -MP, icc 7.0 and 7.1 complain thusly:
4754 # icc: Command line warning: ignoring option '-M'; no argument required
4755 # The diagnosis changed in icc 8.0:
4756 # icc: Command line remark: option '-MP' not supported
4757 if (grep 'ignoring option' conftest.err ||
4758 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4759 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4760 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4761 break
4762 fi
4763 fi
81ecdfbb 4764 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4765 sed -e 's/^/| /' < conftest.err >&5
4766 done
4767
4768 cd ..
4769 rm -rf conftest.dir
4770else
4771 am_cv_CC_dependencies_compiler_type=none
4772fi
4773
4774fi
81ecdfbb
RW
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4776$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4777if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4778then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4779else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4780
4781fi
4782
4783
4784# Check for the 'make' the user wants to use.
4785for ac_prog in make
4786do
4787 # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if test "${ac_cv_prog_MAKE+set}" = set; then :
4792 $as_echo_n "(cached) " >&6
a417dc56
RW
4793else
4794 if test -n "$MAKE"; then
4795 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4796else
4797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4802 for ac_exec_ext in '' $ac_executable_extensions; do
4803 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4804 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4806 break 2
4807 fi
4808done
81ecdfbb
RW
4809 done
4810IFS=$as_save_IFS
a417dc56
RW
4811
4812fi
4813fi
4814MAKE=$ac_cv_prog_MAKE
4815if test -n "$MAKE"; then
81ecdfbb
RW
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4817$as_echo "$MAKE" >&6; }
a417dc56 4818else
81ecdfbb
RW
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
a417dc56
RW
4821fi
4822
81ecdfbb 4823
a417dc56
RW
4824 test -n "$MAKE" && break
4825done
4826
4827MAKE_IS_GNU=
4828case "`$MAKE --version 2>&1 | sed 1q`" in
4829 *GNU*)
4830 MAKE_IS_GNU=yes
4831 ;;
4832esac
81ecdfbb 4833 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4834 GMAKE_TRUE=
4835 GMAKE_FALSE='#'
4836else
4837 GMAKE_TRUE='#'
4838 GMAKE_FALSE=
4839fi
4840
81ecdfbb
RW
4841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4842$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4843set x ${MAKE-make}
4844ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4845if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4846 $as_echo_n "(cached) " >&6
a417dc56
RW
4847else
4848 cat >conftest.make <<\_ACEOF
81ecdfbb 4849SHELL = /bin/sh
a417dc56 4850all:
81ecdfbb 4851 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4852_ACEOF
4853# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4854case `${MAKE-make} -f conftest.make 2>/dev/null` in
4855 *@@@%%%=?*=@@@%%%*)
4856 eval ac_cv_prog_make_${ac_make}_set=yes;;
4857 *)
4858 eval ac_cv_prog_make_${ac_make}_set=no;;
4859esac
a417dc56
RW
4860rm -f conftest.make
4861fi
81ecdfbb
RW
4862if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4864$as_echo "yes" >&6; }
a417dc56
RW
4865 SET_MAKE=
4866else
81ecdfbb
RW
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
a417dc56
RW
4869 SET_MAKE="MAKE=${MAKE-make}"
4870fi
4871
4872
783e057b
DJ
4873
4874CONFIG_OBS=
4875CONFIG_DEPS=
4876CONFIG_SRCS=
4877ENABLE_CFLAGS=
4878
4879CONFIG_ALL=
4880CONFIG_CLEAN=
4881CONFIG_INSTALL=
4882CONFIG_UNINSTALL=
4883
4884# If we haven't got the data from the intl directory,
4885# assume NLS is disabled.
4886USE_NLS=no
4887LIBINTL=
4888LIBINTL_DEP=
4889INCINTL=
4890XGETTEXT=
4891GMSGFMT=
4892POSUB=
4893
4894if test -f ../intl/config.intl; then
4895 . ../intl/config.intl
4896fi
81ecdfbb
RW
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4898$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4899if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
783e057b 4902else
81ecdfbb
RW
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4904$as_echo "yes" >&6; }
783e057b 4905
81ecdfbb 4906$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4907
4908
81ecdfbb
RW
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4910$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4911 # Look for .po and .gmo files in the source directory.
4912 CATALOGS=
4913 XLINGUAS=
4914 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4915 # If there aren't any .gmo files the shell will give us the
4916 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4917 # weeded out.
4918 case "$cat" in *\**)
4919 continue;;
4920 esac
4921 # The quadruple backslash is collapsed to a double backslash
4922 # by the backticks, then collapsed again by the double quotes,
4923 # leaving us with one backslash in the sed expression (right
4924 # before the dot that mustn't act as a wildcard).
4925 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4926 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4927 # The user is allowed to set LINGUAS to a list of languages to
4928 # install catalogs for. If it's empty that means "all of them."
4929 if test "x$LINGUAS" = x; then
4930 CATALOGS="$CATALOGS $cat"
4931 XLINGUAS="$XLINGUAS $lang"
4932 else
4933 case "$LINGUAS" in *$lang*)
4934 CATALOGS="$CATALOGS $cat"
4935 XLINGUAS="$XLINGUAS $lang"
4936 ;;
4937 esac
4938 fi
4939 done
4940 LINGUAS="$XLINGUAS"
81ecdfbb
RW
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4942$as_echo "$LINGUAS" >&6; }
783e057b
DJ
4943
4944
4945 DATADIRNAME=share
4946
4947 INSTOBJEXT=.mo
4948
4949 GENCAT=gencat
4950
4951 CATOBJEXT=.gmo
4952
4953fi
4954
4955localedir='${datadir}/locale'
4956
4957
4958if test x"$USE_NLS" = xyes; then
4959 CONFIG_ALL="$CONFIG_ALL all-po"
4960 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4961 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4962 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4963fi
4964
4965
f434ba03
PA
4966
4967
4968
4969 LIBC_FATAL_STDERR_=1
4970 export LIBC_FATAL_STDERR_
4971
4972
4973
4974
4975
4976 for ac_header in $gl_header_list
4977do :
4978 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4979ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4980eval as_val=\$$as_ac_Header
4981 if test "x$as_val" = x""yes; then :
4982 cat >>confdefs.h <<_ACEOF
4983#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4984_ACEOF
4985
4986fi
4987
4988done
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998 for ac_func in $gl_func_list
4999do :
5000 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5001ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5002eval as_val=\$$as_ac_var
5003 if test "x$as_val" = x""yes; then :
5004 cat >>confdefs.h <<_ACEOF
5005#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5006_ACEOF
5007
5008fi
5009done
5010
5011
5012
5013
5014
5015
5016 GNULIB_MEMCHR=0;
5017 GNULIB_MEMMEM=0;
5018 GNULIB_MEMPCPY=0;
5019 GNULIB_MEMRCHR=0;
5020 GNULIB_RAWMEMCHR=0;
5021 GNULIB_STPCPY=0;
5022 GNULIB_STPNCPY=0;
5023 GNULIB_STRCHRNUL=0;
5024 GNULIB_STRDUP=0;
5025 GNULIB_STRNCAT=0;
5026 GNULIB_STRNDUP=0;
5027 GNULIB_STRNLEN=0;
5028 GNULIB_STRPBRK=0;
5029 GNULIB_STRSEP=0;
5030 GNULIB_STRSTR=0;
5031 GNULIB_STRCASESTR=0;
5032 GNULIB_STRTOK_R=0;
5033 GNULIB_MBSLEN=0;
5034 GNULIB_MBSNLEN=0;
5035 GNULIB_MBSCHR=0;
5036 GNULIB_MBSRCHR=0;
5037 GNULIB_MBSSTR=0;
5038 GNULIB_MBSCASECMP=0;
5039 GNULIB_MBSNCASECMP=0;
5040 GNULIB_MBSPCASECMP=0;
5041 GNULIB_MBSCASESTR=0;
5042 GNULIB_MBSCSPN=0;
5043 GNULIB_MBSPBRK=0;
5044 GNULIB_MBSSPN=0;
5045 GNULIB_MBSSEP=0;
5046 GNULIB_MBSTOK_R=0;
5047 GNULIB_STRERROR=0;
5048 GNULIB_STRSIGNAL=0;
5049 GNULIB_STRVERSCMP=0;
5050 HAVE_MBSLEN=0;
5051 HAVE_MEMCHR=1;
5052 HAVE_DECL_MEMMEM=1;
5053 HAVE_MEMPCPY=1;
5054 HAVE_DECL_MEMRCHR=1;
5055 HAVE_RAWMEMCHR=1;
5056 HAVE_STPCPY=1;
5057 HAVE_STPNCPY=1;
5058 HAVE_STRCHRNUL=1;
5059 HAVE_DECL_STRDUP=1;
5060 HAVE_DECL_STRNDUP=1;
5061 HAVE_DECL_STRNLEN=1;
5062 HAVE_STRPBRK=1;
5063 HAVE_STRSEP=1;
5064 HAVE_STRCASESTR=1;
5065 HAVE_DECL_STRTOK_R=1;
5066 HAVE_DECL_STRSIGNAL=1;
5067 HAVE_STRVERSCMP=1;
5068 REPLACE_MEMCHR=0;
783e057b 5069 REPLACE_MEMMEM=0;
f434ba03
PA
5070 REPLACE_STPNCPY=0;
5071 REPLACE_STRDUP=0;
783e057b 5072 REPLACE_STRSTR=0;
f434ba03
PA
5073 REPLACE_STRCASESTR=0;
5074 REPLACE_STRERROR=0;
5075 REPLACE_STRNCAT=0;
5076 REPLACE_STRNDUP=0;
5077 REPLACE_STRNLEN=0;
5078 REPLACE_STRSIGNAL=0;
5079 REPLACE_STRTOK_R=0;
5080 UNDEFINE_STRTOK_R=0;
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
5095 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
5096 # irrelevant for anonymous mappings.
5097 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
5098if test "x$ac_cv_func_mmap" = x""yes; then :
5099 gl_have_mmap=yes
5100else
5101 gl_have_mmap=no
5102fi
5103
5104
5105 # Try to allow MAP_ANONYMOUS.
5106 gl_have_mmap_anonymous=no
5107 if test $gl_have_mmap = yes; then
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
5109$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
5110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5111/* end confdefs.h. */
5112
5113#include <sys/mman.h>
5114#ifdef MAP_ANONYMOUS
5115 I cant identify this map.
5116#endif
5117
5118_ACEOF
5119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5120 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5121 gl_have_mmap_anonymous=yes
5122fi
5123rm -f conftest*
5124
5125 if test $gl_have_mmap_anonymous != yes; then
5126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127/* end confdefs.h. */
5128
5129#include <sys/mman.h>
5130#ifdef MAP_ANON
5131 I cant identify this map.
5132#endif
5133
5134_ACEOF
5135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5136 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
5137
5138$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
5139
5140 gl_have_mmap_anonymous=yes
5141fi
5142rm -f conftest*
5143
5144 fi
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
5146$as_echo "$gl_have_mmap_anonymous" >&6; }
5147 if test $gl_have_mmap_anonymous = yes; then
5148
5149$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
5150
5151 fi
5152 fi
5153
5154
5155 :
5156
5157
5158
5159
5160
5161
5162 :
5163
5164
5165
5166
5167
5168
5169
5170
5171 :
5172
5173
5174
5175
5176
5177 if test $ac_cv_func_memchr = yes; then
5178 # Detect platform-specific bugs in some versions of glibc:
5179 # memchr should not dereference anything with length 0
5180 # http://bugzilla.redhat.com/499689
5181 # memchr should not dereference overestimated length after a match
5182 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
5183 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
5184 # Assume that memchr works on platforms that lack mprotect.
5185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
5186$as_echo_n "checking whether memchr works... " >&6; }
5187if test "${gl_cv_func_memchr_works+set}" = set; then :
5188 $as_echo_n "(cached) " >&6
5189else
5190 if test "$cross_compiling" = yes; then :
5191 gl_cv_func_memchr_works="guessing no"
5192else
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195
5196#include <string.h>
5197#if HAVE_SYS_MMAN_H
5198# include <fcntl.h>
5199# include <unistd.h>
5200# include <sys/types.h>
5201# include <sys/mman.h>
5202# ifndef MAP_FILE
5203# define MAP_FILE 0
5204# endif
5205#endif
5206
5207int
5208main ()
5209{
5210
5211 char *fence = NULL;
5212#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
5213# if HAVE_MAP_ANONYMOUS
5214 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
5215 const int fd = -1;
5216# else /* !HAVE_MAP_ANONYMOUS */
5217 const int flags = MAP_FILE | MAP_PRIVATE;
5218 int fd = open ("/dev/zero", O_RDONLY, 0666);
5219 if (fd >= 0)
5220# endif
5221 {
5222 int pagesize = getpagesize ();
5223 char *two_pages =
5224 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
5225 flags, fd, 0);
5226 if (two_pages != (char *)(-1)
5227 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
5228 fence = two_pages + pagesize;
5229 }
5230#endif
5231 if (fence)
5232 {
5233 if (memchr (fence, 0, 0))
5234 return 1;
5235 strcpy (fence - 9, "12345678");
5236 if (memchr (fence - 9, 0, 79) != fence - 1)
5237 return 2;
5238 }
5239 return 0;
5240
5241 ;
5242 return 0;
5243}
5244_ACEOF
5245if ac_fn_c_try_run "$LINENO"; then :
5246 gl_cv_func_memchr_works=yes
5247else
5248 gl_cv_func_memchr_works=no
5249fi
5250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5251 conftest.$ac_objext conftest.beam conftest.$ac_ext
5252fi
5253
5254fi
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
5256$as_echo "$gl_cv_func_memchr_works" >&6; }
5257 if test "$gl_cv_func_memchr_works" != yes; then
5258 REPLACE_MEMCHR=1
5259 fi
5260 else
5261 HAVE_MEMCHR=0
5262 fi
5263 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
5264
5265
5266
5267
5268
5269
5270
5271
5272 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
5273
5274
5275 for ac_header in bp-sym.h
5276do :
5277 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
5278if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
5279 cat >>confdefs.h <<_ACEOF
5280#define HAVE_BP_SYM_H 1
5281_ACEOF
5282
5283fi
5284
5285done
5286
5287
5288 fi
783e057b
DJ
5289
5290
81ecdfbb
RW
5291 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
5292if test "x$ac_cv_have_decl_memmem" = x""yes; then :
5293 ac_have_decl=1
783e057b 5294else
81ecdfbb 5295 ac_have_decl=0
783e057b 5296fi
783e057b
DJ
5297
5298cat >>confdefs.h <<_ACEOF
81ecdfbb 5299#define HAVE_DECL_MEMMEM $ac_have_decl
783e057b
DJ
5300_ACEOF
5301
5302
783e057b
DJ
5303
5304
5305
5306
5307
5308
5309
5310
783e057b 5311
783e057b 5312
783e057b 5313
f434ba03 5314
81ecdfbb
RW
5315 for ac_func in memmem
5316do :
5317 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
5318if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 5319 cat >>confdefs.h <<_ACEOF
81ecdfbb 5320#define HAVE_MEMMEM 1
783e057b
DJ
5321_ACEOF
5322
5323else
5324
5325 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5326
5327fi
5328done
5329
5330
5331
5332 :
5333
5334
5335
5336
5337
5338 if test $ac_cv_have_decl_memmem = no; then
5339 HAVE_DECL_MEMMEM=0
5340 fi
5341 :
5342
5343
f434ba03
PA
5344 gl_cv_c_multiarch=no
5345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5346/* end confdefs.h. */
5347#ifndef __APPLE_CC__
5348 not a universal capable compiler
5349 #endif
5350 typedef int dummy;
5351
5352_ACEOF
5353if ac_fn_c_try_compile "$LINENO"; then :
5354
5355 arch=
5356 prev=
5357 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
5358 if test -n "$prev"; then
5359 case $word in
5360 i?86 | x86_64 | ppc | ppc64)
5361 if test -z "$arch" || test "$arch" = "$word"; then
5362 arch="$word"
5363 else
5364 gl_cv_c_multiarch=yes
5365 fi
5366 ;;
5367 esac
5368 prev=
5369 else
5370 if test "x$word" = "x-arch"; then
5371 prev=arch
5372 fi
5373 fi
5374 done
5375
5376fi
5377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5378 if test $gl_cv_c_multiarch = yes; then
5379
5380$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5381
5382 APPLE_UNIVERSAL_BUILD=1
5383 else
5384 APPLE_UNIVERSAL_BUILD=0
5385 fi
5386
5387
5388
5389 REPLACE_NULL=0;
5390 HAVE_WCHAR_T=1;
5391 STDDEF_H='';
5392
5393
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
5395$as_echo_n "checking for wchar_t... " >&6; }
5396if test "${gt_cv_c_wchar_t+set}" = set; then :
5397 $as_echo_n "(cached) " >&6
5398else
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400/* end confdefs.h. */
5401#include <stddef.h>
5402 wchar_t foo = (wchar_t)'\0';
5403int
5404main ()
5405{
5406
5407 ;
5408 return 0;
5409}
5410_ACEOF
5411if ac_fn_c_try_compile "$LINENO"; then :
5412 gt_cv_c_wchar_t=yes
5413else
5414 gt_cv_c_wchar_t=no
5415fi
5416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5417fi
5418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
5419$as_echo "$gt_cv_c_wchar_t" >&6; }
5420 if test $gt_cv_c_wchar_t = yes; then
5421
5422$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
5423
5424 fi
5425
5426
5427
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
5429$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
5430if test "${gl_cv_have_include_next+set}" = set; then :
5431 $as_echo_n "(cached) " >&6
5432else
5433 rm -rf conftestd1a conftestd1b conftestd2
5434 mkdir conftestd1a conftestd1b conftestd2
5435 cat <<EOF > conftestd1a/conftest.h
5436#define DEFINED_IN_CONFTESTD1
5437#include_next <conftest.h>
5438#ifdef DEFINED_IN_CONFTESTD2
5439int foo;
5440#else
5441#error "include_next doesn't work"
5442#endif
5443EOF
5444 cat <<EOF > conftestd1b/conftest.h
5445#define DEFINED_IN_CONFTESTD1
5446#include <stdio.h>
5447#include_next <conftest.h>
5448#ifdef DEFINED_IN_CONFTESTD2
5449int foo;
5450#else
5451#error "include_next doesn't work"
5452#endif
5453EOF
5454 cat <<EOF > conftestd2/conftest.h
5455#ifndef DEFINED_IN_CONFTESTD1
5456#error "include_next test doesn't work"
5457#endif
5458#define DEFINED_IN_CONFTESTD2
5459EOF
5460 gl_save_CPPFLAGS="$CPPFLAGS"
5461 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h. */
5464#include <conftest.h>
5465_ACEOF
5466if ac_fn_c_try_compile "$LINENO"; then :
5467 gl_cv_have_include_next=yes
5468else
5469 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471/* end confdefs.h. */
5472#include <conftest.h>
5473_ACEOF
5474if ac_fn_c_try_compile "$LINENO"; then :
5475 gl_cv_have_include_next=buggy
5476else
5477 gl_cv_have_include_next=no
5478fi
5479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5480
5481fi
5482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483 CPPFLAGS="$gl_save_CPPFLAGS"
5484 rm -rf conftestd1a conftestd1b conftestd2
5485
5486fi
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
5488$as_echo "$gl_cv_have_include_next" >&6; }
5489 PRAGMA_SYSTEM_HEADER=
5490 if test $gl_cv_have_include_next = yes; then
5491 INCLUDE_NEXT=include_next
5492 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5493 if test -n "$GCC"; then
5494 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
5495 fi
5496 else
5497 if test $gl_cv_have_include_next = buggy; then
5498 INCLUDE_NEXT=include
5499 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
5500 else
5501 INCLUDE_NEXT=include
5502 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
5503 fi
5504 fi
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
81ecdfbb
RW
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
5516$as_echo_n "checking for long long int... " >&6; }
5517if test "${ac_cv_type_long_long_int+set}" = set; then :
5518 $as_echo_n "(cached) " >&6
783e057b 5519else
81ecdfbb 5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5521/* end confdefs.h. */
81ecdfbb
RW
5522
5523 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5524 implementations with broken preprocessors. Perhaps this can
5525 be revisited in 2012. In the meantime, code should not expect
5526 #if to work with literals wider than 32 bits. */
783e057b
DJ
5527 /* Test literals. */
5528 long long int ll = 9223372036854775807ll;
5529 long long int nll = -9223372036854775807LL;
5530 unsigned long long int ull = 18446744073709551615ULL;
5531 /* Test constant expressions. */
5532 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5533 ? 1 : -1)];
783e057b 5534 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5535 ? 1 : -1)];
783e057b
DJ
5536 int i = 63;
5537int
5538main ()
5539{
5540/* Test availability of runtime routines for shift and division. */
5541 long long int llmax = 9223372036854775807ll;
5542 unsigned long long int ullmax = 18446744073709551615ull;
5543 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5544 | (llmax / ll) | (llmax % ll)
5545 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5546 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5547 ;
5548 return 0;
5549}
5550
5551_ACEOF
81ecdfbb 5552if ac_fn_c_try_link "$LINENO"; then :
f434ba03 5553 if test "$cross_compiling" = yes; then :
783e057b
DJ
5554 ac_cv_type_long_long_int=yes
5555else
81ecdfbb 5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5557/* end confdefs.h. */
5558#include <limits.h>
f434ba03
PA
5559 #ifndef LLONG_MAX
5560 # define HALF \
5561 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
5562 # define LLONG_MAX (HALF - 1 + HALF)
5563 #endif
783e057b
DJ
5564int
5565main ()
5566{
5567long long int n = 1;
f434ba03
PA
5568 int i;
5569 for (i = 0; ; i++)
5570 {
5571 long long int m = n << i;
5572 if (m >> i != n)
5573 return 1;
5574 if (LLONG_MAX / 2 < m)
5575 break;
5576 }
5577 return 0;
783e057b
DJ
5578 ;
5579 return 0;
5580}
5581_ACEOF
81ecdfbb 5582if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
5583 ac_cv_type_long_long_int=yes
5584else
81ecdfbb 5585 ac_cv_type_long_long_int=no
783e057b 5586fi
81ecdfbb
RW
5587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5588 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 5589fi
783e057b 5590
81ecdfbb
RW
5591else
5592 ac_cv_type_long_long_int=no
783e057b 5593fi
81ecdfbb
RW
5594rm -f core conftest.err conftest.$ac_objext \
5595 conftest$ac_exeext conftest.$ac_ext
783e057b 5596fi
81ecdfbb
RW
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
5598$as_echo "$ac_cv_type_long_long_int" >&6; }
783e057b
DJ
5599 if test $ac_cv_type_long_long_int = yes; then
5600
81ecdfbb 5601$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5602
5603 fi
5604
5605
81ecdfbb
RW
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
5607$as_echo_n "checking for unsigned long long int... " >&6; }
5608if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
5609 $as_echo_n "(cached) " >&6
783e057b 5610else
81ecdfbb 5611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5612/* end confdefs.h. */
81ecdfbb
RW
5613
5614 /* For now, do not test the preprocessor; as of 2007 there are too many
f434ba03
PA
5615 implementations with broken preprocessors. Perhaps this can
5616 be revisited in 2012. In the meantime, code should not expect
5617 #if to work with literals wider than 32 bits. */
783e057b
DJ
5618 /* Test literals. */
5619 long long int ll = 9223372036854775807ll;
5620 long long int nll = -9223372036854775807LL;
5621 unsigned long long int ull = 18446744073709551615ULL;
5622 /* Test constant expressions. */
5623 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
f434ba03 5624 ? 1 : -1)];
783e057b 5625 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
f434ba03 5626 ? 1 : -1)];
783e057b
DJ
5627 int i = 63;
5628int
5629main ()
5630{
5631/* Test availability of runtime routines for shift and division. */
5632 long long int llmax = 9223372036854775807ll;
5633 unsigned long long int ullmax = 18446744073709551615ull;
5634 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
f434ba03
PA
5635 | (llmax / ll) | (llmax % ll)
5636 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
5637 | (ullmax / ull) | (ullmax % ull));
783e057b
DJ
5638 ;
5639 return 0;
5640}
5641
5642_ACEOF
81ecdfbb 5643if ac_fn_c_try_link "$LINENO"; then :
783e057b
DJ
5644 ac_cv_type_unsigned_long_long_int=yes
5645else
81ecdfbb 5646 ac_cv_type_unsigned_long_long_int=no
783e057b 5647fi
81ecdfbb
RW
5648rm -f core conftest.err conftest.$ac_objext \
5649 conftest$ac_exeext conftest.$ac_ext
783e057b 5650fi
81ecdfbb
RW
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
5652$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
783e057b
DJ
5653 if test $ac_cv_type_unsigned_long_long_int = yes; then
5654
81ecdfbb 5655$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
783e057b
DJ
5656
5657 fi
5658
5659
5660
783e057b
DJ
5661
5662
5663
5664
5665
5666
5667
5668
81ecdfbb
RW
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
5670$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
5671if test "${ac_cv_c_restrict+set}" = set; then :
5672 $as_echo_n "(cached) " >&6
783e057b
DJ
5673else
5674 ac_cv_c_restrict=no
5675 # The order here caters to the fact that C++ does not require restrict.
5676 for ac_kw in __restrict __restrict__ _Restrict restrict; do
81ecdfbb 5677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5678/* end confdefs.h. */
5679typedef int * int_ptr;
5680 int foo (int_ptr $ac_kw ip) {
5681 return ip[0];
5682 }
5683int
5684main ()
5685{
5686int s[1];
5687 int * $ac_kw t = s;
5688 t[0] = 0;
5689 return foo(t)
5690 ;
5691 return 0;
5692}
5693_ACEOF
81ecdfbb 5694if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5695 ac_cv_c_restrict=$ac_kw
783e057b 5696fi
81ecdfbb 5697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5698 test "$ac_cv_c_restrict" != no && break
5699 done
5700
5701fi
81ecdfbb
RW
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
5703$as_echo "$ac_cv_c_restrict" >&6; }
783e057b
DJ
5704
5705 case $ac_cv_c_restrict in
5706 restrict) ;;
81ecdfbb 5707 no) $as_echo "#define restrict /**/" >>confdefs.h
783e057b
DJ
5708 ;;
5709 *) cat >>confdefs.h <<_ACEOF
5710#define restrict $ac_cv_c_restrict
5711_ACEOF
5712 ;;
5713 esac
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
f434ba03 5726
783e057b
DJ
5727 :
5728
5729
5730
5731
5732
5733
5734
f434ba03
PA
5735 if test $gl_cv_have_include_next = yes; then
5736 gl_cv_next_string_h='<'string.h'>'
5737 else
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
5739$as_echo_n "checking absolute name of <string.h>... " >&6; }
5740if test "${gl_cv_next_string_h+set}" = set; then :
5741 $as_echo_n "(cached) " >&6
5742else
5743
5744 if test $ac_cv_header_string_h = yes; then
5745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5746/* end confdefs.h. */
5747#include <string.h>
5748
5749_ACEOF
5750 case "$host_os" in
5751 aix*) gl_absname_cpp="$ac_cpp -C" ;;
5752 *) gl_absname_cpp="$ac_cpp" ;;
5753 esac
5754 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5755 sed -n '\#/string.h#{
5756 s#.*"\(.*/string.h\)".*#\1#
5757 s#^/[^/]#//&#
5758 p
5759 q
5760 }'`'"'
5761 else
5762 gl_cv_next_string_h='<'string.h'>'
5763 fi
5764
5765fi
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
5767$as_echo "$gl_cv_next_string_h" >&6; }
5768 fi
5769 NEXT_STRING_H=$gl_cv_next_string_h
5770
5771 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5772 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5773 gl_next_as_first_directive='<'string.h'>'
5774 else
5775 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5776 gl_next_as_first_directive=$gl_cv_next_string_h
5777 fi
5778 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
5779
5780
5781
5782
5783
5784 for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
5785 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
5787$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
5788if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
5789 $as_echo_n "(cached) " >&6
5790else
5791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5792/* end confdefs.h. */
5793#include <string.h>
5794
5795int
5796main ()
5797{
5798#undef $gl_func
5799 (void) $gl_func;
5800 ;
5801 return 0;
5802}
5803_ACEOF
5804if ac_fn_c_try_compile "$LINENO"; then :
5805 eval "$as_gl_Symbol=yes"
5806else
5807 eval "$as_gl_Symbol=no"
5808fi
5809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5810fi
5811eval ac_res=\$$as_gl_Symbol
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5813$as_echo "$ac_res" >&6; }
5814 eval as_val=\$$as_gl_Symbol
5815 if test "x$as_val" = x""yes; then :
5816 cat >>confdefs.h <<_ACEOF
5817#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
5818_ACEOF
5819
5820 eval ac_cv_have_decl_$gl_func=yes
5821fi
5822 done
5823
5824
5825
5826 GNULIB_BTOWC=0;
5827 GNULIB_WCTOB=0;
5828 GNULIB_MBSINIT=0;
5829 GNULIB_MBRTOWC=0;
5830 GNULIB_MBRLEN=0;
5831 GNULIB_MBSRTOWCS=0;
5832 GNULIB_MBSNRTOWCS=0;
5833 GNULIB_WCRTOMB=0;
5834 GNULIB_WCSRTOMBS=0;
5835 GNULIB_WCSNRTOMBS=0;
5836 GNULIB_WCWIDTH=0;
5837 HAVE_BTOWC=1;
5838 HAVE_MBSINIT=1;
5839 HAVE_MBRTOWC=1;
5840 HAVE_MBRLEN=1;
5841 HAVE_MBSRTOWCS=1;
5842 HAVE_MBSNRTOWCS=1;
5843 HAVE_WCRTOMB=1;
5844 HAVE_WCSRTOMBS=1;
5845 HAVE_WCSNRTOMBS=1;
5846 HAVE_DECL_WCTOB=1;
5847 HAVE_DECL_WCWIDTH=1;
5848 REPLACE_MBSTATE_T=0;
5849 REPLACE_BTOWC=0;
5850 REPLACE_WCTOB=0;
5851 REPLACE_MBSINIT=0;
5852 REPLACE_MBRTOWC=0;
5853 REPLACE_MBRLEN=0;
5854 REPLACE_MBSRTOWCS=0;
5855 REPLACE_MBSNRTOWCS=0;
5856 REPLACE_WCRTOMB=0;
5857 REPLACE_WCSRTOMBS=0;
5858 REPLACE_WCSNRTOMBS=0;
5859 REPLACE_WCWIDTH=0;
5860
5861
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
5863$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
5864if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
81ecdfbb 5865 $as_echo_n "(cached) " >&6
783e057b 5866else
f434ba03
PA
5867 gl_cv_header_wchar_h_correct_inline=yes
5868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869/* end confdefs.h. */
783e057b 5870
f434ba03
PA
5871 #define wcstod renamed_wcstod
5872#include <wchar.h>
5873extern int zero (void);
5874int main () { return zero(); }
5875
5876_ACEOF
5877 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5878 (eval $ac_compile) 2>&5
5879 ac_status=$?
5880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5881 test $ac_status = 0; }; then
5882 mv conftest.$ac_objext conftest1.$ac_objext
5883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 5884/* end confdefs.h. */
f434ba03
PA
5885
5886 #define wcstod renamed_wcstod
5887#include <wchar.h>
5888int zero (void) { return 0; }
783e057b
DJ
5889
5890_ACEOF
f434ba03
PA
5891 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5892 (eval $ac_compile) 2>&5
5893 ac_status=$?
5894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5895 test $ac_status = 0; }; then
5896 mv conftest.$ac_objext conftest2.$ac_objext
5897 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
5898 :
5899 else
5900 gl_cv_header_wchar_h_correct_inline=no
5901 fi
5902 fi
5903 fi
5904 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
783e057b
DJ
5905
5906fi
f434ba03
PA
5907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
5908$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
5909 if test $gl_cv_header_wchar_h_correct_inline = no; then
5910 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
5911This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
5912C99 mode. You have four options:
5913 - Add the flag -fgnu89-inline to CC and reconfigure, or
5914 - Fix your include files, using parts of
5915 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
5916 - Use a gcc version older than 4.3, or
5917 - Don't use the flags -std=c99 or -std=gnu99.
5918Configuration aborted." "$LINENO" 5
5919 fi
783e057b
DJ
5920
5921
f434ba03
PA
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
5923$as_echo_n "checking for wint_t... " >&6; }
5924if test "${gt_cv_c_wint_t+set}" = set; then :
5925 $as_echo_n "(cached) " >&6
5926else
5927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5928/* end confdefs.h. */
783e057b 5929
f434ba03
PA
5930/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5931 <wchar.h>.
5932 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5933 before <wchar.h>. */
5934#include <stddef.h>
5935#include <stdio.h>
5936#include <time.h>
5937#include <wchar.h>
5938 wint_t foo = (wchar_t)'\0';
5939int
5940main ()
5941{
783e057b 5942
f434ba03
PA
5943 ;
5944 return 0;
5945}
5946_ACEOF
5947if ac_fn_c_try_compile "$LINENO"; then :
5948 gt_cv_c_wint_t=yes
5949else
5950 gt_cv_c_wint_t=no
5951fi
5952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5953fi
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
5955$as_echo "$gt_cv_c_wint_t" >&6; }
5956 if test $gt_cv_c_wint_t = yes; then
783e057b 5957
f434ba03 5958$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
783e057b 5959
f434ba03 5960 fi
783e057b
DJ
5961
5962
81ecdfbb 5963 if false; then
783e057b
DJ
5964 GL_COND_LIBTOOL_TRUE=
5965 GL_COND_LIBTOOL_FALSE='#'
5966else
5967 GL_COND_LIBTOOL_TRUE='#'
5968 GL_COND_LIBTOOL_FALSE=
5969fi
5970
5971 gl_cond_libtool=false
5972 gl_libdeps=
5973 gl_ltlibdeps=
f434ba03 5974 gl_m4_base='gnulib/m4'
783e057b
DJ
5975
5976
5977
783e057b
DJ
5978
5979
5980
5981
5982
5983
f434ba03
PA
5984 gl_source_base='gnulib'
5985 # Code from module arg-nonnull:
5986 # Code from module c++defs:
5987 # Code from module extensions:
5988 # Code from module include_next:
5989 # Code from module memchr:
783e057b 5990
783e057b 5991
783e057b 5992
783e057b 5993
f434ba03 5994 GNULIB_MEMCHR=1
783e057b 5995
783e057b 5996
783e057b 5997
f434ba03 5998$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
783e057b 5999
783e057b
DJ
6000
6001
f434ba03 6002 # Code from module memmem:
783e057b
DJ
6003
6004
f434ba03
PA
6005 if test $ac_cv_have_decl_memmem = yes; then
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
6007$as_echo_n "checking whether memmem works in linear time... " >&6; }
6008if test "${gl_cv_func_memmem_works+set}" = set; then :
81ecdfbb 6009 $as_echo_n "(cached) " >&6
783e057b 6010else
81ecdfbb 6011 if test "$cross_compiling" = yes; then :
f434ba03 6012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b 6013/* end confdefs.h. */
783e057b 6014
f434ba03
PA
6015#include <features.h>
6016#ifdef __GNU_LIBRARY__
6017 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
6018 Lucky user
6019 #endif
6020#endif
6021#ifdef __CYGWIN__
6022 #include <cygwin/version.h>
6023 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
6024 Lucky user
6025 #endif
6026#endif
783e057b 6027
783e057b 6028_ACEOF
f434ba03
PA
6029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6030 $EGREP "Lucky user" >/dev/null 2>&1; then :
6031 gl_cv_func_memmem_works=yes
783e057b 6032else
f434ba03 6033 gl_cv_func_memmem_works="guessing no"
783e057b 6034fi
f434ba03 6035rm -f conftest*
783e057b
DJ
6036
6037
783e057b 6038else
81ecdfbb 6039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6040/* end confdefs.h. */
6041
f434ba03 6042#include <signal.h> /* for signal */
783e057b
DJ
6043#include <string.h> /* for memmem */
6044#include <stdlib.h> /* for malloc */
6045#include <unistd.h> /* for alarm */
6046
6047int
6048main ()
6049{
6050size_t m = 1000000;
6051 char *haystack = (char *) malloc (2 * m + 1);
6052 char *needle = (char *) malloc (m + 1);
6053 void *result = 0;
6054 /* Failure to compile this test due to missing alarm is okay,
6055 since all such platforms (mingw) also lack memmem. */
f434ba03 6056 signal (SIGALRM, SIG_DFL);
783e057b
DJ
6057 alarm (5);
6058 /* Check for quadratic performance. */
6059 if (haystack && needle)
6060 {
f434ba03
PA
6061 memset (haystack, 'A', 2 * m);
6062 haystack[2 * m] = 'B';
6063 memset (needle, 'A', m);
6064 needle[m] = 'B';
6065 result = memmem (haystack, 2 * m + 1, needle, m + 1);
783e057b
DJ
6066 }
6067 /* Check for empty needle behavior. */
6068 return !result || !memmem ("a", 1, 0, 0);
6069 ;
6070 return 0;
6071}
6072_ACEOF
81ecdfbb 6073if ac_fn_c_try_run "$LINENO"; then :
783e057b
DJ
6074 gl_cv_func_memmem_works=yes
6075else
81ecdfbb 6076 gl_cv_func_memmem_works=no
783e057b 6077fi
81ecdfbb
RW
6078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6079 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 6080fi
81ecdfbb 6081
f434ba03 6082
783e057b 6083fi
81ecdfbb
RW
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
6085$as_echo "$gl_cv_func_memmem_works" >&6; }
783e057b
DJ
6086 if test "$gl_cv_func_memmem_works" != yes; then
6087 REPLACE_MEMMEM=1
6088
6089
6090
6091
6092
6093
6094
f434ba03 6095
783e057b
DJ
6096 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
6097
6098 fi
6099 fi
6100
f434ba03
PA
6101 # Code from module memmem-simple:
6102
783e057b
DJ
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
81ecdfbb
RW
6114 for ac_func in memmem
6115do :
6116 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
6117if test "x$ac_cv_func_memmem" = x""yes; then :
783e057b 6118 cat >>confdefs.h <<_ACEOF
81ecdfbb 6119#define HAVE_MEMMEM 1
783e057b
DJ
6120_ACEOF
6121
6122else
6123
6124 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
6125
6126fi
6127done
6128
6129
6130
6131 :
6132
6133
6134
6135
6136
6137 if test $ac_cv_have_decl_memmem = no; then
6138 HAVE_DECL_MEMMEM=0
6139 fi
6140 :
6141
6142
6143
f434ba03 6144
783e057b
DJ
6145 GNULIB_MEMMEM=1
6146
6147
6148
f434ba03
PA
6149$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
6150
6151
6152
6153 # Code from module multiarch:
6154
6155 # Code from module stddef:
6156
6157
6158
6159 if test $gt_cv_c_wchar_t = no; then
6160 HAVE_WCHAR_T=0
6161 STDDEF_H=stddef.h
6162 fi
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
6164$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
6165if test "${gl_cv_decl_null_works+set}" = set; then :
6166 $as_echo_n "(cached) " >&6
6167else
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169/* end confdefs.h. */
6170#include <stddef.h>
6171 int test[2 * (sizeof NULL == sizeof (void *)) -1];
6172
6173int
6174main ()
6175{
6176
6177 ;
6178 return 0;
6179}
6180_ACEOF
6181if ac_fn_c_try_compile "$LINENO"; then :
6182 gl_cv_decl_null_works=yes
6183else
6184 gl_cv_decl_null_works=no
6185fi
6186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6187fi
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
6189$as_echo "$gl_cv_decl_null_works" >&6; }
6190 if test $gl_cv_decl_null_works = no; then
6191 REPLACE_NULL=1
6192 STDDEF_H=stddef.h
6193 fi
6194 if test -n "$STDDEF_H"; then
6195
6196
6197
6198
6199 :
6200
6201
6202
6203
6204
6205
6206
6207 if test $gl_cv_have_include_next = yes; then
6208 gl_cv_next_stddef_h='<'stddef.h'>'
6209 else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
6211$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
6212if test "${gl_cv_next_stddef_h+set}" = set; then :
6213 $as_echo_n "(cached) " >&6
6214else
6215
6216 if test $ac_cv_header_stddef_h = yes; then
6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6218/* end confdefs.h. */
6219#include <stddef.h>
6220
6221_ACEOF
6222 case "$host_os" in
6223 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6224 *) gl_absname_cpp="$ac_cpp" ;;
6225 esac
6226 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6227 sed -n '\#/stddef.h#{
6228 s#.*"\(.*/stddef.h\)".*#\1#
6229 s#^/[^/]#//&#
6230 p
6231 q
6232 }'`'"'
6233 else
6234 gl_cv_next_stddef_h='<'stddef.h'>'
6235 fi
6236
6237fi
6238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
6239$as_echo "$gl_cv_next_stddef_h" >&6; }
6240 fi
6241 NEXT_STDDEF_H=$gl_cv_next_stddef_h
6242
6243 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6245 gl_next_as_first_directive='<'stddef.h'>'
6246 else
6247 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6248 gl_next_as_first_directive=$gl_cv_next_stddef_h
6249 fi
6250 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
6251
6252
6253
6254 fi
6255
6256 # Code from module stdint:
6257
6258
783e057b
DJ
6259
6260 if test $ac_cv_type_long_long_int = yes; then
6261 HAVE_LONG_LONG_INT=1
6262 else
6263 HAVE_LONG_LONG_INT=0
6264 fi
6265
6266
6267 if test $ac_cv_type_unsigned_long_long_int = yes; then
6268 HAVE_UNSIGNED_LONG_LONG_INT=1
6269 else
6270 HAVE_UNSIGNED_LONG_LONG_INT=0
6271 fi
6272
6273
6274 if test $ac_cv_header_inttypes_h = yes; then
6275 HAVE_INTTYPES_H=1
6276 else
6277 HAVE_INTTYPES_H=0
6278 fi
6279
6280
6281 if test $ac_cv_header_sys_types_h = yes; then
6282 HAVE_SYS_TYPES_H=1
6283 else
6284 HAVE_SYS_TYPES_H=0
6285 fi
6286
6287
6288
6289
6290
f434ba03 6291
783e057b
DJ
6292 :
6293
6294
6295
6296
6297
6298
6299
6300 if test $gl_cv_have_include_next = yes; then
6301 gl_cv_next_stdint_h='<'stdint.h'>'
6302 else
81ecdfbb
RW
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
6304$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
6305if test "${gl_cv_next_stdint_h+set}" = set; then :
6306 $as_echo_n "(cached) " >&6
783e057b
DJ
6307else
6308
f434ba03
PA
6309 if test $ac_cv_header_stdint_h = yes; then
6310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6311/* end confdefs.h. */
6312#include <stdint.h>
6313
6314_ACEOF
f434ba03
PA
6315 case "$host_os" in
6316 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6317 *) gl_absname_cpp="$ac_cpp" ;;
6318 esac
6319 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
6320 sed -n '\#/stdint.h#{
6321 s#.*"\(.*/stdint.h\)".*#\1#
6322 s#^/[^/]#//&#
6323 p
6324 q
6325 }'`'"'
6326 else
6327 gl_cv_next_stdint_h='<'stdint.h'>'
6328 fi
783e057b
DJ
6329
6330fi
81ecdfbb
RW
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
6332$as_echo "$gl_cv_next_stdint_h" >&6; }
783e057b
DJ
6333 fi
6334 NEXT_STDINT_H=$gl_cv_next_stdint_h
6335
f434ba03
PA
6336 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
6337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6338 gl_next_as_first_directive='<'stdint.h'>'
6339 else
6340 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6341 gl_next_as_first_directive=$gl_cv_next_stdint_h
6342 fi
6343 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
6344
783e057b
DJ
6345
6346
6347 if test $ac_cv_header_stdint_h = yes; then
6348 HAVE_STDINT_H=1
6349 else
6350 HAVE_STDINT_H=0
6351 fi
6352
6353
6354 if test $ac_cv_header_stdint_h = yes; then
81ecdfbb
RW
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
6356$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
6357if test "${gl_cv_header_working_stdint_h+set}" = set; then :
6358 $as_echo_n "(cached) " >&6
783e057b
DJ
6359else
6360 gl_cv_header_working_stdint_h=no
81ecdfbb 6361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6362/* end confdefs.h. */
6363
81ecdfbb 6364
783e057b
DJ
6365#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6366#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6367#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6368#include <stdint.h>
6369/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
6370#if !(defined WCHAR_MIN && defined WCHAR_MAX)
6371#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
6372#endif
6373
6374
6375 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6376 included before <wchar.h>. */
6377 #include <stddef.h>
6378 #include <signal.h>
6379 #if HAVE_WCHAR_H
6380 # include <stdio.h>
6381 # include <time.h>
6382 # include <wchar.h>
6383 #endif
6384
6385
6386#ifdef INT8_MAX
6387int8_t a1 = INT8_MAX;
6388int8_t a1min = INT8_MIN;
6389#endif
6390#ifdef INT16_MAX
6391int16_t a2 = INT16_MAX;
6392int16_t a2min = INT16_MIN;
6393#endif
6394#ifdef INT32_MAX
6395int32_t a3 = INT32_MAX;
6396int32_t a3min = INT32_MIN;
6397#endif
6398#ifdef INT64_MAX
6399int64_t a4 = INT64_MAX;
6400int64_t a4min = INT64_MIN;
6401#endif
6402#ifdef UINT8_MAX
6403uint8_t b1 = UINT8_MAX;
6404#else
6405typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
6406#endif
6407#ifdef UINT16_MAX
6408uint16_t b2 = UINT16_MAX;
6409#endif
6410#ifdef UINT32_MAX
6411uint32_t b3 = UINT32_MAX;
6412#endif
6413#ifdef UINT64_MAX
6414uint64_t b4 = UINT64_MAX;
6415#endif
6416int_least8_t c1 = INT8_C (0x7f);
6417int_least8_t c1max = INT_LEAST8_MAX;
6418int_least8_t c1min = INT_LEAST8_MIN;
6419int_least16_t c2 = INT16_C (0x7fff);
6420int_least16_t c2max = INT_LEAST16_MAX;
6421int_least16_t c2min = INT_LEAST16_MIN;
6422int_least32_t c3 = INT32_C (0x7fffffff);
6423int_least32_t c3max = INT_LEAST32_MAX;
6424int_least32_t c3min = INT_LEAST32_MIN;
6425int_least64_t c4 = INT64_C (0x7fffffffffffffff);
6426int_least64_t c4max = INT_LEAST64_MAX;
6427int_least64_t c4min = INT_LEAST64_MIN;
6428uint_least8_t d1 = UINT8_C (0xff);
6429uint_least8_t d1max = UINT_LEAST8_MAX;
6430uint_least16_t d2 = UINT16_C (0xffff);
6431uint_least16_t d2max = UINT_LEAST16_MAX;
6432uint_least32_t d3 = UINT32_C (0xffffffff);
6433uint_least32_t d3max = UINT_LEAST32_MAX;
6434uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
6435uint_least64_t d4max = UINT_LEAST64_MAX;
6436int_fast8_t e1 = INT_FAST8_MAX;
6437int_fast8_t e1min = INT_FAST8_MIN;
6438int_fast16_t e2 = INT_FAST16_MAX;
6439int_fast16_t e2min = INT_FAST16_MIN;
6440int_fast32_t e3 = INT_FAST32_MAX;
6441int_fast32_t e3min = INT_FAST32_MIN;
6442int_fast64_t e4 = INT_FAST64_MAX;
6443int_fast64_t e4min = INT_FAST64_MIN;
6444uint_fast8_t f1 = UINT_FAST8_MAX;
6445uint_fast16_t f2 = UINT_FAST16_MAX;
6446uint_fast32_t f3 = UINT_FAST32_MAX;
6447uint_fast64_t f4 = UINT_FAST64_MAX;
6448#ifdef INTPTR_MAX
6449intptr_t g = INTPTR_MAX;
6450intptr_t gmin = INTPTR_MIN;
6451#endif
6452#ifdef UINTPTR_MAX
6453uintptr_t h = UINTPTR_MAX;
6454#endif
6455intmax_t i = INTMAX_MAX;
6456uintmax_t j = UINTMAX_MAX;
6457
6458#include <limits.h> /* for CHAR_BIT */
6459#define TYPE_MINIMUM(t) \
6460 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
6461#define TYPE_MAXIMUM(t) \
6462 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
6463struct s {
6464 int check_PTRDIFF:
6465 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
6466 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
6467 ? 1 : -1;
6468 /* Detect bug in FreeBSD 6.0 / ia64. */
6469 int check_SIG_ATOMIC:
6470 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
6471 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
6472 ? 1 : -1;
6473 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
6474 int check_WCHAR:
6475 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
6476 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
6477 ? 1 : -1;
6478 /* Detect bug in mingw. */
6479 int check_WINT:
6480 WINT_MIN == TYPE_MINIMUM (wint_t)
6481 && WINT_MAX == TYPE_MAXIMUM (wint_t)
6482 ? 1 : -1;
6483
f434ba03
PA
6484 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
6485 int check_UINT8_C:
6486 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
6487 int check_UINT16_C:
6488 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
6489
6490 /* Detect bugs in OpenBSD 3.9 stdint.h. */
6491#ifdef UINT8_MAX
6492 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
6493#endif
6494#ifdef UINT16_MAX
6495 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
6496#endif
6497#ifdef UINT32_MAX
6498 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
6499#endif
6500#ifdef UINT64_MAX
6501 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
6502#endif
6503 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
6504 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
6505 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
6506 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
6507 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
6508 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
6509 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
6510 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
6511 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
6512 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
6513 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
6514};
6515
6516int
6517main ()
6518{
6519
6520 ;
6521 return 0;
6522}
6523_ACEOF
6524if ac_fn_c_try_compile "$LINENO"; then :
6525 if test "$cross_compiling" = yes; then :
6526 gl_cv_header_working_stdint_h=yes
6527
6528else
6529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6530/* end confdefs.h. */
6531
6532
6533#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
6534#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
6535#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
6536#include <stdint.h>
6537
783e057b 6538
f434ba03
PA
6539 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6540 included before <wchar.h>. */
6541 #include <stddef.h>
6542 #include <signal.h>
6543 #if HAVE_WCHAR_H
6544 # include <stdio.h>
6545 # include <time.h>
6546 # include <wchar.h>
6547 #endif
6548
6549
6550#include <stdio.h>
6551#include <string.h>
6552#define MVAL(macro) MVAL1(macro)
6553#define MVAL1(expression) #expression
6554static const char *macro_values[] =
6555 {
6556#ifdef INT8_MAX
6557 MVAL (INT8_MAX),
6558#endif
6559#ifdef INT16_MAX
6560 MVAL (INT16_MAX),
6561#endif
6562#ifdef INT32_MAX
6563 MVAL (INT32_MAX),
6564#endif
6565#ifdef INT64_MAX
6566 MVAL (INT64_MAX),
6567#endif
783e057b 6568#ifdef UINT8_MAX
f434ba03 6569 MVAL (UINT8_MAX),
783e057b
DJ
6570#endif
6571#ifdef UINT16_MAX
f434ba03 6572 MVAL (UINT16_MAX),
783e057b
DJ
6573#endif
6574#ifdef UINT32_MAX
f434ba03 6575 MVAL (UINT32_MAX),
783e057b
DJ
6576#endif
6577#ifdef UINT64_MAX
f434ba03 6578 MVAL (UINT64_MAX),
783e057b 6579#endif
f434ba03
PA
6580 NULL
6581 };
783e057b
DJ
6582
6583int
6584main ()
6585{
6586
f434ba03
PA
6587 const char **mv;
6588 for (mv = macro_values; *mv != NULL; mv++)
6589 {
6590 const char *value = *mv;
6591 /* Test whether it looks like a cast expression. */
6592 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
6593 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
6594 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
6595 || strncmp (value, "((int)"/*)*/, 6) == 0
6596 || strncmp (value, "((signed short)"/*)*/, 15) == 0
6597 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
6598 return 1;
6599 }
6600 return 0;
6601
783e057b
DJ
6602 ;
6603 return 0;
6604}
6605_ACEOF
f434ba03 6606if ac_fn_c_try_run "$LINENO"; then :
783e057b 6607 gl_cv_header_working_stdint_h=yes
f434ba03
PA
6608fi
6609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6610 conftest.$ac_objext conftest.beam conftest.$ac_ext
6611fi
6612
6613
783e057b 6614fi
81ecdfbb 6615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03 6616
783e057b 6617fi
81ecdfbb
RW
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
6619$as_echo "$gl_cv_header_working_stdint_h" >&6; }
783e057b
DJ
6620 fi
6621 if test "$gl_cv_header_working_stdint_h" = yes; then
6622 STDINT_H=
6623 else
81ecdfbb
RW
6624 for ac_header in sys/inttypes.h sys/bitypes.h
6625do :
6626 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6627ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6628eval as_val=\$$as_ac_Header
6629 if test "x$as_val" = x""yes; then :
783e057b 6630 cat >>confdefs.h <<_ACEOF
81ecdfbb 6631#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
6632_ACEOF
6633
6634fi
6635
6636done
6637
6638 if test $ac_cv_header_sys_inttypes_h = yes; then
6639 HAVE_SYS_INTTYPES_H=1
6640 else
6641 HAVE_SYS_INTTYPES_H=0
6642 fi
6643
6644 if test $ac_cv_header_sys_bitypes_h = yes; then
6645 HAVE_SYS_BITYPES_H=1
6646 else
6647 HAVE_SYS_BITYPES_H=0
6648 fi
6649
6650
6651
6652 :
6653
6654
6655
6656
6657
6658
6659
6660
f434ba03
PA
6661 if test $APPLE_UNIVERSAL_BUILD = 0; then
6662
6663
6664 for gltype in ptrdiff_t size_t ; do
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6666$as_echo_n "checking for bit size of $gltype... " >&6; }
6667if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6668 $as_echo_n "(cached) " >&6
6669else
6670 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6671 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6672 included before <wchar.h>. */
6673 #include <stddef.h>
6674 #include <signal.h>
6675 #if HAVE_WCHAR_H
6676 # include <stdio.h>
6677 # include <time.h>
6678 # include <wchar.h>
6679 #endif
6680
6681#include <limits.h>"; then :
6682
6683else
6684 result=unknown
6685fi
6686
6687 eval gl_cv_bitsizeof_${gltype}=\$result
6688
6689fi
6690eval ac_res=\$gl_cv_bitsizeof_${gltype}
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6692$as_echo "$ac_res" >&6; }
6693 eval result=\$gl_cv_bitsizeof_${gltype}
6694 if test $result = unknown; then
6695 result=0
6696 fi
6697 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6698 cat >>confdefs.h <<_ACEOF
6699#define BITSIZEOF_${GLTYPE} $result
6700_ACEOF
6701
6702 eval BITSIZEOF_${GLTYPE}=\$result
6703 done
6704
6705
6706 fi
6707
783e057b 6708
f434ba03 6709 for gltype in sig_atomic_t wchar_t wint_t ; do
81ecdfbb
RW
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
6711$as_echo_n "checking for bit size of $gltype... " >&6; }
6712if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
6713 $as_echo_n "(cached) " >&6
6714else
6715 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
6716 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6717 included before <wchar.h>. */
6718 #include <stddef.h>
6719 #include <signal.h>
6720 #if HAVE_WCHAR_H
6721 # include <stdio.h>
6722 # include <time.h>
6723 # include <wchar.h>
6724 #endif
6725
6726#include <limits.h>"; then :
6727
6728else
6729 result=unknown
6730fi
6731
6732 eval gl_cv_bitsizeof_${gltype}=\$result
6733
6734fi
6735eval ac_res=\$gl_cv_bitsizeof_${gltype}
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6737$as_echo "$ac_res" >&6; }
6738 eval result=\$gl_cv_bitsizeof_${gltype}
6739 if test $result = unknown; then
6740 result=0
6741 fi
6742 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6743 cat >>confdefs.h <<_ACEOF
6744#define BITSIZEOF_${GLTYPE} $result
6745_ACEOF
783e057b 6746
81ecdfbb
RW
6747 eval BITSIZEOF_${GLTYPE}=\$result
6748 done
783e057b
DJ
6749
6750
6751
6752
81ecdfbb
RW
6753 for gltype in sig_atomic_t wchar_t wint_t ; do
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
6755$as_echo_n "checking whether $gltype is signed... " >&6; }
6756if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
6757 $as_echo_n "(cached) " >&6
783e057b 6758else
81ecdfbb 6759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6760/* end confdefs.h. */
6761
6762 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6763 included before <wchar.h>. */
6764 #include <stddef.h>
6765 #include <signal.h>
6766 #if HAVE_WCHAR_H
6767 # include <stdio.h>
6768 # include <time.h>
6769 # include <wchar.h>
6770 #endif
6771
6772 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6773int
6774main ()
6775{
6776
6777 ;
6778 return 0;
6779}
6780_ACEOF
81ecdfbb 6781if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
6782 result=yes
6783else
81ecdfbb 6784 result=no
20e95c23 6785fi
81ecdfbb 6786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6787 eval gl_cv_type_${gltype}_signed=\$result
6788
6789fi
81ecdfbb
RW
6790eval ac_res=\$gl_cv_type_${gltype}_signed
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6792$as_echo "$ac_res" >&6; }
783e057b
DJ
6793 eval result=\$gl_cv_type_${gltype}_signed
6794 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6795 if test "$result" = yes; then
6796 cat >>confdefs.h <<_ACEOF
6797#define HAVE_SIGNED_${GLTYPE} 1
6798_ACEOF
6799
6800 eval HAVE_SIGNED_${GLTYPE}=1
6801 else
6802 eval HAVE_SIGNED_${GLTYPE}=0
6803 fi
6804 done
6805
6806
6807 gl_cv_type_ptrdiff_t_signed=yes
6808 gl_cv_type_size_t_signed=no
f434ba03 6809 if test $APPLE_UNIVERSAL_BUILD = 0; then
783e057b
DJ
6810
6811
f434ba03 6812 for gltype in ptrdiff_t size_t ; do
81ecdfbb
RW
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6814$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6815if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
6816 $as_echo_n "(cached) " >&6
c906108c 6817else
783e057b
DJ
6818 eval gl_cv_type_${gltype}_suffix=no
6819 eval result=\$gl_cv_type_${gltype}_signed
6820 if test "$result" = yes; then
6821 glsufu=
6822 else
6823 glsufu=u
6824 fi
6825 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6826 case $glsuf in
6827 '') gltype1='int';;
f434ba03
PA
6828 l) gltype1='long int';;
6829 ll) gltype1='long long int';;
6830 i64) gltype1='__int64';;
6831 u) gltype1='unsigned int';;
6832 ul) gltype1='unsigned long int';;
6833 ull) gltype1='unsigned long long int';;
783e057b
DJ
6834 ui64)gltype1='unsigned __int64';;
6835 esac
81ecdfbb 6836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6837/* end confdefs.h. */
6838
6839 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6840 included before <wchar.h>. */
6841 #include <stddef.h>
6842 #include <signal.h>
6843 #if HAVE_WCHAR_H
6844 # include <stdio.h>
6845 # include <time.h>
6846 # include <wchar.h>
6847 #endif
6848
6849 extern $gltype foo;
6850 extern $gltype1 foo;
6851int
6852main ()
6853{
6854
6855 ;
6856 return 0;
6857}
6858_ACEOF
81ecdfbb 6859if ac_fn_c_try_compile "$LINENO"; then :
783e057b 6860 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6861fi
81ecdfbb 6862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
6863 eval result=\$gl_cv_type_${gltype}_suffix
6864 test "$result" != no && break
6865 done
6866fi
81ecdfbb
RW
6867eval ac_res=\$gl_cv_type_${gltype}_suffix
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6869$as_echo "$ac_res" >&6; }
783e057b
DJ
6870 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6871 eval result=\$gl_cv_type_${gltype}_suffix
6872 test "$result" = no && result=
6873 eval ${GLTYPE}_SUFFIX=\$result
6874 cat >>confdefs.h <<_ACEOF
6875#define ${GLTYPE}_SUFFIX $result
6876_ACEOF
6877
6878 done
6879
6880
783e057b
DJ
6881 fi
6882
6883
f434ba03
PA
6884 for gltype in sig_atomic_t wchar_t wint_t ; do
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
6886$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
6887if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
81ecdfbb 6888 $as_echo_n "(cached) " >&6
783e057b 6889else
f434ba03
PA
6890 eval gl_cv_type_${gltype}_suffix=no
6891 eval result=\$gl_cv_type_${gltype}_signed
6892 if test "$result" = yes; then
6893 glsufu=
6894 else
6895 glsufu=u
6896 fi
6897 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6898 case $glsuf in
6899 '') gltype1='int';;
6900 l) gltype1='long int';;
6901 ll) gltype1='long long int';;
6902 i64) gltype1='__int64';;
6903 u) gltype1='unsigned int';;
6904 ul) gltype1='unsigned long int';;
6905 ull) gltype1='unsigned long long int';;
6906 ui64)gltype1='unsigned __int64';;
6907 esac
6908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 6909/* end confdefs.h. */
f434ba03
PA
6910
6911 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6912 included before <wchar.h>. */
6913 #include <stddef.h>
6914 #include <signal.h>
6915 #if HAVE_WCHAR_H
6916 # include <stdio.h>
6917 # include <time.h>
6918 # include <wchar.h>
6919 #endif
6920
6921 extern $gltype foo;
6922 extern $gltype1 foo;
6923int
6924main ()
6925{
6926
6927 ;
6928 return 0;
6929}
783e057b 6930_ACEOF
81ecdfbb 6931if ac_fn_c_try_compile "$LINENO"; then :
f434ba03 6932 eval gl_cv_type_${gltype}_suffix=\$glsuf
783e057b 6933fi
81ecdfbb 6934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f434ba03
PA
6935 eval result=\$gl_cv_type_${gltype}_suffix
6936 test "$result" != no && break
6937 done
783e057b 6938fi
f434ba03
PA
6939eval ac_res=\$gl_cv_type_${gltype}_suffix
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6941$as_echo "$ac_res" >&6; }
6942 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6943 eval result=\$gl_cv_type_${gltype}_suffix
6944 test "$result" = no && result=
6945 eval ${GLTYPE}_SUFFIX=\$result
6946 cat >>confdefs.h <<_ACEOF
6947#define ${GLTYPE}_SUFFIX $result
6948_ACEOF
6949
6950 done
6951
6952
6953
6954 STDINT_H=stdint.h
783e057b
DJ
6955 fi
6956
6957
f434ba03
PA
6958 # Code from module string:
6959
6960
6961
6962 # Code from module warn-on-use:
6963 # Code from module wchar:
6964
6965
6966
6967
783e057b
DJ
6968 :
6969
6970
6971
6972
6973
783e057b
DJ
6974
6975
6976
6977
6978 :
6979
6980
6981
6982
6983
6984
6985
6986 if test $gl_cv_have_include_next = yes; then
6987 gl_cv_next_wchar_h='<'wchar.h'>'
6988 else
81ecdfbb
RW
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
6990$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
6991if test "${gl_cv_next_wchar_h+set}" = set; then :
6992 $as_echo_n "(cached) " >&6
783e057b
DJ
6993else
6994
f434ba03
PA
6995 if test $ac_cv_header_wchar_h = yes; then
6996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
6997/* end confdefs.h. */
6998#include <wchar.h>
6999
7000_ACEOF
f434ba03
PA
7001 case "$host_os" in
7002 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7003 *) gl_absname_cpp="$ac_cpp" ;;
7004 esac
7005 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7006 sed -n '\#/wchar.h#{
7007 s#.*"\(.*/wchar.h\)".*#\1#
7008 s#^/[^/]#//&#
7009 p
7010 q
7011 }'`'"'
7012 else
7013 gl_cv_next_wchar_h='<'wchar.h'>'
7014 fi
783e057b
DJ
7015
7016fi
81ecdfbb
RW
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
7018$as_echo "$gl_cv_next_wchar_h" >&6; }
783e057b
DJ
7019 fi
7020 NEXT_WCHAR_H=$gl_cv_next_wchar_h
7021
f434ba03
PA
7022 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7023 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7024 gl_next_as_first_directive='<'wchar.h'>'
7025 else
7026 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7027 gl_next_as_first_directive=$gl_cv_next_wchar_h
7028 fi
7029 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
7030
7031
7032
7033 if test $ac_cv_header_wchar_h = yes; then
7034 HAVE_WCHAR_H=1
7035 else
7036 HAVE_WCHAR_H=0
7037 fi
7038
7039
7040
7041 if test $gt_cv_c_wint_t = yes; then
7042 HAVE_WINT_T=1
7043 else
7044 HAVE_WINT_T=0
7045 fi
7046
7047
7048
7049 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
7050 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7052$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7053if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7054 $as_echo_n "(cached) " >&6
7055else
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h. */
7058
7059/* Some systems require additional headers. */
7060#ifndef __GLIBC__
7061# include <stddef.h>
7062# include <stdio.h>
7063# include <time.h>
7064#endif
7065#include <wchar.h>
7066
7067int
7068main ()
7069{
7070#undef $gl_func
7071 (void) $gl_func;
7072 ;
7073 return 0;
7074}
7075_ACEOF
7076if ac_fn_c_try_compile "$LINENO"; then :
7077 eval "$as_gl_Symbol=yes"
7078else
7079 eval "$as_gl_Symbol=no"
7080fi
7081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7082fi
7083eval ac_res=\$$as_gl_Symbol
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7085$as_echo "$ac_res" >&6; }
7086 eval as_val=\$$as_gl_Symbol
7087 if test "x$as_val" = x""yes; then :
7088 cat >>confdefs.h <<_ACEOF
7089#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7090_ACEOF
7091
7092 eval ac_cv_have_decl_$gl_func=yes
7093fi
7094 done
7095
7096
7097 # Code from module dummy:
7098 # End of code from modules
7099
7100
c906108c 7101
c906108c 7102
c906108c 7103
c906108c 7104
c906108c 7105
c906108c 7106
c906108c 7107
783e057b
DJ
7108 gltests_libdeps=
7109 gltests_ltlibdeps=
20e95c23 7110
20e95c23 7111
20e95c23 7112
f434ba03
PA
7113
7114
7115
7116
7117
7118
783e057b 7119 gl_source_base='tests'
f434ba03
PA
7120 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
7121
7122 gl_module_indicator_condition=$gltests_WITNESS
7123
7124
7125
7126
7127
c906108c 7128
bec39cab 7129
bec39cab 7130
783e057b
DJ
7131
7132 LIBGNU_LIBDEPS="$gl_libdeps"
7133
7134 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
7135
7136
e28b3332 7137
d5af19ba
DJ
7138# For Makefile dependencies.
7139GNULIB_STDINT_H=
7140if test x"$STDINT_H" != x; then
7141 GNULIB_STDINT_H=gnulib/$STDINT_H
7142fi
7143
7144
bec39cab
AC
7145PACKAGE=gdb
7146
7147cat >>confdefs.h <<_ACEOF
7148#define PACKAGE "$PACKAGE"
7149_ACEOF
7150
7151
7152
e28b3332
DJ
7153# GDB does not use automake, but gnulib does. This line lets us
7154# generate its Makefile.in.
81ecdfbb
RW
7155am__api_version='1.11'
7156
e28b3332
DJ
7157# Find a good install program. We prefer a C program (faster),
7158# so one script is as good as another. But avoid the broken or
7159# incompatible versions:
7160# SysV /etc/install, /usr/sbin/install
7161# SunOS /usr/etc/install
7162# IRIX /sbin/install
7163# AIX /bin/install
7164# AmigaOS /C/install, which installs bootblocks on floppy discs
7165# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7166# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7167# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7168# OS/2's system install, which has a completely different semantic
7169# ./install, which can be erroneously created by make from ./install.sh.
85541719 7170# Reject install programs that cannot install multiple files.
81ecdfbb
RW
7171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7172$as_echo_n "checking for a BSD-compatible install... " >&6; }
e28b3332 7173if test -z "$INSTALL"; then
81ecdfbb
RW
7174if test "${ac_cv_path_install+set}" = set; then :
7175 $as_echo_n "(cached) " >&6
e28b3332
DJ
7176else
7177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180 IFS=$as_save_IFS
7181 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7182 # Account for people who put trailing slashes in PATH elements.
7183case $as_dir/ in #((
7184 ./ | .// | /[cC]/* | \
e28b3332 7185 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
81ecdfbb 7186 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
e28b3332
DJ
7187 /usr/ucb/* ) ;;
7188 *)
7189 # OSF1 and SCO ODT 3.0 have their own names for install.
7190 # Don't use installbsd from OSF since it installs stuff as root
7191 # by default.
7192 for ac_prog in ginstall scoinst install; do
7193 for ac_exec_ext in '' $ac_executable_extensions; do
81ecdfbb 7194 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
e28b3332
DJ
7195 if test $ac_prog = install &&
7196 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7197 # AIX install. It has an incompatible calling convention.
7198 :
7199 elif test $ac_prog = install &&
7200 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7201 # program-specific install script used by HP pwplus--don't use.
7202 :
7203 else
85541719
DE
7204 rm -rf conftest.one conftest.two conftest.dir
7205 echo one > conftest.one
7206 echo two > conftest.two
7207 mkdir conftest.dir
7208 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7209 test -s conftest.one && test -s conftest.two &&
7210 test -s conftest.dir/conftest.one &&
7211 test -s conftest.dir/conftest.two
7212 then
7213 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7214 break 3
7215 fi
e28b3332
DJ
7216 fi
7217 fi
7218 done
7219 done
7220 ;;
7221esac
81ecdfbb
RW
7222
7223 done
7224IFS=$as_save_IFS
e28b3332 7225
85541719 7226rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
7227
7228fi
7229 if test "${ac_cv_path_install+set}" = set; then
7230 INSTALL=$ac_cv_path_install
7231 else
85541719
DE
7232 # As a last resort, use the slow shell script. Don't cache a
7233 # value for INSTALL within a source directory, because that will
e28b3332 7234 # break other packages using the cache if that directory is
85541719 7235 # removed, or if the value is a relative name.
e28b3332
DJ
7236 INSTALL=$ac_install_sh
7237 fi
7238fi
81ecdfbb
RW
7239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7240$as_echo "$INSTALL" >&6; }
e28b3332
DJ
7241
7242# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7243# It thinks the first close brace ends the variable substitution.
7244test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7245
7246test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7247
7248test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7249
81ecdfbb
RW
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7251$as_echo_n "checking whether build environment is sane... " >&6; }
e28b3332
DJ
7252# Just in case
7253sleep 1
7254echo timestamp > conftest.file
81ecdfbb
RW
7255# Reject unsafe characters in $srcdir or the absolute working directory
7256# name. Accept space and tab only in the latter.
7257am_lf='
7258'
7259case `pwd` in
7260 *[\\\"\#\$\&\'\`$am_lf]*)
7261 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
7262esac
7263case $srcdir in
7264 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
7265 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
7266esac
7267
e28b3332
DJ
7268# Do `set' in a subshell so we don't clobber the current shell's
7269# arguments. Must try -L first in case configure is actually a
7270# symlink; some systems play weird games with the mod time of symlinks
7271# (eg FreeBSD returns the mod time of the symlink's containing
7272# directory).
7273if (
81ecdfbb 7274 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
e28b3332
DJ
7275 if test "$*" = "X"; then
7276 # -L didn't work.
81ecdfbb 7277 set X `ls -t "$srcdir/configure" conftest.file`
e28b3332
DJ
7278 fi
7279 rm -f conftest.file
7280 if test "$*" != "X $srcdir/configure conftest.file" \
7281 && test "$*" != "X conftest.file $srcdir/configure"; then
7282
7283 # If neither matched, then we have a broken ls. This can happen
7284 # if, for instance, CONFIG_SHELL is bash and it inherits a
7285 # broken ls alias from the environment. This has actually
7286 # happened. Such a system could not be considered "sane".
81ecdfbb
RW
7287 as_fn_error "ls -t appears to fail. Make sure there is not a broken
7288alias in your environment" "$LINENO" 5
e28b3332
DJ
7289 fi
7290
7291 test "$2" = conftest.file
7292 )
7293then
7294 # Ok.
7295 :
7296else
81ecdfbb
RW
7297 as_fn_error "newly created file is older than distributed files!
7298Check your system clock" "$LINENO" 5
e28b3332 7299fi
81ecdfbb
RW
7300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7301$as_echo "yes" >&6; }
e28b3332 7302test "$program_prefix" != NONE &&
81ecdfbb 7303 program_transform_name="s&^&$program_prefix&;$program_transform_name"
e28b3332
DJ
7304# Use a double $ so make ignores it.
7305test "$program_suffix" != NONE &&
81ecdfbb
RW
7306 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7307# Double any \ or $.
e28b3332 7308# By default was `s,x,x', remove it if useless.
81ecdfbb
RW
7309ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
7310program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e28b3332
DJ
7311
7312# expand $ac_aux_dir to an absolute path
7313am_aux_dir=`cd $ac_aux_dir && pwd`
7314
81ecdfbb
RW
7315if test x"${MISSING+set}" != xset; then
7316 case $am_aux_dir in
7317 *\ * | *\ *)
7318 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7319 *)
7320 MISSING="\${SHELL} $am_aux_dir/missing" ;;
7321 esac
7322fi
e28b3332
DJ
7323# Use eval to expand $SHELL
7324if eval "$MISSING --run true"; then
7325 am_missing_run="$MISSING --run "
7326else
7327 am_missing_run=
81ecdfbb
RW
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
7329$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
7330fi
7331
7332if test x"${install_sh}" != xset; then
7333 case $am_aux_dir in
7334 *\ * | *\ *)
7335 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7336 *)
7337 install_sh="\${SHELL} $am_aux_dir/install-sh"
7338 esac
7339fi
7340
7341# Installed binaries are usually stripped using `strip' when the user
7342# run `make install-strip'. However `strip' might not be the right
7343# tool to use in cross-compilation environments, therefore Automake
7344# will honor the `STRIP' environment variable to overrule this program.
7345if test "$cross_compiling" != no; then
7346 if test -n "$ac_tool_prefix"; then
7347 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7348set dummy ${ac_tool_prefix}strip; ac_word=$2
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if test "${ac_cv_prog_STRIP+set}" = set; then :
7352 $as_echo_n "(cached) " >&6
7353else
7354 if test -n "$STRIP"; then
7355 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7356else
7357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360 IFS=$as_save_IFS
7361 test -z "$as_dir" && as_dir=.
7362 for ac_exec_ext in '' $ac_executable_extensions; do
7363 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7364 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366 break 2
7367 fi
7368done
7369 done
7370IFS=$as_save_IFS
7371
7372fi
7373fi
7374STRIP=$ac_cv_prog_STRIP
7375if test -n "$STRIP"; then
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7377$as_echo "$STRIP" >&6; }
7378else
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380$as_echo "no" >&6; }
7381fi
7382
7383
7384fi
7385if test -z "$ac_cv_prog_STRIP"; then
7386 ac_ct_STRIP=$STRIP
7387 # Extract the first word of "strip", so it can be a program name with args.
7388set dummy strip; ac_word=$2
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7390$as_echo_n "checking for $ac_word... " >&6; }
7391if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
7392 $as_echo_n "(cached) " >&6
7393else
7394 if test -n "$ac_ct_STRIP"; then
7395 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7396else
7397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398for as_dir in $PATH
7399do
7400 IFS=$as_save_IFS
7401 test -z "$as_dir" && as_dir=.
7402 for ac_exec_ext in '' $ac_executable_extensions; do
7403 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7404 ac_cv_prog_ac_ct_STRIP="strip"
7405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7406 break 2
7407 fi
7408done
7409 done
7410IFS=$as_save_IFS
7411
7412fi
7413fi
7414ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7415if test -n "$ac_ct_STRIP"; then
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7417$as_echo "$ac_ct_STRIP" >&6; }
7418else
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420$as_echo "no" >&6; }
7421fi
7422
7423 if test "x$ac_ct_STRIP" = x; then
7424 STRIP=":"
7425 else
7426 case $cross_compiling:$ac_tool_warned in
7427yes:)
7428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7430ac_tool_warned=yes ;;
7431esac
7432 STRIP=$ac_ct_STRIP
7433 fi
7434else
7435 STRIP="$ac_cv_prog_STRIP"
7436fi
7437
7438fi
7439INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7440
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7442$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7443if test -z "$MKDIR_P"; then
7444 if test "${ac_cv_path_mkdir+set}" = set; then :
7445 $as_echo_n "(cached) " >&6
7446else
7447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7448for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7449do
7450 IFS=$as_save_IFS
7451 test -z "$as_dir" && as_dir=.
7452 for ac_prog in mkdir gmkdir; do
7453 for ac_exec_ext in '' $ac_executable_extensions; do
7454 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7455 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7456 'mkdir (GNU coreutils) '* | \
7457 'mkdir (coreutils) '* | \
7458 'mkdir (fileutils) '4.1*)
7459 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7460 break 3;;
7461 esac
7462 done
7463 done
e28b3332 7464 done
81ecdfbb
RW
7465IFS=$as_save_IFS
7466
7467fi
7468
7469 if test "${ac_cv_path_mkdir+set}" = set; then
7470 MKDIR_P="$ac_cv_path_mkdir -p"
e28b3332 7471 else
81ecdfbb
RW
7472 # As a last resort, use the slow shell script. Don't cache a
7473 # value for MKDIR_P within a source directory, because that will
7474 # break other packages using the cache if that directory is
7475 # removed, or if the value is a relative name.
7476 test -d ./--version && rmdir ./--version
7477 MKDIR_P="$ac_install_sh -d"
e28b3332
DJ
7478 fi
7479fi
81ecdfbb
RW
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7481$as_echo "$MKDIR_P" >&6; }
7482
f434ba03 7483
81ecdfbb
RW
7484mkdir_p="$MKDIR_P"
7485case $mkdir_p in
7486 [\\/$]* | ?:[\\/]*) ;;
7487 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7488esac
e28b3332
DJ
7489
7490for ac_prog in gawk mawk nawk awk
7491do
7492 # Extract the first word of "$ac_prog", so it can be a program name with args.
7493set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7495$as_echo_n "checking for $ac_word... " >&6; }
7496if test "${ac_cv_prog_AWK+set}" = set; then :
7497 $as_echo_n "(cached) " >&6
e28b3332
DJ
7498else
7499 if test -n "$AWK"; then
7500 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7501else
7502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503for as_dir in $PATH
7504do
7505 IFS=$as_save_IFS
7506 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7507 for ac_exec_ext in '' $ac_executable_extensions; do
7508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e28b3332 7509 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
e28b3332
DJ
7511 break 2
7512 fi
7513done
81ecdfbb
RW
7514 done
7515IFS=$as_save_IFS
e28b3332
DJ
7516
7517fi
7518fi
7519AWK=$ac_cv_prog_AWK
7520if test -n "$AWK"; then
81ecdfbb
RW
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7522$as_echo "$AWK" >&6; }
e28b3332 7523else
81ecdfbb
RW
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7525$as_echo "no" >&6; }
e28b3332
DJ
7526fi
7527
81ecdfbb 7528
e28b3332
DJ
7529 test -n "$AWK" && break
7530done
7531
81ecdfbb 7532ac_config_commands="$ac_config_commands depfiles"
e28b3332
DJ
7533
7534
7535am_make=${MAKE-make}
7536cat > confinc << 'END'
7537am__doit:
81ecdfbb 7538 @echo this is the am__doit target
e28b3332
DJ
7539.PHONY: am__doit
7540END
7541# If we don't find an include directive, just comment out the code.
81ecdfbb
RW
7542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
7543$as_echo_n "checking for style of include used by $am_make... " >&6; }
e28b3332
DJ
7544am__include="#"
7545am__quote=
7546_am_result=none
7547# First try GNU make style include.
7548echo "include confinc" > confmf
81ecdfbb
RW
7549# Ignore all kinds of additional output from `make'.
7550case `$am_make -s -f confmf 2> /dev/null` in #(
7551*the\ am__doit\ target*)
7552 am__include=include
7553 am__quote=
7554 _am_result=GNU
7555 ;;
7556esac
e28b3332
DJ
7557# Now try BSD make style include.
7558if test "$am__include" = "#"; then
7559 echo '.include "confinc"' > confmf
81ecdfbb
RW
7560 case `$am_make -s -f confmf 2> /dev/null` in #(
7561 *the\ am__doit\ target*)
7562 am__include=.include
7563 am__quote="\""
7564 _am_result=BSD
7565 ;;
7566 esac
e28b3332
DJ
7567fi
7568
7569
81ecdfbb
RW
7570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
7571$as_echo "$_am_result" >&6; }
e28b3332
DJ
7572rm -f confinc confmf
7573
81ecdfbb
RW
7574# Check whether --enable-dependency-tracking was given.
7575if test "${enable_dependency_tracking+set}" = set; then :
7576 enableval=$enable_dependency_tracking;
7577fi
e28b3332 7578
e28b3332
DJ
7579if test "x$enable_dependency_tracking" != xno; then
7580 am_depcomp="$ac_aux_dir/depcomp"
7581 AMDEPBACKSLASH='\'
7582fi
81ecdfbb 7583 if test "x$enable_dependency_tracking" != xno; then
e28b3332
DJ
7584 AMDEP_TRUE=
7585 AMDEP_FALSE='#'
7586else
7587 AMDEP_TRUE='#'
7588 AMDEP_FALSE=
7589fi
7590
7591
81ecdfbb
RW
7592if test "`cd $srcdir && pwd`" != "`pwd`"; then
7593 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7594 # is not polluted with repeated "-I."
7595 am__isrc=' -I$(srcdir)'
7596 # test to see if srcdir already configured
7597 if test -f $srcdir/config.status; then
7598 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
7599 fi
e28b3332
DJ
7600fi
7601
7602# test whether we have cygpath
7603if test -z "$CYGPATH_W"; then
7604 if (cygpath --version) >/dev/null 2>/dev/null; then
7605 CYGPATH_W='cygpath -w'
7606 else
7607 CYGPATH_W=echo
7608 fi
7609fi
7610
7611
7612# Define the identity of the package.
7613 PACKAGE=gdb
7614 VERSION=UNUSED-VERSION
7615
7616
7617# Some tools Automake needs.
7618
7619ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
7620
7621
7622AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
7623
7624
7625AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
7626
7627
7628AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
7629
7630
7631MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
7632
e28b3332
DJ
7633# We need awk for the "check" target. The system "awk" is bad on
7634# some platforms.
7635# Always define AMTAR for backward compatibility.
7636
7637AMTAR=${AMTAR-"${am_missing_run}tar"}
7638
7639am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
7640
7641
7642
7643
7644depcc="$CC" am_compiler_list=
7645
81ecdfbb
RW
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7647$as_echo_n "checking dependency style of $depcc... " >&6; }
7648if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
7649 $as_echo_n "(cached) " >&6
e28b3332
DJ
7650else
7651 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7652 # We make a subdir and do the tests there. Otherwise we can end up
7653 # making bogus files that we don't know about and never remove. For
7654 # instance it was reported that on HP-UX the gcc test will end up
7655 # making a dummy file named `D' -- because `-MD' means `put the output
7656 # in D'.
7657 mkdir conftest.dir
7658 # Copy depcomp to subdir because otherwise we won't find it if we're
7659 # using a relative directory.
7660 cp "$am_depcomp" conftest.dir
7661 cd conftest.dir
7662 # We will build objects and dependencies in a subdirectory because
7663 # it helps to detect inapplicable dependency modes. For instance
7664 # both Tru64's cc and ICC support -MD to output dependencies as a
7665 # side effect of compilation, but ICC will put the dependencies in
7666 # the current directory while Tru64 will put them in the object
7667 # directory.
7668 mkdir sub
7669
7670 am_cv_CC_dependencies_compiler_type=none
7671 if test "$am_compiler_list" = ""; then
7672 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7673 fi
81ecdfbb
RW
7674 am__universal=false
7675 case " $depcc " in #(
7676 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7677 esac
7678
e28b3332
DJ
7679 for depmode in $am_compiler_list; do
7680 # Setup a source with many dependencies, because some compilers
7681 # like to wrap large dependency lists on column 80 (with \), and
7682 # we should not choose a depcomp mode which is confused by this.
7683 #
7684 # We need to recreate these files for each test, as the compiler may
7685 # overwrite some of them when testing with obscure command lines.
7686 # This happens at least with the AIX C compiler.
7687 : > sub/conftest.c
7688 for i in 1 2 3 4 5 6; do
7689 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7690 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7691 # Solaris 8's {/usr,}/bin/sh.
7692 touch sub/conftst$i.h
7693 done
7694 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7695
81ecdfbb
RW
7696 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7697 # mode. It turns out that the SunPro C++ compiler does not properly
7698 # handle `-M -o', and we need to detect this. Also, some Intel
7699 # versions had trouble with output in subdirs
7700 am__obj=sub/conftest.${OBJEXT-o}
7701 am__minus_obj="-o $am__obj"
e28b3332 7702 case $depmode in
81ecdfbb
RW
7703 gcc)
7704 # This depmode causes a compiler race in universal mode.
7705 test "$am__universal" = false || continue
7706 ;;
e28b3332
DJ
7707 nosideeffect)
7708 # after this tag, mechanisms are not by side-effect, so they'll
7709 # only be used when explicitly requested
7710 if test "x$enable_dependency_tracking" = xyes; then
7711 continue
7712 else
7713 break
7714 fi
7715 ;;
81ecdfbb
RW
7716 msvisualcpp | msvcmsys)
7717 # This compiler won't grok `-c -o', but also, the minuso test has
7718 # not run yet. These depmodes are late enough in the game, and
7719 # so weak that their functioning should not be impacted.
7720 am__obj=conftest.${OBJEXT-o}
7721 am__minus_obj=
7722 ;;
e28b3332
DJ
7723 none) break ;;
7724 esac
e28b3332 7725 if depmode=$depmode \
81ecdfbb 7726 source=sub/conftest.c object=$am__obj \
e28b3332 7727 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
81ecdfbb 7728 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
e28b3332 7729 >/dev/null 2>conftest.err &&
81ecdfbb 7730 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
e28b3332 7731 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
81ecdfbb 7732 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
e28b3332
DJ
7733 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7734 # icc doesn't choke on unknown options, it will just issue warnings
7735 # or remarks (even with -Werror). So we grep stderr for any message
7736 # that says an option was ignored or not supported.
7737 # When given -MP, icc 7.0 and 7.1 complain thusly:
7738 # icc: Command line warning: ignoring option '-M'; no argument required
7739 # The diagnosis changed in icc 8.0:
7740 # icc: Command line remark: option '-MP' not supported
7741 if (grep 'ignoring option' conftest.err ||
7742 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7743 am_cv_CC_dependencies_compiler_type=$depmode
7744 break
7745 fi
7746 fi
7747 done
7748
7749 cd ..
7750 rm -rf conftest.dir
7751else
7752 am_cv_CC_dependencies_compiler_type=none
7753fi
7754
7755fi
81ecdfbb
RW
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7757$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
e28b3332
DJ
7758CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7759
81ecdfbb 7760 if
e28b3332
DJ
7761 test "x$enable_dependency_tracking" != xno \
7762 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7763 am__fastdepCC_TRUE=
7764 am__fastdepCC_FALSE='#'
7765else
7766 am__fastdepCC_TRUE='#'
7767 am__fastdepCC_FALSE=
7768fi
7769
7770
7771
7772
bec39cab
AC
7773
7774
81ecdfbb
RW
7775# Check whether --with-separate-debug-dir was given.
7776if test "${with_separate_debug_dir+set}" = set; then :
7777 withval=$with_separate_debug_dir;
b14b1491
TT
7778 DEBUGDIR=$withval
7779else
7780 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
7781fi
7782
20e95c23 7783
783e057b
DJ
7784 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7785 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 7786 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 7787 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7788
783e057b
DJ
7789cat >>confdefs.h <<_ACEOF
7790#define DEBUGDIR "$ac_define_dir"
20e95c23 7791_ACEOF
20e95c23 7792
20e95c23 7793
20e95c23 7794
0c4a4063 7795
b14b1491
TT
7796 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7797 if test "x$prefix" = xNONE; then
7798 test_prefix=/usr/local
7799 else
7800 test_prefix=$prefix
7801 fi
783e057b 7802 else
b14b1491 7803 test_prefix=$exec_prefix
783e057b 7804 fi
b14b1491
TT
7805 value=0
7806 case ${ac_define_dir} in
7807 "${test_prefix}"|"${test_prefix}/"*|\
7808 '${exec_prefix}'|'${exec_prefix}/'*)
7809 value=1
7810 ;;
7811 esac
7812
7813cat >>confdefs.h <<_ACEOF
7814#define DEBUGDIR_RELOCATABLE $value
7815_ACEOF
7816
7817
7818
0c4a4063 7819
b14b1491
TT
7820# GDB's datadir relocation
7821
7822
7823
81ecdfbb
RW
7824# Check whether --with-gdb-datadir was given.
7825if test "${with_gdb_datadir+set}" = set; then :
7826 withval=$with_gdb_datadir;
b14b1491 7827 GDB_DATADIR=$withval
20e95c23 7828else
b14b1491 7829 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
7830fi
7831
20e95c23 7832
b14b1491
TT
7833 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7834 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7835 ac_define_dir=`eval echo $GDB_DATADIR`
7836 ac_define_dir=`eval echo $ac_define_dir`
7837
7838cat >>confdefs.h <<_ACEOF
7839#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
7840_ACEOF
7841
b14b1491
TT
7842
7843
0c4a4063 7844
b14b1491
TT
7845 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7846 if test "x$prefix" = xNONE; then
7847 test_prefix=/usr/local
7848 else
7849 test_prefix=$prefix
7850 fi
7851 else
7852 test_prefix=$exec_prefix
7853 fi
7854 value=0
7855 case ${ac_define_dir} in
7856 "${test_prefix}"|"${test_prefix}/"*|\
7857 '${exec_prefix}'|'${exec_prefix}/'*)
7858 value=1
7859 ;;
7860 esac
7861
7862cat >>confdefs.h <<_ACEOF
7863#define GDB_DATADIR_RELOCATABLE $value
7864_ACEOF
7865
7866
783e057b 7867
20e95c23 7868
0c4a4063 7869
81ecdfbb
RW
7870# Check whether --with-relocated-sources was given.
7871if test "${with_relocated_sources+set}" = set; then :
7872 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
7873
7874 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7875 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7876 ac_define_dir=`eval echo $reloc_srcdir`
7877 ac_define_dir=`eval echo $ac_define_dir`
7878
7879cat >>confdefs.h <<_ACEOF
7880#define RELOC_SRCDIR "$ac_define_dir"
7881_ACEOF
7882
7883
7884
81ecdfbb
RW
7885fi
7886
29b0e8a2
JM
7887
7888
20e95c23 7889
5ae98d25 7890subdirs="$subdirs testsuite"
20e95c23 7891
4f3e6fb7
YQ
7892subdirs="$subdirs common"
7893
20e95c23 7894
783e057b 7895# Check whether to support alternative target configurations
81ecdfbb
RW
7896# Check whether --enable-targets was given.
7897if test "${enable_targets+set}" = set; then :
7898 enableval=$enable_targets; case "${enableval}" in
7899 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
7900 ;;
7901 no) enable_targets= ;;
7902 *) enable_targets=$enableval ;;
7903esac
81ecdfbb
RW
7904fi
7905
20e95c23 7906
783e057b 7907# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
7908# Check whether --enable-64-bit-bfd was given.
7909if test "${enable_64_bit_bfd+set}" = set; then :
7910 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
7911 yes) want64=true ;;
7912 no) want64=false ;;
81ecdfbb 7913 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
7914esac
7915else
7916 want64=false
81ecdfbb
RW
7917fi
7918
783e057b
DJ
7919# Provide defaults for some variables set by the per-host and per-target
7920# configuration.
7921gdb_host_obs=posix-hdep.o
20e95c23 7922
783e057b
DJ
7923if test "${target}" = "${host}"; then
7924 gdb_native=yes
7925else
7926 gdb_native=no
7927fi
20e95c23 7928
783e057b 7929. $srcdir/configure.host
20e95c23 7930
783e057b 7931# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7932
783e057b
DJ
7933TARGET_OBS=
7934all_targets=
20e95c23 7935
783e057b 7936for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7937do
783e057b
DJ
7938 if test "$targ_alias" = "all"; then
7939 all_targets=true
7940 else
7941 # Canonicalize the secondary target names.
7942 result=`$ac_config_sub $targ_alias 2>/dev/null`
7943 if test -n "$result"; then
7944 targ=$result
7945 else
7946 targ=$targ_alias
7947 fi
20e95c23 7948
783e057b 7949 . ${srcdir}/configure.tgt
20e95c23 7950
bf307134
JB
7951 if test -z "${gdb_target_obs}"; then :
7952 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
7953fi
7954
783e057b
DJ
7955 # Target-specific object files
7956 for i in ${gdb_target_obs}; do
7957 case " $TARGET_OBS " in
7958 *" ${i} "*) ;;
7959 *)
7960 TARGET_OBS="$TARGET_OBS ${i}"
7961 ;;
7962 esac
7963 done
20e95c23 7964
783e057b
DJ
7965 # Check whether this target needs 64-bit CORE_ADDR
7966 if test x${want64} = xfalse; then
7967 . ${srcdir}/../bfd/config.bfd
7968 fi
7969 fi
20e95c23
DJ
7970done
7971
783e057b
DJ
7972if test x${all_targets} = xtrue; then
7973
7974 # We want all 64-bit targets if we either:
7975 # - run on a 64-bit host or
7976 # - already require 64-bit support for some other target or
7977 # - the --enable-64-bit-bfd option was supplied
7978 # Otherwise we only support all 32-bit targets.
7979 #
7980 # NOTE: This test must be in sync with the corresponding
7981 # tests in BFD!
20e95c23 7982
783e057b 7983 if test x${want64} = xfalse; then
81ecdfbb
RW
7984 # The cast to long int works around a bug in the HP C Compiler
7985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7987# This bug is HP SR number 8606223364.
7988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7989$as_echo_n "checking size of long... " >&6; }
7990if test "${ac_cv_sizeof_long+set}" = set; then :
7991 $as_echo_n "(cached) " >&6
c0993dbe 7992else
81ecdfbb 7993 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 7994
81ecdfbb
RW
7995else
7996 if test "$ac_cv_type_long" = yes; then
7997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7999{ as_fn_set_status 77
8000as_fn_error "cannot compute sizeof (long)
8001See \`config.log' for more details." "$LINENO" 5; }; }
8002 else
8003 ac_cv_sizeof_long=0
8004 fi
c0993dbe 8005fi
81ecdfbb 8006
c0993dbe 8007fi
81ecdfbb
RW
8008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8009$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 8010
c0993dbe 8011
c0993dbe 8012
c0993dbe
UW
8013cat >>confdefs.h <<_ACEOF
8014#define SIZEOF_LONG $ac_cv_sizeof_long
8015_ACEOF
8016
8017
8018 if test "x${ac_cv_sizeof_long}" = "x8"; then
8019 want64=true
8020 fi
8021 fi
8022 if test x${want64} = xtrue; then
8023 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
8024 else
8025 TARGET_OBS='$(ALL_TARGET_OBS)'
8026 fi
8027fi
8028
8029
8030
8031# For other settings, only the main target counts.
8032gdb_sim=
8033gdb_osabi=
8034build_gdbserver=
8035targ=$target; . ${srcdir}/configure.tgt
8036
8037# Fetch the default architecture and default target vector from BFD.
8038targ=$target; . $srcdir/../bfd/config.bfd
8039
8040# We only want the first architecture, so strip off the others if
8041# there is more than one.
8042targ_archs=`echo $targ_archs | sed 's/ .*//'`
8043
8044if test "x$targ_archs" != x; then
8045
8046cat >>confdefs.h <<_ACEOF
8047#define DEFAULT_BFD_ARCH $targ_archs
8048_ACEOF
8049
8050fi
8051if test "x$targ_defvec" != x; then
8052
8053cat >>confdefs.h <<_ACEOF
8054#define DEFAULT_BFD_VEC $targ_defvec
8055_ACEOF
8056
8057fi
8058
c0993dbe
UW
8059# The CLI cannot be disabled yet, but may be in the future.
8060
8061# Enable CLI.
81ecdfbb
RW
8062# Check whether --enable-gdbcli was given.
8063if test "${enable_gdbcli+set}" = set; then :
8064 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
8065 yes)
8066 ;;
8067 no)
81ecdfbb 8068 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 8069 *)
81ecdfbb 8070 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
8071 esac
8072else
8073 enable_gdbcli=yes
81ecdfbb
RW
8074fi
8075
c0993dbe
UW
8076if test x"$enable_gdbcli" = xyes; then
8077 if test -d $srcdir/cli; then
8078 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
8079 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
8080 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
8081 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
8082 fi
8083fi
8084
8085# Enable MI.
81ecdfbb
RW
8086# Check whether --enable-gdbmi was given.
8087if test "${enable_gdbmi+set}" = set; then :
8088 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
8089 yes | no)
8090 ;;
8091 *)
81ecdfbb 8092 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
8093 esac
8094else
8095 enable_gdbmi=yes
81ecdfbb
RW
8096fi
8097
c0993dbe
UW
8098if test x"$enable_gdbmi" = xyes; then
8099 if test -d $srcdir/mi; then
8100 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
8101 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
8102 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
8103 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
8104 fi
8105fi
8106
8107# Enable TUI.
81ecdfbb
RW
8108# Check whether --enable-tui was given.
8109if test "${enable_tui+set}" = set; then :
8110 enableval=$enable_tui; case $enableval in
3ca64bd3 8111 yes | no | auto)
c0993dbe
UW
8112 ;;
8113 *)
81ecdfbb 8114 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
8115 esac
8116else
3ca64bd3 8117 enable_tui=auto
81ecdfbb
RW
8118fi
8119
c0993dbe
UW
8120
8121# Enable gdbtk.
81ecdfbb
RW
8122# Check whether --enable-gdbtk was given.
8123if test "${enable_gdbtk+set}" = set; then :
8124 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
8125 yes | no)
8126 ;;
8127 *)
81ecdfbb 8128 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
8129 esac
8130else
5062cc19 8131 if test -d $srcdir/gdbtk; then
c0993dbe
UW
8132 enable_gdbtk=yes
8133 else
8134 enable_gdbtk=no
8135 fi
81ecdfbb
RW
8136fi
8137
c0993dbe
UW
8138# We unconditionally disable gdbtk tests on selected platforms.
8139case $host_os in
8140 go32* | windows*)
81ecdfbb
RW
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
8142$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
8143 enable_gdbtk=no ;;
8144esac
8145
8146# Libunwind support.
bec39cab 8147
81ecdfbb
RW
8148# Check whether --with-libunwind was given.
8149if test "${with_libunwind+set}" = set; then :
8150 withval=$with_libunwind; case "${withval}" in
bec39cab
AC
8151 yes) enable_libunwind=yes ;;
8152 no) enable_libunwind=no ;;
81ecdfbb 8153 *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;;
bec39cab 8154esac
bec39cab 8155else
bec39cab 8156
81ecdfbb
RW
8157 for ac_header in libunwind.h libunwind-ia64.h
8158do :
8159 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8160ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8161eval as_val=\$$as_ac_Header
8162 if test "x$as_val" = x""yes; then :
bec39cab 8163 cat >>confdefs.h <<_ACEOF
81ecdfbb 8164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8165_ACEOF
8166
8167fi
8168
8169done
8170
a9322a30
TT
8171 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
8172 enable_libunwind=yes;
8173 fi
8174
bec39cab 8175fi
bec39cab 8176
bec39cab 8177
81ecdfbb
RW
8178if test x"$enable_libunwind" = xyes; then
8179 for ac_header in libunwind.h libunwind-ia64.h
8180do :
8181 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8182ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8183eval as_val=\$$as_ac_Header
8184 if test "x$as_val" = x""yes; then :
bec39cab 8185 cat >>confdefs.h <<_ACEOF
81ecdfbb 8186#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab
AC
8187_ACEOF
8188
8189fi
8190
8191done
8192
bec39cab 8193
81ecdfbb 8194$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
a9322a30
TT
8195
8196 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8197 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8198 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8199fi
8200
cb01cfba
JB
8201opt_curses=no
8202
81ecdfbb
RW
8203# Check whether --with-curses was given.
8204if test "${with_curses+set}" = set; then :
8205 withval=$with_curses; opt_curses=$withval
8206fi
8207
cb01cfba 8208
76a39ba7 8209prefer_curses=no
cb01cfba 8210if test "$opt_curses" = "yes"; then
76a39ba7 8211 prefer_curses=yes
cb01cfba
JB
8212fi
8213
a9322a30 8214# Profiling support.
81ecdfbb
RW
8215# Check whether --enable-profiling was given.
8216if test "${enable_profiling+set}" = set; then :
8217 enableval=$enable_profiling; case $enableval in
a9322a30
TT
8218 yes | no)
8219 ;;
8220 *)
81ecdfbb 8221 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
8222 esac
8223else
8224 enable_profiling=no
81ecdfbb 8225fi
bec39cab 8226
a9322a30
TT
8227
8228for ac_func in monstartup _mcleanup
81ecdfbb
RW
8229do :
8230 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8231ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8232eval as_val=\$$as_ac_var
8233 if test "x$as_val" = x""yes; then :
8234 cat >>confdefs.h <<_ACEOF
8235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 8236_ACEOF
a9322a30 8237
81ecdfbb
RW
8238fi
8239done
a9322a30 8240
81ecdfbb
RW
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
8242$as_echo_n "checking for _etext... " >&6; }
8243if test "${ac_cv_var__etext+set}" = set; then :
8244 $as_echo_n "(cached) " >&6
8245else
8246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8247/* end confdefs.h. */
8248#include <stdlib.h>
8249extern char _etext;
a9322a30
TT
8250
8251int
8252main ()
8253{
8254free (&_etext);
8255 ;
8256 return 0;
8257}
bec39cab 8258_ACEOF
81ecdfbb 8259if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8260 ac_cv_var__etext=yes
bec39cab 8261else
81ecdfbb 8262 ac_cv_var__etext=no
bec39cab 8263fi
81ecdfbb
RW
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
bec39cab 8266fi
81ecdfbb
RW
8267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
8268$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 8269if test $ac_cv_var__etext = yes; then
60ca704f 8270
81ecdfbb 8271$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 8272
bec39cab 8273fi
81ecdfbb
RW
8274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
8275$as_echo_n "checking for etext... " >&6; }
8276if test "${ac_cv_var_etext+set}" = set; then :
8277 $as_echo_n "(cached) " >&6
bec39cab 8278else
81ecdfbb 8279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8280/* end confdefs.h. */
a9322a30
TT
8281#include <stdlib.h>
8282extern char etext;
bec39cab
AC
8283
8284int
8285main ()
8286{
a9322a30 8287free (&etext);
bec39cab
AC
8288 ;
8289 return 0;
8290}
8291_ACEOF
81ecdfbb 8292if ac_fn_c_try_link "$LINENO"; then :
a9322a30 8293 ac_cv_var_etext=yes
bec39cab 8294else
81ecdfbb 8295 ac_cv_var_etext=no
bec39cab 8296fi
81ecdfbb
RW
8297rm -f core conftest.err conftest.$ac_objext \
8298 conftest$ac_exeext conftest.$ac_ext
bec39cab 8299fi
81ecdfbb
RW
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
8301$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
8302if test $ac_cv_var_etext = yes; then
8303
81ecdfbb 8304$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
8305
8306fi
a9322a30
TT
8307if test "$enable_profiling" = yes ; then
8308 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 8309 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
8310 fi
8311 PROFILE_CFLAGS=-pg
8312 OLD_CFLAGS="$CFLAGS"
8313 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8314
81ecdfbb
RW
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
8316$as_echo_n "checking whether $CC supports -pg... " >&6; }
8317if test "${ac_cv_cc_supports_pg+set}" = set; then :
8318 $as_echo_n "(cached) " >&6
bec39cab 8319else
81ecdfbb 8320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8321/* end confdefs.h. */
bec39cab
AC
8322
8323int
8324main ()
8325{
a9322a30 8326int x;
bec39cab
AC
8327 ;
8328 return 0;
8329}
8330_ACEOF
81ecdfbb 8331if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 8332 ac_cv_cc_supports_pg=yes
bec39cab 8333else
81ecdfbb 8334 ac_cv_cc_supports_pg=no
bec39cab 8335fi
81ecdfbb 8336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8337fi
81ecdfbb
RW
8338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
8339$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 8340
a9322a30 8341 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 8342 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 8343 fi
bec39cab 8344
a9322a30 8345 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8346fi
8347
c16158bc
JM
8348
8349
81ecdfbb
RW
8350# Check whether --with-pkgversion was given.
8351if test "${with_pkgversion+set}" = set; then :
8352 withval=$with_pkgversion; case "$withval" in
8353 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8354 no) PKGVERSION= ;;
8355 *) PKGVERSION="($withval) " ;;
8356 esac
8357else
8358 PKGVERSION="(GDB) "
8359
81ecdfbb 8360fi
c16158bc
JM
8361
8362
8363
8364
81ecdfbb
RW
8365
8366# Check whether --with-bugurl was given.
8367if test "${with_bugurl+set}" = set; then :
8368 withval=$with_bugurl; case "$withval" in
8369 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8370 no) BUGURL=
8371 ;;
8372 *) BUGURL="$withval"
8373 ;;
8374 esac
8375else
8376 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8377
81ecdfbb
RW
8378fi
8379
c16158bc
JM
8380 case ${BUGURL} in
8381 "")
8382 REPORT_BUGS_TO=
8383 REPORT_BUGS_TEXI=
8384 ;;
8385 *)
8386 REPORT_BUGS_TO="<$BUGURL>"
8387 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8388 ;;
8389 esac;
8390
8391
8392
8393
8394cat >>confdefs.h <<_ACEOF
8395#define PKGVERSION "$PKGVERSION"
8396_ACEOF
8397
8398
8399cat >>confdefs.h <<_ACEOF
8400#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8401_ACEOF
8402
8403
bec39cab
AC
8404# --------------------- #
8405# Checks for programs. #
8406# --------------------- #
8407
8408for ac_prog in gawk mawk nawk awk
8409do
8410 # Extract the first word of "$ac_prog", so it can be a program name with args.
8411set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8413$as_echo_n "checking for $ac_word... " >&6; }
8414if test "${ac_cv_prog_AWK+set}" = set; then :
8415 $as_echo_n "(cached) " >&6
bec39cab
AC
8416else
8417 if test -n "$AWK"; then
8418 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8419else
8420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8421for as_dir in $PATH
8422do
8423 IFS=$as_save_IFS
8424 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8425 for ac_exec_ext in '' $ac_executable_extensions; do
8426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8427 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 8428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8429 break 2
8430 fi
8431done
81ecdfbb
RW
8432 done
8433IFS=$as_save_IFS
bec39cab
AC
8434
8435fi
8436fi
8437AWK=$ac_cv_prog_AWK
8438if test -n "$AWK"; then
81ecdfbb
RW
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8440$as_echo "$AWK" >&6; }
bec39cab 8441else
81ecdfbb
RW
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443$as_echo "no" >&6; }
bec39cab
AC
8444fi
8445
bec39cab 8446
81ecdfbb 8447 test -n "$AWK" && break
bec39cab
AC
8448done
8449
bec39cab 8450
81ecdfbb
RW
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8452$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
8453LN_S=$as_ln_s
8454if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8456$as_echo "yes" >&6; }
bec39cab 8457else
81ecdfbb
RW
8458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8459$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
8460fi
8461
8462if test -n "$ac_tool_prefix"; then
8463 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8464set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
8465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8466$as_echo_n "checking for $ac_word... " >&6; }
8467if test "${ac_cv_prog_RANLIB+set}" = set; then :
8468 $as_echo_n "(cached) " >&6
bec39cab
AC
8469else
8470 if test -n "$RANLIB"; then
8471 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8472else
8473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8474for as_dir in $PATH
8475do
8476 IFS=$as_save_IFS
8477 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8478 for ac_exec_ext in '' $ac_executable_extensions; do
8479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8480 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 8481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8482 break 2
8483 fi
8484done
81ecdfbb
RW
8485 done
8486IFS=$as_save_IFS
bec39cab
AC
8487
8488fi
8489fi
8490RANLIB=$ac_cv_prog_RANLIB
8491if test -n "$RANLIB"; then
81ecdfbb
RW
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8493$as_echo "$RANLIB" >&6; }
bec39cab 8494else
81ecdfbb
RW
8495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8496$as_echo "no" >&6; }
bec39cab
AC
8497fi
8498
81ecdfbb 8499
bec39cab
AC
8500fi
8501if test -z "$ac_cv_prog_RANLIB"; then
8502 ac_ct_RANLIB=$RANLIB
8503 # Extract the first word of "ranlib", so it can be a program name with args.
8504set dummy ranlib; ac_word=$2
81ecdfbb
RW
8505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8506$as_echo_n "checking for $ac_word... " >&6; }
8507if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8508 $as_echo_n "(cached) " >&6
bec39cab
AC
8509else
8510 if test -n "$ac_ct_RANLIB"; then
8511 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8512else
8513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514for as_dir in $PATH
8515do
8516 IFS=$as_save_IFS
8517 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8518 for ac_exec_ext in '' $ac_executable_extensions; do
8519 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8520 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 8521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8522 break 2
8523 fi
8524done
81ecdfbb
RW
8525 done
8526IFS=$as_save_IFS
bec39cab 8527
bec39cab
AC
8528fi
8529fi
8530ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8531if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8533$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 8534else
81ecdfbb
RW
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536$as_echo "no" >&6; }
bec39cab
AC
8537fi
8538
81ecdfbb
RW
8539 if test "x$ac_ct_RANLIB" = x; then
8540 RANLIB=":"
8541 else
8542 case $cross_compiling:$ac_tool_warned in
8543yes:)
8544{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8545$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8546ac_tool_warned=yes ;;
8547esac
8548 RANLIB=$ac_ct_RANLIB
8549 fi
bec39cab
AC
8550else
8551 RANLIB="$ac_cv_prog_RANLIB"
8552fi
8553
8554for ac_prog in 'bison -y' byacc
8555do
8556 # Extract the first word of "$ac_prog", so it can be a program name with args.
8557set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
8558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8559$as_echo_n "checking for $ac_word... " >&6; }
8560if test "${ac_cv_prog_YACC+set}" = set; then :
8561 $as_echo_n "(cached) " >&6
bec39cab
AC
8562else
8563 if test -n "$YACC"; then
8564 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8565else
8566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569 IFS=$as_save_IFS
8570 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8571 for ac_exec_ext in '' $ac_executable_extensions; do
8572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8573 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 8574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8575 break 2
8576 fi
8577done
81ecdfbb
RW
8578 done
8579IFS=$as_save_IFS
bec39cab
AC
8580
8581fi
8582fi
8583YACC=$ac_cv_prog_YACC
8584if test -n "$YACC"; then
81ecdfbb
RW
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8586$as_echo "$YACC" >&6; }
bec39cab 8587else
81ecdfbb
RW
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
bec39cab
AC
8590fi
8591
81ecdfbb 8592
bec39cab
AC
8593 test -n "$YACC" && break
8594done
8595test -n "$YACC" || YACC="yacc"
8596
8597
8598if test -n "$ac_tool_prefix"; then
8599 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8600set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
8601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602$as_echo_n "checking for $ac_word... " >&6; }
8603if test "${ac_cv_prog_AR+set}" = set; then :
8604 $as_echo_n "(cached) " >&6
bec39cab
AC
8605else
8606 if test -n "$AR"; then
8607 ac_cv_prog_AR="$AR" # Let the user override the test.
8608else
8609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612 IFS=$as_save_IFS
8613 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8614 for ac_exec_ext in '' $ac_executable_extensions; do
8615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8616 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 8617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8618 break 2
8619 fi
8620done
81ecdfbb
RW
8621 done
8622IFS=$as_save_IFS
bec39cab
AC
8623
8624fi
8625fi
8626AR=$ac_cv_prog_AR
8627if test -n "$AR"; then
81ecdfbb
RW
8628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8629$as_echo "$AR" >&6; }
bec39cab 8630else
81ecdfbb
RW
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
bec39cab
AC
8633fi
8634
81ecdfbb 8635
bec39cab
AC
8636fi
8637if test -z "$ac_cv_prog_AR"; then
8638 ac_ct_AR=$AR
8639 # Extract the first word of "ar", so it can be a program name with args.
8640set dummy ar; ac_word=$2
81ecdfbb
RW
8641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8642$as_echo_n "checking for $ac_word... " >&6; }
8643if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8644 $as_echo_n "(cached) " >&6
bec39cab
AC
8645else
8646 if test -n "$ac_ct_AR"; then
8647 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8648else
8649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650for as_dir in $PATH
8651do
8652 IFS=$as_save_IFS
8653 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8654 for ac_exec_ext in '' $ac_executable_extensions; do
8655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8656 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 8657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8658 break 2
8659 fi
8660done
81ecdfbb
RW
8661 done
8662IFS=$as_save_IFS
bec39cab
AC
8663
8664fi
8665fi
8666ac_ct_AR=$ac_cv_prog_ac_ct_AR
8667if test -n "$ac_ct_AR"; then
81ecdfbb
RW
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8669$as_echo "$ac_ct_AR" >&6; }
bec39cab 8670else
81ecdfbb
RW
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
bec39cab
AC
8673fi
8674
81ecdfbb
RW
8675 if test "x$ac_ct_AR" = x; then
8676 AR=""
8677 else
8678 case $cross_compiling:$ac_tool_warned in
8679yes:)
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8682ac_tool_warned=yes ;;
8683esac
8684 AR=$ac_ct_AR
8685 fi
bec39cab
AC
8686else
8687 AR="$ac_cv_prog_AR"
8688fi
8689
8690if test -n "$ac_tool_prefix"; then
8691 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8692set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
8696 $as_echo_n "(cached) " >&6
bec39cab
AC
8697else
8698 if test -n "$DLLTOOL"; then
8699 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8700else
8701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8702for as_dir in $PATH
8703do
8704 IFS=$as_save_IFS
8705 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8706 for ac_exec_ext in '' $ac_executable_extensions; do
8707 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8708 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 8709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8710 break 2
8711 fi
8712done
81ecdfbb
RW
8713 done
8714IFS=$as_save_IFS
bec39cab
AC
8715
8716fi
8717fi
8718DLLTOOL=$ac_cv_prog_DLLTOOL
8719if test -n "$DLLTOOL"; then
81ecdfbb
RW
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8721$as_echo "$DLLTOOL" >&6; }
bec39cab 8722else
81ecdfbb
RW
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724$as_echo "no" >&6; }
bec39cab
AC
8725fi
8726
81ecdfbb 8727
bec39cab
AC
8728fi
8729if test -z "$ac_cv_prog_DLLTOOL"; then
8730 ac_ct_DLLTOOL=$DLLTOOL
8731 # Extract the first word of "dlltool", so it can be a program name with args.
8732set dummy dlltool; ac_word=$2
81ecdfbb
RW
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
8736 $as_echo_n "(cached) " >&6
bec39cab
AC
8737else
8738 if test -n "$ac_ct_DLLTOOL"; then
8739 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8740else
8741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742for as_dir in $PATH
8743do
8744 IFS=$as_save_IFS
8745 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8746 for ac_exec_ext in '' $ac_executable_extensions; do
8747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8748 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 8749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8750 break 2
8751 fi
8752done
81ecdfbb
RW
8753 done
8754IFS=$as_save_IFS
bec39cab
AC
8755
8756fi
8757fi
8758ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8759if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8761$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 8762else
81ecdfbb
RW
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764$as_echo "no" >&6; }
bec39cab
AC
8765fi
8766
81ecdfbb
RW
8767 if test "x$ac_ct_DLLTOOL" = x; then
8768 DLLTOOL=""
8769 else
8770 case $cross_compiling:$ac_tool_warned in
8771yes:)
8772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8774ac_tool_warned=yes ;;
8775esac
8776 DLLTOOL=$ac_ct_DLLTOOL
8777 fi
bec39cab
AC
8778else
8779 DLLTOOL="$ac_cv_prog_DLLTOOL"
8780fi
8781
8782if test -n "$ac_tool_prefix"; then
8783 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8784set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
8785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786$as_echo_n "checking for $ac_word... " >&6; }
8787if test "${ac_cv_prog_WINDRES+set}" = set; then :
8788 $as_echo_n "(cached) " >&6
bec39cab
AC
8789else
8790 if test -n "$WINDRES"; then
8791 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8792else
8793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794for as_dir in $PATH
8795do
8796 IFS=$as_save_IFS
8797 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8798 for ac_exec_ext in '' $ac_executable_extensions; do
8799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8800 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 8801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8802 break 2
8803 fi
8804done
81ecdfbb
RW
8805 done
8806IFS=$as_save_IFS
bec39cab
AC
8807
8808fi
8809fi
8810WINDRES=$ac_cv_prog_WINDRES
8811if test -n "$WINDRES"; then
81ecdfbb
RW
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8813$as_echo "$WINDRES" >&6; }
bec39cab 8814else
81ecdfbb
RW
8815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
bec39cab
AC
8817fi
8818
81ecdfbb 8819
bec39cab
AC
8820fi
8821if test -z "$ac_cv_prog_WINDRES"; then
8822 ac_ct_WINDRES=$WINDRES
8823 # Extract the first word of "windres", so it can be a program name with args.
8824set dummy windres; ac_word=$2
81ecdfbb
RW
8825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8826$as_echo_n "checking for $ac_word... " >&6; }
8827if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
8828 $as_echo_n "(cached) " >&6
bec39cab
AC
8829else
8830 if test -n "$ac_ct_WINDRES"; then
8831 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8832else
8833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834for as_dir in $PATH
8835do
8836 IFS=$as_save_IFS
8837 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8838 for ac_exec_ext in '' $ac_executable_extensions; do
8839 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8840 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 8841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8842 break 2
8843 fi
8844done
81ecdfbb
RW
8845 done
8846IFS=$as_save_IFS
bec39cab
AC
8847
8848fi
8849fi
8850ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8851if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8853$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 8854else
81ecdfbb
RW
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
c906108c 8857fi
bec39cab 8858
81ecdfbb
RW
8859 if test "x$ac_ct_WINDRES" = x; then
8860 WINDRES=""
8861 else
8862 case $cross_compiling:$ac_tool_warned in
8863yes:)
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8866ac_tool_warned=yes ;;
8867esac
8868 WINDRES=$ac_ct_WINDRES
8869 fi
c906108c 8870else
bec39cab 8871 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
8872fi
8873
bec39cab
AC
8874
8875# Needed for GNU/Hurd.
8876if test -n "$ac_tool_prefix"; then
8877 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
8878set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880$as_echo_n "checking for $ac_word... " >&6; }
8881if test "${ac_cv_prog_MIG+set}" = set; then :
8882 $as_echo_n "(cached) " >&6
c906108c 8883else
bec39cab
AC
8884 if test -n "$MIG"; then
8885 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8886else
8887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890 IFS=$as_save_IFS
8891 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8892 for ac_exec_ext in '' $ac_executable_extensions; do
8893 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8894 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8896 break 2
8897 fi
8898done
81ecdfbb
RW
8899 done
8900IFS=$as_save_IFS
bec39cab 8901
c906108c 8902fi
bec39cab
AC
8903fi
8904MIG=$ac_cv_prog_MIG
8905if test -n "$MIG"; then
81ecdfbb
RW
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8907$as_echo "$MIG" >&6; }
c906108c 8908else
81ecdfbb
RW
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8910$as_echo "no" >&6; }
c906108c
SS
8911fi
8912
81ecdfbb 8913
bec39cab
AC
8914fi
8915if test -z "$ac_cv_prog_MIG"; then
8916 ac_ct_MIG=$MIG
8917 # Extract the first word of "mig", so it can be a program name with args.
8918set dummy mig; ac_word=$2
81ecdfbb
RW
8919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8920$as_echo_n "checking for $ac_word... " >&6; }
8921if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
8922 $as_echo_n "(cached) " >&6
bec39cab
AC
8923else
8924 if test -n "$ac_ct_MIG"; then
8925 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8926else
8927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8928for as_dir in $PATH
8929do
8930 IFS=$as_save_IFS
8931 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
8932 for ac_exec_ext in '' $ac_executable_extensions; do
8933 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 8934 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8936 break 2
8937 fi
8938done
81ecdfbb
RW
8939 done
8940IFS=$as_save_IFS
c906108c 8941
bec39cab
AC
8942fi
8943fi
8944ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8945if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8947$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8948else
81ecdfbb
RW
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
bec39cab 8951fi
c906108c 8952
81ecdfbb
RW
8953 if test "x$ac_ct_MIG" = x; then
8954 MIG=""
8955 else
8956 case $cross_compiling:$ac_tool_warned in
8957yes:)
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8960ac_tool_warned=yes ;;
8961esac
8962 MIG=$ac_ct_MIG
8963 fi
bec39cab
AC
8964else
8965 MIG="$ac_cv_prog_MIG"
8966fi
c906108c 8967
c906108c 8968
bec39cab
AC
8969# ---------------------- #
8970# Checks for libraries. #
8971# ---------------------- #
c906108c 8972
bec39cab 8973# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8975$as_echo_n "checking for main in -lm... " >&6; }
8976if test "${ac_cv_lib_m_main+set}" = set; then :
8977 $as_echo_n "(cached) " >&6
bec39cab
AC
8978else
8979 ac_check_lib_save_LIBS=$LIBS
8980LIBS="-lm $LIBS"
81ecdfbb 8981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8982/* end confdefs.h. */
c906108c 8983
c906108c 8984
bec39cab
AC
8985int
8986main ()
8987{
81ecdfbb 8988return main ();
bec39cab
AC
8989 ;
8990 return 0;
8991}
8992_ACEOF
81ecdfbb 8993if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8994 ac_cv_lib_m_main=yes
8995else
81ecdfbb 8996 ac_cv_lib_m_main=no
bec39cab 8997fi
81ecdfbb
RW
8998rm -f core conftest.err conftest.$ac_objext \
8999 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9000LIBS=$ac_check_lib_save_LIBS
9001fi
81ecdfbb
RW
9002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
9003$as_echo "$ac_cv_lib_m_main" >&6; }
9004if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
9005 cat >>confdefs.h <<_ACEOF
9006#define HAVE_LIBM 1
9007_ACEOF
9008
9009 LIBS="-lm $LIBS"
c906108c 9010
c906108c 9011fi
bec39cab
AC
9012
9013
9014# We need to link with -lw to get `wctype' on Solaris before Solaris
9015# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9016# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9017# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
9018ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
9019if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 9020
c906108c 9021else
81ecdfbb
RW
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
9023$as_echo_n "checking for wctype in -lw... " >&6; }
9024if test "${ac_cv_lib_w_wctype+set}" = set; then :
9025 $as_echo_n "(cached) " >&6
bec39cab
AC
9026else
9027 ac_check_lib_save_LIBS=$LIBS
9028LIBS="-lw $LIBS"
81ecdfbb 9029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9030/* end confdefs.h. */
c906108c 9031
81ecdfbb
RW
9032/* Override any GCC internal prototype to avoid an error.
9033 Use char because int might match the return type of a GCC
9034 builtin and then its argument prototype would still apply. */
bec39cab
AC
9035#ifdef __cplusplus
9036extern "C"
9037#endif
bec39cab
AC
9038char wctype ();
9039int
9040main ()
9041{
81ecdfbb 9042return wctype ();
bec39cab
AC
9043 ;
9044 return 0;
9045}
9046_ACEOF
81ecdfbb 9047if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
9048 ac_cv_lib_w_wctype=yes
9049else
81ecdfbb 9050 ac_cv_lib_w_wctype=no
bec39cab 9051fi
81ecdfbb
RW
9052rm -f core conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
9054LIBS=$ac_check_lib_save_LIBS
9055fi
81ecdfbb
RW
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
9057$as_echo "$ac_cv_lib_w_wctype" >&6; }
9058if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
9059 cat >>confdefs.h <<_ACEOF
9060#define HAVE_LIBW 1
9061_ACEOF
c906108c 9062
bec39cab 9063 LIBS="-lw $LIBS"
c906108c 9064
bec39cab 9065fi
c906108c 9066
bec39cab 9067fi
c906108c 9068
ddc9cd0f 9069
bec39cab 9070# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
9071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9072$as_echo_n "checking for library containing gethostbyname... " >&6; }
9073if test "${ac_cv_search_gethostbyname+set}" = set; then :
9074 $as_echo_n "(cached) " >&6
bec39cab
AC
9075else
9076 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9078/* end confdefs.h. */
ddc9cd0f 9079
81ecdfbb
RW
9080/* Override any GCC internal prototype to avoid an error.
9081 Use char because int might match the return type of a GCC
9082 builtin and then its argument prototype would still apply. */
bec39cab
AC
9083#ifdef __cplusplus
9084extern "C"
9085#endif
bec39cab
AC
9086char gethostbyname ();
9087int
9088main ()
9089{
81ecdfbb 9090return gethostbyname ();
bec39cab
AC
9091 ;
9092 return 0;
9093}
9094_ACEOF
81ecdfbb
RW
9095for ac_lib in '' nsl; do
9096 if test -z "$ac_lib"; then
9097 ac_res="none required"
9098 else
9099 ac_res=-l$ac_lib
b4e70030 9100 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9101 fi
9102 if ac_fn_c_try_link "$LINENO"; then :
9103 ac_cv_search_gethostbyname=$ac_res
9104fi
9105rm -f core conftest.err conftest.$ac_objext \
9106 conftest$ac_exeext
9107 if test "${ac_cv_search_gethostbyname+set}" = set; then :
9108 break
9109fi
9110done
9111if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 9112
bec39cab 9113else
81ecdfbb 9114 ac_cv_search_gethostbyname=no
bec39cab 9115fi
81ecdfbb 9116rm conftest.$ac_ext
bec39cab
AC
9117LIBS=$ac_func_search_save_LIBS
9118fi
81ecdfbb
RW
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9120$as_echo "$ac_cv_search_gethostbyname" >&6; }
9121ac_res=$ac_cv_search_gethostbyname
9122if test "$ac_res" != no; then :
9123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 9124
bec39cab 9125fi
96baa820 9126
c906108c 9127
b4e70030 9128# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
9130$as_echo_n "checking for library containing socketpair... " >&6; }
9131if test "${ac_cv_search_socketpair+set}" = set; then :
9132 $as_echo_n "(cached) " >&6
b4e70030
JB
9133else
9134 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9136/* end confdefs.h. */
9137
81ecdfbb
RW
9138/* Override any GCC internal prototype to avoid an error.
9139 Use char because int might match the return type of a GCC
9140 builtin and then its argument prototype would still apply. */
b4e70030
JB
9141#ifdef __cplusplus
9142extern "C"
9143#endif
b4e70030
JB
9144char socketpair ();
9145int
9146main ()
9147{
81ecdfbb 9148return socketpair ();
b4e70030
JB
9149 ;
9150 return 0;
9151}
9152_ACEOF
81ecdfbb
RW
9153for ac_lib in '' socket; do
9154 if test -z "$ac_lib"; then
9155 ac_res="none required"
9156 else
9157 ac_res=-l$ac_lib
b4e70030 9158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9159 fi
9160 if ac_fn_c_try_link "$LINENO"; then :
9161 ac_cv_search_socketpair=$ac_res
9162fi
9163rm -f core conftest.err conftest.$ac_objext \
9164 conftest$ac_exeext
9165 if test "${ac_cv_search_socketpair+set}" = set; then :
9166 break
9167fi
9168done
9169if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 9170
b4e70030 9171else
81ecdfbb 9172 ac_cv_search_socketpair=no
b4e70030 9173fi
81ecdfbb 9174rm conftest.$ac_ext
b4e70030
JB
9175LIBS=$ac_func_search_save_LIBS
9176fi
81ecdfbb
RW
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
9178$as_echo "$ac_cv_search_socketpair" >&6; }
9179ac_res=$ac_cv_search_socketpair
9180if test "$ac_res" != no; then :
9181 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
9182
9183fi
9184
9185
233a11ab 9186# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
9187
9188 # See if the user specified whether he wants zlib support or not.
9189
9190# Check whether --with-zlib was given.
9191if test "${with_zlib+set}" = set; then :
9192 withval=$with_zlib;
9193else
9194 with_zlib=auto
9195fi
9196
9197
9198 if test "$with_zlib" != "no"; then
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
9200$as_echo_n "checking for library containing zlibVersion... " >&6; }
9201if test "${ac_cv_search_zlibVersion+set}" = set; then :
9202 $as_echo_n "(cached) " >&6
233a11ab
CS
9203else
9204 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
9206/* end confdefs.h. */
9207
81ecdfbb
RW
9208/* Override any GCC internal prototype to avoid an error.
9209 Use char because int might match the return type of a GCC
233a11ab 9210 builtin and then its argument prototype would still apply. */
233a11ab
CS
9211#ifdef __cplusplus
9212extern "C"
9213#endif
233a11ab
CS
9214char zlibVersion ();
9215int
9216main ()
9217{
81ecdfbb 9218return zlibVersion ();
233a11ab
CS
9219 ;
9220 return 0;
9221}
9222_ACEOF
81ecdfbb
RW
9223for ac_lib in '' z; do
9224 if test -z "$ac_lib"; then
9225 ac_res="none required"
233a11ab 9226 else
81ecdfbb
RW
9227 ac_res=-l$ac_lib
9228 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 9229 fi
81ecdfbb
RW
9230 if ac_fn_c_try_link "$LINENO"; then :
9231 ac_cv_search_zlibVersion=$ac_res
233a11ab 9232fi
81ecdfbb
RW
9233rm -f core conftest.err conftest.$ac_objext \
9234 conftest$ac_exeext
9235 if test "${ac_cv_search_zlibVersion+set}" = set; then :
9236 break
233a11ab 9237fi
81ecdfbb
RW
9238done
9239if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 9240
233a11ab 9241else
81ecdfbb 9242 ac_cv_search_zlibVersion=no
233a11ab 9243fi
81ecdfbb
RW
9244rm conftest.$ac_ext
9245LIBS=$ac_func_search_save_LIBS
233a11ab 9246fi
81ecdfbb
RW
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
9248$as_echo "$ac_cv_search_zlibVersion" >&6; }
9249ac_res=$ac_cv_search_zlibVersion
9250if test "$ac_res" != no; then :
9251 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9252 for ac_header in zlib.h
9253do :
9254 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9255if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 9256 cat >>confdefs.h <<_ACEOF
81ecdfbb 9257#define HAVE_ZLIB_H 1
233a11ab
CS
9258_ACEOF
9259
9260fi
9261
9262done
9263
9264fi
9265
b040ad30
JB
9266 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
9267 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
9268 fi
9269 fi
9270
233a11ab 9271
77f120bf 9272# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
9274$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
9275if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9276 $as_echo_n "(cached) " >&6
bec39cab
AC
9277else
9278 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9280/* end confdefs.h. */
c906108c 9281
81ecdfbb
RW
9282/* Override any GCC internal prototype to avoid an error.
9283 Use char because int might match the return type of a GCC
9284 builtin and then its argument prototype would still apply. */
bec39cab
AC
9285#ifdef __cplusplus
9286extern "C"
9287#endif
77f120bf 9288char dlgetmodinfo ();
bec39cab
AC
9289int
9290main ()
9291{
81ecdfbb 9292return dlgetmodinfo ();
bec39cab
AC
9293 ;
9294 return 0;
9295}
9296_ACEOF
81ecdfbb
RW
9297for ac_lib in '' dl xpdl; do
9298 if test -z "$ac_lib"; then
9299 ac_res="none required"
9300 else
9301 ac_res=-l$ac_lib
b4e70030 9302 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9303 fi
9304 if ac_fn_c_try_link "$LINENO"; then :
9305 ac_cv_search_dlgetmodinfo=$ac_res
9306fi
9307rm -f core conftest.err conftest.$ac_objext \
9308 conftest$ac_exeext
9309 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
9310 break
9311fi
9312done
9313if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 9314
4e8d927d 9315else
81ecdfbb 9316 ac_cv_search_dlgetmodinfo=no
1ba607ad 9317fi
81ecdfbb 9318rm conftest.$ac_ext
bec39cab
AC
9319LIBS=$ac_func_search_save_LIBS
9320fi
81ecdfbb
RW
9321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
9322$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
9323ac_res=$ac_cv_search_dlgetmodinfo
9324if test "$ac_res" != no; then :
9325 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 9326
8bb2c122 9327fi
8bb2c122 9328
8bb2c122 9329
77f120bf 9330
77f120bf 9331
6c7a06a3 9332
81ecdfbb
RW
9333# Check whether --with-libiconv-prefix was given.
9334if test "${with_libiconv_prefix+set}" = set; then :
9335 withval=$with_libiconv_prefix;
6c7a06a3 9336 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
9337 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
9338 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
9339 done
9340
81ecdfbb
RW
9341fi
9342
6c7a06a3 9343
f18c4681 9344 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
9345 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
9346
81ecdfbb
RW
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
9348$as_echo_n "checking for iconv... " >&6; }
9349if test "${am_cv_func_iconv+set}" = set; then :
9350 $as_echo_n "(cached) " >&6
d542061a 9351else
6c7a06a3
TT
9352
9353 am_cv_func_iconv="no, consider installing GNU libiconv"
9354 am_cv_lib_iconv=no
9355 am_cv_use_build_libiconv=no
f0f20949 9356 am_cv_build_libiconv_path=
4edb1e84
JB
9357
9358 # If libiconv is part of the build tree, then try using it over
9359 # any system iconv.
9360 if test -d ../libiconv; then
f18c4681
JB
9361 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
9362 am_save_LIBS="$LIBS"
9363 am_save_CPPFLAGS="$CPPFLAGS"
9364 LIBS="$LIBS $lib_dir/libiconv.a"
9365 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
9366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9367/* end confdefs.h. */
6c7a06a3
TT
9368#include <stdlib.h>
9369#include <iconv.h>
d542061a
UW
9370int
9371main ()
9372{
6c7a06a3 9373iconv_t cd = iconv_open("","");
f18c4681
JB
9374 iconv(cd,NULL,NULL,NULL,NULL);
9375 iconv_close(cd);
d542061a
UW
9376 ;
9377 return 0;
9378}
9379_ACEOF
81ecdfbb 9380if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9381 am_cv_use_build_libiconv=yes
f0f20949 9382 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
9383 am_cv_lib_iconv=yes
9384 am_cv_func_iconv=yes
d542061a 9385fi
81ecdfbb
RW
9386rm -f core conftest.err conftest.$ac_objext \
9387 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
9388 LIBS="$am_save_LIBS"
9389 CPPFLAGS="$am_save_CPPFLAGS"
9390 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
9391 break
9392 fi
9393 done
4edb1e84 9394 fi
94ae1714 9395
4edb1e84 9396 # Next, try to find iconv in libc.
6c7a06a3 9397 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 9399/* end confdefs.h. */
6c7a06a3
TT
9400#include <stdlib.h>
9401#include <iconv.h>
d542061a
UW
9402int
9403main ()
9404{
6c7a06a3
TT
9405iconv_t cd = iconv_open("","");
9406 iconv(cd,NULL,NULL,NULL,NULL);
9407 iconv_close(cd);
d542061a
UW
9408 ;
9409 return 0;
9410}
9411_ACEOF
81ecdfbb 9412if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9413 am_cv_func_iconv=yes
d542061a 9414fi
81ecdfbb
RW
9415rm -f core conftest.err conftest.$ac_objext \
9416 conftest$ac_exeext conftest.$ac_ext
77f120bf 9417 fi
94ae1714 9418
4edb1e84
JB
9419 # If iconv was not in libc, try -liconv. In this case, arrange to
9420 # look in the libiconv prefix, if it was specified by the user.
9421 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 9422 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
9423 am_save_LIBS="$LIBS"
9424 if test -n "$LIBICONV_INCLUDE"; then
9425 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9426 LIBS="$LIBS $LIBICONV_LIBDIR"
9427 fi
9428 LIBS="$LIBS -liconv"
81ecdfbb 9429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9430/* end confdefs.h. */
6c7a06a3
TT
9431#include <stdlib.h>
9432#include <iconv.h>
bec39cab
AC
9433int
9434main ()
9435{
6c7a06a3
TT
9436iconv_t cd = iconv_open("","");
9437 iconv(cd,NULL,NULL,NULL,NULL);
9438 iconv_close(cd);
bec39cab
AC
9439 ;
9440 return 0;
9441}
9442_ACEOF
81ecdfbb 9443if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 9444 am_cv_lib_iconv=yes
6c7a06a3 9445 am_cv_func_iconv=yes
627af7ea 9446fi
81ecdfbb
RW
9447rm -f core conftest.err conftest.$ac_objext \
9448 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 9449 LIBS="$am_save_LIBS"
fc3b640d 9450 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
9451 fi
9452
9453fi
81ecdfbb
RW
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9455$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
9456
9457 # Set the various flags based on the cache variables. We can't rely
9458 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
9459 LIBICONV=
9460 if test "$am_cv_lib_iconv" = yes; then
9461 LIBICONV="-liconv"
94ae1714
TT
9462 else
9463 LIBICONV_LIBDIR=
9464 LIBICONV_INCLUDE=
fc3b640d
TT
9465 fi
9466 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 9467 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 9468 LIBICONV_LIBDIR=""
fc3b640d
TT
9469 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
9470 fi
9471 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
9472 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 9473
6c7a06a3
TT
9474 if test "$am_cv_func_iconv" = yes; then
9475
81ecdfbb 9476$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 9477
81ecdfbb
RW
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9479$as_echo_n "checking for iconv declaration... " >&6; }
9480 if test "${am_cv_proto_iconv+set}" = set; then :
9481 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9482else
9483
81ecdfbb 9484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9485/* end confdefs.h. */
9486
6c7a06a3
TT
9487#include <stdlib.h>
9488#include <iconv.h>
9489extern
b4e70030 9490#ifdef __cplusplus
6c7a06a3 9491"C"
b4e70030 9492#endif
6c7a06a3
TT
9493#if defined(__STDC__) || defined(__cplusplus)
9494size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9495#else
9496size_t iconv();
9497#endif
9498
b4e70030
JB
9499int
9500main ()
9501{
6c7a06a3 9502
b4e70030
JB
9503 ;
9504 return 0;
9505}
9506_ACEOF
81ecdfbb 9507if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9508 am_cv_proto_iconv_arg1=""
4e8d927d 9509else
81ecdfbb 9510 am_cv_proto_iconv_arg1="const"
b4e70030 9511fi
81ecdfbb 9512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9513 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);"
9514fi
9515
9516 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9518 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9519$as_echo "${ac_t:-
9520 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9521
9522cat >>confdefs.h <<_ACEOF
9523#define ICONV_CONST $am_cv_proto_iconv_arg1
9524_ACEOF
9525
9526 fi
6c7a06a3
TT
9527
9528
9529# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
9530# There is a very specific comment in /usr/include/curses.h explaining that
9531# termcap routines built into libcurses must not be used.
9532#
9533# The symptoms we observed so far is GDB unexpectedly changing
9534# the terminal settings when tgetent is called - this is particularly
9535# visible as the output is missing carriage returns, and so rapidly
9536# becomes very hard to read.
9537#
9538# The readline configure script has already decided that libtermcap
9539# was enough for its purposes, and so decided to build readline using
9540# libtermcap. Since the TUI mode requires curses, building GDB with
9541# TUI enabled results in both libraries to be used at the same time,
9542# which is not allowed. This basically means that GDB with TUI is
9543# broken on alpha-osf.
9544
9545case $host_os in
6bcc772d
RO
9546 osf* )
9547 if test x"$enable_tui" = xyes; then
81ecdfbb 9548 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 9549 fi
6bcc772d 9550 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
9551 enable_tui=no
9552 fi
9553 ;;
9554esac
9555
cb01cfba 9556# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9557if test x"$enable_tui" != xno; then
cb01cfba
JB
9558 prefer_curses=yes
9559fi
9560
9561curses_found=no
9562if test x"$prefer_curses" = xyes; then
9563 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9564 # curses library because the latter might not provide all the
9565 # functionality we need. However, this leads to problems on systems
9566 # where the linker searches /usr/local/lib, but the compiler doesn't
9567 # search /usr/local/include, if ncurses is installed in /usr/local. A
9568 # default installation of ncurses on alpha*-dec-osf* will lead to such
9569 # a situation.
81ecdfbb
RW
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9571$as_echo_n "checking for library containing waddstr... " >&6; }
9572if test "${ac_cv_search_waddstr+set}" = set; then :
9573 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9574else
9575 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9577/* end confdefs.h. */
9578
81ecdfbb
RW
9579/* Override any GCC internal prototype to avoid an error.
9580 Use char because int might match the return type of a GCC
9581 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9582#ifdef __cplusplus
9583extern "C"
9584#endif
6c7a06a3
TT
9585char waddstr ();
9586int
9587main ()
9588{
81ecdfbb 9589return waddstr ();
6c7a06a3
TT
9590 ;
9591 return 0;
9592}
9593_ACEOF
81ecdfbb
RW
9594for ac_lib in '' ncurses cursesX curses; do
9595 if test -z "$ac_lib"; then
9596 ac_res="none required"
9597 else
9598 ac_res=-l$ac_lib
9599 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9600 fi
9601 if ac_fn_c_try_link "$LINENO"; then :
9602 ac_cv_search_waddstr=$ac_res
9603fi
9604rm -f core conftest.err conftest.$ac_objext \
9605 conftest$ac_exeext
9606 if test "${ac_cv_search_waddstr+set}" = set; then :
9607 break
9608fi
9609done
9610if test "${ac_cv_search_waddstr+set}" = set; then :
9611
6c7a06a3 9612else
81ecdfbb
RW
9613 ac_cv_search_waddstr=no
9614fi
9615rm conftest.$ac_ext
9616LIBS=$ac_func_search_save_LIBS
9617fi
9618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9619$as_echo "$ac_cv_search_waddstr" >&6; }
9620ac_res=$ac_cv_search_waddstr
9621if test "$ac_res" != no; then :
9622 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9623
9624fi
9625
9626
cb01cfba
JB
9627 if test "$ac_cv_search_waddstr" != no; then
9628 curses_found=yes
9629 fi
9630fi
9631
9632# Check whether we should enable the TUI, but only do so if we really
9633# can.
9634if test x"$enable_tui" != xno; then
9635 if test -d $srcdir/tui; then
9636 if test "$curses_found" != no; then
6c7a06a3
TT
9637 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9638 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9639 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9640 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9641 CONFIG_ALL="${CONFIG_ALL} all-tui"
9642 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
9643 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
9644 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
9645 else
9646 if test x"$enable_tui" = xyes; then
81ecdfbb 9647 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9648 else
81ecdfbb
RW
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9650$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9651 fi
9652 fi
9653 fi
9654fi
9655
9656# Since GDB uses Readline, we need termcap functionality. In many
9657# cases this will be provided by the curses library, but some systems
9658# have a seperate termcap library, or no curses library at all.
9659
9660case $host_os in
9661 cygwin*)
9662 if test -d $srcdir/libtermcap; then
9663 LIBS="../libtermcap/libtermcap.a $LIBS"
9664 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9665 fi ;;
9666 go32* | *djgpp*)
9667 ac_cv_search_tgetent="none required"
9668 ;;
9669 *mingw32*)
9670 ac_cv_search_tgetent="none required"
9671 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
9672 ;;
9673esac
9674
9675# These are the libraries checked by Readline.
81ecdfbb
RW
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9677$as_echo_n "checking for library containing tgetent... " >&6; }
9678if test "${ac_cv_search_tgetent+set}" = set; then :
9679 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9680else
9681 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9683/* end confdefs.h. */
9684
81ecdfbb
RW
9685/* Override any GCC internal prototype to avoid an error.
9686 Use char because int might match the return type of a GCC
9687 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9688#ifdef __cplusplus
9689extern "C"
9690#endif
6c7a06a3
TT
9691char tgetent ();
9692int
9693main ()
9694{
81ecdfbb 9695return tgetent ();
6c7a06a3
TT
9696 ;
9697 return 0;
9698}
9699_ACEOF
81ecdfbb
RW
9700for ac_lib in '' termcap tinfo curses ncurses; do
9701 if test -z "$ac_lib"; then
9702 ac_res="none required"
9703 else
9704 ac_res=-l$ac_lib
6c7a06a3 9705 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9706 fi
9707 if ac_fn_c_try_link "$LINENO"; then :
9708 ac_cv_search_tgetent=$ac_res
9709fi
9710rm -f core conftest.err conftest.$ac_objext \
9711 conftest$ac_exeext
9712 if test "${ac_cv_search_tgetent+set}" = set; then :
9713 break
9714fi
9715done
9716if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9717
6c7a06a3 9718else
81ecdfbb 9719 ac_cv_search_tgetent=no
6c7a06a3 9720fi
81ecdfbb 9721rm conftest.$ac_ext
6c7a06a3
TT
9722LIBS=$ac_func_search_save_LIBS
9723fi
81ecdfbb
RW
9724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9725$as_echo "$ac_cv_search_tgetent" >&6; }
9726ac_res=$ac_cv_search_tgetent
9727if test "$ac_res" != no; then :
9728 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9729
06825bd1
MK
9730fi
9731
06825bd1 9732
bec39cab 9733if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 9734 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
9735fi
9736
3841debe 9737
81ecdfbb
RW
9738# Check whether --with-system-readline was given.
9739if test "${with_system_readline+set}" = set; then :
9740 withval=$with_system_readline;
9741fi
6a30b0a5 9742
6a30b0a5
AS
9743
9744if test "$with_system_readline" = yes; then
9745 READLINE=-lreadline
9746 READLINE_DEPS=
9747 READLINE_CFLAGS=
39037522 9748 READLINE_TEXI_INCFLAG=
a71e0887
JK
9749
9750 # readline-6.0 started to use the name `_rl_echoing_p'.
9751 # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
9752
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
9754$as_echo_n "checking for readline_echoing_p... " >&6; }
9755 save_LIBS=$LIBS
9756 LIBS="$LIBS $READLINE"
9757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9758/* end confdefs.h. */
9759
9760int
9761main ()
9762{
9763extern int readline_echoing_p;
9764 return readline_echoing_p;
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769if ac_fn_c_try_link "$LINENO"; then :
9770 READLINE_ECHOING_P=yes
9771else
9772 READLINE_ECHOING_P=no
9773
9774$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
9775
9776fi
9777rm -f core conftest.err conftest.$ac_objext \
9778 conftest$ac_exeext conftest.$ac_ext
9779 LIBS="$save_LIBS"
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
9781$as_echo "$READLINE_ECHOING_P" >&6; }
6a30b0a5
AS
9782else
9783 READLINE='$(READLINE_DIR)/libreadline.a'
9784 READLINE_DEPS='$(READLINE)'
9785 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9786 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9787fi
9788
9789
9790
9791
9792
39037522 9793
81ecdfbb
RW
9794# Check whether --with-expat was given.
9795if test "${with_expat+set}" = set; then :
9796 withval=$with_expat;
5c39566f
DJ
9797else
9798 with_expat=auto
81ecdfbb
RW
9799fi
9800
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9802$as_echo_n "checking whether to use expat... " >&6; }
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9804$as_echo "$with_expat" >&6; }
5c39566f
DJ
9805
9806if test "${with_expat}" = no; then
81ecdfbb
RW
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9808$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9809 HAVE_LIBEXPAT=no
9810else
9811
3841debe
DJ
9812 if test "X$prefix" = "XNONE"; then
9813 acl_final_prefix="$ac_default_prefix"
9814 else
9815 acl_final_prefix="$prefix"
9816 fi
9817 if test "X$exec_prefix" = "XNONE"; then
9818 acl_final_exec_prefix='${prefix}'
9819 else
9820 acl_final_exec_prefix="$exec_prefix"
9821 fi
9822 acl_save_prefix="$prefix"
9823 prefix="$acl_final_prefix"
9824 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9825 prefix="$acl_save_prefix"
9826
9827
81ecdfbb
RW
9828# Check whether --with-gnu-ld was given.
9829if test "${with_gnu_ld+set}" = set; then :
9830 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
9831else
9832 with_gnu_ld=no
81ecdfbb
RW
9833fi
9834
3841debe
DJ
9835# Prepare PATH_SEPARATOR.
9836# The user is always right.
9837if test "${PATH_SEPARATOR+set}" != set; then
9838 echo "#! /bin/sh" >conf$$.sh
9839 echo "exit 0" >>conf$$.sh
9840 chmod +x conf$$.sh
9841 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9842 PATH_SEPARATOR=';'
9843 else
9844 PATH_SEPARATOR=:
9845 fi
9846 rm -f conf$$.sh
9847fi
9848ac_prog=ld
9849if test "$GCC" = yes; then
9850 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9852$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
9853 case $host in
9854 *-*-mingw*)
9855 # gcc leaves a trailing carriage return which upsets mingw
9856 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9857 *)
9858 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9859 esac
9860 case $ac_prog in
9861 # Accept absolute paths.
9862 [\\/]* | [A-Za-z]:[\\/]*)
9863 re_direlt='/[^/][^/]*/\.\./'
9864 # Canonicalize the path of ld
9865 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9866 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9867 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9868 done
9869 test -z "$LD" && LD="$ac_prog"
9870 ;;
9871 "")
9872 # If it fails, then pretend we aren't using GCC.
9873 ac_prog=ld
9874 ;;
9875 *)
9876 # If it is relative, then search for the first ld in PATH.
9877 with_gnu_ld=unknown
9878 ;;
9879 esac
9880elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9882$as_echo_n "checking for GNU ld... " >&6; }
3841debe 9883else
81ecdfbb
RW
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9885$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 9886fi
81ecdfbb
RW
9887if test "${acl_cv_path_LD+set}" = set; then :
9888 $as_echo_n "(cached) " >&6
3841debe
DJ
9889else
9890 if test -z "$LD"; then
9891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9892 for ac_dir in $PATH; do
9893 test -z "$ac_dir" && ac_dir=.
9894 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9895 acl_cv_path_LD="$ac_dir/$ac_prog"
9896 # Check to see if the program is GNU ld. I'd rather use --version,
9897 # but apparently some GNU ld's only accept -v.
9898 # Break only if it was the GNU/non-GNU ld that we prefer.
9899 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9900 test "$with_gnu_ld" != no && break
9901 else
9902 test "$with_gnu_ld" != yes && break
9903 fi
9904 fi
9905 done
9906 IFS="$ac_save_ifs"
9907else
9908 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9909fi
9910fi
9911
9912LD="$acl_cv_path_LD"
9913if test -n "$LD"; then
81ecdfbb
RW
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9915$as_echo "$LD" >&6; }
3841debe 9916else
81ecdfbb
RW
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9918$as_echo "no" >&6; }
3841debe 9919fi
81ecdfbb
RW
9920test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9922$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9923if test "${acl_cv_prog_gnu_ld+set}" = set; then :
9924 $as_echo_n "(cached) " >&6
3841debe
DJ
9925else
9926 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9927if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9928 acl_cv_prog_gnu_ld=yes
9929else
9930 acl_cv_prog_gnu_ld=no
9931fi
9932fi
81ecdfbb
RW
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9934$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
9935with_gnu_ld=$acl_cv_prog_gnu_ld
9936
9937
9938
81ecdfbb
RW
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9940$as_echo_n "checking for shared library run path origin... " >&6; }
9941if test "${acl_cv_rpath+set}" = set; then :
9942 $as_echo_n "(cached) " >&6
3841debe
DJ
9943else
9944
9945 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9946 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9947 . ./conftest.sh
9948 rm -f ./conftest.sh
9949 acl_cv_rpath=done
9950
9951fi
81ecdfbb
RW
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9953$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
9954 wl="$acl_cv_wl"
9955 libext="$acl_cv_libext"
9956 shlibext="$acl_cv_shlibext"
9957 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9958 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9959 hardcode_direct="$acl_cv_hardcode_direct"
9960 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
9961 # Check whether --enable-rpath was given.
9962if test "${enable_rpath+set}" = set; then :
9963 enableval=$enable_rpath; :
3841debe
DJ
9964else
9965 enable_rpath=yes
81ecdfbb
RW
9966fi
9967
3841debe
DJ
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977 use_additional=yes
9978
9979 acl_save_prefix="$prefix"
9980 prefix="$acl_final_prefix"
9981 acl_save_exec_prefix="$exec_prefix"
9982 exec_prefix="$acl_final_exec_prefix"
9983
9984 eval additional_includedir=\"$includedir\"
9985 eval additional_libdir=\"$libdir\"
9986
9987 exec_prefix="$acl_save_exec_prefix"
9988 prefix="$acl_save_prefix"
9989
9990
81ecdfbb
RW
9991# Check whether --with-libexpat-prefix was given.
9992if test "${with_libexpat_prefix+set}" = set; then :
9993 withval=$with_libexpat_prefix;
3841debe
DJ
9994 if test "X$withval" = "Xno"; then
9995 use_additional=no
9996 else
9997 if test "X$withval" = "X"; then
9998
9999 acl_save_prefix="$prefix"
10000 prefix="$acl_final_prefix"
10001 acl_save_exec_prefix="$exec_prefix"
10002 exec_prefix="$acl_final_exec_prefix"
10003
10004 eval additional_includedir=\"$includedir\"
10005 eval additional_libdir=\"$libdir\"
10006
10007 exec_prefix="$acl_save_exec_prefix"
10008 prefix="$acl_save_prefix"
10009
10010 else
10011 additional_includedir="$withval/include"
10012 additional_libdir="$withval/lib"
10013 fi
10014 fi
10015
81ecdfbb
RW
10016fi
10017
3841debe
DJ
10018 LIBEXPAT=
10019 LTLIBEXPAT=
10020 INCEXPAT=
10021 rpathdirs=
10022 ltrpathdirs=
10023 names_already_handled=
10024 names_next_round='expat '
10025 while test -n "$names_next_round"; do
10026 names_this_round="$names_next_round"
10027 names_next_round=
10028 for name in $names_this_round; do
10029 already_handled=
10030 for n in $names_already_handled; do
10031 if test "$n" = "$name"; then
10032 already_handled=yes
10033 break
10034 fi
10035 done
10036 if test -z "$already_handled"; then
10037 names_already_handled="$names_already_handled $name"
10038 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10039 eval value=\"\$HAVE_LIB$uppername\"
10040 if test -n "$value"; then
10041 if test "$value" = yes; then
10042 eval value=\"\$LIB$uppername\"
10043 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10044 eval value=\"\$LTLIB$uppername\"
10045 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10046 else
10047 :
10048 fi
10049 else
10050 found_dir=
10051 found_la=
10052 found_so=
10053 found_a=
10054 if test $use_additional = yes; then
10055 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10056 found_dir="$additional_libdir"
10057 found_so="$additional_libdir/lib$name.$shlibext"
10058 if test -f "$additional_libdir/lib$name.la"; then
10059 found_la="$additional_libdir/lib$name.la"
10060 fi
10061 else
10062 if test -f "$additional_libdir/lib$name.$libext"; then
10063 found_dir="$additional_libdir"
10064 found_a="$additional_libdir/lib$name.$libext"
10065 if test -f "$additional_libdir/lib$name.la"; then
10066 found_la="$additional_libdir/lib$name.la"
10067 fi
10068 fi
10069 fi
10070 fi
10071 if test "X$found_dir" = "X"; then
10072 for x in $LDFLAGS $LTLIBEXPAT; do
10073
10074 acl_save_prefix="$prefix"
10075 prefix="$acl_final_prefix"
10076 acl_save_exec_prefix="$exec_prefix"
10077 exec_prefix="$acl_final_exec_prefix"
10078 eval x=\"$x\"
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082 case "$x" in
10083 -L*)
10084 dir=`echo "X$x" | sed -e 's/^X-L//'`
10085 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10086 found_dir="$dir"
10087 found_so="$dir/lib$name.$shlibext"
10088 if test -f "$dir/lib$name.la"; then
10089 found_la="$dir/lib$name.la"
10090 fi
10091 else
10092 if test -f "$dir/lib$name.$libext"; then
10093 found_dir="$dir"
10094 found_a="$dir/lib$name.$libext"
10095 if test -f "$dir/lib$name.la"; then
10096 found_la="$dir/lib$name.la"
10097 fi
10098 fi
10099 fi
10100 ;;
10101 esac
10102 if test "X$found_dir" != "X"; then
10103 break
10104 fi
10105 done
10106 fi
10107 if test "X$found_dir" != "X"; then
10108 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
10109 if test "X$found_so" != "X"; then
10110 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10111 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10112 else
10113 haveit=
10114 for x in $ltrpathdirs; do
10115 if test "X$x" = "X$found_dir"; then
10116 haveit=yes
10117 break
10118 fi
10119 done
10120 if test -z "$haveit"; then
10121 ltrpathdirs="$ltrpathdirs $found_dir"
10122 fi
10123 if test "$hardcode_direct" = yes; then
10124 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10125 else
10126 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10127 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10128 haveit=
10129 for x in $rpathdirs; do
10130 if test "X$x" = "X$found_dir"; then
10131 haveit=yes
10132 break
10133 fi
10134 done
10135 if test -z "$haveit"; then
10136 rpathdirs="$rpathdirs $found_dir"
10137 fi
10138 else
10139 haveit=
10140 for x in $LDFLAGS $LIBEXPAT; do
10141
10142 acl_save_prefix="$prefix"
10143 prefix="$acl_final_prefix"
10144 acl_save_exec_prefix="$exec_prefix"
10145 exec_prefix="$acl_final_exec_prefix"
10146 eval x=\"$x\"
10147 exec_prefix="$acl_save_exec_prefix"
10148 prefix="$acl_save_prefix"
10149
10150 if test "X$x" = "X-L$found_dir"; then
10151 haveit=yes
10152 break
10153 fi
10154 done
10155 if test -z "$haveit"; then
10156 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
10157 fi
10158 if test "$hardcode_minus_L" != no; then
10159 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
10160 else
10161 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10162 fi
10163 fi
10164 fi
10165 fi
10166 else
10167 if test "X$found_a" != "X"; then
10168 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
10169 else
10170 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
10171 fi
10172 fi
10173 additional_includedir=
10174 case "$found_dir" in
10175 */lib | */lib/)
10176 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10177 additional_includedir="$basedir/include"
10178 ;;
10179 esac
10180 if test "X$additional_includedir" != "X"; then
10181 if test "X$additional_includedir" != "X/usr/include"; then
10182 haveit=
10183 if test "X$additional_includedir" = "X/usr/local/include"; then
10184 if test -n "$GCC"; then
10185 case $host_os in
10186 linux*) haveit=yes;;
10187 esac
10188 fi
10189 fi
10190 if test -z "$haveit"; then
10191 for x in $CPPFLAGS $INCEXPAT; do
10192
10193 acl_save_prefix="$prefix"
10194 prefix="$acl_final_prefix"
10195 acl_save_exec_prefix="$exec_prefix"
10196 exec_prefix="$acl_final_exec_prefix"
10197 eval x=\"$x\"
10198 exec_prefix="$acl_save_exec_prefix"
10199 prefix="$acl_save_prefix"
10200
10201 if test "X$x" = "X-I$additional_includedir"; then
10202 haveit=yes
10203 break
10204 fi
10205 done
10206 if test -z "$haveit"; then
10207 if test -d "$additional_includedir"; then
10208 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
10209 fi
10210 fi
10211 fi
10212 fi
10213 fi
10214 if test -n "$found_la"; then
10215 save_libdir="$libdir"
10216 case "$found_la" in
10217 */* | *\\*) . "$found_la" ;;
10218 *) . "./$found_la" ;;
10219 esac
10220 libdir="$save_libdir"
10221 for dep in $dependency_libs; do
10222 case "$dep" in
10223 -L*)
10224 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10225 if test "X$additional_libdir" != "X/usr/lib"; then
10226 haveit=
10227 if test "X$additional_libdir" = "X/usr/local/lib"; then
10228 if test -n "$GCC"; then
10229 case $host_os in
10230 linux*) haveit=yes;;
10231 esac
10232 fi
10233 fi
10234 if test -z "$haveit"; then
10235 haveit=
10236 for x in $LDFLAGS $LIBEXPAT; do
10237
10238 acl_save_prefix="$prefix"
10239 prefix="$acl_final_prefix"
10240 acl_save_exec_prefix="$exec_prefix"
10241 exec_prefix="$acl_final_exec_prefix"
10242 eval x=\"$x\"
10243 exec_prefix="$acl_save_exec_prefix"
10244 prefix="$acl_save_prefix"
10245
10246 if test "X$x" = "X-L$additional_libdir"; then
10247 haveit=yes
10248 break
10249 fi
10250 done
10251 if test -z "$haveit"; then
10252 if test -d "$additional_libdir"; then
10253 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
10254 fi
10255 fi
10256 haveit=
10257 for x in $LDFLAGS $LTLIBEXPAT; do
10258
10259 acl_save_prefix="$prefix"
10260 prefix="$acl_final_prefix"
10261 acl_save_exec_prefix="$exec_prefix"
10262 exec_prefix="$acl_final_exec_prefix"
10263 eval x=\"$x\"
10264 exec_prefix="$acl_save_exec_prefix"
10265 prefix="$acl_save_prefix"
10266
10267 if test "X$x" = "X-L$additional_libdir"; then
10268 haveit=yes
10269 break
10270 fi
10271 done
10272 if test -z "$haveit"; then
10273 if test -d "$additional_libdir"; then
10274 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10275 fi
10276 fi
10277 fi
10278 fi
10279 ;;
10280 -R*)
10281 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10282 if test "$enable_rpath" != no; then
10283 haveit=
10284 for x in $rpathdirs; do
10285 if test "X$x" = "X$dir"; then
10286 haveit=yes
10287 break
10288 fi
10289 done
10290 if test -z "$haveit"; then
10291 rpathdirs="$rpathdirs $dir"
10292 fi
10293 haveit=
10294 for x in $ltrpathdirs; do
10295 if test "X$x" = "X$dir"; then
10296 haveit=yes
10297 break
10298 fi
10299 done
10300 if test -z "$haveit"; then
10301 ltrpathdirs="$ltrpathdirs $dir"
10302 fi
10303 fi
10304 ;;
10305 -l*)
10306 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10307 ;;
10308 *.la)
10309 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10310 ;;
10311 *)
10312 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10313 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10314 ;;
81ecdfbb
RW
10315 esac
10316 done
10317 fi
10318 else
10319 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10320 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10321 fi
10322 fi
10323 fi
10324 done
10325 done
10326 if test "X$rpathdirs" != "X"; then
10327 if test -n "$hardcode_libdir_separator"; then
10328 alldirs=
10329 for found_dir in $rpathdirs; do
10330 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10331 done
10332 acl_save_libdir="$libdir"
10333 libdir="$alldirs"
10334 eval flag=\"$hardcode_libdir_flag_spec\"
10335 libdir="$acl_save_libdir"
10336 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10337 else
10338 for found_dir in $rpathdirs; do
10339 acl_save_libdir="$libdir"
10340 libdir="$found_dir"
10341 eval flag=\"$hardcode_libdir_flag_spec\"
10342 libdir="$acl_save_libdir"
10343 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10344 done
10345 fi
10346 fi
10347 if test "X$ltrpathdirs" != "X"; then
10348 for found_dir in $ltrpathdirs; do
10349 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10350 done
10351 fi
a9322a30
TT
10352
10353
81ecdfbb 10354 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 10355
81ecdfbb
RW
10356 for element in $INCEXPAT; do
10357 haveit=
10358 for x in $CPPFLAGS; do
a9322a30 10359
81ecdfbb
RW
10360 acl_save_prefix="$prefix"
10361 prefix="$acl_final_prefix"
10362 acl_save_exec_prefix="$exec_prefix"
10363 exec_prefix="$acl_final_exec_prefix"
10364 eval x=\"$x\"
10365 exec_prefix="$acl_save_exec_prefix"
10366 prefix="$acl_save_prefix"
a8111142 10367
81ecdfbb
RW
10368 if test "X$x" = "X$element"; then
10369 haveit=yes
10370 break
10371 fi
10372 done
10373 if test -z "$haveit"; then
10374 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10375 fi
10376 done
a9322a30
TT
10377
10378
81ecdfbb
RW
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10380$as_echo_n "checking for libexpat... " >&6; }
10381if test "${ac_cv_libexpat+set}" = set; then :
10382 $as_echo_n "(cached) " >&6
bec39cab 10383else
bec39cab 10384
81ecdfbb
RW
10385 ac_save_LIBS="$LIBS"
10386 LIBS="$LIBS $LIBEXPAT"
10387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10388/* end confdefs.h. */
81ecdfbb
RW
10389#include "expat.h"
10390int
10391main ()
10392{
10393XML_Parser p = XML_ParserCreate (0);
10394 ;
10395 return 0;
10396}
bec39cab 10397_ACEOF
81ecdfbb
RW
10398if ac_fn_c_try_link "$LINENO"; then :
10399 ac_cv_libexpat=yes
c906108c 10400else
81ecdfbb 10401 ac_cv_libexpat=no
bec39cab 10402fi
81ecdfbb
RW
10403rm -f core conftest.err conftest.$ac_objext \
10404 conftest$ac_exeext conftest.$ac_ext
10405 LIBS="$ac_save_LIBS"
c906108c 10406
95ca63c4 10407fi
81ecdfbb
RW
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10409$as_echo "$ac_cv_libexpat" >&6; }
10410 if test "$ac_cv_libexpat" = yes; then
10411 HAVE_LIBEXPAT=yes
bec39cab 10412
81ecdfbb 10413$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10414
81ecdfbb
RW
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10416$as_echo_n "checking how to link with libexpat... " >&6; }
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10418$as_echo "$LIBEXPAT" >&6; }
10419 else
10420 HAVE_LIBEXPAT=no
10421 CPPFLAGS="$ac_save_CPPFLAGS"
10422 LIBEXPAT=
10423 LTLIBEXPAT=
10424 fi
95ca63c4
CF
10425
10426
10427
7cb9022a
MK
10428
10429
bec39cab 10430
81ecdfbb
RW
10431 if test "$HAVE_LIBEXPAT" != yes; then
10432 if test "$with_expat" = yes; then
10433 as_fn_error "expat is missing or unusable" "$LINENO" 5
10434 else
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10436$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10437 fi
10438 else
10439 save_LIBS=$LIBS
10440 LIBS="$LIBS $LIBEXPAT"
10441 for ac_func in XML_StopParser
10442do :
10443 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10444if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 10445 cat >>confdefs.h <<_ACEOF
81ecdfbb 10446#define HAVE_XML_STOPPARSER 1
bec39cab 10447_ACEOF
95ca63c4 10448
bec39cab 10449fi
bec39cab 10450done
95ca63c4 10451
81ecdfbb
RW
10452 LIBS=$save_LIBS
10453 fi
a9322a30
TT
10454fi
10455
a9322a30 10456
a9322a30
TT
10457
10458
ec685c5e 10459
0c4a4063 10460
81ecdfbb
RW
10461# Check whether --with-python was given.
10462if test "${with_python+set}" = set; then :
10463 withval=$with_python;
bec39cab 10464else
81ecdfbb 10465 with_python=auto
bec39cab 10466fi
bec39cab 10467
81ecdfbb
RW
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10469$as_echo_n "checking whether to use python... " >&6; }
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10471$as_echo "$with_python" >&6; }
9a156167 10472
81ecdfbb
RW
10473if test "${with_python}" = no; then
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10475$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10476 have_libpython=no
bec39cab 10477else
81ecdfbb 10478 case "${with_python}" in
81ecdfbb 10479 /*)
ec685c5e
DE
10480 if test -d ${with_python}; then
10481 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10482 python_prog="${with_python}/bin/python"
0c4a4063 10483 python_prefix=
9c4ea6c5
JB
10484 # If python does not exit ${with_python}/bin, then try in
10485 # ${with_python}. On Windows/MinGW, this is where the Python
10486 # executable is.
10487 if test ! -x "${python_prog}"; then
10488 python_prog="${with_python}/python"
10489 python_prefix=
10490 fi
e7a30f46 10491 if test ! -x "${python_prog}"; then
ec685c5e
DE
10492 # Fall back to gdb 7.0/7.1 behaviour.
10493 python_prog=missing
0c4a4063 10494 python_prefix=${with_python}
ec685c5e 10495 fi
e7a30f46 10496 elif test -x "${with_python}"; then
ec685c5e
DE
10497 # While we can't run python compiled for $host (unless host == build),
10498 # the user could write a script that provides the needed information,
10499 # so we support that.
ec685c5e 10500 python_prog=${with_python}
0c4a4063 10501 python_prefix=
ec685c5e
DE
10502 else
10503 as_fn_error "invalid value for --with-python" "$LINENO" 5
10504 fi
81ecdfbb 10505 ;;
ec685c5e
DE
10506 */*)
10507 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10508 as_fn_error "invalid value for --with-python" "$LINENO" 5
10509 ;;
ec685c5e
DE
10510 *)
10511 # The user has either specified auto, yes, or the name of the python
10512 # program assumed to be in $PATH.
10513 python_prefix=
10514 case "${with_python}" in
10515 yes | auto)
10516 if test ${build} = ${host}; then
10517 # Extract the first word of "python", so it can be a program name with args.
10518set dummy python; ac_word=$2
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10520$as_echo_n "checking for $ac_word... " >&6; }
10521if test "${ac_cv_path_python_prog_path+set}" = set; then :
10522 $as_echo_n "(cached) " >&6
10523else
10524 case $python_prog_path in
10525 [\\/]* | ?:[\\/]*)
10526 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10527 ;;
10528 *)
10529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10530for as_dir in $PATH
10531do
10532 IFS=$as_save_IFS
10533 test -z "$as_dir" && as_dir=.
10534 for ac_exec_ext in '' $ac_executable_extensions; do
10535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10536 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10538 break 2
10539 fi
10540done
10541 done
10542IFS=$as_save_IFS
10543
10544 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10545 ;;
10546esac
10547fi
10548python_prog_path=$ac_cv_path_python_prog_path
10549if test -n "$python_prog_path"; then
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10551$as_echo "$python_prog_path" >&6; }
10552else
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
10555fi
10556
10557
10558 if test "${python_prog_path}" = missing; then
10559 python_prog=missing
10560 else
10561 python_prog=${python_prog_path}
10562 fi
10563 else
10564 # Not much we can do except assume the cross-compiler will find the
10565 # right files.
10566 python_prog=missing
10567 fi
10568 ;;
10569 *)
10570 # While we can't run python compiled for $host (unless host == build),
10571 # the user could write a script that provides the needed information,
10572 # so we support that.
10573 python_prog="${with_python}"
10574 # Extract the first word of "${python_prog}", so it can be a program name with args.
10575set dummy ${python_prog}; ac_word=$2
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577$as_echo_n "checking for $ac_word... " >&6; }
10578if test "${ac_cv_path_python_prog_path+set}" = set; then :
10579 $as_echo_n "(cached) " >&6
10580else
10581 case $python_prog_path in
10582 [\\/]* | ?:[\\/]*)
10583 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10584 ;;
10585 *)
10586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589 IFS=$as_save_IFS
10590 test -z "$as_dir" && as_dir=.
10591 for ac_exec_ext in '' $ac_executable_extensions; do
10592 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10593 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595 break 2
10596 fi
10597done
10598 done
10599IFS=$as_save_IFS
10600
10601 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10602 ;;
10603esac
10604fi
10605python_prog_path=$ac_cv_path_python_prog_path
10606if test -n "$python_prog_path"; then
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10608$as_echo "$python_prog_path" >&6; }
10609else
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615 if test "${python_prog_path}" = missing; then
10616 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10617 fi
10618 ;;
10619 esac
81ecdfbb
RW
10620 esac
10621
ec685c5e 10622 if test "${python_prog}" != missing; then
e7a30f46
DE
10623 # We have a python program to use, but it may be too old.
10624 # Don't flag an error for --with-python=auto (the default).
10625 have_python_config=yes
ec685c5e
DE
10626 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10627 if test $? != 0; then
e7a30f46
DE
10628 have_python_config=failed
10629 if test "${with_python}" != auto; then
10630 as_fn_error "failure running python-config --includes" "$LINENO" 5
10631 fi
ec685c5e
DE
10632 fi
10633 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10634 if test $? != 0; then
e7a30f46
DE
10635 have_python_config=failed
10636 if test "${with_python}" != auto; then
10637 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10638 fi
ec685c5e 10639 fi
0c4a4063
DE
10640 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10641 if test $? != 0; then
e7a30f46
DE
10642 have_python_config=failed
10643 if test "${with_python}" != auto; then
10644 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10645 fi
0c4a4063 10646 fi
ec685c5e 10647 else
ac534cba
JB
10648 # We do not have a python executable we can use to determine where
10649 # to find the Python headers and libs. We cannot guess the include
10650 # path from the python_prefix either, because that include path
10651 # depends on the Python version. So, there is nothing much we can
10652 # do except assume that the compiler will be able to find those files.
10653 python_includes=
10654 python_libs=
0c4a4063 10655 have_python_config=no
ec685c5e 10656 fi
bec39cab 10657
ec685c5e
DE
10658 # If we have python-config, only try the configuration it provides.
10659 # Otherwise fallback on the old way of trying different versions of
10660 # python in turn.
81ecdfbb 10661
ec685c5e
DE
10662 have_libpython=no
10663 if test "${have_python_config}" = yes; then
c1039e3c
JB
10664 # Determine the Python version by extracting "-lpython<version>"
10665 # part of the python_libs. <version> is usually X.Y with X and Y
10666 # being decimal numbers, but can also be XY (seen on Windows).
10667 #
10668 # The extraction is performed using sed with a regular expression.
10669 # Initially, the regexp used was using the '?' quantifier to make
10670 # the dot in the version number optional. Unfortunately, this
10671 # does not work with non-GNU versions of sed because, because of
10672 # what looks like a limitation (the '?' quantifier does not work
10673 # with back-references). We work around this limitation by using
10674 # the '*' quantifier instead. It means that, in theory, we might
10675 # match unexpected version strings such as "-lpython2..7", but
10676 # this seems unlikely in practice. And even if that happens,
10677 # an error will be triggered later on, when checking that version
10678 # number.
ec685c5e 10679 python_version=`echo " ${python_libs} " \
c1039e3c 10680 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10681 case "${python_version}" in
10682 python*)
ec685c5e
DE
10683
10684 version=${python_version}
10685
10686 new_CPPFLAGS=${python_includes}
10687 new_LIBS=${python_libs}
81ecdfbb
RW
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10689$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10690 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10691 save_LIBS=$LIBS
ec685c5e
DE
10692 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10693 LIBS="$LIBS $new_LIBS"
10694 found_usable_python=no
81ecdfbb 10695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10696/* end confdefs.h. */
ac534cba 10697#include "Python.h"
81ecdfbb
RW
10698int
10699main ()
10700{
10701Py_Initialize ();
10702 ;
10703 return 0;
10704}
bec39cab 10705_ACEOF
81ecdfbb 10706if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10707 have_libpython=${version}
10708 found_usable_python=yes
ac534cba
JB
10709 PYTHON_CPPFLAGS=$new_CPPFLAGS
10710 PYTHON_LIBS=$new_LIBS
9a156167 10711fi
81ecdfbb
RW
10712rm -f core conftest.err conftest.$ac_objext \
10713 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10714 CPPFLAGS=$save_CPPFLAGS
10715 LIBS=$save_LIBS
ec685c5e
DE
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10717$as_echo "${found_usable_python}" >&6; }
9a156167 10718
0c4a4063
DE
10719 ;;
10720 *)
ec685c5e 10721 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10722 ;;
10723 esac
e7a30f46 10724 elif test "${have_python_config}" != failed; then
ec685c5e 10725 if test "${have_libpython}" = no; then
9a156167 10726
420697bb
TT
10727 version=python2.7
10728
10729 new_CPPFLAGS=${python_includes}
10730 new_LIBS="${python_libs} -lpython2.7"
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10732$as_echo_n "checking for ${version}... " >&6; }
10733 save_CPPFLAGS=$CPPFLAGS
10734 save_LIBS=$LIBS
10735 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10736 LIBS="$LIBS $new_LIBS"
10737 found_usable_python=no
10738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10739/* end confdefs.h. */
ac534cba 10740#include "Python.h"
420697bb
TT
10741int
10742main ()
10743{
10744Py_Initialize ();
10745 ;
10746 return 0;
10747}
10748_ACEOF
10749if ac_fn_c_try_link "$LINENO"; then :
10750 have_libpython=${version}
10751 found_usable_python=yes
ac534cba
JB
10752 PYTHON_CPPFLAGS=$new_CPPFLAGS
10753 PYTHON_LIBS=$new_LIBS
420697bb
TT
10754fi
10755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10757 CPPFLAGS=$save_CPPFLAGS
10758 LIBS=$save_LIBS
420697bb
TT
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10760$as_echo "${found_usable_python}" >&6; }
10761
10762 fi
10763 if test "${have_libpython}" = no; then
10764
ec685c5e
DE
10765 version=python2.6
10766
10767 new_CPPFLAGS=${python_includes}
10768 new_LIBS="${python_libs} -lpython2.6"
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10770$as_echo_n "checking for ${version}... " >&6; }
10771 save_CPPFLAGS=$CPPFLAGS
10772 save_LIBS=$LIBS
10773 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10774 LIBS="$LIBS $new_LIBS"
10775 found_usable_python=no
10776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10777/* end confdefs.h. */
ac534cba 10778#include "Python.h"
ec685c5e
DE
10779int
10780main ()
10781{
10782Py_Initialize ();
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787if ac_fn_c_try_link "$LINENO"; then :
10788 have_libpython=${version}
10789 found_usable_python=yes
ac534cba
JB
10790 PYTHON_CPPFLAGS=$new_CPPFLAGS
10791 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10792fi
10793rm -f core conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10795 CPPFLAGS=$save_CPPFLAGS
10796 LIBS=$save_LIBS
ec685c5e
DE
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10798$as_echo "${found_usable_python}" >&6; }
9a156167 10799
81ecdfbb 10800 fi
ec685c5e 10801 if test ${have_libpython} = no; then
9a156167 10802
81ecdfbb 10803 version=python2.5
9a156167 10804
ec685c5e
DE
10805 new_CPPFLAGS=${python_includes}
10806 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10808$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10809 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10810 save_LIBS=$LIBS
ec685c5e
DE
10811 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10812 LIBS="$LIBS $new_LIBS"
10813 found_usable_python=no
81ecdfbb 10814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10815/* end confdefs.h. */
ac534cba 10816#include "Python.h"
81ecdfbb
RW
10817int
10818main ()
10819{
10820Py_Initialize ();
10821 ;
10822 return 0;
10823}
436868fb 10824_ACEOF
81ecdfbb 10825if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10826 have_libpython=${version}
10827 found_usable_python=yes
ac534cba
JB
10828 PYTHON_CPPFLAGS=$new_CPPFLAGS
10829 PYTHON_LIBS=$new_LIBS
436868fb 10830fi
81ecdfbb
RW
10831rm -f core conftest.err conftest.$ac_objext \
10832 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10833 CPPFLAGS=$save_CPPFLAGS
10834 LIBS=$save_LIBS
ec685c5e
DE
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10836$as_echo "${found_usable_python}" >&6; }
a9322a30 10837
81ecdfbb 10838 fi
ec685c5e 10839 if test ${have_libpython} = no; then
a9322a30 10840
81ecdfbb 10841 version=python2.4
a9322a30 10842
ec685c5e
DE
10843 new_CPPFLAGS=${python_includes}
10844 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10846$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10847 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10848 save_LIBS=$LIBS
ec685c5e
DE
10849 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10850 LIBS="$LIBS $new_LIBS"
10851 found_usable_python=no
81ecdfbb 10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10853/* end confdefs.h. */
ac534cba 10854#include "Python.h"
a9322a30
TT
10855int
10856main ()
10857{
81ecdfbb 10858Py_Initialize ();
a9322a30
TT
10859 ;
10860 return 0;
10861}
436868fb 10862_ACEOF
81ecdfbb 10863if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10864 have_libpython=${version}
10865 found_usable_python=yes
ac534cba
JB
10866 PYTHON_CPPFLAGS=$new_CPPFLAGS
10867 PYTHON_LIBS=$new_LIBS
436868fb 10868fi
81ecdfbb
RW
10869rm -f core conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10871 CPPFLAGS=$save_CPPFLAGS
10872 LIBS=$save_LIBS
ec685c5e
DE
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10874$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10875
ec685c5e
DE
10876 fi
10877 fi
9c4ea6c5 10878 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10879
10880$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10881
9c4ea6c5 10882 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10883
10884$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10885
9c4ea6c5 10886 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10887
10888$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10889
9c4ea6c5 10890 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10891
10892$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10893
81ecdfbb 10894 fi
ec685c5e
DE
10895
10896 if test "${have_libpython}" = no; then
81ecdfbb
RW
10897 case "${with_python}" in
10898 yes)
10899 as_fn_error "python is missing or unusable" "$LINENO" 5
10900 ;;
10901 auto)
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10903$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10904 ;;
10905 *)
10906 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10907 ;;
10908 esac
0c4a4063
DE
10909 else
10910 if test -n "${python_prefix}"; then
10911
10912cat >>confdefs.h <<_ACEOF
10913#define WITH_PYTHON_PATH "${python_prefix}"
10914_ACEOF
10915
10916
10917 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10918 if test "x$prefix" = xNONE; then
10919 test_prefix=/usr/local
10920 else
10921 test_prefix=$prefix
10922 fi
10923 else
10924 test_prefix=$exec_prefix
10925 fi
10926 value=0
10927 case ${python_prefix} in
10928 "${test_prefix}"|"${test_prefix}/"*|\
10929 '${exec_prefix}'|'${exec_prefix}/'*)
10930 value=1
10931 ;;
10932 esac
10933
10934cat >>confdefs.h <<_ACEOF
10935#define PYTHON_PATH_RELOCATABLE $value
10936_ACEOF
10937
10938
10939 fi
81ecdfbb 10940 fi
436868fb 10941fi
436868fb 10942
ec685c5e 10943if test "${have_libpython}" != no; then
436868fb 10944
81ecdfbb 10945$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10946
81ecdfbb
RW
10947 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10948 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10949 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10950 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10951 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10952
81ecdfbb
RW
10953 # Flags needed to compile Python code (taken from python-config --cflags).
10954 # We cannot call python-config directly because it will output whatever was
10955 # used when compiling the Python interpreter itself, including flags which
10956 # would make the python-related objects be compiled differently from the
10957 # rest of GDB (e.g., -O2 and -fPIC).
10958 if test "${GCC}" = yes; then
10959 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10960 fi
436868fb 10961
81ecdfbb
RW
10962 if test "x${tentative_python_cflags}" != x; then
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10964$as_echo_n "checking compiler flags for python code... " >&6; }
10965 for flag in ${tentative_python_cflags}; do
10966 # Check that the compiler accepts it
10967 saved_CFLAGS="$CFLAGS"
10968 CFLAGS="$CFLAGS $flag"
10969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10970/* end confdefs.h. */
81ecdfbb 10971
a9322a30
TT
10972int
10973main ()
10974{
a9322a30
TT
10975
10976 ;
10977 return 0;
10978}
bec39cab 10979_ACEOF
81ecdfbb
RW
10980if ac_fn_c_try_compile "$LINENO"; then :
10981 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10982fi
81ecdfbb
RW
10983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10984 CFLAGS="$saved_CFLAGS"
10985 done
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10987$as_echo "${PYTHON_CFLAGS}" >&6; }
10988 fi
043b6510
JB
10989
10990 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
10991 # #if _SGIAPI
10992 # #define siginfo __siginfo
10993 # #endif
10994 # The problem is that including Python causes some XOPEN macros to be
10995 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
10996 # to false. So, we work around this issue by defining siginfo ourself
10997 # though the command-line.
10998 case "$gdb_host" in
10999 irix*) if test "${GCC}" = yes; then
11000 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
11001 fi
11002 ;;
11003 esac
81ecdfbb
RW
11004else
11005 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
11006 # included.
11007 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
11008 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
11009 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 11010fi
9a156167 11011
9a156167 11012
ac534cba
JB
11013
11014
81ecdfbb
RW
11015# ------------------------- #
11016# Checks for header files. #
11017# ------------------------- #
c890192f 11018
81ecdfbb
RW
11019ac_header_dirent=no
11020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11021 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11023$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
11024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
11025 $as_echo_n "(cached) " >&6
bec39cab 11026else
81ecdfbb 11027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11028/* end confdefs.h. */
81ecdfbb
RW
11029#include <sys/types.h>
11030#include <$ac_hdr>
11031
a9322a30
TT
11032int
11033main ()
11034{
81ecdfbb
RW
11035if ((DIR *) 0)
11036return 0;
a9322a30
TT
11037 ;
11038 return 0;
11039}
bec39cab 11040_ACEOF
81ecdfbb
RW
11041if ac_fn_c_try_compile "$LINENO"; then :
11042 eval "$as_ac_Header=yes"
bec39cab 11043else
81ecdfbb 11044 eval "$as_ac_Header=no"
bec39cab 11045fi
81ecdfbb 11046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11047fi
81ecdfbb
RW
11048eval ac_res=\$$as_ac_Header
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11050$as_echo "$ac_res" >&6; }
11051eval as_val=\$$as_ac_Header
11052 if test "x$as_val" = x""yes; then :
11053 cat >>confdefs.h <<_ACEOF
11054#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 11055_ACEOF
bec39cab 11056
81ecdfbb
RW
11057ac_header_dirent=$ac_hdr; break
11058fi
bec39cab 11059
81ecdfbb
RW
11060done
11061# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11062if test $ac_header_dirent = dirent.h; then
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11064$as_echo_n "checking for library containing opendir... " >&6; }
11065if test "${ac_cv_search_opendir+set}" = set; then :
11066 $as_echo_n "(cached) " >&6
c890192f 11067else
81ecdfbb
RW
11068 ac_func_search_save_LIBS=$LIBS
11069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11070/* end confdefs.h. */
11071
11072/* Override any GCC internal prototype to avoid an error.
11073 Use char because int might match the return type of a GCC
11074 builtin and then its argument prototype would still apply. */
11075#ifdef __cplusplus
11076extern "C"
11077#endif
11078char opendir ();
11079int
11080main ()
11081{
11082return opendir ();
11083 ;
11084 return 0;
11085}
bec39cab 11086_ACEOF
81ecdfbb
RW
11087for ac_lib in '' dir; do
11088 if test -z "$ac_lib"; then
11089 ac_res="none required"
11090 else
11091 ac_res=-l$ac_lib
11092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11093 fi
11094 if ac_fn_c_try_link "$LINENO"; then :
11095 ac_cv_search_opendir=$ac_res
11096fi
11097rm -f core conftest.err conftest.$ac_objext \
11098 conftest$ac_exeext
11099 if test "${ac_cv_search_opendir+set}" = set; then :
11100 break
11101fi
11102done
11103if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 11104
81ecdfbb
RW
11105else
11106 ac_cv_search_opendir=no
11107fi
11108rm conftest.$ac_ext
11109LIBS=$ac_func_search_save_LIBS
11110fi
11111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11112$as_echo "$ac_cv_search_opendir" >&6; }
11113ac_res=$ac_cv_search_opendir
11114if test "$ac_res" != no; then :
11115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11116
bec39cab 11117fi
81ecdfbb 11118
bec39cab 11119else
81ecdfbb
RW
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11121$as_echo_n "checking for library containing opendir... " >&6; }
11122if test "${ac_cv_search_opendir+set}" = set; then :
11123 $as_echo_n "(cached) " >&6
11124else
11125 ac_func_search_save_LIBS=$LIBS
11126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11127/* end confdefs.h. */
81ecdfbb
RW
11128
11129/* Override any GCC internal prototype to avoid an error.
11130 Use char because int might match the return type of a GCC
11131 builtin and then its argument prototype would still apply. */
11132#ifdef __cplusplus
11133extern "C"
11134#endif
11135char opendir ();
a9322a30
TT
11136int
11137main ()
11138{
81ecdfbb 11139return opendir ();
a9322a30
TT
11140 ;
11141 return 0;
11142}
bec39cab 11143_ACEOF
81ecdfbb
RW
11144for ac_lib in '' x; do
11145 if test -z "$ac_lib"; then
11146 ac_res="none required"
11147 else
11148 ac_res=-l$ac_lib
11149 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11150 fi
11151 if ac_fn_c_try_link "$LINENO"; then :
11152 ac_cv_search_opendir=$ac_res
11153fi
11154rm -f core conftest.err conftest.$ac_objext \
11155 conftest$ac_exeext
11156 if test "${ac_cv_search_opendir+set}" = set; then :
11157 break
11158fi
11159done
11160if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 11161
81ecdfbb
RW
11162else
11163 ac_cv_search_opendir=no
bec39cab 11164fi
81ecdfbb
RW
11165rm conftest.$ac_ext
11166LIBS=$ac_func_search_save_LIBS
a9322a30 11167fi
81ecdfbb
RW
11168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11169$as_echo "$ac_cv_search_opendir" >&6; }
11170ac_res=$ac_cv_search_opendir
11171if test "$ac_res" != no; then :
11172 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 11173
81ecdfbb 11174fi
bec39cab 11175
81ecdfbb 11176fi
bec39cab 11177
81ecdfbb
RW
11178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11179$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11180if test "${ac_cv_header_stat_broken+set}" = set; then :
11181 $as_echo_n "(cached) " >&6
9a156167 11182else
81ecdfbb
RW
11183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11184/* end confdefs.h. */
11185#include <sys/types.h>
11186#include <sys/stat.h>
11187
11188#if defined S_ISBLK && defined S_IFDIR
11189extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11190#endif
11191
11192#if defined S_ISBLK && defined S_IFCHR
11193extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11194#endif
11195
11196#if defined S_ISLNK && defined S_IFREG
11197extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11198#endif
11199
11200#if defined S_ISSOCK && defined S_IFREG
11201extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11202#endif
11203
bec39cab 11204_ACEOF
81ecdfbb
RW
11205if ac_fn_c_try_compile "$LINENO"; then :
11206 ac_cv_header_stat_broken=no
11207else
11208 ac_cv_header_stat_broken=yes
11209fi
11210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11211fi
11212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11213$as_echo "$ac_cv_header_stat_broken" >&6; }
11214if test $ac_cv_header_stat_broken = yes; then
9a156167 11215
81ecdfbb 11216$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 11217
bec39cab 11218fi
81ecdfbb
RW
11219
11220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11221$as_echo_n "checking for ANSI C header files... " >&6; }
11222if test "${ac_cv_header_stdc+set}" = set; then :
11223 $as_echo_n "(cached) " >&6
bec39cab 11224else
81ecdfbb 11225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11226/* end confdefs.h. */
81ecdfbb
RW
11227#include <stdlib.h>
11228#include <stdarg.h>
11229#include <string.h>
11230#include <float.h>
11231
a9322a30
TT
11232int
11233main ()
11234{
a9322a30
TT
11235
11236 ;
11237 return 0;
11238}
bec39cab 11239_ACEOF
81ecdfbb
RW
11240if ac_fn_c_try_compile "$LINENO"; then :
11241 ac_cv_header_stdc=yes
bec39cab 11242else
81ecdfbb 11243 ac_cv_header_stdc=no
a9322a30 11244fi
81ecdfbb 11245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11246
81ecdfbb
RW
11247if test $ac_cv_header_stdc = yes; then
11248 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250/* end confdefs.h. */
11251#include <string.h>
bec39cab 11252
81ecdfbb
RW
11253_ACEOF
11254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11255 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11256
bec39cab 11257else
81ecdfbb
RW
11258 ac_cv_header_stdc=no
11259fi
11260rm -f conftest*
11261
11262fi
11263
11264if test $ac_cv_header_stdc = yes; then
11265 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267/* end confdefs.h. */
11268#include <stdlib.h>
11269
bec39cab 11270_ACEOF
81ecdfbb
RW
11271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11272 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11273
81ecdfbb
RW
11274else
11275 ac_cv_header_stdc=no
11276fi
11277rm -f conftest*
bec39cab 11278
bec39cab 11279fi
81ecdfbb
RW
11280
11281if test $ac_cv_header_stdc = yes; then
11282 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11283 if test "$cross_compiling" = yes; then :
11284 :
bec39cab 11285else
81ecdfbb 11286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11287/* end confdefs.h. */
81ecdfbb
RW
11288#include <ctype.h>
11289#include <stdlib.h>
11290#if ((' ' & 0x0FF) == 0x020)
11291# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11292# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11293#else
11294# define ISLOWER(c) \
11295 (('a' <= (c) && (c) <= 'i') \
11296 || ('j' <= (c) && (c) <= 'r') \
11297 || ('s' <= (c) && (c) <= 'z'))
11298# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11299#endif
11300
11301#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11302int
11303main ()
11304{
81ecdfbb
RW
11305 int i;
11306 for (i = 0; i < 256; i++)
11307 if (XOR (islower (i), ISLOWER (i))
11308 || toupper (i) != TOUPPER (i))
11309 return 2;
a9322a30
TT
11310 return 0;
11311}
bec39cab 11312_ACEOF
81ecdfbb
RW
11313if ac_fn_c_try_run "$LINENO"; then :
11314
bec39cab 11315else
81ecdfbb
RW
11316 ac_cv_header_stdc=no
11317fi
11318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11319 conftest.$ac_objext conftest.beam conftest.$ac_ext
11320fi
bec39cab 11321
bec39cab 11322fi
a9322a30 11323fi
81ecdfbb
RW
11324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11325$as_echo "$ac_cv_header_stdc" >&6; }
11326if test $ac_cv_header_stdc = yes; then
bec39cab 11327
81ecdfbb 11328$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11329
81ecdfbb 11330fi
bec39cab 11331
81ecdfbb
RW
11332# elf_hp.h is for HP/UX 64-bit shared library support.
11333# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
11334# unconditionally, so what's the point in checking these?
11335for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11336 thread_db.h gnu/libc-version.h signal.h stddef.h \
11337 stdlib.h string.h memory.h strings.h sys/fault.h \
11338 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11339 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11340 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11341 sys/types.h sys/wait.h wait.h termios.h termio.h \
11342 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
11343do :
11344 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11345ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11346eval as_val=\$$as_ac_Header
11347 if test "x$as_val" = x""yes; then :
bec39cab 11348 cat >>confdefs.h <<_ACEOF
81ecdfbb 11349#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11350_ACEOF
c906108c 11351
bec39cab 11352fi
81ecdfbb
RW
11353
11354done
11355
11356for ac_header in link.h
11357do :
11358 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
11359# include <sys/types.h>
11360#endif
11361#if HAVE_NLIST_H
11362# include <nlist.h>
a9322a30
TT
11363#endif
11364
81ecdfbb
RW
11365"
11366if test "x$ac_cv_header_link_h" = x""yes; then :
11367 cat >>confdefs.h <<_ACEOF
11368#define HAVE_LINK_H 1
bec39cab 11369_ACEOF
bec39cab 11370
a9322a30 11371fi
bec39cab 11372
81ecdfbb 11373done
c906108c 11374
81ecdfbb
RW
11375for ac_header in sys/proc.h
11376do :
11377 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11378# include <sys/param.h>
11379#endif
c906108c 11380
81ecdfbb
RW
11381"
11382if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11383 cat >>confdefs.h <<_ACEOF
81ecdfbb 11384#define HAVE_SYS_PROC_H 1
bec39cab 11385_ACEOF
5ee754fc 11386
bec39cab 11387fi
81ecdfbb
RW
11388
11389done
11390
11391for ac_header in sys/user.h
11392do :
11393 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11394# include <sys/param.h>
a9322a30
TT
11395#endif
11396
81ecdfbb
RW
11397"
11398if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11399 cat >>confdefs.h <<_ACEOF
11400#define HAVE_SYS_USER_H 1
bec39cab 11401_ACEOF
bec39cab 11402
a9322a30 11403fi
bec39cab 11404
81ecdfbb 11405done
5ee754fc 11406
5ee754fc 11407
81ecdfbb
RW
11408# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11409# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11410# think that we don't have <curses.h> if we're using GCC.
11411case $host_os in
11412 solaris2.[789])
11413 if test "$GCC" = yes; then
11414
11415$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11416
11417 fi ;;
11418esac
11419for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11420do :
11421 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11422ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11423eval as_val=\$$as_ac_Header
11424 if test "x$as_val" = x""yes; then :
bec39cab 11425 cat >>confdefs.h <<_ACEOF
81ecdfbb 11426#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11427_ACEOF
5ee754fc
MK
11428
11429fi
11430
81ecdfbb 11431done
bec39cab 11432
81ecdfbb
RW
11433for ac_header in term.h
11434do :
11435 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11436# include <curses.h>
11437#endif
bec39cab 11438
81ecdfbb
RW
11439"
11440if test "x$ac_cv_header_term_h" = x""yes; then :
11441 cat >>confdefs.h <<_ACEOF
11442#define HAVE_TERM_H 1
a8111142 11443_ACEOF
a8111142 11444
a8111142 11445fi
a8111142 11446
81ecdfbb 11447done
a8111142
TT
11448
11449
81ecdfbb
RW
11450# ------------------------- #
11451# Checks for declarations. #
11452# ------------------------- #
a9322a30 11453
81ecdfbb
RW
11454ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11455if test "x$ac_cv_have_decl_free" = x""yes; then :
11456 ac_have_decl=1
bec39cab 11457else
81ecdfbb
RW
11458 ac_have_decl=0
11459fi
11460
11461cat >>confdefs.h <<_ACEOF
11462#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11463_ACEOF
81ecdfbb
RW
11464ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11465if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11466 ac_have_decl=1
11467else
11468 ac_have_decl=0
11469fi
11470
11471cat >>confdefs.h <<_ACEOF
11472#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11473_ACEOF
81ecdfbb
RW
11474ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11475if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11476 ac_have_decl=1
bec39cab 11477else
81ecdfbb
RW
11478 ac_have_decl=0
11479fi
bec39cab 11480
81ecdfbb
RW
11481cat >>confdefs.h <<_ACEOF
11482#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11483_ACEOF
81ecdfbb
RW
11484ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11485if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11486 ac_have_decl=1
11487else
11488 ac_have_decl=0
11489fi
11490
11491cat >>confdefs.h <<_ACEOF
11492#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 11493_ACEOF
81ecdfbb
RW
11494ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11495if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11496 ac_have_decl=1
bec39cab 11497else
81ecdfbb
RW
11498 ac_have_decl=0
11499fi
5ee754fc 11500
81ecdfbb
RW
11501cat >>confdefs.h <<_ACEOF
11502#define HAVE_DECL_STRSTR $ac_have_decl
11503_ACEOF
11504ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
11505if test "x$ac_cv_have_decl_getopt" = x""yes; then :
11506 ac_have_decl=1
11507else
11508 ac_have_decl=0
5ee754fc 11509fi
81ecdfbb
RW
11510
11511cat >>confdefs.h <<_ACEOF
11512#define HAVE_DECL_GETOPT $ac_have_decl
11513_ACEOF
11514ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11515if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11516 ac_have_decl=1
11517else
11518 ac_have_decl=0
5ee754fc 11519fi
81ecdfbb
RW
11520
11521cat >>confdefs.h <<_ACEOF
11522#define HAVE_DECL_SNPRINTF $ac_have_decl
11523_ACEOF
11524ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11525if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11526 ac_have_decl=1
11527else
11528 ac_have_decl=0
5ee754fc
MK
11529fi
11530
a9322a30 11531cat >>confdefs.h <<_ACEOF
81ecdfbb 11532#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 11533_ACEOF
5ee754fc 11534
5ee754fc 11535
81ecdfbb
RW
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11537$as_echo_n "checking for LC_MESSAGES... " >&6; }
11538if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11539 $as_echo_n "(cached) " >&6
bec39cab 11540else
81ecdfbb 11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11542/* end confdefs.h. */
81ecdfbb 11543#include <locale.h>
a9322a30
TT
11544int
11545main ()
11546{
81ecdfbb 11547return LC_MESSAGES
a9322a30
TT
11548 ;
11549 return 0;
11550}
bec39cab 11551_ACEOF
81ecdfbb
RW
11552if ac_fn_c_try_link "$LINENO"; then :
11553 am_cv_val_LC_MESSAGES=yes
bec39cab 11554else
81ecdfbb
RW
11555 am_cv_val_LC_MESSAGES=no
11556fi
11557rm -f core conftest.err conftest.$ac_objext \
11558 conftest$ac_exeext conftest.$ac_ext
11559fi
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11561$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11562 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11563
81ecdfbb
RW
11564$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11565
11566 fi
11567
11568
11569# ----------------------- #
11570# Checks for structures. #
11571# ----------------------- #
11572
11573ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11574if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11575
11576cat >>confdefs.h <<_ACEOF
11577#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11578_ACEOF
7eb368b3 11579
81ecdfbb 11580
7eb368b3 11581fi
81ecdfbb
RW
11582ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11583if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11584
a9322a30
TT
11585cat >>confdefs.h <<_ACEOF
11586#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11587_ACEOF
11588
a9322a30 11589
7eb368b3
NR
11590fi
11591
7eb368b3 11592
a9322a30
TT
11593# ------------------ #
11594# Checks for types. #
11595# ------------------ #
7eb368b3 11596
81ecdfbb
RW
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11598$as_echo_n "checking return type of signal handlers... " >&6; }
11599if test "${ac_cv_type_signal+set}" = set; then :
11600 $as_echo_n "(cached) " >&6
bec39cab 11601else
81ecdfbb 11602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11603/* end confdefs.h. */
a9322a30
TT
11604#include <sys/types.h>
11605#include <signal.h>
7cb9022a 11606
a9322a30
TT
11607int
11608main ()
11609{
81ecdfbb 11610return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11611 ;
11612 return 0;
11613}
bec39cab 11614_ACEOF
81ecdfbb
RW
11615if ac_fn_c_try_compile "$LINENO"; then :
11616 ac_cv_type_signal=int
bec39cab 11617else
81ecdfbb 11618 ac_cv_type_signal=void
bec39cab 11619fi
81ecdfbb 11620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11621fi
81ecdfbb
RW
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11623$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11624
a9322a30
TT
11625cat >>confdefs.h <<_ACEOF
11626#define RETSIGTYPE $ac_cv_type_signal
11627_ACEOF
5ee754fc 11628
bec39cab 11629
81ecdfbb 11630ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11631#include <sys/socket.h>
11632
81ecdfbb
RW
11633"
11634if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11635
a9322a30
TT
11636cat >>confdefs.h <<_ACEOF
11637#define HAVE_SOCKLEN_T 1
11638_ACEOF
11639
11640
11641fi
11642
11643
11644# ------------------------------------- #
11645# Checks for compiler characteristics. #
11646# ------------------------------------- #
11647
81ecdfbb
RW
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11649$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11650if test "${ac_cv_c_const+set}" = set; then :
11651 $as_echo_n "(cached) " >&6
a9322a30 11652else
81ecdfbb 11653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11654/* end confdefs.h. */
a9322a30
TT
11655
11656int
11657main ()
11658{
11659/* FIXME: Include the comments suggested by Paul. */
11660#ifndef __cplusplus
11661 /* Ultrix mips cc rejects this. */
11662 typedef int charset[2];
81ecdfbb 11663 const charset cs;
a9322a30 11664 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11665 char const *const *pcpcc;
11666 char **ppc;
a9322a30
TT
11667 /* NEC SVR4.0.2 mips cc rejects this. */
11668 struct point {int x, y;};
11669 static struct point const zero = {0,0};
11670 /* AIX XL C 1.02.0.0 rejects this.
11671 It does not let you subtract one const X* pointer from another in
11672 an arm of an if-expression whose if-part is not a constant
11673 expression */
11674 const char *g = "string";
81ecdfbb 11675 pcpcc = &g + (g ? g-g : 0);
a9322a30 11676 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11677 ++pcpcc;
11678 ppc = (char**) pcpcc;
11679 pcpcc = (char const *const *) ppc;
a9322a30
TT
11680 { /* SCO 3.2v4 cc rejects this. */
11681 char *t;
11682 char const *s = 0 ? (char *) 0 : (char const *) 0;
11683
11684 *t++ = 0;
81ecdfbb 11685 if (s) return 0;
a9322a30
TT
11686 }
11687 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11688 int x[] = {25, 17};
11689 const int *foo = &x[0];
11690 ++foo;
11691 }
11692 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11693 typedef const int *iptr;
11694 iptr p = 0;
11695 ++p;
11696 }
11697 { /* AIX XL C 1.02.0.0 rejects this saying
11698 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11699 struct s { int j; const int *ap[3]; };
11700 struct s *b; b->j = 5;
11701 }
11702 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11703 const int foo = 10;
81ecdfbb 11704 if (!foo) return 0;
a9322a30 11705 }
81ecdfbb 11706 return !cs[0] && !zero.x;
a9322a30
TT
11707#endif
11708
11709 ;
11710 return 0;
11711}
bec39cab 11712_ACEOF
81ecdfbb 11713if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11714 ac_cv_c_const=yes
5ee754fc 11715else
81ecdfbb 11716 ac_cv_c_const=no
5ee754fc 11717fi
81ecdfbb 11718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11719fi
81ecdfbb
RW
11720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11721$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11722if test $ac_cv_c_const = no; then
bec39cab 11723
81ecdfbb 11724$as_echo "#define const /**/" >>confdefs.h
bec39cab 11725
5ee754fc 11726fi
bec39cab 11727
81ecdfbb
RW
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11729$as_echo_n "checking for inline... " >&6; }
11730if test "${ac_cv_c_inline+set}" = set; then :
11731 $as_echo_n "(cached) " >&6
bec39cab 11732else
a9322a30
TT
11733 ac_cv_c_inline=no
11734for ac_kw in inline __inline__ __inline; do
81ecdfbb 11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11736/* end confdefs.h. */
a9322a30
TT
11737#ifndef __cplusplus
11738typedef int foo_t;
11739static $ac_kw foo_t static_foo () {return 0; }
11740$ac_kw foo_t foo () {return 0; }
11741#endif
11742
bec39cab 11743_ACEOF
81ecdfbb
RW
11744if ac_fn_c_try_compile "$LINENO"; then :
11745 ac_cv_c_inline=$ac_kw
bec39cab 11746fi
81ecdfbb
RW
11747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11748 test "$ac_cv_c_inline" != no && break
a9322a30 11749done
bec39cab 11750
5ee754fc 11751fi
81ecdfbb
RW
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11753$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11754
a9322a30
TT
11755case $ac_cv_c_inline in
11756 inline | yes) ;;
11757 *)
11758 case $ac_cv_c_inline in
11759 no) ac_val=;;
11760 *) ac_val=$ac_cv_c_inline;;
11761 esac
11762 cat >>confdefs.h <<_ACEOF
11763#ifndef __cplusplus
11764#define inline $ac_val
11765#endif
11766_ACEOF
bec39cab
AC
11767 ;;
11768esac
bec39cab 11769
81ecdfbb
RW
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11771$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11772if test "${ac_cv_c_bigendian+set}" = set; then :
11773 $as_echo_n "(cached) " >&6
bec39cab 11774else
81ecdfbb
RW
11775 ac_cv_c_bigendian=unknown
11776 # See if we're dealing with a universal compiler.
11777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11778/* end confdefs.h. */
11779#ifndef __APPLE_CC__
11780 not a universal capable compiler
11781 #endif
11782 typedef int dummy;
11783
11784_ACEOF
11785if ac_fn_c_try_compile "$LINENO"; then :
11786
11787 # Check for potential -arch flags. It is not universal unless
11788 # there are at least two -arch flags with different values.
11789 ac_arch=
11790 ac_prev=
11791 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11792 if test -n "$ac_prev"; then
11793 case $ac_word in
11794 i?86 | x86_64 | ppc | ppc64)
11795 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11796 ac_arch=$ac_word
11797 else
11798 ac_cv_c_bigendian=universal
11799 break
11800 fi
11801 ;;
11802 esac
11803 ac_prev=
11804 elif test "x$ac_word" = "x-arch"; then
11805 ac_prev=arch
11806 fi
11807 done
11808fi
11809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11810 if test $ac_cv_c_bigendian = unknown; then
11811 # See if sys/param.h defines the BYTE_ORDER macro.
11812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11813/* end confdefs.h. */
a9322a30 11814#include <sys/types.h>
81ecdfbb 11815 #include <sys/param.h>
a9322a30
TT
11816
11817int
11818main ()
11819{
81ecdfbb
RW
11820#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11821 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11822 && LITTLE_ENDIAN)
11823 bogus endian macros
11824 #endif
a9322a30
TT
11825
11826 ;
11827 return 0;
11828}
bec39cab 11829_ACEOF
81ecdfbb 11830if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11831 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11833/* end confdefs.h. */
a9322a30 11834#include <sys/types.h>
81ecdfbb 11835 #include <sys/param.h>
a9322a30
TT
11836
11837int
11838main ()
11839{
11840#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11841 not big endian
11842 #endif
a9322a30
TT
11843
11844 ;
11845 return 0;
11846}
bec39cab 11847_ACEOF
81ecdfbb 11848if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11849 ac_cv_c_bigendian=yes
5ee754fc 11850else
81ecdfbb 11851 ac_cv_c_bigendian=no
5ee754fc 11852fi
81ecdfbb
RW
11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11854fi
11855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11856 fi
11857 if test $ac_cv_c_bigendian = unknown; then
11858 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861#include <limits.h>
bec39cab 11862
81ecdfbb
RW
11863int
11864main ()
11865{
11866#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11867 bogus endian macros
11868 #endif
11869
11870 ;
11871 return 0;
11872}
7eb368b3 11873_ACEOF
81ecdfbb
RW
11874if ac_fn_c_try_compile "$LINENO"; then :
11875 # It does; now see whether it defined to _BIG_ENDIAN or not.
11876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11877/* end confdefs.h. */
81ecdfbb
RW
11878#include <limits.h>
11879
7eb368b3
NR
11880int
11881main ()
11882{
81ecdfbb
RW
11883#ifndef _BIG_ENDIAN
11884 not big endian
11885 #endif
11886
7eb368b3
NR
11887 ;
11888 return 0;
11889}
11890_ACEOF
81ecdfbb 11891if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11892 ac_cv_c_bigendian=yes
81ecdfbb
RW
11893else
11894 ac_cv_c_bigendian=no
a9322a30 11895fi
81ecdfbb 11896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11897fi
81ecdfbb
RW
11898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11899 fi
11900 if test $ac_cv_c_bigendian = unknown; then
11901 # Compile a test program.
11902 if test "$cross_compiling" = yes; then :
11903 # Try to guess by grepping values from an object file.
11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905/* end confdefs.h. */
11906short int ascii_mm[] =
11907 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11908 short int ascii_ii[] =
11909 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11910 int use_ascii (int i) {
11911 return ascii_mm[i] + ascii_ii[i];
11912 }
11913 short int ebcdic_ii[] =
11914 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11915 short int ebcdic_mm[] =
11916 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11917 int use_ebcdic (int i) {
11918 return ebcdic_mm[i] + ebcdic_ii[i];
11919 }
11920 extern int foo;
7eb368b3 11921
81ecdfbb
RW
11922int
11923main ()
11924{
11925return use_ascii (foo) == use_ebcdic (foo);
11926 ;
11927 return 0;
11928}
11929_ACEOF
11930if ac_fn_c_try_compile "$LINENO"; then :
11931 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11932 ac_cv_c_bigendian=yes
11933 fi
11934 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11935 if test "$ac_cv_c_bigendian" = unknown; then
11936 ac_cv_c_bigendian=no
11937 else
11938 # finding both strings is unlikely to happen, but who knows?
11939 ac_cv_c_bigendian=unknown
11940 fi
11941 fi
7eb368b3 11942fi
81ecdfbb 11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11944else
81ecdfbb 11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11946/* end confdefs.h. */
81ecdfbb 11947$ac_includes_default
d3ea6809
MM
11948int
11949main ()
11950{
81ecdfbb
RW
11951
11952 /* Are we little or big endian? From Harbison&Steele. */
11953 union
11954 {
11955 long int l;
11956 char c[sizeof (long int)];
11957 } u;
11958 u.l = 1;
11959 return u.c[sizeof (long int) - 1] == 1;
11960
11961 ;
11962 return 0;
d3ea6809
MM
11963}
11964_ACEOF
81ecdfbb 11965if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11966 ac_cv_c_bigendian=no
d3ea6809 11967else
81ecdfbb 11968 ac_cv_c_bigendian=yes
d3ea6809 11969fi
81ecdfbb
RW
11970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11971 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11972fi
a9322a30 11973
81ecdfbb
RW
11974 fi
11975fi
11976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11977$as_echo "$ac_cv_c_bigendian" >&6; }
11978 case $ac_cv_c_bigendian in #(
11979 yes)
11980 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11981;; #(
11982 no)
11983 ;; #(
11984 universal)
11985
11986$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11987
11988 ;; #(
11989 *)
11990 as_fn_error "unknown endianness
11991 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11992 esac
d3ea6809
MM
11993
11994
a9322a30
TT
11995# ------------------------------ #
11996# Checks for library functions. #
11997# ------------------------------ #
d3ea6809 11998
a9322a30
TT
11999# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12000# for constant arguments. Useless!
81ecdfbb
RW
12001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12002$as_echo_n "checking for working alloca.h... " >&6; }
12003if test "${ac_cv_working_alloca_h+set}" = set; then :
12004 $as_echo_n "(cached) " >&6
d3ea6809 12005else
81ecdfbb 12006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 12007/* end confdefs.h. */
a9322a30 12008#include <alloca.h>
bec39cab
AC
12009int
12010main ()
12011{
a9322a30 12012char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 12013 if (p) return 0;
bec39cab
AC
12014 ;
12015 return 0;
12016}
12017_ACEOF
81ecdfbb 12018if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12019 ac_cv_working_alloca_h=yes
bec39cab 12020else
81ecdfbb 12021 ac_cv_working_alloca_h=no
bec39cab 12022fi
81ecdfbb
RW
12023rm -f core conftest.err conftest.$ac_objext \
12024 conftest$ac_exeext conftest.$ac_ext
bec39cab 12025fi
81ecdfbb
RW
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12027$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
12028if test $ac_cv_working_alloca_h = yes; then
12029
81ecdfbb 12030$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 12031
c906108c 12032fi
bec39cab 12033
81ecdfbb
RW
12034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12035$as_echo_n "checking for alloca... " >&6; }
12036if test "${ac_cv_func_alloca_works+set}" = set; then :
12037 $as_echo_n "(cached) " >&6
bec39cab 12038else
81ecdfbb 12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12040/* end confdefs.h. */
a9322a30
TT
12041#ifdef __GNUC__
12042# define alloca __builtin_alloca
b4e70030 12043#else
a9322a30
TT
12044# ifdef _MSC_VER
12045# include <malloc.h>
12046# define alloca _alloca
12047# else
81ecdfbb 12048# ifdef HAVE_ALLOCA_H
a9322a30
TT
12049# include <alloca.h>
12050# else
12051# ifdef _AIX
12052 #pragma alloca
12053# else
12054# ifndef alloca /* predefined by HP cc +Olibcalls */
12055char *alloca ();
12056# endif
12057# endif
12058# endif
12059# endif
c906108c 12060#endif
97bf5e38 12061
bec39cab
AC
12062int
12063main ()
12064{
a9322a30 12065char *p = (char *) alloca (1);
81ecdfbb 12066 if (p) return 0;
bec39cab
AC
12067 ;
12068 return 0;
12069}
12070_ACEOF
81ecdfbb 12071if ac_fn_c_try_link "$LINENO"; then :
a9322a30 12072 ac_cv_func_alloca_works=yes
bec39cab 12073else
81ecdfbb 12074 ac_cv_func_alloca_works=no
bec39cab 12075fi
81ecdfbb
RW
12076rm -f core conftest.err conftest.$ac_objext \
12077 conftest$ac_exeext conftest.$ac_ext
bec39cab 12078fi
81ecdfbb
RW
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12080$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
12081
12082if test $ac_cv_func_alloca_works = yes; then
12083
81ecdfbb 12084$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 12085
a9322a30
TT
12086else
12087 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12088# that cause trouble. Some versions do not even contain alloca or
12089# contain a buggy version. If you still want to use their alloca,
12090# use ar to extract alloca.o from them instead of compiling alloca.c.
12091
81ecdfbb 12092ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 12093
81ecdfbb 12094$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 12095
bec39cab 12096
81ecdfbb
RW
12097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12098$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12099if test "${ac_cv_os_cray+set}" = set; then :
12100 $as_echo_n "(cached) " >&6
a9322a30 12101else
81ecdfbb 12102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 12103/* end confdefs.h. */
81ecdfbb 12104#if defined CRAY && ! defined CRAY2
a9322a30
TT
12105webecray
12106#else
12107wenotbecray
12108#endif
12109
12110_ACEOF
12111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12112 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
12113 ac_cv_os_cray=yes
12114else
81ecdfbb 12115 ac_cv_os_cray=no
bec39cab 12116fi
81ecdfbb
RW
12117rm -f conftest*
12118
bec39cab 12119fi
81ecdfbb
RW
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12121$as_echo "$ac_cv_os_cray" >&6; }
12122if test $ac_cv_os_cray = yes; then
12123 for ac_func in _getb67 GETB67 getb67; do
12124 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12125ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12126eval as_val=\$$as_ac_var
12127 if test "x$as_val" = x""yes; then :
a9322a30
TT
12128
12129cat >>confdefs.h <<_ACEOF
12130#define CRAY_STACKSEG_END $ac_func
bec39cab 12131_ACEOF
c906108c 12132
a9322a30 12133 break
c906108c
SS
12134fi
12135
a9322a30
TT
12136 done
12137fi
bec39cab 12138
81ecdfbb
RW
12139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12140$as_echo_n "checking stack direction for C alloca... " >&6; }
12141if test "${ac_cv_c_stack_direction+set}" = set; then :
12142 $as_echo_n "(cached) " >&6
a9322a30 12143else
81ecdfbb 12144 if test "$cross_compiling" = yes; then :
a9322a30 12145 ac_cv_c_stack_direction=0
bec39cab 12146else
81ecdfbb 12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12148/* end confdefs.h. */
81ecdfbb 12149$ac_includes_default
a9322a30
TT
12150int
12151find_stack_direction ()
b4e70030 12152{
a9322a30
TT
12153 static char *addr = 0;
12154 auto char dummy;
12155 if (addr == 0)
12156 {
12157 addr = &dummy;
12158 return find_stack_direction ();
12159 }
12160 else
12161 return (&dummy > addr) ? 1 : -1;
b4e70030 12162}
b757528f 12163
bec39cab
AC
12164int
12165main ()
12166{
81ecdfbb 12167 return find_stack_direction () < 0;
bec39cab
AC
12168}
12169_ACEOF
81ecdfbb 12170if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12171 ac_cv_c_stack_direction=1
12172else
81ecdfbb 12173 ac_cv_c_stack_direction=-1
a9322a30 12174fi
81ecdfbb
RW
12175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12176 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12177fi
a9322a30 12178
81ecdfbb
RW
12179fi
12180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12181$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
12182cat >>confdefs.h <<_ACEOF
12183#define STACK_DIRECTION $ac_cv_c_stack_direction
12184_ACEOF
12185
12186
12187fi
12188
a9322a30 12189for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12190do :
12191 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12192ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12193eval as_val=\$$as_ac_Header
12194 if test "x$as_val" = x""yes; then :
bec39cab 12195 cat >>confdefs.h <<_ACEOF
81ecdfbb 12196#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12197_ACEOF
b757528f 12198
b757528f 12199fi
bec39cab 12200
a9322a30 12201done
a3828db0 12202
a9322a30 12203for ac_func in getpagesize
81ecdfbb
RW
12204do :
12205 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12206if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12207 cat >>confdefs.h <<_ACEOF
81ecdfbb 12208#define HAVE_GETPAGESIZE 1
bec39cab 12209_ACEOF
bcb3dc3d 12210
bcb3dc3d
MK
12211fi
12212done
12213
81ecdfbb
RW
12214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12215$as_echo_n "checking for working mmap... " >&6; }
12216if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12217 $as_echo_n "(cached) " >&6
a9322a30 12218else
81ecdfbb 12219 if test "$cross_compiling" = yes; then :
a9322a30 12220 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12221else
81ecdfbb 12222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12223/* end confdefs.h. */
a9322a30
TT
12224$ac_includes_default
12225/* malloc might have been renamed as rpl_malloc. */
12226#undef malloc
bec39cab 12227
a9322a30
TT
12228/* Thanks to Mike Haertel and Jim Avera for this test.
12229 Here is a matrix of mmap possibilities:
12230 mmap private not fixed
12231 mmap private fixed at somewhere currently unmapped
12232 mmap private fixed at somewhere already mapped
12233 mmap shared not fixed
12234 mmap shared fixed at somewhere currently unmapped
12235 mmap shared fixed at somewhere already mapped
12236 For private mappings, we should verify that changes cannot be read()
12237 back from the file, nor mmap's back from the file at a different
12238 address. (There have been systems where private was not correctly
12239 implemented like the infamous i386 svr4.0, and systems where the
12240 VM page cache was not coherent with the file system buffer cache
12241 like early versions of FreeBSD and possibly contemporary NetBSD.)
12242 For shared mappings, we should conversely verify that changes get
12243 propagated back to all the places they're supposed to be.
bec39cab 12244
a9322a30
TT
12245 Grep wants private fixed already mapped.
12246 The main things grep needs to know about mmap are:
12247 * does it exist and is it safe to write into the mmap'd area
12248 * how to use it (BSD variants) */
8b9cf735 12249
a9322a30
TT
12250#include <fcntl.h>
12251#include <sys/mman.h>
8b9cf735 12252
81ecdfbb 12253#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12254char *malloc ();
a3828db0
MK
12255#endif
12256
a9322a30 12257/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12258#ifndef HAVE_GETPAGESIZE
a9322a30 12259/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12260# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12261# define HAVE_SYS_PARAM_H 1
12262# endif
12263
12264# ifdef _SC_PAGESIZE
12265# define getpagesize() sysconf(_SC_PAGESIZE)
12266# else /* no _SC_PAGESIZE */
81ecdfbb 12267# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12268# include <sys/param.h>
12269# ifdef EXEC_PAGESIZE
12270# define getpagesize() EXEC_PAGESIZE
12271# else /* no EXEC_PAGESIZE */
12272# ifdef NBPG
12273# define getpagesize() NBPG * CLSIZE
12274# ifndef CLSIZE
12275# define CLSIZE 1
12276# endif /* no CLSIZE */
12277# else /* no NBPG */
12278# ifdef NBPC
12279# define getpagesize() NBPC
12280# else /* no NBPC */
12281# ifdef PAGESIZE
12282# define getpagesize() PAGESIZE
12283# endif /* PAGESIZE */
12284# endif /* no NBPC */
12285# endif /* no NBPG */
12286# endif /* no EXEC_PAGESIZE */
12287# else /* no HAVE_SYS_PARAM_H */
12288# define getpagesize() 8192 /* punt totally */
12289# endif /* no HAVE_SYS_PARAM_H */
12290# endif /* no _SC_PAGESIZE */
12291
12292#endif /* no HAVE_GETPAGESIZE */
12293
bec39cab
AC
12294int
12295main ()
12296{
a9322a30
TT
12297 char *data, *data2, *data3;
12298 int i, pagesize;
12299 int fd;
12300
12301 pagesize = getpagesize ();
12302
12303 /* First, make a file with some known garbage in it. */
12304 data = (char *) malloc (pagesize);
12305 if (!data)
81ecdfbb 12306 return 1;
a9322a30
TT
12307 for (i = 0; i < pagesize; ++i)
12308 *(data + i) = rand ();
12309 umask (0);
12310 fd = creat ("conftest.mmap", 0600);
12311 if (fd < 0)
81ecdfbb 12312 return 1;
a9322a30 12313 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12314 return 1;
a9322a30
TT
12315 close (fd);
12316
12317 /* Next, try to mmap the file at a fixed address which already has
12318 something else allocated at it. If we can, also make sure that
12319 we see the same garbage. */
12320 fd = open ("conftest.mmap", O_RDWR);
12321 if (fd < 0)
81ecdfbb 12322 return 1;
a9322a30
TT
12323 data2 = (char *) malloc (2 * pagesize);
12324 if (!data2)
81ecdfbb
RW
12325 return 1;
12326 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12327 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12328 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12329 return 1;
a9322a30
TT
12330 for (i = 0; i < pagesize; ++i)
12331 if (*(data + i) != *(data2 + i))
81ecdfbb 12332 return 1;
a9322a30
TT
12333
12334 /* Finally, make sure that changes to the mapped area do not
12335 percolate back to the file as seen by read(). (This is a bug on
12336 some variants of i386 svr4.0.) */
12337 for (i = 0; i < pagesize; ++i)
12338 *(data2 + i) = *(data2 + i) + 1;
12339 data3 = (char *) malloc (pagesize);
12340 if (!data3)
81ecdfbb 12341 return 1;
a9322a30 12342 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12343 return 1;
a9322a30
TT
12344 for (i = 0; i < pagesize; ++i)
12345 if (*(data + i) != *(data3 + i))
81ecdfbb 12346 return 1;
a9322a30 12347 close (fd);
81ecdfbb 12348 return 0;
bec39cab
AC
12349}
12350_ACEOF
81ecdfbb 12351if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12352 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12353else
81ecdfbb 12354 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12355fi
81ecdfbb
RW
12356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12357 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12358fi
81ecdfbb 12359
a9322a30 12360fi
81ecdfbb
RW
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12362$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12363if test $ac_cv_func_mmap_fixed_mapped = yes; then
12364
81ecdfbb 12365$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12366
086ec9eb 12367fi
a9322a30 12368rm -f conftest.mmap
a3828db0 12369
81ecdfbb
RW
12370ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12371if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12372
a9322a30
TT
12373else
12374
12375cat >>confdefs.h <<_ACEOF
12376#define pid_t int
bec39cab 12377_ACEOF
086ec9eb
MK
12378
12379fi
12380
81ecdfbb
RW
12381for ac_header in vfork.h
12382do :
12383 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12384if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12385 cat >>confdefs.h <<_ACEOF
81ecdfbb 12386#define HAVE_VFORK_H 1
bec39cab 12387_ACEOF
c906108c
SS
12388
12389fi
a9322a30 12390
a3828db0 12391done
c906108c 12392
a9322a30 12393for ac_func in fork vfork
81ecdfbb
RW
12394do :
12395 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12396ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12397eval as_val=\$$as_ac_var
12398 if test "x$as_val" = x""yes; then :
a3828db0 12399 cat >>confdefs.h <<_ACEOF
81ecdfbb 12400#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12401_ACEOF
b83266a0 12402
97bf5e38 12403fi
a3828db0 12404done
b83266a0 12405
a9322a30 12406if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12408$as_echo_n "checking for working fork... " >&6; }
12409if test "${ac_cv_func_fork_works+set}" = set; then :
12410 $as_echo_n "(cached) " >&6
a9322a30 12411else
81ecdfbb 12412 if test "$cross_compiling" = yes; then :
a9322a30
TT
12413 ac_cv_func_fork_works=cross
12414else
81ecdfbb
RW
12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416/* end confdefs.h. */
12417$ac_includes_default
12418int
12419main ()
12420{
12421
12422 /* By Ruediger Kuhlmann. */
12423 return fork () < 0;
12424
12425 ;
12426 return 0;
12427}
a9322a30 12428_ACEOF
81ecdfbb 12429if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12430 ac_cv_func_fork_works=yes
12431else
81ecdfbb 12432 ac_cv_func_fork_works=no
a9322a30 12433fi
81ecdfbb
RW
12434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12435 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12436fi
81ecdfbb 12437
a9322a30 12438fi
81ecdfbb
RW
12439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12440$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12441
12442else
12443 ac_cv_func_fork_works=$ac_cv_func_fork
12444fi
12445if test "x$ac_cv_func_fork_works" = xcross; then
12446 case $host in
12447 *-*-amigaos* | *-*-msdosdjgpp*)
12448 # Override, as these systems have only a dummy fork() stub
12449 ac_cv_func_fork_works=no
12450 ;;
12451 *)
12452 ac_cv_func_fork_works=yes
12453 ;;
12454 esac
81ecdfbb
RW
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12456$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12457fi
12458ac_cv_func_vfork_works=$ac_cv_func_vfork
12459if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12461$as_echo_n "checking for working vfork... " >&6; }
12462if test "${ac_cv_func_vfork_works+set}" = set; then :
12463 $as_echo_n "(cached) " >&6
a9322a30 12464else
81ecdfbb 12465 if test "$cross_compiling" = yes; then :
a9322a30
TT
12466 ac_cv_func_vfork_works=cross
12467else
81ecdfbb 12468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12469/* end confdefs.h. */
12470/* Thanks to Paul Eggert for this test. */
81ecdfbb 12471$ac_includes_default
a9322a30 12472#include <sys/wait.h>
81ecdfbb 12473#ifdef HAVE_VFORK_H
a9322a30
TT
12474# include <vfork.h>
12475#endif
12476/* On some sparc systems, changes by the child to local and incoming
12477 argument registers are propagated back to the parent. The compiler
12478 is told about this with #include <vfork.h>, but some compilers
12479 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12480 static variable whose address is put into a register that is
12481 clobbered by the vfork. */
12482static void
12483#ifdef __cplusplus
12484sparc_address_test (int arg)
12485# else
12486sparc_address_test (arg) int arg;
12487#endif
12488{
12489 static pid_t child;
12490 if (!child) {
12491 child = vfork ();
12492 if (child < 0) {
12493 perror ("vfork");
12494 _exit(2);
12495 }
12496 if (!child) {
12497 arg = getpid();
12498 write(-1, "", 0);
12499 _exit (arg);
12500 }
12501 }
12502}
12503
12504int
12505main ()
12506{
12507 pid_t parent = getpid ();
12508 pid_t child;
12509
12510 sparc_address_test (0);
12511
12512 child = vfork ();
12513
12514 if (child == 0) {
12515 /* Here is another test for sparc vfork register problems. This
12516 test uses lots of local variables, at least as many local
12517 variables as main has allocated so far including compiler
12518 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12519 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12520 reuse the register of parent for one of the local variables,
12521 since it will think that parent can't possibly be used any more
12522 in this routine. Assigning to the local variable will thus
12523 munge parent in the parent process. */
12524 pid_t
12525 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12526 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12527 /* Convince the compiler that p..p7 are live; otherwise, it might
12528 use the same hardware register for all 8 local variables. */
12529 if (p != p1 || p != p2 || p != p3 || p != p4
12530 || p != p5 || p != p6 || p != p7)
12531 _exit(1);
12532
12533 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12534 from child file descriptors. If the child closes a descriptor
12535 before it execs or exits, this munges the parent's descriptor
12536 as well. Test for this by closing stdout in the child. */
12537 _exit(close(fileno(stdout)) != 0);
12538 } else {
12539 int status;
12540 struct stat st;
12541
12542 while (wait(&status) != child)
12543 ;
81ecdfbb 12544 return (
a9322a30
TT
12545 /* Was there some problem with vforking? */
12546 child < 0
12547
12548 /* Did the child fail? (This shouldn't happen.) */
12549 || status
12550
12551 /* Did the vfork/compiler bug occur? */
12552 || parent != getpid()
12553
12554 /* Did the file descriptor bug occur? */
12555 || fstat(fileno(stdout), &st) != 0
12556 );
12557 }
12558}
12559_ACEOF
81ecdfbb 12560if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12561 ac_cv_func_vfork_works=yes
12562else
81ecdfbb 12563 ac_cv_func_vfork_works=no
a9322a30 12564fi
81ecdfbb
RW
12565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12566 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12567fi
81ecdfbb 12568
a9322a30 12569fi
81ecdfbb
RW
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12571$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12572
12573fi;
12574if test "x$ac_cv_func_fork_works" = xcross; then
12575 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12577$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12578fi
12579
12580if test "x$ac_cv_func_vfork_works" = xyes; then
12581
81ecdfbb 12582$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12583
12584else
12585
81ecdfbb 12586$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12587
12588fi
12589if test "x$ac_cv_func_fork_works" = xyes; then
12590
81ecdfbb 12591$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12592
12593fi
12594
a9322a30 12595for ac_func in canonicalize_file_name realpath getrusage getuid \
db5e03ae 12596 getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
a9322a30 12597 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 12598 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
0a4f61e3 12599 setrlimit getrlimit posix_madvise waitpid
81ecdfbb
RW
12600do :
12601 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12602ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12603eval as_val=\$$as_ac_var
12604 if test "x$as_val" = x""yes; then :
6c7a06a3 12605 cat >>confdefs.h <<_ACEOF
81ecdfbb 12606#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12607_ACEOF
12608
12609fi
12610done
12611
12612
81ecdfbb
RW
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12614$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12615if test "${am_cv_langinfo_codeset+set}" = set; then :
12616 $as_echo_n "(cached) " >&6
6c7a06a3 12617else
81ecdfbb 12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12619/* end confdefs.h. */
12620#include <langinfo.h>
12621int
12622main ()
12623{
12624char* cs = nl_langinfo(CODESET);
bec39cab
AC
12625 ;
12626 return 0;
12627}
12628_ACEOF
81ecdfbb 12629if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12630 am_cv_langinfo_codeset=yes
a4db0f07 12631else
81ecdfbb 12632 am_cv_langinfo_codeset=no
a4db0f07 12633fi
81ecdfbb
RW
12634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12636
a4db0f07 12637fi
81ecdfbb
RW
12638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12639$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12640 if test $am_cv_langinfo_codeset = yes; then
12641
81ecdfbb 12642$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12643
6c7a06a3 12644 fi
c906108c 12645
06825bd1 12646
a3828db0
MK
12647# Check the return and argument types of ptrace. No canned test for
12648# this, so roll our own.
12649gdb_ptrace_headers='
12650#if HAVE_SYS_TYPES_H
12651# include <sys/types.h>
12652#endif
12653#if HAVE_SYS_PTRACE_H
12654# include <sys/ptrace.h>
12655#endif
12656#if HAVE_UNISTD_H
12657# include <unistd.h>
12658#endif
12659'
12660# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
12661ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12662"
12663if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12664 ac_have_decl=1
06825bd1 12665else
81ecdfbb 12666 ac_have_decl=0
06825bd1 12667fi
06825bd1 12668
a3828db0 12669cat >>confdefs.h <<_ACEOF
81ecdfbb 12670#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12671_ACEOF
81ecdfbb 12672if test $ac_have_decl = 1; then :
bec39cab 12673
a3828db0 12674else
a3828db0
MK
12675
12676 : ${gdb_cv_func_ptrace_ret='int'}
12677 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12678
06825bd1
MK
12679fi
12680
064ef605
DJ
12681# Check return type. Varargs (used on GNU/Linux) conflict with the
12682# empty argument list, so check for that explicitly.
81ecdfbb
RW
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12684$as_echo_n "checking return type of ptrace... " >&6; }
12685if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12686 $as_echo_n "(cached) " >&6
bec39cab 12687else
81ecdfbb 12688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12689/* end confdefs.h. */
a3828db0 12690$gdb_ptrace_headers
bec39cab
AC
12691int
12692main ()
12693{
064ef605
DJ
12694extern long ptrace (enum __ptrace_request, ...);
12695 ;
12696 return 0;
12697}
12698_ACEOF
81ecdfbb 12699if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12700 gdb_cv_func_ptrace_ret='long'
12701else
81ecdfbb 12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12703/* end confdefs.h. */
12704$gdb_ptrace_headers
12705int
12706main ()
12707{
a3828db0 12708extern int ptrace ();
bec39cab
AC
12709 ;
12710 return 0;
12711}
12712_ACEOF
81ecdfbb 12713if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12714 gdb_cv_func_ptrace_ret='int'
70f9f479 12715else
81ecdfbb 12716 gdb_cv_func_ptrace_ret='long'
70f9f479 12717fi
81ecdfbb 12718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12719fi
81ecdfbb 12720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12721fi
81ecdfbb
RW
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12723$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12724
a3828db0
MK
12725cat >>confdefs.h <<_ACEOF
12726#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12727_ACEOF
70f9f479 12728
a3828db0 12729# Check argument types.
81ecdfbb
RW
12730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12731$as_echo_n "checking types of arguments for ptrace... " >&6; }
12732if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12733 $as_echo_n "(cached) " >&6
bec39cab 12734else
a3828db0 12735
81ecdfbb 12736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12737/* end confdefs.h. */
12738$gdb_ptrace_headers
12739int
12740main ()
12741{
12742extern long ptrace (enum __ptrace_request, ...);
12743 ;
12744 return 0;
12745}
12746_ACEOF
81ecdfbb 12747if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12748 gdb_cv_func_ptrace_args='int,int,long,long'
12749else
064ef605 12750
a3828db0
MK
12751for gdb_arg1 in 'int' 'long'; do
12752 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12753 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 12754 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12756/* end confdefs.h. */
a3828db0 12757$gdb_ptrace_headers
bec39cab
AC
12758int
12759main ()
12760{
a3828db0
MK
12761
12762extern $gdb_cv_func_ptrace_ret
12763 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12764
bec39cab
AC
12765 ;
12766 return 0;
12767}
12768_ACEOF
81ecdfbb 12769if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12770 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12771 break 4;
5c7f2947 12772fi
81ecdfbb 12773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12774 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12776/* end confdefs.h. */
a3828db0 12777$gdb_ptrace_headers
bec39cab
AC
12778int
12779main ()
12780{
a3828db0
MK
12781
12782extern $gdb_cv_func_ptrace_ret
12783 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12784
bec39cab
AC
12785 ;
12786 return 0;
12787}
12788_ACEOF
81ecdfbb 12789if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12790
12791gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12792 break 5;
78434e59 12793fi
81ecdfbb 12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12795 done
12796 done
12797 done
12798 done
12799done
12800# Provide a safe default value.
12801: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12802
064ef605 12803fi
81ecdfbb 12804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12805fi
81ecdfbb
RW
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12807$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12808ac_save_IFS=$IFS; IFS=','
12809set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12810IFS=$ac_save_IFS
12811shift
bec39cab 12812
a3828db0
MK
12813cat >>confdefs.h <<_ACEOF
12814#define PTRACE_TYPE_ARG3 $3
12815_ACEOF
12816
12817if test -n "$5"; then
12818
12819cat >>confdefs.h <<_ACEOF
12820#define PTRACE_TYPE_ARG5 $5
bec39cab 12821_ACEOF
78434e59
MK
12822
12823fi
12824
a3828db0 12825if test "$cross_compiling" = no; then
81ecdfbb
RW
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12827$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12828if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12829 $as_echo_n "(cached) " >&6
a3828db0 12830else
81ecdfbb
RW
12831 if test "$cross_compiling" = yes; then :
12832 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12833else
81ecdfbb 12834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12835/* end confdefs.h. */
81ecdfbb 12836$ac_includes_default
bec39cab
AC
12837int
12838main ()
12839{
a3828db0
MK
12840/* If this system has a BSD-style setpgrp which takes arguments,
12841 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12842 exit successfully. */
81ecdfbb 12843 return setpgrp (1,1) != -1;
bec39cab
AC
12844 ;
12845 return 0;
12846}
12847_ACEOF
81ecdfbb 12848if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12849 ac_cv_func_setpgrp_void=no
c906108c 12850else
81ecdfbb 12851 ac_cv_func_setpgrp_void=yes
c906108c 12852fi
81ecdfbb
RW
12853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12854 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12855fi
81ecdfbb 12856
a3828db0 12857fi
81ecdfbb
RW
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12859$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12860if test $ac_cv_func_setpgrp_void = yes; then
12861
81ecdfbb 12862$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12863
12864fi
a3828db0
MK
12865
12866else
81ecdfbb
RW
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12868$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12869if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12870 $as_echo_n "(cached) " >&6
97bf5e38 12871else
81ecdfbb 12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12873/* end confdefs.h. */
a3828db0
MK
12874
12875#include <unistd.h>
12876
bec39cab
AC
12877int
12878main ()
12879{
a3828db0
MK
12880
12881 if (setpgrp(1,1) == -1)
12882 exit (0);
12883 else
12884 exit (1);
12885
bec39cab
AC
12886 ;
12887 return 0;
12888}
12889_ACEOF
81ecdfbb 12890if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12891 ac_cv_func_setpgrp_void=no
c906108c 12892else
81ecdfbb 12893 ac_cv_func_setpgrp_void=yes
c906108c 12894fi
81ecdfbb 12895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12896fi
81ecdfbb
RW
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12898$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12899if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12900 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12901
a3828db0 12902fi
c906108c
SS
12903fi
12904
a3828db0
MK
12905# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
12906# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12908$as_echo_n "checking for sigsetjmp... " >&6; }
12909if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12910 $as_echo_n "(cached) " >&6
bec39cab 12911else
81ecdfbb 12912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12913/* end confdefs.h. */
a3828db0
MK
12914
12915#include <setjmp.h>
12916
bec39cab
AC
12917int
12918main ()
12919{
a3828db0 12920sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
12921 ;
12922 return 0;
12923}
12924_ACEOF
81ecdfbb 12925if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12926 gdb_cv_func_sigsetjmp=yes
c906108c 12927else
81ecdfbb 12928 gdb_cv_func_sigsetjmp=no
c906108c 12929fi
81ecdfbb 12930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12931fi
81ecdfbb
RW
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12933$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 12934if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 12935
81ecdfbb 12936$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 12937
97bf5e38 12938fi
c906108c 12939
a3828db0
MK
12940# Assume we'll default to using the included libiberty regex.
12941gdb_use_included_regex=yes
12942
12943# However, if the system regex is GNU regex, then default to *not*
12944# using the included regex.
81ecdfbb
RW
12945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12946$as_echo_n "checking for GNU regex... " >&6; }
12947if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12948 $as_echo_n "(cached) " >&6
bec39cab 12949else
81ecdfbb 12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12951/* end confdefs.h. */
a3828db0 12952#include <gnu-versions.h>
bec39cab
AC
12953int
12954main ()
12955{
81ecdfbb
RW
12956#define REGEX_INTERFACE_VERSION 1
12957#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12958# error "Version mismatch"
12959#endif
5c45e068
MK
12960 ;
12961 return 0;
12962}
12963_ACEOF
81ecdfbb
RW
12964if ac_fn_c_try_compile "$LINENO"; then :
12965 gdb_cv_have_gnu_regex=yes
5c45e068 12966else
81ecdfbb
RW
12967 gdb_cv_have_gnu_regex=no
12968fi
12969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12970fi
12971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12972$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12973if test $gdb_cv_have_gnu_regex = yes; then
12974 gdb_use_included_regex=no
5c45e068 12975fi
81ecdfbb
RW
12976
12977
12978# Check whether --with-included-regex was given.
12979if test "${with_included_regex+set}" = set; then :
12980 withval=$with_included_regex; gdb_with_regex=$withval
12981else
12982 gdb_with_regex=$gdb_use_included_regex
c906108c 12983fi
81ecdfbb
RW
12984
12985if test "$gdb_with_regex" = yes; then
12986
12987$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12988
c906108c 12989fi
81ecdfbb
RW
12990
12991# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12992ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12993#include <sys/proc.h>
12994
12995"
12996if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12997
5c45e068 12998cat >>confdefs.h <<_ACEOF
a3828db0 12999#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13000_ACEOF
c906108c 13001
5c45e068 13002
97bf5e38 13003fi
c906108c 13004
5c45e068 13005
a3828db0 13006# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13008$as_echo_n "checking for struct lwp... " >&6; }
13009if test "${gdb_cv_struct_lwp+set}" = set; then :
13010 $as_echo_n "(cached) " >&6
bec39cab 13011else
81ecdfbb 13012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13013/* end confdefs.h. */
a3828db0
MK
13014#include <sys/param.h>
13015#include <sys/lwp.h>
bec39cab
AC
13016int
13017main ()
13018{
a3828db0 13019struct lwp l;
bec39cab
AC
13020 ;
13021 return 0;
13022}
13023_ACEOF
81ecdfbb 13024if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13025 gdb_cv_struct_lwp=yes
c906108c 13026else
81ecdfbb 13027 gdb_cv_struct_lwp=no
c906108c 13028fi
81ecdfbb 13029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13030fi
81ecdfbb
RW
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13032$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13033if test $gdb_cv_struct_lwp = yes; then
c906108c 13034
81ecdfbb 13035$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13036
97bf5e38 13037fi
c906108c 13038
a3828db0 13039# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13041$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13042if test "${gdb_cv_struct_reg+set}" = set; then :
13043 $as_echo_n "(cached) " >&6
bec39cab 13044else
81ecdfbb 13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13046/* end confdefs.h. */
a3828db0
MK
13047#include <sys/types.h>
13048#include <machine/reg.h>
bec39cab
AC
13049int
13050main ()
13051{
a3828db0 13052struct reg r;
bec39cab
AC
13053 ;
13054 return 0;
13055}
13056_ACEOF
81ecdfbb 13057if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13058 gdb_cv_struct_reg=yes
27ca5dad 13059else
81ecdfbb 13060 gdb_cv_struct_reg=no
27ca5dad 13061fi
81ecdfbb 13062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13063fi
81ecdfbb
RW
13064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13065$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13066if test $gdb_cv_struct_reg = yes; then
bec39cab 13067
81ecdfbb 13068$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13069
13070fi
97bf5e38 13071
a3828db0
MK
13072# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13073# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
13074ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
13075"
13076if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13077
13078cat >>confdefs.h <<_ACEOF
a3828db0 13079#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13080_ACEOF
3862412b 13081
5c45e068 13082
97bf5e38 13083fi
81ecdfbb
RW
13084ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
13085"
13086if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13087
13088cat >>confdefs.h <<_ACEOF
a3828db0 13089#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13090_ACEOF
3862412b 13091
5c45e068 13092
97bf5e38 13093fi
3862412b 13094
5c45e068 13095
a3828db0 13096# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13098$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13099if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13100 $as_echo_n "(cached) " >&6
451928c5 13101else
81ecdfbb 13102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13103/* end confdefs.h. */
a3828db0 13104#include <sys/ptrace.h>
bec39cab
AC
13105int
13106main ()
13107{
a3828db0 13108PTRACE_GETREGS;
bec39cab
AC
13109 ;
13110 return 0;
13111}
13112_ACEOF
81ecdfbb 13113if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13114 gdb_cv_have_ptrace_getregs=yes
451928c5 13115else
81ecdfbb 13116 gdb_cv_have_ptrace_getregs=no
451928c5 13117fi
81ecdfbb 13118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13119fi
13120
81ecdfbb
RW
13121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13122$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13123if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13124
81ecdfbb 13125$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13126
97bf5e38 13127fi
451928c5 13128
a3828db0 13129# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13131$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13132if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13133 $as_echo_n "(cached) " >&6
451928c5 13134else
81ecdfbb 13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13136/* end confdefs.h. */
a3828db0 13137#include <sys/ptrace.h>
bec39cab
AC
13138int
13139main ()
13140{
a3828db0 13141PTRACE_GETFPXREGS;
bec39cab
AC
13142 ;
13143 return 0;
13144}
13145_ACEOF
81ecdfbb 13146if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13147 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13148else
81ecdfbb 13149 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13150fi
81ecdfbb 13151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13152fi
13153
81ecdfbb
RW
13154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13155$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13156if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13157
81ecdfbb 13158$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13159
97bf5e38 13160fi
451928c5 13161
a3828db0 13162# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13164$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13165if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13166 $as_echo_n "(cached) " >&6
3862412b 13167else
81ecdfbb 13168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13169/* end confdefs.h. */
a3828db0
MK
13170#include <sys/types.h>
13171#include <sys/ptrace.h>
bec39cab
AC
13172int
13173main ()
13174{
a3828db0 13175PT_GETDBREGS;
bec39cab
AC
13176 ;
13177 return 0;
13178}
13179_ACEOF
81ecdfbb 13180if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13181 gdb_cv_have_pt_getdbregs=yes
3862412b 13182else
81ecdfbb 13183 gdb_cv_have_pt_getdbregs=no
3862412b 13184fi
81ecdfbb 13185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13186fi
13187
81ecdfbb
RW
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13189$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13190if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13191
81ecdfbb 13192$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13193
97bf5e38 13194fi
3862412b 13195
a3828db0 13196# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13198$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13199if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13200 $as_echo_n "(cached) " >&6
3862412b 13201else
81ecdfbb 13202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13203/* end confdefs.h. */
a3828db0
MK
13204#include <sys/types.h>
13205#include <sys/ptrace.h>
bec39cab
AC
13206int
13207main ()
13208{
a3828db0 13209PT_GETXMMREGS;
bec39cab
AC
13210 ;
13211 return 0;
13212}
13213_ACEOF
81ecdfbb 13214if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13215 gdb_cv_have_pt_getxmmregs=yes
3862412b 13216else
81ecdfbb 13217 gdb_cv_have_pt_getxmmregs=no
3862412b 13218fi
81ecdfbb 13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13220fi
13221
81ecdfbb
RW
13222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13223$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13224if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13225
81ecdfbb 13226$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13227
97bf5e38 13228fi
3862412b 13229
eb368090 13230# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
13231
13232if test "${target}" = "${host}"; then
13233 case "${host}" in
97bf5e38 13234 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 13235
81ecdfbb 13236$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13237
13238 ;;
c162e8c9 13239 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13240
81ecdfbb 13241$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13242
13243 ;;
13244 mips-sgi-irix5*)
13245 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13246
81ecdfbb 13247$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13248
13249 ;;
13250 esac
13251fi
13252
13253if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
13255$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
13256 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
13257 $as_echo_n "(cached) " >&6
bec39cab 13258else
81ecdfbb 13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13260/* end confdefs.h. */
596c9d4b
KB
13261
13262#define _SYSCALL32
d30c5336
JK
13263/* Needed for new procfs interface on sparc-solaris. */
13264#define _STRUCTURED_PROC 1
596c9d4b 13265#include <sys/procfs.h>
bec39cab
AC
13266int
13267main ()
13268{
97bf5e38 13269pstatus_t avar
bec39cab
AC
13270 ;
13271 return 0;
13272}
13273_ACEOF
81ecdfbb 13274if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13275 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 13276else
81ecdfbb 13277 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 13278
596c9d4b 13279fi
81ecdfbb 13280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13281fi
13282
97bf5e38 13283 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 13284
81ecdfbb 13285$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
13286
13287 fi
81ecdfbb
RW
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
13289$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 13290
81ecdfbb
RW
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
13292$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
13293 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
13294 $as_echo_n "(cached) " >&6
596c9d4b 13295else
81ecdfbb 13296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13297/* end confdefs.h. */
596c9d4b
KB
13298
13299#define _SYSCALL32
d30c5336
JK
13300/* Needed for new procfs interface on sparc-solaris. */
13301#define _STRUCTURED_PROC 1
596c9d4b 13302#include <sys/procfs.h>
bec39cab
AC
13303int
13304main ()
13305{
97bf5e38 13306prrun_t avar
bec39cab
AC
13307 ;
13308 return 0;
13309}
13310_ACEOF
81ecdfbb 13311if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13312 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 13313else
81ecdfbb 13314 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 13315
596c9d4b 13316fi
81ecdfbb 13317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13318fi
13319
97bf5e38 13320 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 13321
81ecdfbb 13322$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
13323
13324 fi
81ecdfbb
RW
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
13326$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 13327
81ecdfbb
RW
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13329$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13330 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13331 $as_echo_n "(cached) " >&6
596c9d4b 13332else
81ecdfbb 13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13334/* end confdefs.h. */
596c9d4b
KB
13335
13336#define _SYSCALL32
d30c5336
JK
13337/* Needed for new procfs interface on sparc-solaris. */
13338#define _STRUCTURED_PROC 1
596c9d4b 13339#include <sys/procfs.h>
bec39cab
AC
13340int
13341main ()
13342{
97bf5e38 13343gregset_t avar
bec39cab
AC
13344 ;
13345 return 0;
13346}
13347_ACEOF
81ecdfbb 13348if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13349 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13350else
81ecdfbb 13351 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13352
596c9d4b 13353fi
81ecdfbb 13354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13355fi
13356
97bf5e38 13357 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13358
81ecdfbb 13359$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13360
13361 fi
81ecdfbb
RW
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13363$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13364
81ecdfbb
RW
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13366$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13367 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13368 $as_echo_n "(cached) " >&6
d84dd0c5 13369else
81ecdfbb 13370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13371/* end confdefs.h. */
97bf5e38
MK
13372
13373#define _SYSCALL32
d30c5336
JK
13374/* Needed for new procfs interface on sparc-solaris. */
13375#define _STRUCTURED_PROC 1
d84dd0c5 13376#include <sys/procfs.h>
bec39cab
AC
13377int
13378main ()
13379{
97bf5e38 13380fpregset_t avar
bec39cab
AC
13381 ;
13382 return 0;
13383}
13384_ACEOF
81ecdfbb 13385if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13386 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13387else
81ecdfbb 13388 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13389
d84dd0c5 13390fi
81ecdfbb 13391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13392fi
13393
97bf5e38 13394 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13395
81ecdfbb 13396$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13397
97bf5e38 13398 fi
81ecdfbb
RW
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13400$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13401
81ecdfbb
RW
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13403$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13404 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13405 $as_echo_n "(cached) " >&6
c906108c 13406else
81ecdfbb 13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13408/* end confdefs.h. */
c906108c 13409
97bf5e38 13410#define _SYSCALL32
d30c5336
JK
13411/* Needed for new procfs interface on sparc-solaris. */
13412#define _STRUCTURED_PROC 1
97bf5e38 13413#include <sys/procfs.h>
bec39cab
AC
13414int
13415main ()
13416{
97bf5e38 13417prgregset_t avar
bec39cab
AC
13418 ;
13419 return 0;
13420}
13421_ACEOF
81ecdfbb 13422if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13423 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13424else
81ecdfbb 13425 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13426
c906108c 13427fi
81ecdfbb 13428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13429fi
13430
97bf5e38 13431 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13432
81ecdfbb 13433$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13434
97bf5e38 13435 fi
81ecdfbb
RW
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13437$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13438
81ecdfbb
RW
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13440$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13441 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13442 $as_echo_n "(cached) " >&6
d45fe813 13443else
81ecdfbb 13444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13445/* end confdefs.h. */
97bf5e38
MK
13446
13447#define _SYSCALL32
d30c5336
JK
13448/* Needed for new procfs interface on sparc-solaris. */
13449#define _STRUCTURED_PROC 1
97bf5e38 13450#include <sys/procfs.h>
bec39cab
AC
13451int
13452main ()
13453{
97bf5e38 13454prfpregset_t avar
bec39cab
AC
13455 ;
13456 return 0;
13457}
13458_ACEOF
81ecdfbb 13459if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13460 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13461else
81ecdfbb 13462 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13463
d45fe813 13464fi
81ecdfbb 13465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13466fi
13467
97bf5e38 13468 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13469
81ecdfbb 13470$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13471
97bf5e38 13472 fi
81ecdfbb
RW
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13474$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13475
81ecdfbb
RW
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13477$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13478 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13479 $as_echo_n "(cached) " >&6
d45fe813 13480else
81ecdfbb 13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13482/* end confdefs.h. */
97bf5e38
MK
13483
13484#define _SYSCALL32
d30c5336
JK
13485/* Needed for new procfs interface on sparc-solaris. */
13486#define _STRUCTURED_PROC 1
97bf5e38 13487#include <sys/procfs.h>
bec39cab
AC
13488int
13489main ()
13490{
97bf5e38 13491prgregset32_t avar
bec39cab
AC
13492 ;
13493 return 0;
13494}
13495_ACEOF
81ecdfbb 13496if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13497 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13498else
81ecdfbb 13499 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13500
d45fe813 13501fi
81ecdfbb 13502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13503fi
13504
97bf5e38 13505 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13506
81ecdfbb 13507$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13508
97bf5e38 13509 fi
81ecdfbb
RW
13510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13511$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13512
81ecdfbb
RW
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
13514$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
13515 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
13516 $as_echo_n "(cached) " >&6
d45fe813 13517else
81ecdfbb 13518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13519/* end confdefs.h. */
97bf5e38
MK
13520
13521#define _SYSCALL32
d30c5336
JK
13522/* Needed for new procfs interface on sparc-solaris. */
13523#define _STRUCTURED_PROC 1
97bf5e38 13524#include <sys/procfs.h>
bec39cab
AC
13525int
13526main ()
13527{
97bf5e38 13528prfpregset32_t avar
bec39cab
AC
13529 ;
13530 return 0;
13531}
13532_ACEOF
81ecdfbb 13533if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13534 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 13535else
81ecdfbb 13536 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 13537
d45fe813 13538fi
81ecdfbb 13539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13540fi
13541
97bf5e38 13542 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 13543
81ecdfbb 13544$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 13545
97bf5e38 13546 fi
81ecdfbb
RW
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
13548$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 13549
81ecdfbb
RW
13550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13551$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13552 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13553 $as_echo_n "(cached) " >&6
d45fe813 13554else
81ecdfbb 13555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13556/* end confdefs.h. */
97bf5e38 13557
d45fe813 13558#define _SYSCALL32
d30c5336
JK
13559/* Needed for new procfs interface on sparc-solaris. */
13560#define _STRUCTURED_PROC 1
97bf5e38 13561#include <sys/procfs.h>
bec39cab
AC
13562int
13563main ()
13564{
97bf5e38 13565lwpid_t avar
bec39cab
AC
13566 ;
13567 return 0;
13568}
13569_ACEOF
81ecdfbb 13570if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13571 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13572else
81ecdfbb 13573 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13574
d45fe813 13575fi
81ecdfbb 13576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13577fi
13578
97bf5e38 13579 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13580
81ecdfbb 13581$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13582
97bf5e38 13583 fi
81ecdfbb
RW
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13585$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13586
81ecdfbb
RW
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13588$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13589 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13590 $as_echo_n "(cached) " >&6
c906108c 13591else
81ecdfbb 13592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13593/* end confdefs.h. */
c906108c 13594
97bf5e38 13595#define _SYSCALL32
d30c5336
JK
13596/* Needed for new procfs interface on sparc-solaris. */
13597#define _STRUCTURED_PROC 1
97bf5e38 13598#include <sys/procfs.h>
bec39cab
AC
13599int
13600main ()
13601{
97bf5e38 13602psaddr_t avar
bec39cab
AC
13603 ;
13604 return 0;
13605}
13606_ACEOF
81ecdfbb 13607if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13608 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13609else
81ecdfbb 13610 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13611
c906108c 13612fi
81ecdfbb 13613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13614fi
13615
97bf5e38 13616 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13617
81ecdfbb 13618$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13619
97bf5e38 13620 fi
81ecdfbb
RW
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13622$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13623
81ecdfbb
RW
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13625$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13626 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13627 $as_echo_n "(cached) " >&6
c906108c 13628else
81ecdfbb 13629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13630/* end confdefs.h. */
c906108c 13631
97bf5e38 13632#define _SYSCALL32
d30c5336
JK
13633/* Needed for new procfs interface on sparc-solaris. */
13634#define _STRUCTURED_PROC 1
97bf5e38 13635#include <sys/procfs.h>
bec39cab
AC
13636int
13637main ()
13638{
97bf5e38 13639prsysent_t avar
bec39cab
AC
13640 ;
13641 return 0;
13642}
13643_ACEOF
81ecdfbb 13644if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13645 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13646else
81ecdfbb 13647 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13648
c906108c 13649fi
81ecdfbb 13650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13651fi
13652
97bf5e38 13653 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13654
81ecdfbb 13655$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13656
97bf5e38 13657 fi
81ecdfbb
RW
13658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13659$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13660
81ecdfbb
RW
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13662$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13663 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13664 $as_echo_n "(cached) " >&6
c906108c 13665else
81ecdfbb 13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13667/* end confdefs.h. */
c906108c 13668
97bf5e38 13669#define _SYSCALL32
d30c5336
JK
13670/* Needed for new procfs interface on sparc-solaris. */
13671#define _STRUCTURED_PROC 1
97bf5e38 13672#include <sys/procfs.h>
bec39cab
AC
13673int
13674main ()
13675{
97bf5e38 13676pr_sigset_t avar
bec39cab
AC
13677 ;
13678 return 0;
13679}
13680_ACEOF
81ecdfbb 13681if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13682 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13683else
81ecdfbb 13684 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13685
c906108c 13686fi
81ecdfbb 13687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13688fi
13689
97bf5e38 13690 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13691
81ecdfbb 13692$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13693
97bf5e38 13694 fi
81ecdfbb
RW
13695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13696$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13697
81ecdfbb
RW
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13699$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13700 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13701 $as_echo_n "(cached) " >&6
c906108c 13702else
81ecdfbb 13703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13704/* end confdefs.h. */
c906108c 13705
97bf5e38 13706#define _SYSCALL32
d30c5336
JK
13707/* Needed for new procfs interface on sparc-solaris. */
13708#define _STRUCTURED_PROC 1
97bf5e38 13709#include <sys/procfs.h>
bec39cab
AC
13710int
13711main ()
13712{
97bf5e38 13713pr_sigaction64_t avar
bec39cab
AC
13714 ;
13715 return 0;
13716}
13717_ACEOF
81ecdfbb 13718if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13719 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13720else
81ecdfbb 13721 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13722
c906108c 13723fi
81ecdfbb 13724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13725fi
13726
97bf5e38 13727 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13728
81ecdfbb 13729$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13730
97bf5e38 13731 fi
81ecdfbb
RW
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13733$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13734
81ecdfbb
RW
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13736$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13737 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13738 $as_echo_n "(cached) " >&6
97bf5e38 13739else
81ecdfbb 13740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13741/* end confdefs.h. */
97bf5e38
MK
13742
13743#define _SYSCALL32
d30c5336
JK
13744/* Needed for new procfs interface on sparc-solaris. */
13745#define _STRUCTURED_PROC 1
97bf5e38 13746#include <sys/procfs.h>
bec39cab
AC
13747int
13748main ()
13749{
97bf5e38 13750pr_siginfo64_t avar
bec39cab
AC
13751 ;
13752 return 0;
13753}
13754_ACEOF
81ecdfbb 13755if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13756 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13757else
81ecdfbb 13758 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13759
97bf5e38 13760fi
81ecdfbb 13761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13762fi
c906108c 13763
97bf5e38 13764 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13765
81ecdfbb 13766$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13767
97bf5e38 13768 fi
81ecdfbb
RW
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13770$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13771
13772
97bf5e38
MK
13773
13774
13775
97bf5e38 13776 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13778$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13779 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13780 $as_echo_n "(cached) " >&6
c906108c 13781else
81ecdfbb 13782 if test "$cross_compiling" = yes; then :
97bf5e38 13783 gdb_cv_prfpregset_t_broken=yes
c906108c 13784else
81ecdfbb 13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13786/* end confdefs.h. */
97bf5e38
MK
13787#include <sys/procfs.h>
13788 int main ()
13789 {
13790 if (sizeof (prfpregset_t) == sizeof (void *))
13791 return 1;
13792 return 0;
13793 }
bec39cab 13794_ACEOF
81ecdfbb 13795if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13796 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13797else
13798 gdb_cv_prfpregset_t_broken=yes
c906108c 13799fi
81ecdfbb
RW
13800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13801 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13802fi
81ecdfbb 13803
c906108c
SS
13804fi
13805
81ecdfbb
RW
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13807$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13808 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13809
81ecdfbb 13810$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13811
97bf5e38
MK
13812 fi
13813 fi
c906108c 13814
bec39cab 13815
81ecdfbb
RW
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
13817$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
13818 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
13819 $as_echo_n "(cached) " >&6
c906108c 13820else
81ecdfbb 13821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13822/* end confdefs.h. */
97bf5e38
MK
13823#include <unistd.h>
13824#include <sys/types.h>
13825#include <sys/procfs.h>
13826
bec39cab
AC
13827int
13828main ()
13829{
97bf5e38
MK
13830
13831 int dummy;;
13832 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
13833
13834 ;
13835 return 0;
13836}
13837_ACEOF
81ecdfbb 13838if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13839 gdb_cv_have_procfs_piocset=yes
c906108c 13840else
81ecdfbb 13841 gdb_cv_have_procfs_piocset=no
c906108c 13842fi
81ecdfbb 13843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13844fi
97bf5e38 13845
81ecdfbb
RW
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
13847$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 13848 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 13849
81ecdfbb 13850$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
13851
13852 fi
c906108c 13853fi
c906108c 13854
97bf5e38 13855if test ${host} = ${target} ; then
bec39cab 13856
81ecdfbb
RW
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
13858$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
13859 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
13860 $as_echo_n "(cached) " >&6
bec39cab 13861else
81ecdfbb 13862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13863/* end confdefs.h. */
97bf5e38 13864#include <link.h>
bec39cab
AC
13865int
13866main ()
13867{
97bf5e38 13868struct link_map lm; (void) lm.l_addr;
bec39cab
AC
13869 ;
13870 return 0;
13871}
13872_ACEOF
81ecdfbb 13873if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13874 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 13875else
81ecdfbb 13876 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 13877fi
81ecdfbb 13878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13879fi
13880
81ecdfbb
RW
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
13882$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 13883 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 13884
81ecdfbb 13885$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13886
13887 fi
13888
bec39cab 13889
81ecdfbb
RW
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
13891$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
13892 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
13893 $as_echo_n "(cached) " >&6
c906108c 13894else
81ecdfbb 13895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13896/* end confdefs.h. */
97bf5e38
MK
13897#include <sys/types.h>
13898#include <link.h>
bec39cab
AC
13899int
13900main ()
13901{
97bf5e38 13902struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
13903 ;
13904 return 0;
13905}
13906_ACEOF
81ecdfbb 13907if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13908 gdb_cv_have_struct_link_map_with_lm_members=yes
13909else
81ecdfbb 13910 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 13911fi
81ecdfbb 13912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13913fi
c906108c 13914
81ecdfbb
RW
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
13916$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 13917 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 13918
81ecdfbb 13919$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
13920
13921 fi
13922
bec39cab 13923
81ecdfbb
RW
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
13925$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
13926 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
13927 $as_echo_n "(cached) " >&6
c906108c 13928else
81ecdfbb 13929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13930/* end confdefs.h. */
97bf5e38
MK
13931#include <sys/types.h>
13932#ifdef HAVE_NLIST_H
13933#include <nlist.h>
13934#endif
13935#include <link.h>
bec39cab
AC
13936int
13937main ()
13938{
97bf5e38 13939struct so_map lm; (void) lm.som_addr;
bec39cab
AC
13940 ;
13941 return 0;
13942}
13943_ACEOF
81ecdfbb 13944if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13945 gdb_cv_have_struct_so_map_with_som_members=yes
13946else
81ecdfbb 13947 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 13948fi
81ecdfbb 13949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13950fi
c906108c 13951
81ecdfbb
RW
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
13953$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 13954 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 13955
81ecdfbb 13956$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 13957
97bf5e38 13958 fi
c906108c 13959
bec39cab 13960
81ecdfbb
RW
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
13962$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
13963 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
13964 $as_echo_n "(cached) " >&6
97bf5e38 13965else
81ecdfbb 13966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13967/* end confdefs.h. */
97bf5e38
MK
13968#define _SYSCALL32
13969#include <sys/link.h>
bec39cab
AC
13970int
13971main ()
13972{
97bf5e38 13973struct link_map32 l;
bec39cab
AC
13974 ;
13975 return 0;
13976}
13977_ACEOF
81ecdfbb 13978if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13979 gdb_cv_have_struct_link_map32=yes
13980else
81ecdfbb 13981 gdb_cv_have_struct_link_map32=no
97bf5e38 13982fi
81ecdfbb 13983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13984fi
c906108c 13985
81ecdfbb
RW
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
13987$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 13988 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 13989
81ecdfbb 13990$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 13991
60ca704f 13992
81ecdfbb 13993$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 13994
97bf5e38
MK
13995 fi
13996fi
c906108c 13997
bc8bcb4b 13998# Check if the compiler supports the `long long' type.
c906108c 13999
81ecdfbb
RW
14000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14001$as_echo_n "checking for long long support in compiler... " >&6; }
14002if test "${gdb_cv_c_long_long+set}" = set; then :
14003 $as_echo_n "(cached) " >&6
97bf5e38 14004else
81ecdfbb 14005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14006/* end confdefs.h. */
bc8bcb4b 14007extern long long foo;
bec39cab
AC
14008int
14009main ()
14010{
bc8bcb4b 14011switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14012 ;
14013 return 0;
14014}
14015_ACEOF
81ecdfbb 14016if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14017 gdb_cv_c_long_long=yes
14018else
81ecdfbb 14019 gdb_cv_c_long_long=no
97bf5e38 14020fi
81ecdfbb 14021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14022fi
81ecdfbb
RW
14023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14024$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 14025if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 14026
81ecdfbb 14027$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14028
14029fi
14030
bc8bcb4b 14031# Check if the compiler and runtime support printing long longs.
97bf5e38 14032
81ecdfbb
RW
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14034$as_echo_n "checking for long long support in printf... " >&6; }
14035if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14036 $as_echo_n "(cached) " >&6
97bf5e38 14037else
81ecdfbb 14038 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14039 gdb_cv_printf_has_long_long=no
14040else
81ecdfbb 14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14042/* end confdefs.h. */
bc8bcb4b
MK
14043$ac_includes_default
14044int
14045main ()
14046{
14047char buf[32];
97bf5e38
MK
14048 long long l = 0;
14049 l = (l << 16) + 0x0123;
14050 l = (l << 16) + 0x4567;
14051 l = (l << 16) + 0x89ab;
14052 l = (l << 16) + 0xcdef;
14053 sprintf (buf, "0x%016llx", l);
14054 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14055 ;
14056 return 0;
c906108c 14057}
bec39cab 14058_ACEOF
81ecdfbb 14059if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14060 gdb_cv_printf_has_long_long=yes
14061else
81ecdfbb 14062 gdb_cv_printf_has_long_long=no
97bf5e38 14063fi
81ecdfbb
RW
14064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14065 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14066fi
81ecdfbb 14067
97bf5e38 14068fi
81ecdfbb
RW
14069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14070$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14071if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14072
81ecdfbb 14073$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14074
14075fi
97bf5e38 14076
1a619819
LM
14077# Check if the compiler and runtime support printing decfloats.
14078
81ecdfbb
RW
14079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14080$as_echo_n "checking for decfloat support in printf... " >&6; }
14081if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14082 $as_echo_n "(cached) " >&6
1a619819 14083else
81ecdfbb 14084 if test "$cross_compiling" = yes; then :
1a619819
LM
14085 gdb_cv_printf_has_decfloat=no
14086else
81ecdfbb 14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14088/* end confdefs.h. */
14089$ac_includes_default
14090int
14091main ()
14092{
14093char buf[64];
14094 _Decimal32 d32 = 1.2345df;
14095 _Decimal64 d64 = 1.2345dd;
14096 _Decimal128 d128 = 1.2345dl;
14097 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14098 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14099 ;
14100 return 0;
14101}
14102_ACEOF
81ecdfbb 14103if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14104 gdb_cv_printf_has_decfloat=yes
14105else
81ecdfbb 14106 gdb_cv_printf_has_decfloat=no
1a619819 14107fi
81ecdfbb
RW
14108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14109 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14110fi
81ecdfbb 14111
1a619819 14112fi
81ecdfbb
RW
14113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14114$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14115if test $gdb_cv_printf_has_decfloat = yes; then
14116
81ecdfbb 14117$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14118
14119fi
14120
bc8bcb4b
MK
14121# Check if the compiler supports the `long double' type. We can't use
14122# AC_C_LONG_DOUBLE because that one does additional checks on the
14123# constants defined in <float.h> that fail on some systems,
14124# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14125
81ecdfbb
RW
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14127$as_echo_n "checking for long double support in compiler... " >&6; }
14128if test "${gdb_cv_c_long_double+set}" = set; then :
14129 $as_echo_n "(cached) " >&6
97bf5e38 14130else
81ecdfbb 14131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14132/* end confdefs.h. */
97bf5e38 14133long double foo;
bec39cab 14134_ACEOF
81ecdfbb 14135if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14136 gdb_cv_c_long_double=yes
97bf5e38 14137else
81ecdfbb 14138 gdb_cv_c_long_double=no
97bf5e38 14139fi
81ecdfbb 14140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14141fi
81ecdfbb
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14143$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14144if test $gdb_cv_c_long_double = yes; then
c906108c 14145
81ecdfbb 14146$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14147
14148fi
14149
bc8bcb4b 14150# Check if the compiler and runtime support printing long doubles.
97bf5e38 14151
81ecdfbb
RW
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14153$as_echo_n "checking for long double support in printf... " >&6; }
14154if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14155 $as_echo_n "(cached) " >&6
97bf5e38 14156else
81ecdfbb 14157 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14158 gdb_cv_printf_has_long_double=no
14159else
81ecdfbb 14160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14161/* end confdefs.h. */
bc8bcb4b
MK
14162$ac_includes_default
14163int
14164main ()
14165{
14166char buf[16];
97bf5e38
MK
14167 long double f = 3.141592653;
14168 sprintf (buf, "%Lg", f);
14169 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14170 ;
14171 return 0;
97bf5e38 14172}
bec39cab 14173_ACEOF
81ecdfbb 14174if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14175 gdb_cv_printf_has_long_double=yes
c906108c 14176else
81ecdfbb 14177 gdb_cv_printf_has_long_double=no
c906108c 14178fi
81ecdfbb
RW
14179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14180 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14181fi
81ecdfbb 14182
c906108c 14183fi
81ecdfbb
RW
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14185$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14186if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14187
81ecdfbb 14188$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14189
14190fi
97bf5e38 14191
bc8bcb4b 14192# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14193
81ecdfbb
RW
14194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14195$as_echo_n "checking for long double support in scanf... " >&6; }
14196if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14197 $as_echo_n "(cached) " >&6
97bf5e38 14198else
81ecdfbb 14199 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14200 gdb_cv_scanf_has_long_double=no
14201else
81ecdfbb 14202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14203/* end confdefs.h. */
bc8bcb4b
MK
14204#include <stdio.h>
14205int
14206main ()
14207{
14208char *buf = "3.141592653";
97bf5e38
MK
14209 long double f = 0;
14210 sscanf (buf, "%Lg", &f);
14211 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14212 ;
14213 return 0;
97bf5e38 14214}
bec39cab 14215_ACEOF
81ecdfbb 14216if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14217 gdb_cv_scanf_has_long_double=yes
14218else
81ecdfbb 14219 gdb_cv_scanf_has_long_double=no
97bf5e38 14220fi
81ecdfbb
RW
14221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14222 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14223fi
81ecdfbb 14224
c906108c 14225fi
81ecdfbb
RW
14226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14227$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14228if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14229
81ecdfbb 14230$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14231
14232fi
c906108c 14233
438013df
AO
14234case ${host_os} in
14235aix*)
81ecdfbb
RW
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14237$as_echo_n "checking for -bbigtoc option... " >&6; }
14238if test "${gdb_cv_bigtoc+set}" = set; then :
14239 $as_echo_n "(cached) " >&6
438013df 14240else
bec39cab 14241
438013df
AO
14242 SAVE_LDFLAGS=$LDFLAGS
14243
14244 case $GCC in
14245 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14246 *) gdb_cv_bigtoc=-bbigtoc ;;
14247 esac
14248
14249 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14251/* end confdefs.h. */
438013df 14252
bec39cab
AC
14253int
14254main ()
14255{
438013df 14256int i;
bec39cab
AC
14257 ;
14258 return 0;
14259}
14260_ACEOF
81ecdfbb 14261if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14262
81ecdfbb
RW
14263else
14264 gdb_cv_bigtoc=
438013df 14265fi
81ecdfbb
RW
14266rm -f core conftest.err conftest.$ac_objext \
14267 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14268 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14269
bec39cab 14270fi
81ecdfbb
RW
14271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14272$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14273 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14274 ;;
14275esac
14276
38f6b338 14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14278$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14279dynamic_list=false
14280if test "${gdb_native}" = yes; then
14281 # The dynamically loaded libthread_db needs access to symbols in the gdb
14282 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14283 # may not be supported there.
14284 old_LDFLAGS="$LDFLAGS"
14285 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14286 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14287 LDFLAGS="$LDFLAGS $RDYNAMIC"
14288 if test "${have_libpython}" = no; then
14289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14290/* end confdefs.h. */
14291
14292int
14293main ()
14294{
14295
14296 ;
14297 return 0;
14298}
14299_ACEOF
14300if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14301 dynamic_list=true
14302fi
14303rm -f core conftest.err conftest.$ac_objext \
14304 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14305 else
14306 # Workaround http://bugs.python.org/issue4434 where static
14307 # libpythonX.Y.a would get its symbols required for
14308 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14309 # Problem does not happen for the recommended libpythonX.Y.so linkage.
14310 old_CFLAGS="$CFLAGS"
14311 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14312 if test "$cross_compiling" = yes; then :
3bebe2f2 14313 true
f6528abd 14314else
3bebe2f2
JK
14315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316/* end confdefs.h. */
14317#include "${have_libpython}/Python.h"
14318int
14319main ()
14320{
14321int err;
38f6b338
JK
14322 Py_Initialize ();
14323 err = PyRun_SimpleString ("import itertools\n");
14324 Py_Finalize ();
14325 return err == 0 ? 0 : 1;
3bebe2f2
JK
14326 ;
14327 return 0;
14328}
14329_ACEOF
14330if ac_fn_c_try_run "$LINENO"; then :
14331 dynamic_list=true
14332fi
14333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14334 conftest.$ac_objext conftest.beam conftest.$ac_ext
14335fi
14336
38f6b338
JK
14337 CFLAGS="$old_CFLAGS"
14338 fi
14339 LDFLAGS="$old_LDFLAGS"
14340fi
14341if $dynamic_list; then
14342 found="-Wl,--dynamic-list"
14343 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14344else
38f6b338
JK
14345 found="-rdynamic"
14346 RDYNAMIC="-rdynamic"
f6528abd 14347fi
f6528abd 14348
38f6b338 14349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14350$as_echo "$found" >&6; }
0407b3f1 14351
f6528abd 14352
0407b3f1 14353if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14354 case ${host_os} in
c906108c 14355 solaris*)
d92419e5
JB
14356 # See if thread_db library is around for Solaris thread debugging.
14357 # Note that we must explicitly test for version 1 of the library
14358 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14359 # the same API.
81ecdfbb
RW
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14361$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14362 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14364$as_echo "yes" >&6; }
60ca704f 14365
81ecdfbb 14366$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14367
3483b318 14368 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14369 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14371$as_echo_n "checking for dlopen in -ldl... " >&6; }
14372if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14373 $as_echo_n "(cached) " >&6
c906108c 14374else
bec39cab 14375 ac_check_lib_save_LIBS=$LIBS
c906108c 14376LIBS="-ldl $LIBS"
81ecdfbb 14377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14378/* end confdefs.h. */
14379
81ecdfbb
RW
14380/* Override any GCC internal prototype to avoid an error.
14381 Use char because int might match the return type of a GCC
14382 builtin and then its argument prototype would still apply. */
bec39cab
AC
14383#ifdef __cplusplus
14384extern "C"
14385#endif
bec39cab
AC
14386char dlopen ();
14387int
14388main ()
14389{
81ecdfbb 14390return dlopen ();
bec39cab
AC
14391 ;
14392 return 0;
14393}
14394_ACEOF
81ecdfbb 14395if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14396 ac_cv_lib_dl_dlopen=yes
14397else
81ecdfbb 14398 ac_cv_lib_dl_dlopen=no
bec39cab 14399fi
81ecdfbb
RW
14400rm -f core conftest.err conftest.$ac_objext \
14401 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14402LIBS=$ac_check_lib_save_LIBS
14403fi
81ecdfbb
RW
14404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14405$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14406if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14407 cat >>confdefs.h <<_ACEOF
14408#define HAVE_LIBDL 1
14409_ACEOF
c906108c
SS
14410
14411 LIBS="-ldl $LIBS"
14412
c906108c
SS
14413fi
14414
f6528abd 14415 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14416 # Sun randomly tweaked the prototypes in <proc_service.h>
14417 # at one point.
81ecdfbb
RW
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14419$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14420 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14421 $as_echo_n "(cached) " >&6
c906108c 14422else
bec39cab 14423
81ecdfbb 14424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14425/* end confdefs.h. */
c906108c
SS
14426
14427 #include <proc_service.h>
14428 ps_err_e ps_pdwrite
14429 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14430
bec39cab
AC
14431int
14432main ()
14433{
14434
14435 ;
14436 return 0;
14437}
14438_ACEOF
81ecdfbb 14439if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14440 gdb_cv_proc_service_is_old=no
14441else
81ecdfbb 14442 gdb_cv_proc_service_is_old=yes
c906108c 14443fi
81ecdfbb 14444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14445
c906108c
SS
14446fi
14447
81ecdfbb
RW
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14449$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14450 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14451
81ecdfbb 14452$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14453
14454 fi
14455 else
81ecdfbb
RW
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14457$as_echo "no" >&6; }
c906108c
SS
14458 fi
14459 ;;
d92419e5 14460 aix*)
81ecdfbb
RW
14461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14462$as_echo_n "checking for AiX thread debugging library... " >&6; }
14463 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14464 $as_echo_n "(cached) " >&6
bec39cab 14465else
81ecdfbb 14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14467/* end confdefs.h. */
d92419e5 14468#include <sys/pthdebug.h>
bec39cab
AC
14469int
14470main ()
14471{
d92419e5
JB
14472#ifndef PTHDB_VERSION_3
14473 #error
14474 #endif
bec39cab
AC
14475 ;
14476 return 0;
14477}
14478_ACEOF
81ecdfbb 14479if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14480 gdb_cv_have_aix_thread_debug=yes
14481else
81ecdfbb 14482 gdb_cv_have_aix_thread_debug=no
d92419e5 14483fi
81ecdfbb 14484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14485fi
14486
81ecdfbb
RW
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14488$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14489 if test $gdb_cv_have_aix_thread_debug = yes; then
14490 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14491 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
14492 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
14493 fi
14494 ;;
c906108c 14495 esac
bec39cab 14496
c906108c
SS
14497fi
14498
3f47be5c 14499if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14501$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14502if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14503 $as_echo_n "(cached) " >&6
bec39cab 14504else
81ecdfbb 14505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14506/* end confdefs.h. */
3f47be5c 14507#include <thread_db.h>
bec39cab
AC
14508int
14509main ()
14510{
3f47be5c 14511int i = TD_NOTALLOC;
bec39cab
AC
14512 ;
14513 return 0;
14514}
14515_ACEOF
81ecdfbb 14516if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14517 gdb_cv_thread_db_h_has_td_notalloc=yes
14518else
81ecdfbb 14519 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14520
3f47be5c 14521fi
81ecdfbb 14522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14523
bec39cab 14524fi
81ecdfbb
RW
14525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14526$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14528$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14529if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14530 $as_echo_n "(cached) " >&6
59f80f10 14531else
81ecdfbb 14532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14533/* end confdefs.h. */
14534#include <thread_db.h>
14535int
14536main ()
14537{
14538int i = TD_VERSION;
14539 ;
14540 return 0;
14541}
14542_ACEOF
81ecdfbb 14543if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14544 gdb_cv_thread_db_h_has_td_version=yes
14545else
81ecdfbb 14546 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14547
14548fi
81ecdfbb 14549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14550
14551fi
81ecdfbb
RW
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14553$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14555$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14556if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14557 $as_echo_n "(cached) " >&6
59f80f10 14558else
81ecdfbb 14559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14560/* end confdefs.h. */
14561#include <thread_db.h>
14562int
14563main ()
14564{
14565int i = TD_NOTLS;
14566 ;
14567 return 0;
14568}
14569_ACEOF
81ecdfbb 14570if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14571 gdb_cv_thread_db_h_has_td_notls=yes
14572else
81ecdfbb 14573 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14574
14575fi
81ecdfbb 14576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14577
14578fi
81ecdfbb
RW
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14580$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14581fi
14582if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14583
81ecdfbb 14584$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14585
59f80f10
DJ
14586fi
14587if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14588
81ecdfbb 14589$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14590
14591fi
14592if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14593
81ecdfbb 14594$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14595
3f47be5c
EZ
14596fi
14597
b757528f 14598if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14600$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14601if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14602 $as_echo_n "(cached) " >&6
bec39cab 14603else
81ecdfbb 14604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14605/* end confdefs.h. */
b757528f 14606#include <sys/syscall.h>
bec39cab
AC
14607int
14608main ()
14609{
b757528f 14610int i = __NR_tkill;
bec39cab
AC
14611 ;
14612 return 0;
14613}
14614_ACEOF
81ecdfbb 14615if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14616 gdb_cv_sys_syscall_h_has_tkill=yes
14617else
81ecdfbb 14618 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14619
b757528f 14620fi
81ecdfbb 14621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14622
bec39cab 14623fi
81ecdfbb
RW
14624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14625$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
14626fi
14627if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 14628
81ecdfbb 14629$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
14630
14631fi
14632
81ecdfbb
RW
14633ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14634"
14635if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14636 ac_have_decl=1
10568435 14637else
81ecdfbb 14638 ac_have_decl=0
10568435 14639fi
10568435
JK
14640
14641cat >>confdefs.h <<_ACEOF
81ecdfbb 14642#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14643_ACEOF
14644
14645
81ecdfbb
RW
14646if test "$cross_compiling" = yes; then :
14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14648/* end confdefs.h. */
14649#include <sys/personality.h>
14650int
14651main ()
14652{
14653
14654# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14655# define ADDR_NO_RANDOMIZE 0x0040000
14656# endif
14657 /* Test the flag could be set and stays set. */
14658 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14659 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14660 return 1
14661 ;
14662 return 0;
14663}
14664_ACEOF
81ecdfbb 14665if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14666 have_personality=true
14667else
81ecdfbb 14668 have_personality=false
10568435 14669fi
81ecdfbb
RW
14670rm -f core conftest.err conftest.$ac_objext \
14671 conftest$ac_exeext conftest.$ac_ext
10568435 14672else
81ecdfbb 14673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14674/* end confdefs.h. */
14675#include <sys/personality.h>
14676int
14677main ()
14678{
14679
14680# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14681# define ADDR_NO_RANDOMIZE 0x0040000
14682# endif
14683 /* Test the flag could be set and stays set. */
14684 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14685 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14686 return 1
14687 ;
14688 return 0;
14689}
14690_ACEOF
81ecdfbb 14691if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14692 have_personality=true
14693else
81ecdfbb 14694 have_personality=false
10568435 14695fi
81ecdfbb
RW
14696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14697 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14698fi
81ecdfbb 14699
10568435
JK
14700if $have_personality
14701then
14702
81ecdfbb 14703$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14704
14705fi
14706
fb40c209 14707
b14b1491 14708target_sysroot_reloc=0
bec39cab 14709
81ecdfbb
RW
14710# Check whether --with-sysroot was given.
14711if test "${with_sysroot+set}" = set; then :
14712 withval=$with_sysroot;
030292b7 14713 case ${with_sysroot} in
715d1656 14714 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
14715 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
14716 esac
14717
14718 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14719
07abfebf
RS
14720 if test "x$prefix" = xNONE; then
14721 test_prefix=/usr/local
14722 else
14723 test_prefix=$prefix
14724 fi
aa28a74e 14725 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 14726 test_exec_prefix=$test_prefix
030292b7 14727 else
07abfebf 14728 test_exec_prefix=$exec_prefix
030292b7
DJ
14729 fi
14730 case ${TARGET_SYSTEM_ROOT} in
715d1656 14731 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
14732 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
14733 '${prefix}'|'${prefix}/'*|\
715d1656 14734 '${exec_prefix}'|'${exec_prefix}/'*)
b14b1491 14735 target_sysroot_reloc=1
030292b7
DJ
14736 ;;
14737 esac
14738
14739else
bec39cab 14740
030292b7
DJ
14741 TARGET_SYSTEM_ROOT=
14742 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
14743
81ecdfbb 14744fi
b14b1491 14745
81ecdfbb 14746TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc"
030292b7
DJ
14747
14748
14749
16e7150e 14750
16e7150e 14751
81ecdfbb
RW
14752# Check whether --with-system-gdbinit was given.
14753if test "${with_system_gdbinit+set}" = set; then :
14754 withval=$with_system_gdbinit;
b14b1491
TT
14755 SYSTEM_GDBINIT=$withval
14756else
14757 SYSTEM_GDBINIT=
81ecdfbb
RW
14758fi
14759
16e7150e
JG
14760
14761 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14762 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14763 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14764 ac_define_dir=`eval echo $ac_define_dir`
14765
14766cat >>confdefs.h <<_ACEOF
14767#define SYSTEM_GDBINIT "$ac_define_dir"
14768_ACEOF
14769
14770
14771
0c4a4063 14772
b14b1491
TT
14773 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14774 if test "x$prefix" = xNONE; then
14775 test_prefix=/usr/local
14776 else
14777 test_prefix=$prefix
14778 fi
14779 else
14780 test_prefix=$exec_prefix
14781 fi
14782 value=0
14783 case ${ac_define_dir} in
14784 "${test_prefix}"|"${test_prefix}/"*|\
14785 '${exec_prefix}'|'${exec_prefix}/'*)
14786 value=1
14787 ;;
14788 esac
16e7150e 14789
b14b1491
TT
14790cat >>confdefs.h <<_ACEOF
14791#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14792_ACEOF
14793
b14b1491 14794
16e7150e 14795
0c4a4063 14796
81ecdfbb
RW
14797# Check whether --enable-werror was given.
14798if test "${enable_werror+set}" = set; then :
14799 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14800 yes | y) ERROR_ON_WARNING="yes" ;;
14801 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14802 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14803 esac
81ecdfbb
RW
14804fi
14805
094a342e
MK
14806
14807# Enable -Werror by default when using gcc
14808if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
14809 ERROR_ON_WARNING=yes
14810fi
14811
14812WERROR_CFLAGS=""
14813if test "${ERROR_ON_WARNING}" = yes ; then
14814 WERROR_CFLAGS="-Werror"
14815fi
14816
aa79a185
DJ
14817# The entries after -Wno-pointer-sign are disabled warnings which may
14818# be enabled in the future, which can not currently be used to build
14819# GDB.
14820# NOTE: If you change this list, remember to update
3b851bce 14821# gdb/doc/gdbint.texinfo.
aa79a185
DJ
14822build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
14823-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4
JB
14824-Wno-unused -Wunused-value -Wunused-function \
14825-Wno-switch -Wno-char-subscripts"
a3b362c4 14826
3526781e
DJ
14827# Enable -Wno-format by default when using gcc on mingw since many
14828# GCC versions complain about %I64.
14829case "${host}" in
14830 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14831esac
14832
81ecdfbb
RW
14833# Check whether --enable-build-warnings was given.
14834if test "${enable_build_warnings+set}" = set; then :
14835 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14836 yes) ;;
14837 no) build_warnings="-w";;
14838 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14839 build_warnings="${build_warnings} ${t}";;
14840 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14841 build_warnings="${t} ${build_warnings}";;
14842 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14843esac
d4f3574e 14844if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14845 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14846fi
81ecdfbb
RW
14847fi
14848# Check whether --enable-gdb-build-warnings was given.
14849if test "${enable_gdb_build_warnings+set}" = set; then :
14850 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14851 yes) ;;
14852 no) build_warnings="-w";;
14853 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14854 build_warnings="${build_warnings} ${t}";;
14855 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14856 build_warnings="${t} ${build_warnings}";;
14857 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14858esac
14859if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14860 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14861fi
81ecdfbb
RW
14862fi
14863WARN_CFLAGS=""
c906108c
SS
14864if test "x${build_warnings}" != x -a "x$GCC" = xyes
14865then
81ecdfbb
RW
14866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14867$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14868 # Separate out the -Werror flag as some files just cannot be
14869 # compiled with it enabled.
14870 for w in ${build_warnings}; do
14871 case $w in
14872 -Werr*) WERROR_CFLAGS=-Werror ;;
14873 *) # Check that GCC accepts it
4536bbc6
AC
14874 saved_CFLAGS="$CFLAGS"
14875 CFLAGS="$CFLAGS $w"
81ecdfbb 14876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14877/* end confdefs.h. */
4536bbc6 14878
bec39cab
AC
14879int
14880main ()
14881{
4536bbc6 14882
bec39cab
AC
14883 ;
14884 return 0;
14885}
14886_ACEOF
81ecdfbb 14887if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 14888 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14889fi
81ecdfbb 14890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14891 CFLAGS="$saved_CFLAGS"
746a987d
AC
14892 esac
14893 done
81ecdfbb
RW
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14895$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14896fi
14897
14898
104c1213 14899
7a292a7a 14900# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14902$as_echo_n "checking for cygwin... " >&6; }
14903if test "${gdb_cv_os_cygwin+set}" = set; then :
14904 $as_echo_n "(cached) " >&6
bec39cab 14905else
81ecdfbb 14906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14907/* end confdefs.h. */
7a292a7a
SS
14908
14909#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14910lose
14911#endif
bec39cab 14912_ACEOF
7a292a7a 14913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 14914 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
14915 gdb_cv_os_cygwin=yes
14916else
7a292a7a
SS
14917 gdb_cv_os_cygwin=no
14918fi
14919rm -f conftest*
14920
14921fi
81ecdfbb
RW
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14923$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14924
aff38e61 14925
3eb25fda 14926SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14927case ${host} in
95cbc983
AC
14928 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14929 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14930 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14931esac
14932
14933
cd0fc7c3
SS
14934# libreadline needs libuser32.a in a cygwin environment
14935WIN32LIBS=
14936if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14937 WIN32LIBS="-luser32"
14938 case "${target}" in
14939 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14940 ;;
14941 esac
cd0fc7c3 14942fi
c906108c 14943
b4505029
MM
14944# The ser-tcp.c module requires sockets.
14945case ${host} in
14946 *mingw32*)
14947
81ecdfbb 14948$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14949
14950 WIN32LIBS="$WIN32LIBS -lws2_32"
14951 ;;
14952esac
14953
7a292a7a 14954
31d99776
DJ
14955# Add ELF support to GDB, but only if BFD includes ELF support.
14956OLD_CFLAGS=$CFLAGS
14957OLD_LDFLAGS=$LDFLAGS
14958OLD_LIBS=$LIBS
cab58a69 14959CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 14960LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 14961intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
14962# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14963if test "$plugins" = "yes"; then
14964 LIBS="-ldl $LIBS"
14965fi
0f72fb1c 14966LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
14968$as_echo_n "checking for ELF support in BFD... " >&6; }
14969if test "${gdb_cv_var_elf+set}" = set; then :
14970 $as_echo_n "(cached) " >&6
31d99776 14971else
81ecdfbb 14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14973/* end confdefs.h. */
14974#include <stdlib.h>
14975#include "bfd.h"
14976#include "elf-bfd.h"
14977
14978int
14979main ()
14980{
14981bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
14982 ;
14983 return 0;
14984}
14985_ACEOF
81ecdfbb 14986if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14987 gdb_cv_var_elf=yes
14988else
81ecdfbb 14989 gdb_cv_var_elf=no
31d99776 14990fi
81ecdfbb
RW
14991rm -f core conftest.err conftest.$ac_objext \
14992 conftest$ac_exeext conftest.$ac_ext
31d99776 14993fi
81ecdfbb
RW
14994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14995$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
14996if test $gdb_cv_var_elf = yes; then
14997 CONFIG_OBS="$CONFIG_OBS elfread.o"
14998
81ecdfbb 14999$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15000
075ff26d
JK
15001 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15002 if test "$plugins" = "yes"; then
15003 OLD_LIBS="-ldl $OLD_LIBS"
15004 fi
31d99776
DJ
15005fi
15006CFLAGS=$OLD_CFLAGS
15007LDFLAGS=$OLD_LDFLAGS
15008LIBS=$OLD_LIBS
15009
121ce6e5
DJ
15010# Add any host-specific objects to GDB.
15011CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15012
3fc11d3e
JM
15013LIBGUI="../libgui/src/libgui.a"
15014GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15015
15016
7a292a7a 15017
3fc11d3e
JM
15018WIN32LDAPP=
15019
15020
15021
d91670b9 15022case "${host}" in
686a5eed 15023*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15024 configdir="win"
15025 ;;
15026*)
15027 configdir="unix"
15028 ;;
15029esac
3fc11d3e
JM
15030
15031GDBTKLIBS=
15032if test "${enable_gdbtk}" = "yes"; then
15033
d1c3b63a
KS
15034 # Gdbtk must have an absolute path to srcdir in order to run
15035 # properly when not installed.
15036 here=`pwd`
15037 cd ${srcdir}
15038 GDBTK_SRC_DIR=`pwd`
15039 cd $here
15040
bec39cab 15041
5062cc19
KS
15042 #
15043 # Ok, lets find the tcl configuration
15044 # First, look for one uninstalled.
15045 # the alternative search directory is invoked by --with-tcl
15046 #
3fc11d3e 15047
5062cc19
KS
15048 if test x"${no_tcl}" = x ; then
15049 # we reset no_tcl in case something fails here
15050 no_tcl=true
bec39cab 15051
81ecdfbb
RW
15052# Check whether --with-tcl was given.
15053if test "${with_tcl+set}" = set; then :
15054 withval=$with_tcl; with_tclconfig=${withval}
15055fi
15056
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15058$as_echo_n "checking for Tcl configuration... " >&6; }
15059 if test "${ac_cv_c_tclconfig+set}" = set; then :
15060 $as_echo_n "(cached) " >&6
3fc11d3e 15061else
bec39cab 15062
3fc11d3e 15063
5062cc19
KS
15064 # First check to see if --with-tcl was specified.
15065 case "${host}" in
15066 *-*-cygwin*) platDir="win" ;;
15067 *) platDir="unix" ;;
15068 esac
15069 if test x"${with_tclconfig}" != x ; then
15070 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15071 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15072 else
81ecdfbb 15073 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15074 fi
15075 fi
15076
15077 # then check for a private Tcl installation
15078 if test x"${ac_cv_c_tclconfig}" = x ; then
15079 for i in \
15080 ../tcl \
15081 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15082 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15083 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15084 ../../tcl \
15085 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15086 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15087 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15088 ../../../tcl \
15089 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15090 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15091 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15092 if test -f "$i/$platDir/tclConfig.sh" ; then
15093 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15094 break
15095 fi
15096 done
15097 fi
15098
15099 # on Darwin, check in Framework installation locations
15100 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15101 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15102 `ls -d /Library/Frameworks 2>/dev/null` \
15103 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15104 `ls -d /System/Library/Frameworks 2>/dev/null` \
15105 ; do
15106 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15107 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15108 break
15109 fi
15110 done
15111 fi
15112
15113 # check in a few common install locations
15114 if test x"${ac_cv_c_tclconfig}" = x ; then
15115 for i in `ls -d ${libdir} 2>/dev/null` \
15116 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15117 `ls -d ${prefix}/lib 2>/dev/null` \
15118 `ls -d /usr/local/lib 2>/dev/null` \
15119 `ls -d /usr/contrib/lib 2>/dev/null` \
15120 `ls -d /usr/lib 2>/dev/null` \
15121 ; do
15122 if test -f "$i/tclConfig.sh" ; then
15123 ac_cv_c_tclconfig=`(cd $i; pwd)`
15124 break
15125 fi
15126 done
15127 fi
3fc11d3e 15128
5062cc19
KS
15129 # check in a few other private locations
15130 if test x"${ac_cv_c_tclconfig}" = x ; then
15131 for i in \
15132 ${srcdir}/../tcl \
15133 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15134 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15135 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15136 if test -f "$i/$platDir/tclConfig.sh" ; then
15137 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15138 break
15139 fi
15140 done
15141 fi
bec39cab 15142
3fc11d3e
JM
15143fi
15144
5062cc19
KS
15145
15146 if test x"${ac_cv_c_tclconfig}" = x ; then
15147 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15149$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15150 else
15151 no_tcl=
15152 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15154$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15155 fi
15156 fi
3fc11d3e 15157
bec39cab 15158
85541719
DE
15159 # If $no_tk is nonempty, then we can't do Tk, and there is no
15160 # point to doing Tcl.
bec39cab 15161
5062cc19
KS
15162 #
15163 # Ok, lets find the tk configuration
15164 # First, look for one uninstalled.
15165 # the alternative search directory is invoked by --with-tk
15166 #
3fc11d3e 15167
5062cc19
KS
15168 if test x"${no_tk}" = x ; then
15169 # we reset no_tk in case something fails here
15170 no_tk=true
bec39cab 15171
81ecdfbb
RW
15172# Check whether --with-tk was given.
15173if test "${with_tk+set}" = set; then :
15174 withval=$with_tk; with_tkconfig=${withval}
15175fi
15176
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15178$as_echo_n "checking for Tk configuration... " >&6; }
15179 if test "${ac_cv_c_tkconfig+set}" = set; then :
15180 $as_echo_n "(cached) " >&6
bec39cab 15181else
3fc11d3e
JM
15182
15183
5062cc19
KS
15184 # First check to see if --with-tkconfig was specified.
15185 if test x"${with_tkconfig}" != x ; then
15186 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15187 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15188 else
81ecdfbb 15189 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15190 fi
15191 fi
3fc11d3e 15192
5062cc19
KS
15193 # then check for a private Tk library
15194 case "${host}" in
15195 *-*-cygwin*) platDir="win" ;;
15196 *) platDir="unix" ;;
15197 esac
15198 if test x"${ac_cv_c_tkconfig}" = x ; then
15199 for i in \
15200 ../tk \
15201 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15202 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15203 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15204 ../../tk \
15205 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15206 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15207 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15208 ../../../tk \
15209 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15210 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15211 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15212 if test -f "$i/$platDir/tkConfig.sh" ; then
15213 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15214 break
15215 fi
15216 done
15217 fi
15218
15219 # on Darwin, check in Framework installation locations
15220 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15221 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15222 `ls -d /Library/Frameworks 2>/dev/null` \
15223 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15224 `ls -d /System/Library/Frameworks 2>/dev/null` \
15225 ; do
15226 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15227 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15228 break
15229 fi
15230 done
15231 fi
15232
15233 # check in a few common install locations
15234 if test x"${ac_cv_c_tkconfig}" = x ; then
15235 for i in `ls -d ${libdir} 2>/dev/null` \
15236 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15237 `ls -d ${prefix}/lib 2>/dev/null` \
15238 `ls -d /usr/local/lib 2>/dev/null` \
15239 `ls -d /usr/contrib/lib 2>/dev/null` \
15240 `ls -d /usr/lib 2>/dev/null` \
15241 ; do
15242 if test -f "$i/tkConfig.sh" ; then
15243 ac_cv_c_tkconfig=`(cd $i; pwd)`
15244 break
15245 fi
15246 done
15247 fi
15248 # check in a few other private locations
15249 if test x"${ac_cv_c_tkconfig}" = x ; then
15250 for i in \
15251 ${srcdir}/../tk \
15252 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15253 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15254 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15255 if test -f "$i/$platDir/tkConfig.sh" ; then
15256 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15257 break
15258 fi
15259 done
15260 fi
3fc11d3e 15261
3fc11d3e
JM
15262fi
15263
15264
5062cc19
KS
15265 if test x"${ac_cv_c_tkconfig}" = x ; then
15266 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15268$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15269 else
15270 no_tk=
15271 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15273$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15274 fi
3fc11d3e 15275 fi
dd2504ab 15276
dd2504ab 15277
85541719
DE
15278 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15279
81ecdfbb
RW
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15281$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15282
15283 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15285$as_echo "loading" >&6; }
85541719
DE
15286 . ${TCL_BIN_DIR}/tclConfig.sh
15287 else
81ecdfbb
RW
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15289$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15290 fi
15291
15292 # eval is required to do the TCL_DBGX substitution
15293 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15294 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15295
15296 # If the TCL_BIN_DIR is the build directory (not the install directory),
15297 # then set the common variable name to the value of the build variables.
15298 # For example, the variable TCL_LIB_SPEC will be set to the value
15299 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15300 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15301 # installed and uninstalled version of Tcl.
15302 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15303 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15304 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15305 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15306 elif test "`uname -s`" = "Darwin"; then
15307 # If Tcl was built as a framework, attempt to use the libraries
15308 # from the framework at the given location so that linking works
15309 # against Tcl.framework installed in an arbitary location.
15310 case ${TCL_DEFS} in
15311 *TCL_FRAMEWORK*)
15312 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15313 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15314 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15315 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15316 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15317 break
15318 fi
15319 done
15320 fi
15321 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15322 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15323 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15324 fi
15325 ;;
15326 esac
15327 fi
15328
15329 # eval is required to do the TCL_DBGX substitution
15330 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15331 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15332 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15333 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349 # Check for in-tree tcl
15350 here=`pwd`
15351 cd ${srcdir}/..
15352 topdir=`pwd`
15353 cd ${here}
15354
15355 intree="no"
15356 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15357 intree="yes"
15358 fi
15359
15360 # Find Tcl private headers
15361 if test x"${intree}" = xno; then
15362
81ecdfbb
RW
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15364$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15365 private_dir=""
15366 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15367 if test -f ${dir}/tclInt.h ; then
15368 private_dir=${dir}
15369 fi
15370
15371 if test x"${private_dir}" = x; then
81ecdfbb 15372 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15373 else
15374 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15376$as_echo "${private_dir}" >&6; }
85541719
DE
15377 fi
15378
15379 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15380 TCL_LIBRARY="${TCL_LIB_SPEC}"
15381 TCL_DEPS=""
15382 else
15383 # If building tcl in the same src tree, private headers
15384 # are not needed, but we need to be sure to use the right
15385 # headers library
15386 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15387 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15388 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15389 fi
15390
15391
15392
15393
15394
81ecdfbb
RW
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15396$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15397
5062cc19 15398 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15400$as_echo "loading" >&6; }
5062cc19 15401 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15402 else
81ecdfbb
RW
15403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15404$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15405 fi
bec39cab 15406
5062cc19
KS
15407 # eval is required to do the TK_DBGX substitution
15408 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15409 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15410
15411 # If the TK_BIN_DIR is the build directory (not the install directory),
15412 # then set the common variable name to the value of the build variables.
15413 # For example, the variable TK_LIB_SPEC will be set to the value
15414 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15415 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15416 # installed and uninstalled version of Tcl.
85541719 15417 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15418 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15419 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15420 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15421 elif test "`uname -s`" = "Darwin"; then
15422 # If Tk was built as a framework, attempt to use the libraries
15423 # from the framework at the given location so that linking works
15424 # against Tk.framework installed in an arbitary location.
15425 case ${TK_DEFS} in
15426 *TK_FRAMEWORK*)
85541719 15427 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15428 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15429 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15430 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15431 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15432 break
15433 fi
15434 done
15435 fi
85541719 15436 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15437 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15438 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15439 fi
15440 ;;
15441 esac
3fc11d3e
JM
15442 fi
15443
5062cc19
KS
15444 # eval is required to do the TK_DBGX substitution
15445 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15446 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15447 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15448 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15449
3fc11d3e
JM
15450
15451
bec39cab
AC
15452
15453
15454
15455
15456
15457
15458
3fc11d3e 15459
3fc11d3e 15460
bec39cab 15461
bec39cab 15462
85541719
DE
15463 # Check for in-tree Tk
15464 intree="no"
15465 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15466 intree="yes"
15467 fi
3fc11d3e 15468
85541719
DE
15469 # Find Tk private headers
15470 if test x"${intree}" = xno; then
3fc11d3e 15471
81ecdfbb
RW
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15473$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15474 private_dir=""
15475 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15476 if test -f ${dir}/tkInt.h; then
15477 private_dir=${dir}
3fc11d3e 15478 fi
bec39cab 15479
5062cc19 15480 if test x"${private_dir}" = x; then
81ecdfbb 15481 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15482 else
5062cc19 15483 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15485$as_echo "${private_dir}" >&6; }
3fc11d3e 15486 fi
3fc11d3e 15487
85541719
DE
15488 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15489 TK_LIBRARY=${TK_LIB_SPEC}
15490 TK_DEPS=""
15491 else
15492 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15493 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15494 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15495 fi
3fc11d3e
JM
15496
15497
3fc11d3e
JM
15498
15499
3fc11d3e 15500
85541719 15501 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15502
85541719
DE
15503 # Include some libraries that Tcl and Tk want.
15504 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15505 # Yes, the ordering seems wrong here. But it isn't.
15506 # TK_LIBS is the list of libraries that need to be linked
15507 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15508 # were in LIBS then any link tests after this point would
15509 # try to include things like `$(LIBGUI)', which wouldn't work.
15510 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15511
85541719
DE
15512 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15513 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15514 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15515 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15516 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15517 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15518 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15519
85541719
DE
15520 if test x$gdb_cv_os_cygwin = xyes; then
15521 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15522 WIN32LDAPP="-Wl,--subsystem,console"
15523 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15524 fi
ffc6a242 15525
81ecdfbb 15526 subdirs="$subdirs gdbtk"
3ace7edb 15527
85541719 15528 fi
3fc11d3e
JM
15529fi
15530
15531
15532
15533
15534
15535
15536
15537
81ecdfbb
RW
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15539$as_echo_n "checking for X... " >&6; }
bec39cab 15540
c906108c 15541
81ecdfbb
RW
15542# Check whether --with-x was given.
15543if test "${with_x+set}" = set; then :
15544 withval=$with_x;
15545fi
c906108c
SS
15546
15547# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15548if test "x$with_x" = xno; then
15549 # The user explicitly disabled X.
15550 have_x=disabled
15551else
81ecdfbb
RW
15552 case $x_includes,$x_libraries in #(
15553 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15554 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15555 $as_echo_n "(cached) " >&6
c906108c
SS
15556else
15557 # One or both of the vars are not set, and there is no cached value.
bec39cab 15558ac_x_includes=no ac_x_libraries=no
81ecdfbb 15559rm -f -r conftest.dir
bec39cab
AC
15560if mkdir conftest.dir; then
15561 cd conftest.dir
bec39cab 15562 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15563incroot:
15564 @echo incroot='${INCROOT}'
15565usrlibdir:
15566 @echo usrlibdir='${USRLIBDIR}'
15567libdir:
15568 @echo libdir='${LIBDIR}'
15569_ACEOF
15570 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15571 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15572 for ac_var in incroot usrlibdir libdir; do
15573 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15574 done
c906108c 15575 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15576 for ac_extension in a so sl dylib la dll; do
15577 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15578 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15579 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15580 fi
15581 done
15582 # Screen out bogus values from the imake configuration. They are
15583 # bogus both because they are the default anyway, and because
15584 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15585 case $ac_im_incroot in
81ecdfbb 15586 /usr/include) ac_x_includes= ;;
bec39cab 15587 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15588 esac
bec39cab 15589 case $ac_im_usrlibdir in
81ecdfbb 15590 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15591 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15592 esac
15593 fi
15594 cd ..
81ecdfbb 15595 rm -f -r conftest.dir
c906108c
SS
15596fi
15597
bec39cab
AC
15598# Standard set of common directories for X headers.
15599# Check X11 before X11Rn because it is often a symlink to the current release.
15600ac_x_header_dirs='
15601/usr/X11/include
81ecdfbb 15602/usr/X11R7/include
bec39cab
AC
15603/usr/X11R6/include
15604/usr/X11R5/include
15605/usr/X11R4/include
15606
15607/usr/include/X11
81ecdfbb 15608/usr/include/X11R7
bec39cab
AC
15609/usr/include/X11R6
15610/usr/include/X11R5
15611/usr/include/X11R4
15612
15613/usr/local/X11/include
81ecdfbb 15614/usr/local/X11R7/include
bec39cab
AC
15615/usr/local/X11R6/include
15616/usr/local/X11R5/include
15617/usr/local/X11R4/include
15618
15619/usr/local/include/X11
81ecdfbb 15620/usr/local/include/X11R7
bec39cab
AC
15621/usr/local/include/X11R6
15622/usr/local/include/X11R5
15623/usr/local/include/X11R4
15624
15625/usr/X386/include
15626/usr/x386/include
15627/usr/XFree86/include/X11
15628
15629/usr/include
15630/usr/local/include
15631/usr/unsupported/include
15632/usr/athena/include
15633/usr/local/x11r5/include
15634/usr/lpp/Xamples/include
15635
15636/usr/openwin/include
15637/usr/openwin/share/include'
15638
15639if test "$ac_x_includes" = no; then
81ecdfbb 15640 # Guess where to find include files, by looking for Xlib.h.
c906108c 15641 # First, try using that file with no special directory specified.
81ecdfbb 15642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15643/* end confdefs.h. */
81ecdfbb 15644#include <X11/Xlib.h>
bec39cab 15645_ACEOF
81ecdfbb 15646if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15647 # We can compile using X headers with no special include directory.
15648ac_x_includes=
15649else
bec39cab 15650 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15651 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15652 ac_x_includes=$ac_dir
15653 break
15654 fi
15655done
c906108c 15656fi
bec39cab
AC
15657rm -f conftest.err conftest.$ac_ext
15658fi # $ac_x_includes = no
c906108c 15659
bec39cab 15660if test "$ac_x_libraries" = no; then
c906108c 15661 # Check for the libraries.
c906108c
SS
15662 # See if we find them without any special options.
15663 # Don't add to $LIBS permanently.
bec39cab 15664 ac_save_LIBS=$LIBS
81ecdfbb
RW
15665 LIBS="-lX11 $LIBS"
15666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15667/* end confdefs.h. */
81ecdfbb 15668#include <X11/Xlib.h>
bec39cab
AC
15669int
15670main ()
15671{
81ecdfbb 15672XrmInitialize ()
bec39cab
AC
15673 ;
15674 return 0;
15675}
15676_ACEOF
81ecdfbb 15677if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15678 LIBS=$ac_save_LIBS
c906108c
SS
15679# We can link X programs with no special library path.
15680ac_x_libraries=
15681else
81ecdfbb
RW
15682 LIBS=$ac_save_LIBS
15683for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15684do
bec39cab 15685 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15686 for ac_extension in a so sl dylib la dll; do
15687 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15688 ac_x_libraries=$ac_dir
15689 break 2
15690 fi
15691 done
15692done
15693fi
81ecdfbb
RW
15694rm -f core conftest.err conftest.$ac_objext \
15695 conftest$ac_exeext conftest.$ac_ext
bec39cab 15696fi # $ac_x_libraries = no
c906108c 15697
81ecdfbb
RW
15698case $ac_x_includes,$ac_x_libraries in #(
15699 no,* | *,no | *\'*)
15700 # Didn't find X, or a directory has "'" in its name.
15701 ac_cv_have_x="have_x=no";; #(
15702 *)
15703 # Record where we found X for the cache.
15704 ac_cv_have_x="have_x=yes\
15705 ac_x_includes='$ac_x_includes'\
15706 ac_x_libraries='$ac_x_libraries'"
15707esac
c906108c 15708fi
81ecdfbb
RW
15709;; #(
15710 *) have_x=yes;;
15711 esac
c906108c
SS
15712 eval "$ac_cv_have_x"
15713fi # $with_x != no
15714
15715if test "$have_x" != yes; then
81ecdfbb
RW
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15717$as_echo "$have_x" >&6; }
c906108c
SS
15718 no_x=yes
15719else
15720 # If each of the values was on the command line, it overrides each guess.
15721 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15722 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15723 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15724 ac_cv_have_x="have_x=yes\
15725 ac_x_includes='$x_includes'\
15726 ac_x_libraries='$x_libraries'"
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15728$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15729fi
15730
15731
bec39cab 15732# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15733# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15734# This code just checks for a few cases where we'd like to ignore those
15735# definitions, even when they're present in the '.mt' file. These cases
15736# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15737# not part of the source tree.
7a292a7a 15738#
81ecdfbb
RW
15739# Check whether --enable-sim was given.
15740if test "${enable_sim+set}" = set; then :
15741 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15742 echo "enableval = ${enableval}";
15743 case "${enableval}" in
15744 yes) ignore_sim=false ;;
15745 no) ignore_sim=true ;;
15746 *) ignore_sim=false ;;
15747 esac
15748else
15749 ignore_sim=false
81ecdfbb
RW
15750fi
15751
7a292a7a
SS
15752
15753if test ! -d "${srcdir}/../sim"; then
15754 ignore_sim=true
15755fi
15756
9b624dbe
UW
15757SIM=
15758SIM_OBS=
15759if test "${ignore_sim}" = "false"; then
15760 if test x"${gdb_sim}" != x ; then
15761 SIM="${gdb_sim}"
15762 SIM_OBS="remote-sim.o"
60ca704f 15763
81ecdfbb 15764$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15765
9b624dbe 15766 fi
7a292a7a
SS
15767fi
15768
15769
15770
c906108c
SS
15771
15772
15773
15774
15775
15776
dfcd3bfb 15777
e56ac5c3
AC
15778
15779
b3a90332
AC
15780
15781
c35f4ffc 15782# List of host floatformats.
bec39cab
AC
15783
15784cat >>confdefs.h <<_ACEOF
c35f4ffc 15785#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15786_ACEOF
c35f4ffc 15787
bec39cab
AC
15788
15789cat >>confdefs.h <<_ACEOF
c35f4ffc 15790#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15791_ACEOF
15792
c35f4ffc 15793
bec39cab 15794cat >>confdefs.h <<_ACEOF
c35f4ffc 15795#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15796_ACEOF
c35f4ffc
AC
15797
15798
c906108c
SS
15799# target_subdir is used by the testsuite to find the target libraries.
15800target_subdir=
15801if test "${host}" != "${target}"; then
15802 target_subdir="${target_alias}/"
15803fi
15804
15805
15806frags=
771b4502 15807if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15808 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15809 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15810 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15811 fi
15812 frags="$frags $host_makefile_frag"
15813else
15814 host_makefile_frag=/dev/null
c906108c 15815fi
c906108c 15816
c906108c
SS
15817
15818
15819
771b4502 15820if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15821# We pick this up from the host configuration file (.mh) because we
15822# do not have a native configuration Makefile fragment.
c906108c
SS
15823nativefile=`sed -n '
15824s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15825' ${host_makefile_frag}`
c906108c
SS
15826fi
15827
15828
b00a8037 15829if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15830
15831cat >>confdefs.h <<_ACEOF
b00a8037 15832#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15833_ACEOF
b00a8037
DJ
15834
15835fi
15836
8dcde887 15837# Enable multi-ice-gdb-server.
81ecdfbb
RW
15838# Check whether --enable-multi-ice was given.
15839if test "${enable_multi_ice+set}" = set; then :
15840 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15841 yes | no)
15842 ;;
81ecdfbb 15843 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15844 esac
81ecdfbb 15845fi
b4e70030 15846
81ecdfbb
RW
15847if test "x$enable_multi_ice" = xyes; then
15848 subdirs="$subdirs multi-ice"
3ace7edb 15849
a85f51e7
DJ
15850fi
15851
496c0e1b
JB
15852# Check whether --enable-gdbserver was given.
15853if test "${enable_gdbserver+set}" = set; then :
15854 enableval=$enable_gdbserver; case "${enableval}" in
15855 yes| no|auto) ;;
15856 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15857esac
15858else
15859 enable_gdbserver=auto
15860fi
15861
15862
15863# We only build gdbserver automatically in a native configuration, and
15864# only if the user did not explicitly disable its build.
15865if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15867$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15868 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15870$as_echo "yes" >&6; }
15871 subdirs="$subdirs gdbserver"
3ace7edb 15872
496c0e1b 15873 gdbserver_build_enabled=yes
8dcde887 15874 else
81ecdfbb
RW
15875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15876$as_echo "no" >&6; }
8dcde887
MK
15877 fi
15878fi
15879
496c0e1b
JB
15880# If the user explicitly request the gdbserver to be built, verify that
15881# we were in fact able to enable it.
15882if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15883 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15884fi
15885
db985757 15886# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15887# to an empty version.
c906108c
SS
15888
15889files=
15890links=
5a2402b8 15891
c906108c
SS
15892rm -f nm.h
15893if test "${nativefile}" != ""; then
0f475e27
AC
15894 case "${nativefile}" in
15895 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15896 * ) GDB_NM_FILE="${nativefile}"
15897 esac
5a2402b8
AC
15898 files="${files} ${GDB_NM_FILE}"
15899 links="${links} nm.h"
60ca704f
SE
15900
15901cat >>confdefs.h <<_ACEOF
b78960be 15902#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15903_ACEOF
5a2402b8 15904
c906108c 15905fi
5a2402b8
AC
15906
15907
bec39cab
AC
15908ac_sources="$files"
15909ac_dests="$links"
15910while test -n "$ac_sources"; do
15911 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15912 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15913 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15914done
81ecdfbb 15915ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15916
15917
c906108c
SS
15918
15919
c906108c 15920
81ecdfbb 15921$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15922
bec39cab 15923
5ae98d25 15924ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile"
81ecdfbb
RW
15925
15926ac_config_commands="$ac_config_commands default"
89a34d1b 15927
bec39cab
AC
15928cat >confcache <<\_ACEOF
15929# This file is a shell script that caches the results of configure
15930# tests run on this system so they can be shared between configure
15931# scripts and configure runs, see configure's option --config-cache.
15932# It is not useful on other systems. If it contains results you don't
15933# want to keep, you may remove or edit it.
15934#
15935# config.status only pays attention to the cache file if you give it
15936# the --recheck option to rerun configure.
15937#
15938# `ac_cv_env_foo' variables (set or unset) will be overridden when
15939# loading this file, other *unset* `ac_cv_foo' will be assigned the
15940# following values.
15941
15942_ACEOF
15943
15944# The following way of writing the cache mishandles newlines in values,
15945# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15946# So, we kill variables containing newlines.
bec39cab
AC
15947# Ultrix sh set writes to stderr and can't be redirected directly,
15948# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15949(
15950 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15951 eval ac_val=\$$ac_var
15952 case $ac_val in #(
15953 *${as_nl}*)
15954 case $ac_var in #(
15955 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15956$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15957 esac
15958 case $ac_var in #(
15959 _ | IFS | as_nl) ;; #(
15960 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15961 *) { eval $ac_var=; unset $ac_var;} ;;
15962 esac ;;
15963 esac
15964 done
15965
bec39cab 15966 (set) 2>&1 |
81ecdfbb
RW
15967 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15968 *${as_nl}ac_space=\ *)
15969 # `set' does not quote correctly, so add quotes: double-quote
15970 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15971 sed -n \
15972 "s/'/'\\\\''/g;
15973 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15974 ;; #(
bec39cab
AC
15975 *)
15976 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15977 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15978 ;;
81ecdfbb
RW
15979 esac |
15980 sort
15981) |
bec39cab 15982 sed '
81ecdfbb 15983 /^ac_cv_env_/b end
bec39cab 15984 t clear
81ecdfbb 15985 :clear
bec39cab
AC
15986 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15987 t end
81ecdfbb
RW
15988 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15989 :end' >>confcache
15990if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15991 if test -w "$cache_file"; then
15992 test "x$cache_file" != "x/dev/null" &&
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15994$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15995 cat confcache >$cache_file
15996 else
81ecdfbb
RW
15997 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15998$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15999 fi
16000fi
16001rm -f confcache
16002
16003test "x$prefix" = xNONE && prefix=$ac_default_prefix
16004# Let make expand exec_prefix.
16005test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16006
bec39cab
AC
16007DEFS=-DHAVE_CONFIG_H
16008
16009ac_libobjs=
16010ac_ltlibobjs=
16011for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16012 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16013 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16014 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16015 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16016 # will be set to the directory where LIBOBJS objects are built.
16017 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16018 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16019done
16020LIBOBJS=$ac_libobjs
16021
16022LTLIBOBJS=$ac_ltlibobjs
16023
16024
85981d60 16025if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16026 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16027Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16028fi
a417dc56 16029if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16030 as_fn_error "conditional \"GMAKE\" was never defined.
16031Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16032fi
783e057b 16033if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
81ecdfbb
RW
16034 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
16035Usually this means the macro was only invoked conditionally." "$LINENO" 5
783e057b
DJ
16036fi
16037
16038 gl_libobjs=
16039 gl_ltlibobjs=
16040 if test -n "$gl_LIBOBJS"; then
16041 # Remove the extension.
16042 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16043 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16044 gl_libobjs="$gl_libobjs $i.$ac_objext"
16045 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
16046 done
16047 fi
16048 gl_LIBOBJS=$gl_libobjs
16049
16050 gl_LTLIBOBJS=$gl_ltlibobjs
16051
16052
16053
16054 gltests_libobjs=
16055 gltests_ltlibobjs=
16056 if test -n "$gltests_LIBOBJS"; then
16057 # Remove the extension.
16058 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 16059 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
783e057b
DJ
16060 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
16061 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
16062 done
16063 fi
16064 gltests_LIBOBJS=$gltests_libobjs
16065
16066 gltests_LTLIBOBJS=$gltests_ltlibobjs
16067
16068
e28b3332 16069if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
81ecdfbb
RW
16070 as_fn_error "conditional \"AMDEP\" was never defined.
16071Usually this means the macro was only invoked conditionally." "$LINENO" 5
e28b3332
DJ
16072fi
16073if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
81ecdfbb
RW
16074 as_fn_error "conditional \"am__fastdepCC\" was never defined.
16075Usually this means the macro was only invoked conditionally." "$LINENO" 5
16076fi
16077 if test -n "$EXEEXT"; then
16078 am__EXEEXT_TRUE=
16079 am__EXEEXT_FALSE='#'
16080else
16081 am__EXEEXT_TRUE='#'
16082 am__EXEEXT_FALSE=
e28b3332 16083fi
bec39cab 16084
81ecdfbb
RW
16085
16086
bec39cab 16087: ${CONFIG_STATUS=./config.status}
81ecdfbb 16088ac_write_fail=0
bec39cab
AC
16089ac_clean_files_save=$ac_clean_files
16090ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16092$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16093as_write_fail=0
16094cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16095#! $SHELL
16096# Generated by $as_me.
16097# Run this file to recreate the current configuration.
16098# Compiler output produced by configure, useful for debugging
16099# configure, is in config.log if it exists.
16100
16101debug=false
16102ac_cs_recheck=false
16103ac_cs_silent=false
bec39cab 16104
81ecdfbb
RW
16105SHELL=\${CONFIG_SHELL-$SHELL}
16106export SHELL
16107_ASEOF
16108cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16109## -------------------- ##
16110## M4sh Initialization. ##
16111## -------------------- ##
16112
16113# Be more Bourne compatible
16114DUALCASE=1; export DUALCASE # for MKS sh
16115if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16116 emulate sh
16117 NULLCMD=:
81ecdfbb 16118 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16119 # is contrary to our usage. Disable this feature.
16120 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16121 setopt NO_GLOB_SUBST
16122else
16123 case `(set -o) 2>/dev/null` in #(
16124 *posix*) :
16125 set -o posix ;; #(
16126 *) :
16127 ;;
16128esac
bec39cab 16129fi
bec39cab 16130
81ecdfbb
RW
16131
16132as_nl='
16133'
16134export as_nl
16135# Printing a long string crashes Solaris 7 /usr/bin/printf.
16136as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16137as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16138as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16139# Prefer a ksh shell builtin over an external printf program on Solaris,
16140# but without wasting forks for bash or zsh.
16141if test -z "$BASH_VERSION$ZSH_VERSION" \
16142 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16143 as_echo='print -r --'
16144 as_echo_n='print -rn --'
16145elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16146 as_echo='printf %s\n'
16147 as_echo_n='printf %s'
16148else
16149 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16150 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16151 as_echo_n='/usr/ucb/echo -n'
16152 else
16153 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16154 as_echo_n_body='eval
16155 arg=$1;
16156 case $arg in #(
16157 *"$as_nl"*)
16158 expr "X$arg" : "X\\(.*\\)$as_nl";
16159 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16160 esac;
16161 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16162 '
16163 export as_echo_n_body
16164 as_echo_n='sh -c $as_echo_n_body as_echo'
16165 fi
16166 export as_echo_body
16167 as_echo='sh -c $as_echo_body as_echo'
16168fi
16169
16170# The user is always right.
16171if test "${PATH_SEPARATOR+set}" != set; then
16172 PATH_SEPARATOR=:
16173 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16174 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16175 PATH_SEPARATOR=';'
16176 }
bec39cab
AC
16177fi
16178
16179
81ecdfbb
RW
16180# IFS
16181# We need space, tab and new line, in precisely that order. Quoting is
16182# there to prevent editors from complaining about space-tab.
16183# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16184# splitting by setting IFS to empty value.)
16185IFS=" "" $as_nl"
16186
16187# Find who we are. Look in the path if we contain no directory separator.
16188case $0 in #((
16189 *[\\/]* ) as_myself=$0 ;;
16190 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16191for as_dir in $PATH
16192do
16193 IFS=$as_save_IFS
16194 test -z "$as_dir" && as_dir=.
16195 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16196 done
16197IFS=$as_save_IFS
16198
16199 ;;
16200esac
16201# We did not find ourselves, most probably we were run as `sh COMMAND'
16202# in which case we are not to be found in the path.
16203if test "x$as_myself" = x; then
16204 as_myself=$0
16205fi
16206if test ! -f "$as_myself"; then
16207 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16208 exit 1
16209fi
16210
16211# Unset variables that we do not need and which cause bugs (e.g. in
16212# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16213# suppresses any "Segmentation fault" message there. '((' could
16214# trigger a bug in pdksh 5.2.14.
16215for as_var in BASH_ENV ENV MAIL MAILPATH
16216do eval test x\${$as_var+set} = xset \
16217 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16218done
bec39cab
AC
16219PS1='$ '
16220PS2='> '
16221PS4='+ '
16222
16223# NLS nuisances.
81ecdfbb
RW
16224LC_ALL=C
16225export LC_ALL
16226LANGUAGE=C
16227export LANGUAGE
16228
16229# CDPATH.
16230(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16231
16232
16233# as_fn_error ERROR [LINENO LOG_FD]
16234# ---------------------------------
16235# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16236# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16237# script with status $?, using 1 if that was 0.
16238as_fn_error ()
16239{
16240 as_status=$?; test $as_status -eq 0 && as_status=1
16241 if test "$3"; then
16242 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16243 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16244 fi
16245 $as_echo "$as_me: error: $1" >&2
16246 as_fn_exit $as_status
16247} # as_fn_error
16248
16249
16250# as_fn_set_status STATUS
16251# -----------------------
16252# Set $? to STATUS, without forking.
16253as_fn_set_status ()
16254{
16255 return $1
16256} # as_fn_set_status
16257
16258# as_fn_exit STATUS
16259# -----------------
16260# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16261as_fn_exit ()
16262{
16263 set +e
16264 as_fn_set_status $1
16265 exit $1
16266} # as_fn_exit
16267
16268# as_fn_unset VAR
16269# ---------------
16270# Portably unset VAR.
16271as_fn_unset ()
16272{
16273 { eval $1=; unset $1;}
16274}
16275as_unset=as_fn_unset
16276# as_fn_append VAR VALUE
16277# ----------------------
16278# Append the text in VALUE to the end of the definition contained in VAR. Take
16279# advantage of any shell optimizations that allow amortized linear growth over
16280# repeated appends, instead of the typical quadratic growth present in naive
16281# implementations.
16282if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16283 eval 'as_fn_append ()
16284 {
16285 eval $1+=\$2
16286 }'
16287else
16288 as_fn_append ()
16289 {
16290 eval $1=\$$1\$2
16291 }
16292fi # as_fn_append
16293
16294# as_fn_arith ARG...
16295# ------------------
16296# Perform arithmetic evaluation on the ARGs, and store the result in the
16297# global $as_val. Take advantage of shells that can avoid forks. The arguments
16298# must be portable across $(()) and expr.
16299if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16300 eval 'as_fn_arith ()
16301 {
16302 as_val=$(( $* ))
16303 }'
16304else
16305 as_fn_arith ()
16306 {
16307 as_val=`expr "$@" || test $? -eq 1`
16308 }
16309fi # as_fn_arith
bec39cab 16310
81ecdfbb
RW
16311
16312if expr a : '\(a\)' >/dev/null 2>&1 &&
16313 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16314 as_expr=expr
16315else
16316 as_expr=false
16317fi
16318
81ecdfbb 16319if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16320 as_basename=basename
16321else
16322 as_basename=false
16323fi
16324
81ecdfbb
RW
16325if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16326 as_dirname=dirname
16327else
16328 as_dirname=false
16329fi
bec39cab 16330
81ecdfbb 16331as_me=`$as_basename -- "$0" ||
bec39cab
AC
16332$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16333 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16334 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16335$as_echo X/"$0" |
16336 sed '/^.*\/\([^/][^/]*\)\/*$/{
16337 s//\1/
16338 q
16339 }
16340 /^X\/\(\/\/\)$/{
16341 s//\1/
16342 q
16343 }
16344 /^X\/\(\/\).*/{
16345 s//\1/
16346 q
16347 }
16348 s/.*/./; q'`
b4e70030 16349
b4e70030
JB
16350# Avoid depending upon Character Ranges.
16351as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16352as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16353as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16354as_cr_digits='0123456789'
16355as_cr_alnum=$as_cr_Letters$as_cr_digits
16356
81ecdfbb
RW
16357ECHO_C= ECHO_N= ECHO_T=
16358case `echo -n x` in #(((((
16359-n*)
16360 case `echo 'xy\c'` in
16361 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16362 xy) ECHO_C='\c';;
16363 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16364 ECHO_T=' ';;
16365 esac;;
16366*)
16367 ECHO_N='-n';;
bec39cab
AC
16368esac
16369
81ecdfbb
RW
16370rm -f conf$$ conf$$.exe conf$$.file
16371if test -d conf$$.dir; then
16372 rm -f conf$$.dir/conf$$.file
bec39cab 16373else
81ecdfbb
RW
16374 rm -f conf$$.dir
16375 mkdir conf$$.dir 2>/dev/null
bec39cab 16376fi
81ecdfbb
RW
16377if (echo >conf$$.file) 2>/dev/null; then
16378 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16379 as_ln_s='ln -s'
81ecdfbb
RW
16380 # ... but there are two gotchas:
16381 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16382 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16383 # In both cases, we have to default to `cp -p'.
16384 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16385 as_ln_s='cp -p'
16386 elif ln conf$$.file conf$$ 2>/dev/null; then
16387 as_ln_s=ln
16388 else
16389 as_ln_s='cp -p'
b4e70030 16390 fi
bec39cab
AC
16391else
16392 as_ln_s='cp -p'
16393fi
81ecdfbb
RW
16394rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16395rmdir conf$$.dir 2>/dev/null
16396
16397
16398# as_fn_mkdir_p
16399# -------------
16400# Create "$as_dir" as a directory, including parents if necessary.
16401as_fn_mkdir_p ()
16402{
16403
16404 case $as_dir in #(
16405 -*) as_dir=./$as_dir;;
16406 esac
16407 test -d "$as_dir" || eval $as_mkdir_p || {
16408 as_dirs=
16409 while :; do
16410 case $as_dir in #(
16411 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16412 *) as_qdir=$as_dir;;
16413 esac
16414 as_dirs="'$as_qdir' $as_dirs"
16415 as_dir=`$as_dirname -- "$as_dir" ||
16416$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16417 X"$as_dir" : 'X\(//\)[^/]' \| \
16418 X"$as_dir" : 'X\(//\)$' \| \
16419 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16420$as_echo X"$as_dir" |
16421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16422 s//\1/
16423 q
16424 }
16425 /^X\(\/\/\)[^/].*/{
16426 s//\1/
16427 q
16428 }
16429 /^X\(\/\/\)$/{
16430 s//\1/
16431 q
16432 }
16433 /^X\(\/\).*/{
16434 s//\1/
16435 q
16436 }
16437 s/.*/./; q'`
16438 test -d "$as_dir" && break
16439 done
16440 test -z "$as_dirs" || eval "mkdir $as_dirs"
16441 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16442
bec39cab 16443
81ecdfbb 16444} # as_fn_mkdir_p
bec39cab 16445if mkdir -p . 2>/dev/null; then
81ecdfbb 16446 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16447else
16448 test -d ./-p && rmdir ./-p
16449 as_mkdir_p=false
16450fi
16451
81ecdfbb
RW
16452if test -x / >/dev/null 2>&1; then
16453 as_test_x='test -x'
16454else
16455 if ls -dL / >/dev/null 2>&1; then
16456 as_ls_L_option=L
16457 else
16458 as_ls_L_option=
16459 fi
16460 as_test_x='
16461 eval sh -c '\''
16462 if test -d "$1"; then
16463 test -d "$1/.";
16464 else
16465 case $1 in #(
16466 -*)set "./$1";;
16467 esac;
16468 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16469 ???[sx]*):;;*)false;;esac;fi
16470 '\'' sh
16471 '
16472fi
16473as_executable_p=$as_test_x
bec39cab
AC
16474
16475# Sed expression to map a string onto a valid CPP name.
16476as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16477
16478# Sed expression to map a string onto a valid variable name.
16479as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16480
16481
bec39cab 16482exec 6>&1
81ecdfbb
RW
16483## ----------------------------------- ##
16484## Main body of $CONFIG_STATUS script. ##
16485## ----------------------------------- ##
16486_ASEOF
16487test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16488
16489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16490# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16491# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16492# values after options handling.
16493ac_log="
bec39cab 16494This file was extended by $as_me, which was
81ecdfbb 16495generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16496
16497 CONFIG_FILES = $CONFIG_FILES
16498 CONFIG_HEADERS = $CONFIG_HEADERS
16499 CONFIG_LINKS = $CONFIG_LINKS
16500 CONFIG_COMMANDS = $CONFIG_COMMANDS
16501 $ $0 $@
16502
81ecdfbb
RW
16503on `(hostname || uname -n) 2>/dev/null | sed 1q`
16504"
16505
bec39cab
AC
16506_ACEOF
16507
81ecdfbb
RW
16508case $ac_config_files in *"
16509"*) set x $ac_config_files; shift; ac_config_files=$*;;
16510esac
234b45d4 16511
81ecdfbb
RW
16512case $ac_config_headers in *"
16513"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16514esac
b4e70030 16515
b4e70030 16516
81ecdfbb
RW
16517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16518# Files that config.status was made for.
16519config_files="$ac_config_files"
16520config_headers="$ac_config_headers"
16521config_links="$ac_config_links"
16522config_commands="$ac_config_commands"
234b45d4 16523
81ecdfbb 16524_ACEOF
b4e70030 16525
81ecdfbb 16526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16527ac_cs_usage="\
81ecdfbb
RW
16528\`$as_me' instantiates files and other configuration actions
16529from templates according to the current configuration. Unless the files
16530and actions are specified as TAGs, all are instantiated by default.
234b45d4 16531
81ecdfbb 16532Usage: $0 [OPTION]... [TAG]...
234b45d4 16533
bec39cab 16534 -h, --help print this help, then exit
81ecdfbb
RW
16535 -V, --version print version number and configuration settings, then exit
16536 -q, --quiet, --silent
16537 do not print progress messages
bec39cab
AC
16538 -d, --debug don't remove temporary files
16539 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16540 --file=FILE[:TEMPLATE]
16541 instantiate the configuration file FILE
16542 --header=FILE[:TEMPLATE]
16543 instantiate the configuration header FILE
234b45d4 16544
bec39cab
AC
16545Configuration files:
16546$config_files
234b45d4 16547
bec39cab
AC
16548Configuration headers:
16549$config_headers
234b45d4 16550
bec39cab
AC
16551Configuration links:
16552$config_links
234b45d4 16553
bec39cab
AC
16554Configuration commands:
16555$config_commands
16556
81ecdfbb 16557Report bugs to the package provider."
b4e70030 16558
81ecdfbb
RW
16559_ACEOF
16560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16561ac_cs_version="\\
16562config.status
81ecdfbb
RW
16563configured by $0, generated by GNU Autoconf 2.64,
16564 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16565
81ecdfbb 16566Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16567This config.status script is free software; the Free Software Foundation
16568gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16569
16570ac_pwd='$ac_pwd'
16571srcdir='$srcdir'
16572INSTALL='$INSTALL'
16573MKDIR_P='$MKDIR_P'
16574AWK='$AWK'
16575test -n "\$AWK" || AWK=awk
bec39cab
AC
16576_ACEOF
16577
81ecdfbb
RW
16578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16579# The default lists apply if the user does not specify any file.
bec39cab
AC
16580ac_need_defaults=:
16581while test $# != 0
16582do
16583 case $1 in
16584 --*=*)
81ecdfbb
RW
16585 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16586 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16587 ac_shift=:
c906108c 16588 ;;
81ecdfbb 16589 *)
bec39cab
AC
16590 ac_option=$1
16591 ac_optarg=$2
16592 ac_shift=shift
c906108c 16593 ;;
bec39cab 16594 esac
c906108c 16595
bec39cab
AC
16596 case $ac_option in
16597 # Handling of the options.
bec39cab
AC
16598 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16599 ac_cs_recheck=: ;;
81ecdfbb
RW
16600 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16601 $as_echo "$ac_cs_version"; exit ;;
16602 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16603 debug=: ;;
16604 --file | --fil | --fi | --f )
16605 $ac_shift
81ecdfbb
RW
16606 case $ac_optarg in
16607 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16608 esac
16609 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16610 ac_need_defaults=false;;
16611 --header | --heade | --head | --hea )
16612 $ac_shift
81ecdfbb
RW
16613 case $ac_optarg in
16614 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16615 esac
16616 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16617 ac_need_defaults=false;;
81ecdfbb
RW
16618 --he | --h)
16619 # Conflict between --help and --header
16620 as_fn_error "ambiguous option: \`$1'
16621Try \`$0 --help' for more information.";;
16622 --help | --hel | -h )
16623 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16624 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16625 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16626 ac_cs_silent=: ;;
c906108c 16627
bec39cab 16628 # This is an error.
81ecdfbb
RW
16629 -*) as_fn_error "unrecognized option: \`$1'
16630Try \`$0 --help' for more information." ;;
c906108c 16631
81ecdfbb
RW
16632 *) as_fn_append ac_config_targets " $1"
16633 ac_need_defaults=false ;;
c906108c 16634
bec39cab
AC
16635 esac
16636 shift
16637done
c906108c 16638
bec39cab 16639ac_configure_extra_args=
c906108c 16640
bec39cab
AC
16641if $ac_cs_silent; then
16642 exec 6>/dev/null
16643 ac_configure_extra_args="$ac_configure_extra_args --silent"
16644fi
c906108c 16645
bec39cab 16646_ACEOF
81ecdfbb 16647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16648if \$ac_cs_recheck; then
81ecdfbb
RW
16649 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16650 shift
16651 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16652 CONFIG_SHELL='$SHELL'
16653 export CONFIG_SHELL
16654 exec "\$@"
bec39cab
AC
16655fi
16656
16657_ACEOF
81ecdfbb
RW
16658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16659exec 5>>config.log
16660{
16661 echo
16662 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16663## Running $as_me. ##
16664_ASBOX
16665 $as_echo "$ac_log"
16666} >&5
bec39cab 16667
81ecdfbb
RW
16668_ACEOF
16669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16670#
81ecdfbb 16671# INIT-COMMANDS
c906108c 16672#
a417dc56 16673ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 16674AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 16675
bec39cab
AC
16676_ACEOF
16677
81ecdfbb 16678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16679
81ecdfbb 16680# Handling of arguments.
bec39cab 16681for ac_config_target in $ac_config_targets
c906108c 16682do
81ecdfbb
RW
16683 case $ac_config_target in
16684 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16685 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16686 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16687 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16688 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16689 ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
5ae98d25 16690 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
81ecdfbb 16691 "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
aa2e2d8d 16692 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16693 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16694
16695 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16696 esac
16697done
16698
81ecdfbb 16699
bec39cab
AC
16700# If the user did not use the arguments to specify the items to instantiate,
16701# then the envvar interface is used. Set only those that are not.
16702# We use the long form for the default assignment because of an extremely
16703# bizarre bug on SunOS 4.1.3.
16704if $ac_need_defaults; then
16705 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16706 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16707 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16708 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16709fi
16710
b4e70030 16711# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16712# simply because there is no reason against having it here, and in addition,
b4e70030 16713# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16714# Hook for its removal unless debugging.
16715# Note that there is a small window in which the directory will not be cleaned:
16716# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16717$debug ||
16718{
81ecdfbb
RW
16719 tmp=
16720 trap 'exit_status=$?
16721 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16722' 0
16723 trap 'as_fn_exit 1' 1 2 13 15
16724}
16725# Create a (secure) tmp directory for tmp files.
16726
16727{
16728 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16729 test -n "$tmp" && test -d "$tmp"
16730} ||
16731{
16732 tmp=./conf$$-$RANDOM
16733 (umask 077 && mkdir "$tmp")
16734} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16735
16736# Set up the scripts for CONFIG_FILES section.
16737# No need to generate them if there are no CONFIG_FILES.
16738# This happens for instance with `./config.status config.h'.
16739if test -n "$CONFIG_FILES"; then
16740
16741if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16742 ac_cs_awk_getline=:
16743 ac_cs_awk_pipe_init=
16744 ac_cs_awk_read_file='
16745 while ((getline aline < (F[key])) > 0)
16746 print(aline)
16747 close(F[key])'
16748 ac_cs_awk_pipe_fini=
16749else
16750 ac_cs_awk_getline=false
16751 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16752 ac_cs_awk_read_file='
16753 print "|#_!!_#|"
16754 print "cat " F[key] " &&"
16755 '$ac_cs_awk_pipe_init
16756 # The final `:' finishes the AND list.
16757 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16758fi
16759ac_cr=`echo X | tr X '\015'`
16760# On cygwin, bash can eat \r inside `` if the user requested igncr.
16761# But we know of no other shell where ac_cr would be empty at this
16762# point, so we can use a bashism as a fallback.
16763if test "x$ac_cr" = x; then
16764 eval ac_cr=\$\'\\r\'
16765fi
16766ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16767if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16768 ac_cs_awk_cr='\r'
16769else
16770 ac_cs_awk_cr=$ac_cr
16771fi
16772
16773echo 'BEGIN {' >"$tmp/subs1.awk" &&
16774_ACEOF
16775
16776# Create commands to substitute file output variables.
16777{
16778 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16779 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16780 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16781 echo "_ACAWK" &&
16782 echo "_ACEOF"
16783} >conf$$files.sh &&
16784. ./conf$$files.sh ||
16785 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16786rm -f conf$$files.sh
16787
16788{
16789 echo "cat >conf$$subs.awk <<_ACEOF" &&
16790 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16791 echo "_ACEOF"
16792} >conf$$subs.sh ||
16793 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16794ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16795ac_delim='%!_!# '
16796for ac_last_try in false false false false false :; do
16797 . ./conf$$subs.sh ||
16798 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16799
16800 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16801 if test $ac_delim_n = $ac_delim_num; then
16802 break
16803 elif $ac_last_try; then
16804 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16805 else
16806 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16807 fi
16808done
16809rm -f conf$$subs.sh
16810
16811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16812cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16813_ACEOF
16814sed -n '
16815h
16816s/^/S["/; s/!.*/"]=/
16817p
16818g
16819s/^[^!]*!//
16820:repl
16821t repl
16822s/'"$ac_delim"'$//
16823t delim
16824:nl
16825h
16826s/\(.\{148\}\).*/\1/
16827t more1
16828s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16829p
16830n
16831b repl
16832:more1
16833s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16834p
16835g
16836s/.\{148\}//
16837t nl
16838:delim
16839h
16840s/\(.\{148\}\).*/\1/
16841t more2
16842s/["\\]/\\&/g; s/^/"/; s/$/"/
16843p
16844b
16845:more2
16846s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16847p
16848g
16849s/.\{148\}//
16850t delim
16851' <conf$$subs.awk | sed '
16852/^[^""]/{
16853 N
16854 s/\n//
16855}
16856' >>$CONFIG_STATUS || ac_write_fail=1
16857rm -f conf$$subs.awk
16858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16859_ACAWK
16860cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16861 for (key in S) S_is_set[key] = 1
16862 FS = "\a"
16863 \$ac_cs_awk_pipe_init
16864}
16865{
16866 line = $ 0
16867 nfields = split(line, field, "@")
16868 substed = 0
16869 len = length(field[1])
16870 for (i = 2; i < nfields; i++) {
16871 key = field[i]
16872 keylen = length(key)
16873 if (S_is_set[key]) {
16874 value = S[key]
16875 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16876 len += length(value) + length(field[++i])
16877 substed = 1
16878 } else
16879 len += 1 + keylen
16880 }
16881 if (nfields == 3 && !substed) {
16882 key = field[2]
16883 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16884 \$ac_cs_awk_read_file
16885 next
16886 }
16887 }
16888 print line
b4e70030 16889}
81ecdfbb
RW
16890\$ac_cs_awk_pipe_fini
16891_ACAWK
16892_ACEOF
16893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16894if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16895 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16896else
16897 cat
16898fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16899 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16900_ACEOF
16901
16902# VPATH may cause trouble with some makes, so we remove $(srcdir),
16903# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16904# trailing colons and then remove the whole line if VPATH becomes empty
16905# (actually we leave an empty line to preserve line numbers).
16906if test "x$srcdir" = x.; then
16907 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16908s/:*\$(srcdir):*/:/
16909s/:*\${srcdir}:*/:/
16910s/:*@srcdir@:*/:/
16911s/^\([^=]*=[ ]*\):*/\1/
16912s/:*$//
16913s/^[^=]*=[ ]*$//
16914}'
16915fi
16916
16917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16918fi # test -n "$CONFIG_FILES"
16919
16920# Set up the scripts for CONFIG_HEADERS section.
16921# No need to generate them if there are no CONFIG_HEADERS.
16922# This happens for instance with `./config.status Makefile'.
16923if test -n "$CONFIG_HEADERS"; then
16924cat >"$tmp/defines.awk" <<\_ACAWK ||
16925BEGIN {
16926_ACEOF
16927
16928# Transform confdefs.h into an awk script `defines.awk', embedded as
16929# here-document in config.status, that substitutes the proper values into
16930# config.h.in to produce config.h.
4e8d927d 16931
81ecdfbb
RW
16932# Create a delimiter string that does not exist in confdefs.h, to ease
16933# handling of long lines.
16934ac_delim='%!_!# '
16935for ac_last_try in false false :; do
16936 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16937 if test -z "$ac_t"; then
16938 break
16939 elif $ac_last_try; then
16940 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16941 else
16942 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16943 fi
16944done
4e8d927d 16945
81ecdfbb
RW
16946# For the awk script, D is an array of macro values keyed by name,
16947# likewise P contains macro parameters if any. Preserve backslash
16948# newline sequences.
16949
16950ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16951sed -n '
16952s/.\{148\}/&'"$ac_delim"'/g
16953t rset
16954:rset
16955s/^[ ]*#[ ]*define[ ][ ]*/ /
16956t def
16957d
16958:def
16959s/\\$//
16960t bsnl
16961s/["\\]/\\&/g
16962s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16963D["\1"]=" \3"/p
16964s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16965d
16966:bsnl
16967s/["\\]/\\&/g
16968s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16969D["\1"]=" \3\\\\\\n"\\/p
16970t cont
16971s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16972t cont
16973d
16974:cont
16975n
16976s/.\{148\}/&'"$ac_delim"'/g
16977t clear
16978:clear
16979s/\\$//
16980t bsnlc
16981s/["\\]/\\&/g; s/^/"/; s/$/"/p
16982d
16983:bsnlc
16984s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16985b cont
16986' <confdefs.h | sed '
16987s/'"$ac_delim"'/"\\\
16988"/g' >>$CONFIG_STATUS || ac_write_fail=1
16989
16990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16991 for (key in D) D_is_set[key] = 1
16992 FS = "\a"
16993}
16994/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16995 line = \$ 0
16996 split(line, arg, " ")
16997 if (arg[1] == "#") {
16998 defundef = arg[2]
16999 mac1 = arg[3]
17000 } else {
17001 defundef = substr(arg[1], 2)
17002 mac1 = arg[2]
17003 }
17004 split(mac1, mac2, "(") #)
17005 macro = mac2[1]
17006 prefix = substr(line, 1, index(line, defundef) - 1)
17007 if (D_is_set[macro]) {
17008 # Preserve the white space surrounding the "#".
17009 print prefix "define", macro P[macro] D[macro]
17010 next
17011 } else {
17012 # Replace #undef with comments. This is necessary, for example,
17013 # in the case of _POSIX_SOURCE, which is predefined and required
17014 # on some systems where configure will not decide to define it.
17015 if (defundef == "undef") {
17016 print "/*", prefix defundef, macro, "*/"
17017 next
17018 }
17019 }
b4e70030 17020}
81ecdfbb
RW
17021{ print }
17022_ACAWK
b4e70030 17023_ACEOF
81ecdfbb
RW
17024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17025 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17026fi # test -n "$CONFIG_HEADERS"
4e8d927d 17027
4e8d927d 17028
81ecdfbb
RW
17029eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17030shift
17031for ac_tag
17032do
17033 case $ac_tag in
17034 :[FHLC]) ac_mode=$ac_tag; continue;;
17035 esac
17036 case $ac_mode$ac_tag in
17037 :[FHL]*:*);;
17038 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17039 :[FH]-) ac_tag=-:-;;
17040 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17041 esac
17042 ac_save_IFS=$IFS
17043 IFS=:
17044 set x $ac_tag
17045 IFS=$ac_save_IFS
17046 shift
17047 ac_file=$1
17048 shift
4e8d927d 17049
81ecdfbb
RW
17050 case $ac_mode in
17051 :L) ac_source=$1;;
17052 :[FH])
17053 ac_file_inputs=
17054 for ac_f
17055 do
17056 case $ac_f in
17057 -) ac_f="$tmp/stdin";;
17058 *) # Look for the file first in the build tree, then in the source tree
17059 # (if the path is not absolute). The absolute path cannot be DOS-style,
17060 # because $ac_f cannot contain `:'.
17061 test -f "$ac_f" ||
17062 case $ac_f in
17063 [\\/$]*) false;;
17064 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17065 esac ||
17066 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17067 esac
17068 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17069 as_fn_append ac_file_inputs " '$ac_f'"
17070 done
17071
17072 # Let's still pretend it is `configure' which instantiates (i.e., don't
17073 # use $as_me), people would be surprised to read:
17074 # /* config.h. Generated by config.status. */
17075 configure_input='Generated from '`
17076 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17077 `' by configure.'
17078 if test x"$ac_file" != x-; then
17079 configure_input="$ac_file. $configure_input"
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17081$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17082 fi
81ecdfbb
RW
17083 # Neutralize special characters interpreted by sed in replacement strings.
17084 case $configure_input in #(
17085 *\&* | *\|* | *\\* )
17086 ac_sed_conf_input=`$as_echo "$configure_input" |
17087 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17088 *) ac_sed_conf_input=$configure_input;;
17089 esac
4e8d927d 17090
81ecdfbb
RW
17091 case $ac_tag in
17092 *:-:* | *:-) cat >"$tmp/stdin" \
17093 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17094 esac
17095 ;;
c906108c
SS
17096 esac
17097
81ecdfbb 17098 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17099$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17100 X"$ac_file" : 'X\(//\)[^/]' \| \
17101 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17102 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17103$as_echo X"$ac_file" |
17104 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17105 s//\1/
17106 q
17107 }
17108 /^X\(\/\/\)[^/].*/{
17109 s//\1/
17110 q
17111 }
17112 /^X\(\/\/\)$/{
17113 s//\1/
17114 q
17115 }
17116 /^X\(\/\).*/{
17117 s//\1/
17118 q
17119 }
17120 s/.*/./; q'`
17121 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17122 ac_builddir=.
17123
81ecdfbb
RW
17124case "$ac_dir" in
17125.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17126*)
17127 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17128 # A ".." for each directory in $ac_dir_suffix.
17129 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17130 case $ac_top_builddir_sub in
17131 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17132 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17133 esac ;;
17134esac
17135ac_abs_top_builddir=$ac_pwd
17136ac_abs_builddir=$ac_pwd$ac_dir_suffix
17137# for backward compatibility:
17138ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17139
17140case $srcdir in
81ecdfbb 17141 .) # We are building in place.
bec39cab 17142 ac_srcdir=.
81ecdfbb
RW
17143 ac_top_srcdir=$ac_top_builddir_sub
17144 ac_abs_top_srcdir=$ac_pwd ;;
17145 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17146 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17147 ac_top_srcdir=$srcdir
17148 ac_abs_top_srcdir=$srcdir ;;
17149 *) # Relative name.
17150 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17151 ac_top_srcdir=$ac_top_build_prefix$srcdir
17152 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17153esac
81ecdfbb 17154ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17155
c906108c 17156
81ecdfbb
RW
17157 case $ac_mode in
17158 :F)
17159 #
17160 # CONFIG_FILE
17161 #
c906108c 17162
bec39cab
AC
17163 case $INSTALL in
17164 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17165 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17166 esac
81ecdfbb
RW
17167 ac_MKDIR_P=$MKDIR_P
17168 case $MKDIR_P in
17169 [\\/$]* | ?:[\\/]* ) ;;
17170 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17171 esac
17172_ACEOF
121ce6e5 17173
81ecdfbb
RW
17174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17175# If the template does not know about datarootdir, expand it.
17176# FIXME: This hack should be removed a few years after 2.60.
17177ac_datarootdir_hack=; ac_datarootdir_seen=
17178ac_sed_dataroot='
17179/datarootdir/ {
17180 p
17181 q
17182}
17183/@datadir@/p
17184/@docdir@/p
17185/@infodir@/p
17186/@localedir@/p
17187/@mandir@/p'
17188case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17189*datarootdir*) ac_datarootdir_seen=yes;;
17190*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17192$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17193_ACEOF
17194cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17195 ac_datarootdir_hack='
17196 s&@datadir@&$datadir&g
17197 s&@docdir@&$docdir&g
17198 s&@infodir@&$infodir&g
17199 s&@localedir@&$localedir&g
17200 s&@mandir@&$mandir&g
17201 s&\\\${datarootdir}&$datarootdir&g' ;;
17202esac
4e8d927d 17203_ACEOF
81ecdfbb
RW
17204
17205# Neutralize VPATH when `$srcdir' = `.'.
17206# Shell code in configure.ac might set extrasub.
17207# FIXME: do we really want to maintain this feature?
17208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17209ac_sed_extra="$ac_vpsub
bec39cab
AC
17210$extrasub
17211_ACEOF
81ecdfbb 17212cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17213:t
17214/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17215s|@configure_input@|$ac_sed_conf_input|;t t
17216s&@top_builddir@&$ac_top_builddir_sub&;t t
17217s&@top_build_prefix@&$ac_top_build_prefix&;t t
17218s&@srcdir@&$ac_srcdir&;t t
17219s&@abs_srcdir@&$ac_abs_srcdir&;t t
17220s&@top_srcdir@&$ac_top_srcdir&;t t
17221s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17222s&@builddir@&$ac_builddir&;t t
17223s&@abs_builddir@&$ac_abs_builddir&;t t
17224s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17225s&@INSTALL@&$ac_INSTALL&;t t
17226s&@MKDIR_P@&$ac_MKDIR_P&;t t
17227$ac_datarootdir_hack
17228"
17229eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17230if $ac_cs_awk_getline; then
17231 $AWK -f "$tmp/subs.awk"
17232else
17233 $AWK -f "$tmp/subs.awk" | $SHELL
17234fi >$tmp/out \
17235 || as_fn_error "could not create $ac_file" "$LINENO" 5
17236
17237test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17238 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17239 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17241which seems to be undefined. Please make sure it is defined." >&5
17242$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17243which seems to be undefined. Please make sure it is defined." >&2;}
17244
17245 rm -f "$tmp/stdin"
bec39cab 17246 case $ac_file in
81ecdfbb
RW
17247 -) cat "$tmp/out" && rm -f "$tmp/out";;
17248 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17249 esac \
17250 || as_fn_error "could not create $ac_file" "$LINENO" 5
17251 ;;
17252 :H)
17253 #
17254 # CONFIG_HEADER
17255 #
bec39cab 17256 if test x"$ac_file" != x-; then
81ecdfbb
RW
17257 {
17258 $as_echo "/* $configure_input */" \
17259 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17260 } >"$tmp/config.h" \
17261 || as_fn_error "could not create $ac_file" "$LINENO" 5
17262 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17264$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17265 else
81ecdfbb
RW
17266 rm -f "$ac_file"
17267 mv "$tmp/config.h" "$ac_file" \
17268 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17269 fi
17270 else
81ecdfbb
RW
17271 $as_echo "/* $configure_input */" \
17272 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17273 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17274 fi
81ecdfbb
RW
17275# Compute "$ac_file"'s index in $config_headers.
17276_am_arg="$ac_file"
e28b3332
DJ
17277_am_stamp_count=1
17278for _am_header in $config_headers :; do
17279 case $_am_header in
81ecdfbb 17280 $_am_arg | $_am_arg:* )
e28b3332
DJ
17281 break ;;
17282 * )
17283 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
17284 esac
17285done
81ecdfbb
RW
17286echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
17287$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17288 X"$_am_arg" : 'X\(//\)[^/]' \| \
17289 X"$_am_arg" : 'X\(//\)$' \| \
17290 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
17291$as_echo X"$_am_arg" |
17292 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17293 s//\1/
17294 q
17295 }
17296 /^X\(\/\/\)[^/].*/{
17297 s//\1/
17298 q
17299 }
17300 /^X\(\/\/\)$/{
17301 s//\1/
17302 q
17303 }
17304 /^X\(\/\).*/{
17305 s//\1/
17306 q
17307 }
17308 s/.*/./; q'`/stamp-h$_am_stamp_count
17309 ;;
17310 :L)
17311 #
17312 # CONFIG_LINK
17313 #
c906108c 17314
81ecdfbb
RW
17315 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17316 :
b4e70030 17317 else
81ecdfbb
RW
17318 # Prefer the file from the source tree if names are identical.
17319 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17320 ac_source=$srcdir/$ac_source
17321 fi
b4e70030 17322
81ecdfbb
RW
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17324$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17325
81ecdfbb
RW
17326 if test ! -r "$ac_source"; then
17327 as_fn_error "$ac_source: file not found" "$LINENO" 5
17328 fi
17329 rm -f "$ac_file"
bec39cab 17330
81ecdfbb
RW
17331 # Try a relative symlink, then a hard link, then a copy.
17332 case $srcdir in
17333 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17334 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17335 esac
17336 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17337 ln "$ac_source" "$ac_file" 2>/dev/null ||
17338 cp -p "$ac_source" "$ac_file" ||
17339 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17340 fi
17341 ;;
17342 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17343$as_echo "$as_me: executing $ac_file commands" >&6;}
17344 ;;
c906108c 17345 esac
b4e70030 17346
bec39cab 17347
81ecdfbb
RW
17348 case $ac_file$ac_mode in
17349 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17350 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
17351 # Autoconf 2.62 quotes --file arguments for eval, but not when files
17352 # are listed without --file. Let's play safe and only enable the eval
17353 # if we detect the quoting.
17354 case $CONFIG_FILES in
17355 *\'*) eval set x "$CONFIG_FILES" ;;
17356 *) set x $CONFIG_FILES ;;
17357 esac
17358 shift
17359 for mf
17360 do
17361 # Strip MF so we end up with the name of the file.
17362 mf=`echo "$mf" | sed -e 's/:.*$//'`
17363 # Check whether this is an Automake generated Makefile or not.
17364 # We used to match only the files named `Makefile.in', but
17365 # some people rename them; so instead we look at the file content.
17366 # Grep'ing the first line is not enough: some people post-process
17367 # each Makefile.in and add a new line on top of each file to say so.
17368 # Grep'ing the whole file is not good either: AIX grep has a line
17369 # limit of 2048, but all sed's we know have understand at least 4000.
17370 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
17371 dirpart=`$as_dirname -- "$mf" ||
e28b3332
DJ
17372$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17373 X"$mf" : 'X\(//\)[^/]' \| \
17374 X"$mf" : 'X\(//\)$' \| \
81ecdfbb
RW
17375 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
17376$as_echo X"$mf" |
17377 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17378 s//\1/
17379 q
17380 }
17381 /^X\(\/\/\)[^/].*/{
17382 s//\1/
17383 q
17384 }
17385 /^X\(\/\/\)$/{
17386 s//\1/
17387 q
17388 }
17389 /^X\(\/\).*/{
17390 s//\1/
17391 q
17392 }
17393 s/.*/./; q'`
17394 else
17395 continue
17396 fi
17397 # Extract the definition of DEPDIR, am__include, and am__quote
17398 # from the Makefile without running `make'.
17399 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
17400 test -z "$DEPDIR" && continue
17401 am__include=`sed -n 's/^am__include = //p' < "$mf"`
17402 test -z "am__include" && continue
17403 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
17404 # When using ansi2knr, U may be empty or an underscore; expand it
17405 U=`sed -n 's/^U = //p' < "$mf"`
17406 # Find all dependency output files, they are included files with
17407 # $(DEPDIR) in their names. We invoke sed twice because it is the
17408 # simplest approach to changing $(DEPDIR) to its actual value in the
17409 # expansion.
17410 for file in `sed -n "
17411 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
17412 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
17413 # Make sure the directory exists.
17414 test -f "$dirpart/$file" && continue
17415 fdir=`$as_dirname -- "$file" ||
e28b3332
DJ
17416$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17417 X"$file" : 'X\(//\)[^/]' \| \
17418 X"$file" : 'X\(//\)$' \| \
81ecdfbb
RW
17419 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
17420$as_echo X"$file" |
17421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17422 s//\1/
17423 q
17424 }
17425 /^X\(\/\/\)[^/].*/{
17426 s//\1/
17427 q
17428 }
17429 /^X\(\/\/\)$/{
17430 s//\1/
17431 q
17432 }
17433 /^X\(\/\).*/{
17434 s//\1/
17435 q
17436 }
17437 s/.*/./; q'`
17438 as_dir=$dirpart/$fdir; as_fn_mkdir_p
17439 # echo "creating $dirpart/$file"
17440 echo '# dummy' > "$dirpart/$file"
e28b3332 17441 done
e28b3332 17442 done
81ecdfbb 17443}
4e8d927d 17444 ;;
81ecdfbb 17445 "default":C)
c906108c
SS
17446case x$CONFIG_HEADERS in
17447xconfig.h:config.in)
17448echo > stamp-h ;;
17449esac
bec39cab 17450 ;;
81ecdfbb 17451
bec39cab 17452 esac
81ecdfbb 17453done # for ac_tag
c906108c 17454
bec39cab 17455
81ecdfbb 17456as_fn_exit 0
bec39cab 17457_ACEOF
bec39cab
AC
17458ac_clean_files=$ac_clean_files_save
17459
81ecdfbb
RW
17460test $ac_write_fail = 0 ||
17461 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17462
bec39cab
AC
17463
17464# configure is writing to config.log, and then calls config.status.
17465# config.status does its own redirection, appending to config.log.
17466# Unfortunately, on DOS this fails, as config.log is still kept open
17467# by configure, so config.status won't be able to write to it; its
17468# output is simply discarded. So we exec the FD to /dev/null,
17469# effectively closing config.log, so it can be properly (re)opened and
17470# appended to by config.status. When coming back to configure, we
17471# need to make the FD available again.
17472if test "$no_create" != yes; then
17473 ac_cs_success=:
17474 ac_config_status_args=
17475 test "$silent" = yes &&
17476 ac_config_status_args="$ac_config_status_args --quiet"
17477 exec 5>/dev/null
17478 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17479 exec 5>>config.log
17480 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17481 # would make configure fail if this is the last instruction.
81ecdfbb 17482 $ac_cs_success || as_fn_exit $?
bec39cab 17483fi
c906108c 17484
bec39cab 17485#
81ecdfbb 17486# CONFIG_SUBDIRS section.
bec39cab 17487#
c906108c
SS
17488if test "$no_recursion" != yes; then
17489
81ecdfbb
RW
17490 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17491 # so they do not pile up.
c906108c
SS
17492 ac_sub_configure_args=
17493 ac_prev=
fdc59709
PB
17494 eval "set x $ac_configure_args"
17495 shift
17496 for ac_arg
17497 do
c906108c
SS
17498 if test -n "$ac_prev"; then
17499 ac_prev=
17500 continue
17501 fi
bec39cab 17502 case $ac_arg in
c906108c
SS
17503 -cache-file | --cache-file | --cache-fil | --cache-fi \
17504 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17505 ac_prev=cache_file ;;
17506 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17507 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17508 | --c=*)
17509 ;;
17510 --config-cache | -C)
c906108c
SS
17511 ;;
17512 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17513 ac_prev=srcdir ;;
17514 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17515 ;;
bec39cab
AC
17516 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17517 ac_prev=prefix ;;
17518 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17519 ;;
81ecdfbb
RW
17520 --disable-option-checking)
17521 ;;
fdc59709
PB
17522 *)
17523 case $ac_arg in
81ecdfbb 17524 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17525 esac
81ecdfbb 17526 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17527 esac
17528 done
17529
bec39cab
AC
17530 # Always prepend --prefix to ensure using the same prefix
17531 # in subdir configurations.
fdc59709
PB
17532 ac_arg="--prefix=$prefix"
17533 case $ac_arg in
81ecdfbb 17534 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17535 esac
81ecdfbb
RW
17536 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17537
17538 # Pass --silent
17539 if test "$silent" = yes; then
17540 ac_sub_configure_args="--silent $ac_sub_configure_args"
17541 fi
17542
17543 # Always prepend --disable-option-checking to silence warnings, since
17544 # different subdirs can have different --enable and --with options.
17545 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17546
b4e70030 17547 ac_popdir=`pwd`
bec39cab 17548 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17549
17550 # Do not complain, so a configure script can configure whichever
17551 # parts of a large source tree are present.
fdc59709 17552 test -d "$srcdir/$ac_dir" || continue
c906108c 17553
81ecdfbb
RW
17554 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17555 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17556 $as_echo "$ac_msg" >&6
17557 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17558 ac_builddir=.
17559
81ecdfbb
RW
17560case "$ac_dir" in
17561.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17562*)
17563 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17564 # A ".." for each directory in $ac_dir_suffix.
17565 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17566 case $ac_top_builddir_sub in
17567 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17568 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17569 esac ;;
17570esac
17571ac_abs_top_builddir=$ac_pwd
17572ac_abs_builddir=$ac_pwd$ac_dir_suffix
17573# for backward compatibility:
17574ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17575
17576case $srcdir in
81ecdfbb 17577 .) # We are building in place.
bec39cab 17578 ac_srcdir=.
81ecdfbb
RW
17579 ac_top_srcdir=$ac_top_builddir_sub
17580 ac_abs_top_srcdir=$ac_pwd ;;
17581 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17582 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17583 ac_top_srcdir=$srcdir
17584 ac_abs_top_srcdir=$srcdir ;;
17585 *) # Relative name.
17586 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17587 ac_top_srcdir=$ac_top_build_prefix$srcdir
17588 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17589esac
81ecdfbb 17590ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17591
c906108c 17592
fdc59709 17593 cd "$ac_dir"
c906108c
SS
17594
17595 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17596 if test -f "$ac_srcdir/configure.gnu"; then
17597 ac_sub_configure=$ac_srcdir/configure.gnu
17598 elif test -f "$ac_srcdir/configure"; then
17599 ac_sub_configure=$ac_srcdir/configure
17600 elif test -f "$ac_srcdir/configure.in"; then
17601 # This should be Cygnus configure.
17602 ac_sub_configure=$ac_aux_dir/configure
c906108c 17603 else
81ecdfbb
RW
17604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17605$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17606 ac_sub_configure=
17607 fi
17608
17609 # The recursion is here.
17610 if test -n "$ac_sub_configure"; then
c906108c 17611 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17612 case $cache_file in
17613 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17614 *) # Relative name.
17615 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17616 esac
c906108c 17617
81ecdfbb
RW
17618 { $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
17619$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17620 # The eval makes quoting arguments work.
fdc59709
PB
17621 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17622 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17623 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17624 fi
17625
fdc59709 17626 cd "$ac_popdir"
c906108c
SS
17627 done
17628fi
81ecdfbb
RW
17629if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17631$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17632fi
c906108c
SS
17633
17634
17635exit 0
This page took 2.12095 seconds and 4 git commands to generate.