Fix "breakpoint always-inserted off"; remove "breakpoint always-inserted auto"
[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
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
4df42755
DE
661HAVE_GUILE_FALSE
662HAVE_GUILE_TRUE
ed3ef339
DE
663GUILE_LIBS
664GUILE_CPPFLAGS
e76c5d17
DE
665GUILD_TARGET_FLAG
666GUILD
ed3ef339 667pkg_config_prog_path
4df42755
DE
668HAVE_PYTHON_FALSE
669HAVE_PYTHON_TRUE
ac534cba
JB
670PYTHON_LIBS
671PYTHON_CPPFLAGS
81ecdfbb 672PYTHON_CFLAGS
ec685c5e 673python_prog_path
81ecdfbb
RW
674LTLIBEXPAT
675LIBEXPAT
676HAVE_LIBEXPAT
b8e0a31c 677JIT_READER_DIR
f997c383 678TARGET_PTR
39037522 679READLINE_TEXI_INCFLAG
81ecdfbb
RW
680READLINE_CFLAGS
681READLINE_DEPS
682READLINE
683MIG
684WINDRES
685DLLTOOL
c971b7fa 686AR
81ecdfbb
RW
687YFLAGS
688YACC
c971b7fa 689RANLIB
81ecdfbb 690LN_S
c971b7fa
PA
691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
694AWK
81ecdfbb
RW
695REPORT_BUGS_TEXI
696REPORT_BUGS_TO
697PKGVERSION
b292c783 698HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
699TARGET_OBS
700subdirs
701GDB_DATADIR
702DEBUGDIR
5048e516
JK
703MAKEINFO_EXTRA_FLAGS
704MAKEINFOFLAGS
705MAKEINFO
81ecdfbb
RW
706PACKAGE
707GNULIB_STDINT_H
81ecdfbb
RW
708CATOBJEXT
709GENCAT
710INSTOBJEXT
711DATADIRNAME
712CATALOGS
713POSUB
714GMSGFMT
715XGETTEXT
716INCINTL
717LIBINTL_DEP
718LIBINTL
719USE_NLS
720SET_MAKE
721GMAKE_FALSE
722GMAKE_TRUE
723MAKE
724CCDEPMODE
725DEPDIR
726am__leading_dot
4869db5e
RM
727INSTALL_STRIP_PROGRAM
728STRIP
729install_sh
81ecdfbb
RW
730target_os
731target_vendor
732target_cpu
733target
734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
c971b7fa
PA
742EGREP
743GREP
744CPP
81ecdfbb
RW
745OBJEXT
746EXEEXT
747ac_ct_CC
748CPPFLAGS
749LDFLAGS
750CFLAGS
751CC
752MAINT
753MAINTAINER_MODE_FALSE
754MAINTAINER_MODE_TRUE
755target_alias
756host_alias
757build_alias
758LIBS
759ECHO_T
760ECHO_N
761ECHO_C
762DEFS
763mandir
764localedir
765libdir
766psdir
767pdfdir
768dvidir
769htmldir
770infodir
771docdir
772oldincludedir
773includedir
774localstatedir
775sharedstatedir
776sysconfdir
777datadir
778datarootdir
779libexecdir
780sbindir
781bindir
782program_transform_name
783prefix
784exec_prefix
785PACKAGE_URL
786PACKAGE_BUGREPORT
787PACKAGE_STRING
788PACKAGE_VERSION
789PACKAGE_TARNAME
790PACKAGE_NAME
791PATH_SEPARATOR
792SHELL'
a4ce5b0d 793ac_subst_files='host_makefile_frag'
81ecdfbb
RW
794ac_user_opts='
795enable_option_checking
796enable_maintainer_mode
da2f07f1
JK
797enable_plugins
798enable_largefile
81ecdfbb
RW
799with_separate_debug_dir
800with_gdb_datadir
801with_relocated_sources
7349ff92 802with_auto_load_dir
bccbefd2 803with_auto_load_safe_path
81ecdfbb
RW
804enable_targets
805enable_64_bit_bfd
806enable_gdbcli
807enable_gdbmi
808enable_tui
809enable_gdbtk
05e7c244 810with_libunwind_ia64
81ecdfbb
RW
811with_curses
812enable_profiling
813with_pkgversion
814with_bugurl
b040ad30 815with_zlib
81ecdfbb 816with_libiconv_prefix
478aac75 817with_iconv_bin
81ecdfbb 818with_system_readline
b8e0a31c 819with_jit_reader_dir
81ecdfbb
RW
820with_expat
821with_gnu_ld
822enable_rpath
823with_libexpat_prefix
824with_python
ed3ef339 825with_guile
a8db4212 826enable_libmcheck
81ecdfbb
RW
827with_included_regex
828with_sysroot
829with_system_gdbinit
830enable_werror
831enable_build_warnings
832enable_gdb_build_warnings
608e2dbb
TT
833with_lzma
834with_liblzma_prefix
81ecdfbb
RW
835with_tcl
836with_tk
837with_x
838enable_sim
839enable_multi_ice
496c0e1b 840enable_gdbserver
393fd4c3
YQ
841with_babeltrace
842with_libbabeltrace_prefix
81ecdfbb
RW
843'
844 ac_precious_vars='build_alias
845host_alias
846target_alias
847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
852CPP
f06e05e0
JK
853MAKEINFO
854MAKEINFOFLAGS
81ecdfbb
RW
855YACC
856YFLAGS
857XMKMF'
5ae98d25 858ac_subdirs_all='testsuite
81ecdfbb
RW
859gdbtk
860multi-ice
861gdbserver'
c906108c
SS
862
863# Initialize some variables set by options.
bec39cab
AC
864ac_init_help=
865ac_init_version=false
81ecdfbb
RW
866ac_unrecognized_opts=
867ac_unrecognized_sep=
c906108c
SS
868# The variables have the same names as the options, with
869# dashes changed to underlines.
bec39cab 870cache_file=/dev/null
c906108c 871exec_prefix=NONE
c906108c 872no_create=
c906108c
SS
873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
878silent=
879site=
880srcdir=
c906108c
SS
881verbose=
882x_includes=NONE
883x_libraries=NONE
bec39cab
AC
884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 890# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
c906108c
SS
896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
c906108c
SS
899includedir='${prefix}/include'
900oldincludedir='/usr/include'
81ecdfbb
RW
901docdir='${datarootdir}/doc/${PACKAGE}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
c906108c 910
c906108c 911ac_prev=
81ecdfbb 912ac_dashdash=
c906108c
SS
913for ac_option
914do
c906108c
SS
915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
81ecdfbb 917 eval $ac_prev=\$ac_option
c906108c
SS
918 ac_prev=
919 continue
920 fi
921
81ecdfbb
RW
922 case $ac_option in
923 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *) ac_optarg=yes ;;
925 esac
c906108c
SS
926
927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
81ecdfbb
RW
929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
c906108c
SS
932
933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 936 bindir=$ac_optarg ;;
c906108c
SS
937
938 -build | --build | --buil | --bui | --bu)
bec39cab 939 ac_prev=build_alias ;;
c906108c 940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 941 build_alias=$ac_optarg ;;
c906108c
SS
942
943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
c906108c 952
81ecdfbb 953 -datadir | --datadir | --datadi | --datad)
c906108c 954 ac_prev=datadir ;;
81ecdfbb 955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 956 datadir=$ac_optarg ;;
c906108c 957
81ecdfbb
RW
958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
c906108c 965 -disable-* | --disable-*)
81ecdfbb 966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 967 # Reject names that are not valid shell variable names.
81ecdfbb
RW
968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969 as_fn_error "invalid feature name: $ac_useropt"
970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
c906108c
SS
990
991 -enable-* | --enable-*)
81ecdfbb 992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 993 # Reject names that are not valid shell variable names.
81ecdfbb
RW
994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995 as_fn_error "invalid feature name: $ac_useropt"
996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
b4e70030 1004 esac
81ecdfbb 1005 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1006
1007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
bec39cab 1014 exec_prefix=$ac_optarg ;;
c906108c
SS
1015
1016 -gas | --gas | --ga | --g)
1017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
1019
bec39cab
AC
1020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
c906108c
SS
1026
1027 -host | --host | --hos | --ho)
bec39cab 1028 ac_prev=host_alias ;;
c906108c 1029 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1030 host_alias=$ac_optarg ;;
c906108c 1031
81ecdfbb
RW
1032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
c906108c
SS
1038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1043 includedir=$ac_optarg ;;
c906108c
SS
1044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1048 infodir=$ac_optarg ;;
c906108c
SS
1049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1053 libdir=$ac_optarg ;;
c906108c
SS
1054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
bec39cab 1060 libexecdir=$ac_optarg ;;
c906108c 1061
81ecdfbb
RW
1062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
c906108c 1067 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1068 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1072 localstatedir=$ac_optarg ;;
c906108c
SS
1073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1077 mandir=$ac_optarg ;;
c906108c
SS
1078
1079 -nfp | --nfp | --nf)
1080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
1082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1084 | --no-cr | --no-c | -n)
c906108c
SS
1085 no_create=yes ;;
1086
1087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
1090
1091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1098 oldincludedir=$ac_optarg ;;
c906108c
SS
1099
1100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1103 prefix=$ac_optarg ;;
c906108c
SS
1104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1110 program_prefix=$ac_optarg ;;
c906108c
SS
1111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1117 program_suffix=$ac_optarg ;;
c906108c
SS
1118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1134 program_transform_name=$ac_optarg ;;
c906108c 1135
81ecdfbb
RW
1136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
c906108c
SS
1146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
1150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
bec39cab 1154 sbindir=$ac_optarg ;;
c906108c
SS
1155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
bec39cab 1165 sharedstatedir=$ac_optarg ;;
c906108c
SS
1166
1167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
bec39cab 1170 site=$ac_optarg ;;
3ace7edb 1171
c906108c
SS
1172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1175 srcdir=$ac_optarg ;;
c906108c
SS
1176
1177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1182 sysconfdir=$ac_optarg ;;
c906108c
SS
1183
1184 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1185 ac_prev=target_alias ;;
c906108c 1186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1187 target_alias=$ac_optarg ;;
c906108c
SS
1188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
bec39cab
AC
1192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
c906108c
SS
1194
1195 -with-* | --with-*)
81ecdfbb 1196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1197 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199 as_fn_error "invalid package name: $ac_useropt"
1200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
b4e70030 1208 esac
81ecdfbb 1209 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1210
1211 -without-* | --without-*)
81ecdfbb 1212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1213 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215 as_fn_error "invalid package name: $ac_useropt"
1216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
c906108c
SS
1226
1227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
1230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1236 x_includes=$ac_optarg ;;
c906108c
SS
1237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1243 x_libraries=$ac_optarg ;;
c906108c 1244
81ecdfbb
RW
1245 -*) as_fn_error "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information."
c906108c
SS
1247 ;;
1248
bec39cab
AC
1249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
1254 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1255 esac
1256 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1257 export $ac_envvar ;;
1258
c906108c 1259 *)
bec39cab 1260 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1264 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1265 ;;
1266
1267 esac
1268done
1269
1270if test -n "$ac_prev"; then
bec39cab 1271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1272 as_fn_error "missing argument to $ac_option"
c906108c 1273fi
c906108c 1274
81ecdfbb
RW
1275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
1278 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1280 esac
81ecdfbb 1281fi
b4e70030 1282
81ecdfbb
RW
1283# Check all directory arguments for consistency.
1284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287 libdir localedir mandir
b4e70030 1288do
81ecdfbb
RW
1289 eval ac_val=\$$ac_var
1290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
b4e70030 1297 case $ac_val in
81ecdfbb
RW
1298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1300 esac
81ecdfbb 1301 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1302done
1303
bec39cab
AC
1304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
1310
1311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
81ecdfbb 1315 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1316 If a cross compiler is detected then cross compile mode will be used." >&2
1317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
c906108c 1321
bec39cab
AC
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
c906108c 1326
c906108c 1327
81ecdfbb
RW
1328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1331 as_fn_error "working directory cannot be determined"
1332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1333 as_fn_error "pwd does not report name of working directory"
1334
1335
c906108c
SS
1336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
1338 ac_srcdir_defaulted=yes
81ecdfbb
RW
1339 # Try the directory containing this script, then the parent directory.
1340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
1346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
c906108c 1363 srcdir=$ac_confdir
81ecdfbb 1364 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1365 srcdir=..
1366 fi
1367else
1368 ac_srcdir_defaulted=no
1369fi
81ecdfbb
RW
1370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1372 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1373fi
1374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
1376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
c906108c 1394
bec39cab
AC
1395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
1402\`configure' configures this package to adapt to many kinds of systems.
1403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
1416 -q, --quiet, --silent do not print \`checking...' messages
1417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
bec39cab
AC
1422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1424 [$ac_default_prefix]
bec39cab 1425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1426 [PREFIX]
bec39cab
AC
1427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
81ecdfbb
RW
1436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1455_ACEOF
1456
1457 cat <<\_ACEOF
1458
9009e1ae
MR
1459Program names:
1460 --program-prefix=PREFIX prepend PREFIX to installed program names
1461 --program-suffix=SUFFIX append SUFFIX to installed program names
1462 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1463
bec39cab
AC
1464X features:
1465 --x-includes=DIR X include files are in DIR
1466 --x-libraries=DIR X library files are in DIR
1467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1471 --target=TARGET configure for building compilers for TARGET [HOST]
1472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
1476
1477 cat <<\_ACEOF
1478
1479Optional Features:
81ecdfbb 1480 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1483 --enable-maintainer-mode enable make rules and dependencies not useful
1484 (and sometimes confusing) to the casual installer
2974be62 1485 --enable-plugins Enable support for plugins
da2f07f1 1486 --disable-largefile omit support for large files
a1220294
TT
1487 --enable-targets=TARGETS
1488 alternative target configurations
c0993dbe 1489 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1490 --disable-gdbcli disable command-line interface (CLI)
1491 --disable-gdbmi disable machine-interface (MI)
1492 --enable-tui enable full-screen terminal user interface (TUI)
1493 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1494 --enable-profiling enable profiling of GDB
3841debe 1495 --disable-rpath do not hardcode runtime library paths
17ef446e 1496 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1497 --enable-werror treat compile warnings as errors
32c1c914 1498 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1499 --enable-gdb-build-warnings
32c1c914 1500 enable GDB specific build-time compiler warnings if
a1220294 1501 gcc is used
32c1c914 1502 --enable-sim link gdb with simulator
bec39cab 1503 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1504 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1505 is auto)
bec39cab
AC
1506
1507Optional Packages:
1508 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1509 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1510 --with-separate-debug-dir=PATH
32c1c914 1511 look for global separate debug info in this path
62e4f60c 1512 [LIBDIR/debug]
b14b1491
TT
1513 --with-gdb-datadir=PATH look for global separate data files in this path
1514 [DATADIR/gdb]
29b0e8a2 1515 --with-relocated-sources=PATH
32c1c914 1516 automatically relocate this path for source files
7349ff92 1517 --with-auto-load-dir=PATH
aff139ff 1518 directories from which to load auto-loaded scripts
1564a261 1519 [$debugdir:$datadir/auto-load]
bccbefd2 1520 --with-auto-load-safe-path=PATH
aff139ff 1521 directories safe to hold auto-loaded files
7349ff92 1522 [--with-auto-load-dir]
bccbefd2
JK
1523 --without-auto-load-safe-path
1524 do not restrict auto-loaded files locations
05e7c244 1525 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1526 --with-curses use the curses library instead of the termcap
1527 library
c16158bc
JM
1528 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1529 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1530 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1531 --with-libiconv-prefix=DIR
1532 search for libiconv in DIR/include and DIR/lib
478aac75 1533 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1534 --with-system-readline use installed readline library
b8e0a31c
SD
1535 --with-jit-reader-dir=PATH
1536 directory to load the JIT readers from
5c39566f 1537 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1538 --with-gnu-ld assume the C compiler uses GNU ld default=no
1539 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1540 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1541 --with-python[=PYTHON] include python support
1542 (auto/yes/no/<python-program>)
ed3ef339
DE
1543 --with-guile[=GUILE] include guile support
1544 (auto/yes/no/<guile-version>/<pkg-config-program>)
a1220294
TT
1545 --without-included-regex
1546 don't use included regex; this is the default on
1547 systems with version 2 of the GNU C library (use
1548 with caution on other system)
81ecdfbb 1549 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1550 --with-system-gdbinit=PATH
32c1c914 1551 automatically load a system-wide gdbinit file
608e2dbb
TT
1552 --with-lzma support lzma compression (auto/yes/no)
1553 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1554 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1555 --with-tcl directory containing tcl configuration (tclConfig.sh)
1556 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1557 --with-x use the X Window System
393fd4c3
YQ
1558 --with-babeltrace include babeltrace support (auto/yes/no)
1559 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1560 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1561
1562Some influential environment variables:
1563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
81ecdfbb
RW
1567 LIBS libraries to pass to the linker, e.g. -l<library>
1568 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1569 you have headers in a nonstandard directory <include dir>
bec39cab 1570 CPP C preprocessor
f06e05e0
JK
1571 MAKEINFO Parent configure detects if it is of sufficient version.
1572 MAKEINFOFLAGS
1573 Parameters for MAKEINFO.
81ecdfbb
RW
1574 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1575 the first program found out of: `bison -y', `byacc', `yacc'.
1576 YFLAGS The list of arguments that will be passed by default to $YACC.
1577 This script will default YFLAGS to the empty string to avoid a
1578 default value of `-d' given by some make applications.
1579 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1580
1581Use these variables to override the choices made by `configure' or to help
1582it to find libraries and programs with nonstandard names/locations.
1583
81ecdfbb 1584Report bugs to the package provider.
bec39cab 1585_ACEOF
81ecdfbb 1586ac_status=$?
bec39cab
AC
1587fi
1588
1589if test "$ac_init_help" = "recursive"; then
1590 # If there are subdirs, report their specific --help.
bec39cab 1591 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1592 test -d "$ac_dir" ||
1593 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1594 continue
bec39cab
AC
1595 ac_builddir=.
1596
81ecdfbb
RW
1597case "$ac_dir" in
1598.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599*)
1600 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1601 # A ".." for each directory in $ac_dir_suffix.
1602 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1603 case $ac_top_builddir_sub in
1604 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1605 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1606 esac ;;
1607esac
1608ac_abs_top_builddir=$ac_pwd
1609ac_abs_builddir=$ac_pwd$ac_dir_suffix
1610# for backward compatibility:
1611ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1612
1613case $srcdir in
81ecdfbb 1614 .) # We are building in place.
bec39cab 1615 ac_srcdir=.
81ecdfbb
RW
1616 ac_top_srcdir=$ac_top_builddir_sub
1617 ac_abs_top_srcdir=$ac_pwd ;;
1618 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1619 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1620 ac_top_srcdir=$srcdir
1621 ac_abs_top_srcdir=$srcdir ;;
1622 *) # Relative name.
1623 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1624 ac_top_srcdir=$ac_top_build_prefix$srcdir
1625 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1626esac
81ecdfbb 1627ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1628
81ecdfbb
RW
1629 cd "$ac_dir" || { ac_status=$?; continue; }
1630 # Check for guested configure.
1631 if test -f "$ac_srcdir/configure.gnu"; then
1632 echo &&
1633 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1634 elif test -f "$ac_srcdir/configure"; then
1635 echo &&
1636 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1637 else
81ecdfbb
RW
1638 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1639 fi || ac_status=$?
1640 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1641 done
1642fi
1643
81ecdfbb 1644test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1645if $ac_init_version; then
1646 cat <<\_ACEOF
81ecdfbb
RW
1647configure
1648generated by GNU Autoconf 2.64
bec39cab 1649
81ecdfbb 1650Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1651This configure script is free software; the Free Software Foundation
1652gives unlimited permission to copy, distribute and modify it.
1653_ACEOF
81ecdfbb 1654 exit
bec39cab 1655fi
bec39cab 1656
81ecdfbb
RW
1657## ------------------------ ##
1658## Autoconf initialization. ##
1659## ------------------------ ##
bec39cab 1660
81ecdfbb
RW
1661# ac_fn_c_try_compile LINENO
1662# --------------------------
1663# Try to compile conftest.$ac_ext, and return whether this succeeded.
1664ac_fn_c_try_compile ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 rm -f conftest.$ac_objext
1668 if { { ac_try="$ac_compile"
1669case "(($ac_try" in
1670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671 *) ac_try_echo=$ac_try;;
1672esac
1673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674$as_echo "$ac_try_echo"; } >&5
1675 (eval "$ac_compile") 2>conftest.err
1676 ac_status=$?
1677 if test -s conftest.err; then
1678 grep -v '^ *+' conftest.err >conftest.er1
1679 cat conftest.er1 >&5
1680 mv -f conftest.er1 conftest.err
1681 fi
1682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1683 test $ac_status = 0; } && {
1684 test -z "$ac_c_werror_flag" ||
1685 test ! -s conftest.err
1686 } && test -s conftest.$ac_objext; then :
1687 ac_retval=0
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1691
81ecdfbb
RW
1692 ac_retval=1
1693fi
1694 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1695 return $ac_retval
1696
1697} # ac_fn_c_try_compile
1698
1699# ac_fn_c_try_cpp LINENO
1700# ----------------------
1701# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702ac_fn_c_try_cpp ()
bec39cab 1703{
81ecdfbb
RW
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705 if { { ac_try="$ac_cpp conftest.$ac_ext"
1706case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1718 fi
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } >/dev/null && {
1721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 }; then :
1724 ac_retval=0
1725else
1726 $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1728
81ecdfbb
RW
1729 ac_retval=1
1730fi
1731 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1732 return $ac_retval
bec39cab 1733
81ecdfbb 1734} # ac_fn_c_try_cpp
bec39cab 1735
81ecdfbb
RW
1736# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1737# -------------------------------------------------------
1738# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1739# the include files in INCLUDES and setting the cache variable VAR
1740# accordingly.
1741ac_fn_c_check_header_mongrel ()
1742{
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1746$as_echo_n "checking for $2... " >&6; }
1747if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1748 $as_echo_n "(cached) " >&6
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
1753else
1754 # Is the header compilable?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1756$as_echo_n "checking $2 usability... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 ac_header_compiler=yes
1764else
1765 ac_header_compiler=no
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1769$as_echo "$ac_header_compiler" >&6; }
bec39cab 1770
81ecdfbb
RW
1771# Is the header present?
1772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1773$as_echo_n "checking $2 presence... " >&6; }
1774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775/* end confdefs.h. */
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_cpp "$LINENO"; then :
1779 ac_header_preproc=yes
1780else
1781 ac_header_preproc=no
1782fi
1783rm -f conftest.err conftest.$ac_ext
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1785$as_echo "$ac_header_preproc" >&6; }
bec39cab 1786
81ecdfbb
RW
1787# So? What about this header?
1788case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1789 yes:no: )
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1791$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794 ;;
1795 no:yes:* )
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1797$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1799$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1801$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1803$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807esac
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811 $as_echo_n "(cached) " >&6
1812else
1813 eval "$3=\$ac_header_compiler"
1814fi
1815eval ac_res=\$$3
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817$as_echo "$ac_res" >&6; }
1818fi
1819 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1820
81ecdfbb 1821} # ac_fn_c_check_header_mongrel
bec39cab 1822
81ecdfbb
RW
1823# ac_fn_c_try_run LINENO
1824# ----------------------
1825# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1826# that executables *can* be run.
1827ac_fn_c_try_run ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_link"
1831case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_link") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1841 { { case "(($ac_try" in
1842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1843 *) ac_try_echo=$ac_try;;
1844esac
1845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1846$as_echo "$ac_try_echo"; } >&5
1847 (eval "$ac_try") 2>&5
1848 ac_status=$?
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; }; }; then :
1851 ac_retval=0
1852else
1853 $as_echo "$as_me: program exited with status $ac_status" >&5
1854 $as_echo "$as_me: failed program was:" >&5
1855sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1856
81ecdfbb
RW
1857 ac_retval=$ac_status
1858fi
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861 return $ac_retval
bec39cab 1862
81ecdfbb 1863} # ac_fn_c_try_run
bec39cab 1864
81ecdfbb
RW
1865# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists and can be compiled using the include files in
1868# INCLUDES, setting the cache variable VAR accordingly.
1869ac_fn_c_check_header_compile ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880#include <$2>
bec39cab 1881_ACEOF
81ecdfbb
RW
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 eval "$3=yes"
1884else
1885 eval "$3=no"
1886fi
1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1893
81ecdfbb 1894} # ac_fn_c_check_header_compile
bec39cab 1895
2974be62
AM
1896# ac_fn_c_try_link LINENO
1897# -----------------------
1898# Try to link conftest.$ac_ext, and return whether this succeeded.
1899ac_fn_c_try_link ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 rm -f conftest.$ac_objext conftest$ac_exeext
1903 if { { ac_try="$ac_link"
1904case "(($ac_try" in
1905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906 *) ac_try_echo=$ac_try;;
1907esac
1908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909$as_echo "$ac_try_echo"; } >&5
1910 (eval "$ac_link") 2>conftest.err
1911 ac_status=$?
1912 if test -s conftest.err; then
1913 grep -v '^ *+' conftest.err >conftest.er1
1914 cat conftest.er1 >&5
1915 mv -f conftest.er1 conftest.err
1916 fi
1917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918 test $ac_status = 0; } && {
1919 test -z "$ac_c_werror_flag" ||
1920 test ! -s conftest.err
1921 } && test -s conftest$ac_exeext && {
1922 test "$cross_compiling" = yes ||
1923 $as_test_x conftest$ac_exeext
1924 }; then :
1925 ac_retval=0
1926else
1927 $as_echo "$as_me: failed program was:" >&5
1928sed 's/^/| /' conftest.$ac_ext >&5
1929
1930 ac_retval=1
1931fi
1932 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1933 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1934 # interfere with the next link command; also delete a directory that is
1935 # left behind by Apple's compiler. We do this before executing the actions.
1936 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1937 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938 return $ac_retval
1939
1940} # ac_fn_c_try_link
1941
81ecdfbb
RW
1942# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943# --------------------------------------------
1944# Tries to find the compile-time value of EXPR in a program that includes
1945# INCLUDES, setting VAR accordingly. Returns whether the value could be
1946# computed
1947ac_fn_c_compute_int ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 if test "$cross_compiling" = yes; then
1951 # Depending upon the size, compute the lo and hi bounds.
1952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !(($2) >= 0)];
1959test_array [0] = 0
bec39cab 1960
81ecdfbb
RW
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 ac_lo=0 ac_mid=0
1967 while :; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
1972main ()
1973{
1974static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1975test_array [0] = 0
bec39cab 1976
81ecdfbb
RW
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 ac_hi=$ac_mid; break
1983else
1984 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1985 if test $ac_lo -le $ac_mid; then
1986 ac_lo= ac_hi=
1987 break
1988 fi
1989 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1990fi
81ecdfbb
RW
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992 done
c906108c 1993else
81ecdfbb
RW
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) < 0)];
2001test_array [0] = 0
bec39cab 2002
81ecdfbb
RW
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_hi=-1 ac_mid=-1
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2017test_array [0] = 0
bec39cab 2018
81ecdfbb
RW
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_lo=$ac_mid; break
2025else
2026 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2027 if test $ac_mid -le $ac_hi; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 ac_lo= ac_hi=
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041# Binary search between lo and hi bounds.
2042while test "x$ac_lo" != "x$ac_hi"; do
2043 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2051test_array [0] = 0
bec39cab 2052
81ecdfbb
RW
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid
2059else
2060 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2063done
2064case $ac_lo in #((
2065?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2066'') ac_retval=1 ;;
2067esac
2068 else
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072static long int longval () { return $2; }
2073static unsigned long int ulongval () { return $2; }
2074#include <stdio.h>
2075#include <stdlib.h>
2076int
2077main ()
2078{
bec39cab 2079
81ecdfbb
RW
2080 FILE *f = fopen ("conftest.val", "w");
2081 if (! f)
2082 return 1;
2083 if (($2) < 0)
2084 {
2085 long int i = longval ();
2086 if (i != ($2))
2087 return 1;
2088 fprintf (f, "%ld", i);
2089 }
2090 else
2091 {
2092 unsigned long int i = ulongval ();
2093 if (i != ($2))
2094 return 1;
2095 fprintf (f, "%lu", i);
2096 }
2097 /* Do not output a trailing newline, as this causes \r\n confusion
2098 on some platforms. */
2099 return ferror (f) || fclose (f) != 0;
bec39cab 2100
81ecdfbb
RW
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_run "$LINENO"; then :
2106 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2107else
2108 ac_retval=1
2109fi
2110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2111 conftest.$ac_objext conftest.beam conftest.$ac_ext
2112rm -f conftest.val
bec39cab 2113
81ecdfbb
RW
2114 fi
2115 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2116 return $ac_retval
bec39cab 2117
81ecdfbb 2118} # ac_fn_c_compute_int
bec39cab 2119
55a8c076
YQ
2120# ac_fn_c_check_func LINENO FUNC VAR
2121# ----------------------------------
2122# Tests whether FUNC exists, setting the cache variable VAR accordingly
2123ac_fn_c_check_func ()
81ecdfbb
RW
2124{
2125 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127$as_echo_n "checking for $2... " >&6; }
2128if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2129 $as_echo_n "(cached) " >&6
2130else
81ecdfbb
RW
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
55a8c076
YQ
2133/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2134 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2135#define $2 innocuous_$2
2136
2137/* System header to define __stub macros and hopefully few prototypes,
2138 which can conflict with char $2 (); below.
2139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2140 <limits.h> exists even on freestanding compilers. */
2141
2142#ifdef __STDC__
2143# include <limits.h>
2144#else
2145# include <assert.h>
2146#endif
2147
2148#undef $2
2149
2150/* Override any GCC internal prototype to avoid an error.
2151 Use char because int might match the return type of a GCC
2152 builtin and then its argument prototype would still apply. */
2153#ifdef __cplusplus
2154extern "C"
2155#endif
2156char $2 ();
2157/* The GNU C library defines this for functions which it implements
2158 to always fail with ENOSYS. Some functions are actually named
2159 something starting with __ and the normal name is an alias. */
2160#if defined __stub_$2 || defined __stub___$2
2161choke me
2162#endif
2163
2164int
2165main ()
2166{
2167return $2 ();
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_link "$LINENO"; then :
2173 eval "$3=yes"
2174else
2175 eval "$3=no"
2176fi
2177rm -f core conftest.err conftest.$ac_objext \
2178 conftest$ac_exeext conftest.$ac_ext
2179fi
2180eval ac_res=\$$3
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182$as_echo "$ac_res" >&6; }
2183 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184
2185} # ac_fn_c_check_func
2186
770d76d7
PA
2187# ac_fn_c_check_decl LINENO SYMBOL VAR
2188# ------------------------------------
2189# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2190ac_fn_c_check_decl ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193 as_decl_name=`echo $2|sed 's/ *(.*//'`
2194 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2196$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2197if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2198 $as_echo_n "(cached) " >&6
2199else
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h. */
2202$4
2203int
2204main ()
2205{
2206#ifndef $as_decl_name
2207#ifdef __cplusplus
2208 (void) $as_decl_use;
2209#else
2210 (void) $as_decl_name;
2211#endif
2212#endif
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_compile "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_decl
2231
55a8c076
YQ
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
2241if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
2289# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2290# -------------------------------------------
2291# Tests whether TYPE exists after having included INCLUDES, setting cache
2292# variable VAR accordingly.
2293ac_fn_c_check_type ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297$as_echo_n "checking for $2... " >&6; }
2298if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2299 $as_echo_n "(cached) " >&6
2300else
2301 eval "$3=no"
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304$4
2305int
2306main ()
2307{
2308if (sizeof ($2))
2309 return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
2321if (sizeof (($2)))
2322 return 0;
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2328
81ecdfbb
RW
2329else
2330 eval "$3=yes"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336eval ac_res=\$$3
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2340
81ecdfbb
RW
2341} # ac_fn_c_check_type
2342cat >config.log <<_ACEOF
2343This file contains any messages produced by compilers while
2344running configure, to aid debugging if configure makes a mistake.
d5af19ba 2345
81ecdfbb
RW
2346It was created by $as_me, which was
2347generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2348
81ecdfbb 2349 $ $0 $@
413ccac7 2350
81ecdfbb
RW
2351_ACEOF
2352exec 5>>config.log
2353{
2354cat <<_ASUNAME
2355## --------- ##
2356## Platform. ##
2357## --------- ##
413ccac7 2358
81ecdfbb
RW
2359hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2360uname -m = `(uname -m) 2>/dev/null || echo unknown`
2361uname -r = `(uname -r) 2>/dev/null || echo unknown`
2362uname -s = `(uname -s) 2>/dev/null || echo unknown`
2363uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2364
81ecdfbb
RW
2365/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2366/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2367
81ecdfbb
RW
2368/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2369/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2370/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2371/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2372/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2373/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2374/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2375
81ecdfbb 2376_ASUNAME
bec39cab 2377
bec39cab
AC
2378as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2379for as_dir in $PATH
2380do
2381 IFS=$as_save_IFS
2382 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2383 $as_echo "PATH: $as_dir"
2384 done
2385IFS=$as_save_IFS
bec39cab 2386
81ecdfbb 2387} >&5
bec39cab 2388
81ecdfbb 2389cat >&5 <<_ACEOF
bec39cab 2390
bec39cab 2391
81ecdfbb
RW
2392## ----------- ##
2393## Core tests. ##
2394## ----------- ##
2395
2396_ACEOF
2397
2398
2399# Keep a trace of the command line.
2400# Strip out --no-create and --no-recursion so they do not pile up.
2401# Strip out --silent because we don't want to record it for future runs.
2402# Also quote any args containing shell meta-characters.
2403# Make two passes to allow for proper duplicate-argument suppression.
2404ac_configure_args=
2405ac_configure_args0=
2406ac_configure_args1=
2407ac_must_keep_next=false
2408for ac_pass in 1 2
2409do
2410 for ac_arg
2411 do
2412 case $ac_arg in
2413 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2414 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2415 | -silent | --silent | --silen | --sile | --sil)
2416 continue ;;
2417 *\'*)
2418 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419 esac
2420 case $ac_pass in
2421 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2422 2)
2423 as_fn_append ac_configure_args1 " '$ac_arg'"
2424 if test $ac_must_keep_next = true; then
2425 ac_must_keep_next=false # Got value, back to normal.
2426 else
2427 case $ac_arg in
2428 *=* | --config-cache | -C | -disable-* | --disable-* \
2429 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2430 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2431 | -with-* | --with-* | -without-* | --without-* | --x)
2432 case "$ac_configure_args0 " in
2433 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434 esac
2435 ;;
2436 -* ) ac_must_keep_next=true ;;
2437 esac
2438 fi
2439 as_fn_append ac_configure_args " '$ac_arg'"
2440 ;;
2441 esac
2442 done
2443done
2444{ ac_configure_args0=; unset ac_configure_args0;}
2445{ ac_configure_args1=; unset ac_configure_args1;}
2446
2447# When interrupted or exit'd, cleanup temporary files, and complete
2448# config.log. We remove comments because anyway the quotes in there
2449# would cause problems or look ugly.
2450# WARNING: Use '\'' to represent an apostrophe within the trap.
2451# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2452trap 'exit_status=$?
2453 # Save into config.log some information that might help in debugging.
2454 {
2455 echo
2456
2457 cat <<\_ASBOX
2458## ---------------- ##
2459## Cache variables. ##
2460## ---------------- ##
2461_ASBOX
2462 echo
2463 # The following way of writing the cache mishandles newlines in values,
2464(
2465 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466 eval ac_val=\$$ac_var
2467 case $ac_val in #(
2468 *${as_nl}*)
2469 case $ac_var in #(
2470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2472 esac
2473 case $ac_var in #(
2474 _ | IFS | as_nl) ;; #(
2475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476 *) { eval $ac_var=; unset $ac_var;} ;;
2477 esac ;;
2478 esac
2479 done
2480 (set) 2>&1 |
2481 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482 *${as_nl}ac_space=\ *)
2483 sed -n \
2484 "s/'\''/'\''\\\\'\'''\''/g;
2485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486 ;; #(
2487 *)
2488 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2489 ;;
2490 esac |
2491 sort
2492)
2493 echo
2494
2495 cat <<\_ASBOX
2496## ----------------- ##
2497## Output variables. ##
2498## ----------------- ##
2499_ASBOX
2500 echo
2501 for ac_var in $ac_subst_vars
2502 do
2503 eval ac_val=\$$ac_var
2504 case $ac_val in
2505 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2506 esac
2507 $as_echo "$ac_var='\''$ac_val'\''"
2508 done | sort
2509 echo
2510
2511 if test -n "$ac_subst_files"; then
2512 cat <<\_ASBOX
2513## ------------------- ##
2514## File substitutions. ##
2515## ------------------- ##
2516_ASBOX
2517 echo
2518 for ac_var in $ac_subst_files
2519 do
2520 eval ac_val=\$$ac_var
2521 case $ac_val in
2522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523 esac
2524 $as_echo "$ac_var='\''$ac_val'\''"
2525 done | sort
2526 echo
2527 fi
2528
2529 if test -s confdefs.h; then
2530 cat <<\_ASBOX
2531## ----------- ##
2532## confdefs.h. ##
2533## ----------- ##
2534_ASBOX
2535 echo
2536 cat confdefs.h
2537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
2540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
2542 } >&5
2543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2545 exit $exit_status
2546' 0
2547for ac_signal in 1 2 13 15; do
2548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
2553rm -f -r conftest* confdefs.h
2554
2555$as_echo "/* confdefs.h */" > confdefs.h
2556
2557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
2563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
2567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
2571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
2575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
2579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
2583
2584# Let the site file select an alternate cache file if it wants to.
2585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
2588if test -n "$CONFIG_SITE"; then
2589 ac_site_file1=$CONFIG_SITE
2590elif test "x$prefix" != xNONE; then
2591 ac_site_file1=$prefix/share/config.site
2592 ac_site_file2=$prefix/etc/config.site
2593else
2594 ac_site_file1=$ac_default_prefix/share/config.site
2595 ac_site_file2=$ac_default_prefix/etc/config.site
2596fi
2597for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2598do
2599 test "x$ac_site_file" = xNONE && continue
2600 if test -r "$ac_site_file"; then
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2603 sed 's/^/| /' "$ac_site_file" >&5
2604 . "$ac_site_file"
2605 fi
2606done
2607
2608if test -r "$cache_file"; then
2609 # Some versions of bash will fail to source /dev/null (special
2610 # files actually), so we avoid doing that.
2611 if test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
2614 case $cache_file in
2615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
2617 esac
2618 fi
2619else
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
2622 >$cache_file
bec39cab
AC
2623fi
2624
81ecdfbb
RW
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
2628for ac_var in $ac_precious_vars; do
2629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
2631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
2633 case $ac_old_set,$ac_new_set in
2634 set,)
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2637 ac_cache_corrupted=: ;;
2638 ,set)
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
2645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
2666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2680 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2681fi
2682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
2685
2686ac_ext=c
2687ac_cpp='$CPP $CPPFLAGS'
2688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
2691
2692
2693
2694
2695
2696ac_config_headers="$ac_config_headers config.h:config.in"
2697
2698
2699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2700$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2701 # Check whether --enable-maintainer-mode was given.
2702if test "${enable_maintainer_mode+set}" = set; then :
2703 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2704else
2705 USE_MAINTAINER_MODE=no
2706fi
2707
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2709$as_echo "$USE_MAINTAINER_MODE" >&6; }
2710 if test $USE_MAINTAINER_MODE = yes; then
2711 MAINTAINER_MODE_TRUE=
2712 MAINTAINER_MODE_FALSE='#'
2713else
2714 MAINTAINER_MODE_TRUE='#'
2715 MAINTAINER_MODE_FALSE=
2716fi
2717
2718 MAINT=$MAINTAINER_MODE_TRUE
2719
2720
2721
17ef446e 2722# Set the 'development' global.
270c9937 2723. $srcdir/../bfd/development.sh
f5f1cdb6 2724
81ecdfbb
RW
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730if test -n "$ac_tool_prefix"; then
2731 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2732set dummy ${ac_tool_prefix}gcc; ac_word=$2
2733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734$as_echo_n "checking for $ac_word... " >&6; }
2735if test "${ac_cv_prog_CC+set}" = set; then :
2736 $as_echo_n "(cached) " >&6
c906108c
SS
2737else
2738 if test -n "$CC"; then
2739 ac_cv_prog_CC="$CC" # Let the user override the test.
2740else
bec39cab
AC
2741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742for as_dir in $PATH
2743do
2744 IFS=$as_save_IFS
2745 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2746 for ac_exec_ext in '' $ac_executable_extensions; do
2747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2748 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2750 break 2
2751 fi
2752done
81ecdfbb
RW
2753 done
2754IFS=$as_save_IFS
bec39cab 2755
c906108c
SS
2756fi
2757fi
bec39cab 2758CC=$ac_cv_prog_CC
c906108c 2759if test -n "$CC"; then
81ecdfbb
RW
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2761$as_echo "$CC" >&6; }
c906108c 2762else
81ecdfbb
RW
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2764$as_echo "no" >&6; }
c906108c
SS
2765fi
2766
81ecdfbb 2767
b4e70030
JB
2768fi
2769if test -z "$ac_cv_prog_CC"; then
2770 ac_ct_CC=$CC
81ecdfbb
RW
2771 # Extract the first word of "gcc", so it can be a program name with args.
2772set dummy gcc; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
2775if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2776 $as_echo_n "(cached) " >&6
b4e70030
JB
2777else
2778 if test -n "$ac_ct_CC"; then
2779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788 ac_cv_prog_ac_ct_CC="gcc"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2790 break 2
4e8d927d 2791 fi
b4e70030 2792done
81ecdfbb
RW
2793 done
2794IFS=$as_save_IFS
b4e70030
JB
2795
2796fi
2797fi
2798ac_ct_CC=$ac_cv_prog_ac_ct_CC
2799if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2801$as_echo "$ac_ct_CC" >&6; }
b4e70030 2802else
81ecdfbb
RW
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804$as_echo "no" >&6; }
b4e70030
JB
2805fi
2806
81ecdfbb
RW
2807 if test "x$ac_ct_CC" = x; then
2808 CC=""
2809 else
2810 case $cross_compiling:$ac_tool_warned in
2811yes:)
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2814ac_tool_warned=yes ;;
2815esac
2816 CC=$ac_ct_CC
2817 fi
b4e70030
JB
2818else
2819 CC="$ac_cv_prog_CC"
2820fi
2821
c906108c 2822if test -z "$CC"; then
81ecdfbb
RW
2823 if test -n "$ac_tool_prefix"; then
2824 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2825set dummy ${ac_tool_prefix}cc; ac_word=$2
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2827$as_echo_n "checking for $ac_word... " >&6; }
2828if test "${ac_cv_prog_CC+set}" = set; then :
2829 $as_echo_n "(cached) " >&6
c906108c
SS
2830else
2831 if test -n "$CC"; then
2832 ac_cv_prog_CC="$CC" # Let the user override the test.
2833else
bec39cab
AC
2834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2835for as_dir in $PATH
2836do
2837 IFS=$as_save_IFS
2838 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2839 for ac_exec_ext in '' $ac_executable_extensions; do
2840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2841 ac_cv_prog_CC="${ac_tool_prefix}cc"
2842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2843 break 2
2844 fi
2845done
81ecdfbb
RW
2846 done
2847IFS=$as_save_IFS
2848
2849fi
2850fi
2851CC=$ac_cv_prog_CC
2852if test -n "$CC"; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2854$as_echo "$CC" >&6; }
2855else
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
2858fi
2859
2860
2861 fi
2862fi
2863if test -z "$CC"; then
2864 # Extract the first word of "cc", so it can be a program name with args.
2865set dummy cc; ac_word=$2
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867$as_echo_n "checking for $ac_word... " >&6; }
2868if test "${ac_cv_prog_CC+set}" = set; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 if test -n "$CC"; then
2872 ac_cv_prog_CC="$CC" # Let the user override the test.
2873else
2874 ac_prog_rejected=no
2875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876for as_dir in $PATH
2877do
2878 IFS=$as_save_IFS
2879 test -z "$as_dir" && as_dir=.
2880 for ac_exec_ext in '' $ac_executable_extensions; do
2881 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2882 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2883 ac_prog_rejected=yes
2884 continue
2885 fi
2886 ac_cv_prog_CC="cc"
2887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888 break 2
2889 fi
2890done
2891 done
2892IFS=$as_save_IFS
bec39cab 2893
c906108c
SS
2894if test $ac_prog_rejected = yes; then
2895 # We found a bogon in the path, so make sure we never use it.
2896 set dummy $ac_cv_prog_CC
2897 shift
bec39cab 2898 if test $# != 0; then
c906108c
SS
2899 # We chose a different compiler from the bogus one.
2900 # However, it has the same basename, so the bogon will be chosen
2901 # first if we set CC to just the basename; use the full file name.
2902 shift
bec39cab 2903 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2904 fi
2905fi
2906fi
2907fi
bec39cab 2908CC=$ac_cv_prog_CC
c906108c 2909if test -n "$CC"; then
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
c906108c 2912else
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
c906108c
SS
2915fi
2916
81ecdfbb 2917
bec39cab
AC
2918fi
2919if test -z "$CC"; then
2920 if test -n "$ac_tool_prefix"; then
81ecdfbb 2921 for ac_prog in cl.exe
bec39cab
AC
2922 do
2923 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
2927if test "${ac_cv_prog_CC+set}" = set; then :
2928 $as_echo_n "(cached) " >&6
c906108c
SS
2929else
2930 if test -n "$CC"; then
2931 ac_cv_prog_CC="$CC" # Let the user override the test.
2932else
bec39cab
AC
2933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934for as_dir in $PATH
2935do
2936 IFS=$as_save_IFS
2937 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2938 for ac_exec_ext in '' $ac_executable_extensions; do
2939 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2940 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2942 break 2
2943 fi
2944done
81ecdfbb
RW
2945 done
2946IFS=$as_save_IFS
bec39cab 2947
c906108c
SS
2948fi
2949fi
bec39cab 2950CC=$ac_cv_prog_CC
c906108c 2951if test -n "$CC"; then
81ecdfbb
RW
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2953$as_echo "$CC" >&6; }
c906108c 2954else
81ecdfbb
RW
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956$as_echo "no" >&6; }
c906108c 2957fi
bec39cab 2958
81ecdfbb 2959
bec39cab
AC
2960 test -n "$CC" && break
2961 done
2962fi
2963if test -z "$CC"; then
2964 ac_ct_CC=$CC
81ecdfbb 2965 for ac_prog in cl.exe
bec39cab
AC
2966do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2970$as_echo_n "checking for $ac_word... " >&6; }
2971if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2972 $as_echo_n "(cached) " >&6
bec39cab
AC
2973else
2974 if test -n "$ac_ct_CC"; then
2975 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2976else
2977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978for as_dir in $PATH
2979do
2980 IFS=$as_save_IFS
2981 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2982 for ac_exec_ext in '' $ac_executable_extensions; do
2983 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2984 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2986 break 2
c906108c 2987 fi
bec39cab 2988done
81ecdfbb
RW
2989 done
2990IFS=$as_save_IFS
bec39cab
AC
2991
2992fi
2993fi
2994ac_ct_CC=$ac_cv_prog_ac_ct_CC
2995if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2997$as_echo "$ac_ct_CC" >&6; }
bec39cab 2998else
81ecdfbb
RW
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3000$as_echo "no" >&6; }
c906108c
SS
3001fi
3002
81ecdfbb 3003
bec39cab
AC
3004 test -n "$ac_ct_CC" && break
3005done
c906108c 3006
81ecdfbb
RW
3007 if test "x$ac_ct_CC" = x; then
3008 CC=""
3009 else
3010 case $cross_compiling:$ac_tool_warned in
3011yes:)
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3014ac_tool_warned=yes ;;
3015esac
3016 CC=$ac_ct_CC
3017 fi
bec39cab
AC
3018fi
3019
3020fi
3021
3022
81ecdfbb
RW
3023test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3025as_fn_error "no acceptable C compiler found in \$PATH
3026See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3027
3028# Provide some information about the compiler.
81ecdfbb
RW
3029$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3030set X $ac_compile
3031ac_compiler=$2
3032for ac_option in --version -v -V -qversion; do
3033 { { ac_try="$ac_compiler $ac_option >&5"
3034case "(($ac_try" in
3035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036 *) ac_try_echo=$ac_try;;
3037esac
3038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3039$as_echo "$ac_try_echo"; } >&5
3040 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3041 ac_status=$?
81ecdfbb
RW
3042 if test -s conftest.err; then
3043 sed '10a\
3044... rest of stderr output deleted ...
3045 10q' conftest.err >conftest.er1
3046 cat conftest.er1 >&5
3047 rm -f conftest.er1 conftest.err
3048 fi
3049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3050 test $ac_status = 0; }
3051done
bec39cab 3052
81ecdfbb 3053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3054/* end confdefs.h. */
3055
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064ac_clean_files_save=$ac_clean_files
81ecdfbb 3065ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3066# Try to create an executable without -o first, disregard a.out.
3067# It will help us diagnose broken compilers, and finding out an intuition
3068# of exeext.
81ecdfbb
RW
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3070$as_echo_n "checking for C compiler default output file name... " >&6; }
3071ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3072
3073# The possible output files:
3074ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3075
3076ac_rmfiles=
3077for ac_file in $ac_files
3078do
3079 case $ac_file in
3080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3081 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3082 esac
3083done
3084rm -f $ac_rmfiles
3085
3086if { { ac_try="$ac_link_default"
3087case "(($ac_try" in
3088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089 *) ac_try_echo=$ac_try;;
3090esac
3091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092$as_echo "$ac_try_echo"; } >&5
3093 (eval "$ac_link_default") 2>&5
3094 ac_status=$?
3095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3096 test $ac_status = 0; }; then :
3097 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3098# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3099# in a Makefile. We should not override ac_cv_exeext if it was cached,
3100# so that the user can short-circuit this test for compilers unknown to
3101# Autoconf.
3102for ac_file in $ac_files ''
bec39cab
AC
3103do
3104 test -f "$ac_file" || continue
3105 case $ac_file in
81ecdfbb 3106 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3107 ;;
3108 [ab].out )
3109 # We found the default executable, but exeext='' is most
3110 # certainly right.
3111 break;;
3112 *.* )
81ecdfbb
RW
3113 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3114 then :; else
3115 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3116 fi
3117 # We set ac_cv_exeext here because the later test for it is not
3118 # safe: cross compilers may not add the suffix if given an `-o'
3119 # argument, so we may need to know it at that point already.
3120 # Even if this section looks crufty: it has the advantage of
3121 # actually working.
b4e70030
JB
3122 break;;
3123 * )
3124 break;;
bec39cab
AC
3125 esac
3126done
81ecdfbb
RW
3127test "$ac_cv_exeext" = no && ac_cv_exeext=
3128
bec39cab 3129else
81ecdfbb
RW
3130 ac_file=''
3131fi
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3133$as_echo "$ac_file" >&6; }
3134if test -z "$ac_file"; then :
3135 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3136sed 's/^/| /' conftest.$ac_ext >&5
3137
81ecdfbb
RW
3138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140{ as_fn_set_status 77
3141as_fn_error "C compiler cannot create executables
3142See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3143fi
b4e70030 3144ac_exeext=$ac_cv_exeext
b4e70030 3145
81ecdfbb 3146# Check that the compiler produces executables we can run. If not, either
bec39cab 3147# the compiler is broken, or we cross compile.
81ecdfbb
RW
3148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3149$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3150# If not cross compiling, check that we can run a simple program.
3151if test "$cross_compiling" != yes; then
3152 if { ac_try='./$ac_file'
81ecdfbb
RW
3153 { { case "(($ac_try" in
3154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155 *) ac_try_echo=$ac_try;;
3156esac
3157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3158$as_echo "$ac_try_echo"; } >&5
3159 (eval "$ac_try") 2>&5
bec39cab 3160 ac_status=$?
81ecdfbb
RW
3161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3162 test $ac_status = 0; }; }; then
bec39cab 3163 cross_compiling=no
c906108c 3164 else
bec39cab
AC
3165 if test "$cross_compiling" = maybe; then
3166 cross_compiling=yes
3167 else
81ecdfbb
RW
3168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3170as_fn_error "cannot run C compiled programs.
bec39cab 3171If you meant to cross compile, use \`--host'.
81ecdfbb 3172See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3173 fi
c906108c 3174 fi
bec39cab 3175fi
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3177$as_echo "yes" >&6; }
bec39cab 3178
81ecdfbb 3179rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3180ac_clean_files=$ac_clean_files_save
81ecdfbb 3181# Check that the compiler produces executables we can run. If not, either
b4e70030 3182# the compiler is broken, or we cross compile.
81ecdfbb
RW
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3184$as_echo_n "checking whether we are cross compiling... " >&6; }
3185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3186$as_echo "$cross_compiling" >&6; }
3187
3188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3189$as_echo_n "checking for suffix of executables... " >&6; }
3190if { { ac_try="$ac_link"
3191case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194esac
3195eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3196$as_echo "$ac_try_echo"; } >&5
3197 (eval "$ac_link") 2>&5
bec39cab 3198 ac_status=$?
81ecdfbb
RW
3199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200 test $ac_status = 0; }; then :
b4e70030
JB
3201 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3202# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3203# work properly (i.e., refer to `conftest.exe'), while it won't with
3204# `rm'.
3205for ac_file in conftest.exe conftest conftest.*; do
3206 test -f "$ac_file" || continue
3207 case $ac_file in
81ecdfbb 3208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3209 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3210 break;;
3211 * ) break;;
3212 esac
3213done
c906108c 3214else
81ecdfbb
RW
3215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217as_fn_error "cannot compute suffix of executables: cannot compile and link
3218See \`config.log' for more details." "$LINENO" 5; }
c906108c 3219fi
b4e70030 3220rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3222$as_echo "$ac_cv_exeext" >&6; }
c906108c 3223
b4e70030 3224rm -f conftest.$ac_ext
bec39cab
AC
3225EXEEXT=$ac_cv_exeext
3226ac_exeext=$EXEEXT
81ecdfbb
RW
3227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3228$as_echo_n "checking for suffix of object files... " >&6; }
3229if test "${ac_cv_objext+set}" = set; then :
3230 $as_echo_n "(cached) " >&6
bec39cab 3231else
81ecdfbb 3232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3233/* end confdefs.h. */
3234
3235int
3236main ()
3237{
3238
3239 ;
3240 return 0;
3241}
3242_ACEOF
3243rm -f conftest.o conftest.obj
81ecdfbb
RW
3244if { { ac_try="$ac_compile"
3245case "(($ac_try" in
3246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247 *) ac_try_echo=$ac_try;;
3248esac
3249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250$as_echo "$ac_try_echo"; } >&5
3251 (eval "$ac_compile") 2>&5
3252 ac_status=$?
3253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3254 test $ac_status = 0; }; then :
3255 for ac_file in conftest.o conftest.obj conftest.*; do
3256 test -f "$ac_file" || continue;
bec39cab 3257 case $ac_file in
81ecdfbb 3258 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3259 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3260 break;;
3261 esac
3262done
c906108c 3263else
81ecdfbb 3264 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3265sed 's/^/| /' conftest.$ac_ext >&5
3266
81ecdfbb
RW
3267{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269as_fn_error "cannot compute suffix of object files: cannot compile
3270See \`config.log' for more details." "$LINENO" 5; }
c906108c 3271fi
b4e70030 3272rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3273fi
81ecdfbb
RW
3274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3275$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3276OBJEXT=$ac_cv_objext
3277ac_objext=$OBJEXT
81ecdfbb
RW
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3279$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3280if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3281 $as_echo_n "(cached) " >&6
c906108c 3282else
81ecdfbb 3283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3284/* end confdefs.h. */
3285
3286int
3287main ()
3288{
3289#ifndef __GNUC__
3290 choke me
3291#endif
3292
3293 ;
3294 return 0;
3295}
3296_ACEOF
81ecdfbb 3297if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3298 ac_compiler_gnu=yes
3299else
81ecdfbb 3300 ac_compiler_gnu=no
bec39cab 3301fi
81ecdfbb 3302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3303ac_cv_c_compiler_gnu=$ac_compiler_gnu
3304
3305fi
81ecdfbb
RW
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3307$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3308if test $ac_compiler_gnu = yes; then
3309 GCC=yes
3310else
3311 GCC=
3312fi
bec39cab
AC
3313ac_test_CFLAGS=${CFLAGS+set}
3314ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3316$as_echo_n "checking whether $CC accepts -g... " >&6; }
3317if test "${ac_cv_prog_cc_g+set}" = set; then :
3318 $as_echo_n "(cached) " >&6
bec39cab 3319else
81ecdfbb
RW
3320 ac_save_c_werror_flag=$ac_c_werror_flag
3321 ac_c_werror_flag=yes
3322 ac_cv_prog_cc_g=no
3323 CFLAGS="-g"
3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3325/* end confdefs.h. */
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
81ecdfbb 3335if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3336 ac_cv_prog_cc_g=yes
3337else
81ecdfbb
RW
3338 CFLAGS=""
3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350if ac_fn_c_try_compile "$LINENO"; then :
3351
3352else
3353 ac_c_werror_flag=$ac_save_c_werror_flag
3354 CFLAGS="-g"
3355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356/* end confdefs.h. */
3357
3358int
3359main ()
3360{
c906108c 3361
81ecdfbb
RW
3362 ;
3363 return 0;
3364}
3365_ACEOF
3366if ac_fn_c_try_compile "$LINENO"; then :
3367 ac_cv_prog_cc_g=yes
3368fi
3369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3370fi
3371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3372fi
81ecdfbb
RW
3373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3374 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3375fi
81ecdfbb
RW
3376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3377$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3378if test "$ac_test_CFLAGS" = set; then
bec39cab 3379 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3380elif test $ac_cv_prog_cc_g = yes; then
3381 if test "$GCC" = yes; then
3382 CFLAGS="-g -O2"
3383 else
3384 CFLAGS="-g"
3385 fi
3386else
3387 if test "$GCC" = yes; then
3388 CFLAGS="-O2"
3389 else
3390 CFLAGS=
3391 fi
3392fi
81ecdfbb
RW
3393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3394$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3395if test "${ac_cv_prog_cc_c89+set}" = set; then :
3396 $as_echo_n "(cached) " >&6
bec39cab 3397else
81ecdfbb 3398 ac_cv_prog_cc_c89=no
bec39cab 3399ac_save_CC=$CC
81ecdfbb 3400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3401/* end confdefs.h. */
c906108c
SS
3402#include <stdarg.h>
3403#include <stdio.h>
3404#include <sys/types.h>
3405#include <sys/stat.h>
3406/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3407struct buf { int x; };
3408FILE * (*rcsopen) (struct buf *, struct stat *, int);
3409static char *e (p, i)
3410 char **p;
3411 int i;
3412{
3413 return p[i];
3414}
3415static char *f (char * (*g) (char **, int), char **p, ...)
3416{
3417 char *s;
3418 va_list v;
3419 va_start (v,p);
3420 s = g (p, va_arg (v,int));
3421 va_end (v);
3422 return s;
3423}
bec39cab
AC
3424
3425/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3426 function prototypes and stuff, but not '\xHH' hex character constants.
3427 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3428 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3429 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3430 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3431 that's true only with -std. */
bec39cab
AC
3432int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3433
81ecdfbb
RW
3434/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3435 inside strings and character constants. */
3436#define FOO(x) 'x'
3437int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3438
c906108c
SS
3439int test (int i, double x);
3440struct s1 {int (*f) (int a);};
3441struct s2 {int (*f) (double a);};
3442int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3443int argc;
3444char **argv;
bec39cab
AC
3445int
3446main ()
3447{
c906108c 3448return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3449 ;
3450 return 0;
3451}
3452_ACEOF
81ecdfbb
RW
3453for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3454 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3455do
3456 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3457 if ac_fn_c_try_compile "$LINENO"; then :
3458 ac_cv_prog_cc_c89=$ac_arg
c906108c 3459fi
81ecdfbb
RW
3460rm -f core conftest.err conftest.$ac_objext
3461 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3462done
81ecdfbb 3463rm -f conftest.$ac_ext
bec39cab 3464CC=$ac_save_CC
c906108c
SS
3465
3466fi
81ecdfbb
RW
3467# AC_CACHE_VAL
3468case "x$ac_cv_prog_cc_c89" in
3469 x)
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3471$as_echo "none needed" >&6; } ;;
3472 xno)
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3474$as_echo "unsupported" >&6; } ;;
bec39cab 3475 *)
81ecdfbb
RW
3476 CC="$CC $ac_cv_prog_cc_c89"
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3478$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3479esac
81ecdfbb 3480if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3481
b4e70030
JB
3482fi
3483
bec39cab
AC
3484ac_ext=c
3485ac_cpp='$CPP $CPPFLAGS'
3486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3489
60ca704f 3490
bec39cab
AC
3491ac_ext=c
3492ac_cpp='$CPP $CPPFLAGS'
3493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3495ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3497$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3498# On Suns, sometimes $CPP names a directory.
3499if test -n "$CPP" && test -d "$CPP"; then
3500 CPP=
8bb2c122 3501fi
bec39cab 3502if test -z "$CPP"; then
81ecdfbb
RW
3503 if test "${ac_cv_prog_CPP+set}" = set; then :
3504 $as_echo_n "(cached) " >&6
bec39cab
AC
3505else
3506 # Double quotes because CPP needs to be expanded
3507 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3508 do
3509 ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
3514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
3516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3519/* end confdefs.h. */
3520#ifdef __STDC__
3521# include <limits.h>
3522#else
3523# include <assert.h>
3524#endif
3525 Syntax error
3526_ACEOF
81ecdfbb 3527if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3528
81ecdfbb 3529else
bec39cab
AC
3530 # Broken: fails on valid input.
3531continue
3532fi
3533rm -f conftest.err conftest.$ac_ext
3534
81ecdfbb 3535 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3536 # can be detected and how.
81ecdfbb 3537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3538/* end confdefs.h. */
3539#include <ac_nonexistent.h>
3540_ACEOF
81ecdfbb 3541if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3542 # Broken: success on invalid input.
3543continue
8bb2c122 3544else
bec39cab
AC
3545 # Passes both tests.
3546ac_preproc_ok=:
3547break
8bb2c122 3548fi
bec39cab 3549rm -f conftest.err conftest.$ac_ext
8bb2c122 3550
bec39cab
AC
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
81ecdfbb 3554if $ac_preproc_ok; then :
bec39cab
AC
3555 break
3556fi
8bb2c122 3557
bec39cab
AC
3558 done
3559 ac_cv_prog_CPP=$CPP
ddc9cd0f 3560
c906108c 3561fi
bec39cab
AC
3562 CPP=$ac_cv_prog_CPP
3563else
3564 ac_cv_prog_CPP=$CPP
c906108c 3565fi
81ecdfbb
RW
3566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3567$as_echo "$CPP" >&6; }
bec39cab
AC
3568ac_preproc_ok=false
3569for ac_c_preproc_warn_flag in '' yes
3570do
3571 # Use a header file that comes with gcc, so configuring glibc
3572 # with a fresh cross-compiler works.
3573 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574 # <limits.h> exists even on freestanding compilers.
3575 # On the NeXT, cc -E runs the code through the compiler's parser,
3576 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3578/* end confdefs.h. */
3579#ifdef __STDC__
3580# include <limits.h>
3581#else
3582# include <assert.h>
3583#endif
3584 Syntax error
3585_ACEOF
81ecdfbb 3586if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3587
81ecdfbb 3588else
bec39cab
AC
3589 # Broken: fails on valid input.
3590continue
3591fi
3592rm -f conftest.err conftest.$ac_ext
3593
81ecdfbb 3594 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3595 # can be detected and how.
81ecdfbb 3596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3597/* end confdefs.h. */
3598#include <ac_nonexistent.h>
3599_ACEOF
81ecdfbb 3600if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3601 # Broken: success on invalid input.
3602continue
c906108c 3603else
bec39cab
AC
3604 # Passes both tests.
3605ac_preproc_ok=:
3606break
c906108c 3607fi
bec39cab 3608rm -f conftest.err conftest.$ac_ext
c906108c 3609
bec39cab
AC
3610done
3611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3612rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3613if $ac_preproc_ok; then :
3614
c906108c 3615else
81ecdfbb
RW
3616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3618as_fn_error "C preprocessor \"$CPP\" fails sanity check
3619See \`config.log' for more details." "$LINENO" 5; }
c906108c 3620fi
c906108c 3621
bec39cab
AC
3622ac_ext=c
3623ac_cpp='$CPP $CPPFLAGS'
3624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3626ac_compiler_gnu=$ac_cv_c_compiler_gnu
3627
3628
81ecdfbb
RW
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3631if test "${ac_cv_path_GREP+set}" = set; then :
3632 $as_echo_n "(cached) " >&6
4e8d927d 3633else
81ecdfbb
RW
3634 if test -z "$GREP"; then
3635 ac_path_GREP_found=false
3636 # Loop through the user's path and test for each of PROGNAME-LIST
3637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_prog in grep ggrep; do
3643 for ac_exec_ext in '' $ac_executable_extensions; do
3644 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3645 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3646# Check for GNU ac_path_GREP and select it if it is found.
3647 # Check for GNU $ac_path_GREP
3648case `"$ac_path_GREP" --version 2>&1` in
3649*GNU*)
3650 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3651*)
3652 ac_count=0
3653 $as_echo_n 0123456789 >"conftest.in"
3654 while :
3655 do
3656 cat "conftest.in" "conftest.in" >"conftest.tmp"
3657 mv "conftest.tmp" "conftest.in"
3658 cp "conftest.in" "conftest.nl"
3659 $as_echo 'GREP' >> "conftest.nl"
3660 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3661 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3662 as_fn_arith $ac_count + 1 && ac_count=$as_val
3663 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3664 # Best one so far, save it but keep looking for a better one
3665 ac_cv_path_GREP="$ac_path_GREP"
3666 ac_path_GREP_max=$ac_count
bec39cab 3667 fi
81ecdfbb
RW
3668 # 10*(2^10) chars as input seems more than enough
3669 test $ac_count -gt 10 && break
3670 done
3671 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3672esac
bec39cab 3673
81ecdfbb
RW
3674 $ac_path_GREP_found && break 3
3675 done
3676 done
3677 done
3678IFS=$as_save_IFS
3679 if test -z "$ac_cv_path_GREP"; then
3680 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3681 fi
c906108c 3682else
81ecdfbb 3683 ac_cv_path_GREP=$GREP
c906108c 3684fi
c906108c 3685
81ecdfbb
RW
3686fi
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3688$as_echo "$ac_cv_path_GREP" >&6; }
3689 GREP="$ac_cv_path_GREP"
c906108c 3690
c906108c 3691
81ecdfbb
RW
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3693$as_echo_n "checking for egrep... " >&6; }
3694if test "${ac_cv_path_EGREP+set}" = set; then :
3695 $as_echo_n "(cached) " >&6
783e057b 3696else
81ecdfbb
RW
3697 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3698 then ac_cv_path_EGREP="$GREP -E"
3699 else
3700 if test -z "$EGREP"; then
3701 ac_path_EGREP_found=false
3702 # Loop through the user's path and test for each of PROGNAME-LIST
3703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3705do
3706 IFS=$as_save_IFS
3707 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3708 for ac_prog in egrep; do
3709 for ac_exec_ext in '' $ac_executable_extensions; do
3710 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3711 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3712# Check for GNU ac_path_EGREP and select it if it is found.
3713 # Check for GNU $ac_path_EGREP
3714case `"$ac_path_EGREP" --version 2>&1` in
3715*GNU*)
3716 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3717*)
3718 ac_count=0
3719 $as_echo_n 0123456789 >"conftest.in"
3720 while :
3721 do
3722 cat "conftest.in" "conftest.in" >"conftest.tmp"
3723 mv "conftest.tmp" "conftest.in"
3724 cp "conftest.in" "conftest.nl"
3725 $as_echo 'EGREP' >> "conftest.nl"
3726 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3727 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3728 as_fn_arith $ac_count + 1 && ac_count=$as_val
3729 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3730 # Best one so far, save it but keep looking for a better one
3731 ac_cv_path_EGREP="$ac_path_EGREP"
3732 ac_path_EGREP_max=$ac_count
3733 fi
3734 # 10*(2^10) chars as input seems more than enough
3735 test $ac_count -gt 10 && break
3736 done
3737 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3738esac
bec39cab 3739
81ecdfbb
RW
3740 $ac_path_EGREP_found && break 3
3741 done
3742 done
3743 done
3744IFS=$as_save_IFS
3745 if test -z "$ac_cv_path_EGREP"; then
3746 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3747 fi
783e057b 3748else
81ecdfbb 3749 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3750fi
3751
81ecdfbb 3752 fi
783e057b 3753fi
81ecdfbb
RW
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3755$as_echo "$ac_cv_path_EGREP" >&6; }
3756 EGREP="$ac_cv_path_EGREP"
3757
783e057b 3758
81ecdfbb
RW
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3760$as_echo_n "checking for ANSI C header files... " >&6; }
3761if test "${ac_cv_header_stdc+set}" = set; then :
3762 $as_echo_n "(cached) " >&6
783e057b 3763else
81ecdfbb 3764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3765/* end confdefs.h. */
783e057b 3766#include <stdlib.h>
bec39cab 3767#include <stdarg.h>
783e057b
DJ
3768#include <string.h>
3769#include <float.h>
c906108c 3770
bec39cab
AC
3771int
3772main ()
3773{
c906108c 3774
bec39cab
AC
3775 ;
3776 return 0;
3777}
3778_ACEOF
81ecdfbb 3779if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3780 ac_cv_header_stdc=yes
c906108c 3781else
81ecdfbb 3782 ac_cv_header_stdc=no
c906108c 3783fi
81ecdfbb 3784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3785
783e057b
DJ
3786if test $ac_cv_header_stdc = yes; then
3787 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3789/* end confdefs.h. */
3790#include <string.h>
c906108c 3791
783e057b
DJ
3792_ACEOF
3793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3794 $EGREP "memchr" >/dev/null 2>&1; then :
3795
c906108c 3796else
783e057b 3797 ac_cv_header_stdc=no
c906108c 3798fi
783e057b 3799rm -f conftest*
c906108c
SS
3800
3801fi
3802
783e057b
DJ
3803if test $ac_cv_header_stdc = yes; then
3804 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3806/* end confdefs.h. */
3807#include <stdlib.h>
bec39cab 3808
783e057b
DJ
3809_ACEOF
3810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3811 $EGREP "free" >/dev/null 2>&1; then :
3812
bec39cab 3813else
783e057b 3814 ac_cv_header_stdc=no
bec39cab 3815fi
783e057b 3816rm -f conftest*
bec39cab
AC
3817
3818fi
bec39cab 3819
783e057b
DJ
3820if test $ac_cv_header_stdc = yes; then
3821 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3822 if test "$cross_compiling" = yes; then :
783e057b 3823 :
bec39cab 3824else
81ecdfbb 3825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3826/* end confdefs.h. */
3827#include <ctype.h>
81ecdfbb 3828#include <stdlib.h>
783e057b
DJ
3829#if ((' ' & 0x0FF) == 0x020)
3830# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3831# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3832#else
3833# define ISLOWER(c) \
3834 (('a' <= (c) && (c) <= 'i') \
3835 || ('j' <= (c) && (c) <= 'r') \
3836 || ('s' <= (c) && (c) <= 'z'))
3837# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3838#endif
3839
3840#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3841int
3842main ()
3843{
3844 int i;
3845 for (i = 0; i < 256; i++)
3846 if (XOR (islower (i), ISLOWER (i))
3847 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3848 return 2;
3849 return 0;
783e057b
DJ
3850}
3851_ACEOF
81ecdfbb 3852if ac_fn_c_try_run "$LINENO"; then :
783e057b 3853
81ecdfbb
RW
3854else
3855 ac_cv_header_stdc=no
783e057b 3856fi
81ecdfbb
RW
3857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3858 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3859fi
81ecdfbb 3860
783e057b
DJ
3861fi
3862fi
81ecdfbb
RW
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3864$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3865if test $ac_cv_header_stdc = yes; then
3866
81ecdfbb 3867$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3868
3869fi
3870
3871# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3872for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3873 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3874do :
3875 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3876ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3877"
3878eval as_val=\$$as_ac_Header
3879 if test "x$as_val" = x""yes; then :
783e057b 3880 cat >>confdefs.h <<_ACEOF
81ecdfbb 3881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3882_ACEOF
3883
3884fi
3885
3886done
3887
3888
3889
81ecdfbb
RW
3890 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3891if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3892 MINIX=yes
3893else
3894 MINIX=
3895fi
3896
3897
3898 if test "$MINIX" = yes; then
3899
81ecdfbb 3900$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3901
3902
81ecdfbb 3903$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3904
3905
81ecdfbb 3906$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3907
3908 fi
3909
3910
81ecdfbb
RW
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3912$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3913if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3914 $as_echo_n "(cached) " >&6
783e057b 3915else
81ecdfbb 3916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3917/* end confdefs.h. */
3918
c971b7fa
PA
3919# define __EXTENSIONS__ 1
3920 $ac_includes_default
783e057b
DJ
3921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
81ecdfbb 3929if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3930 ac_cv_safe_to_define___extensions__=yes
3931else
81ecdfbb 3932 ac_cv_safe_to_define___extensions__=no
783e057b 3933fi
81ecdfbb 3934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3935fi
81ecdfbb
RW
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3937$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3938 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3939 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3940
81ecdfbb 3941 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3942
81ecdfbb 3943 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3944
81ecdfbb 3945 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3946
81ecdfbb 3947 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3948
3949
c971b7fa
PA
3950ac_aux_dir=
3951for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3952 for ac_t in install-sh install.sh shtool; do
3953 if test -f "$ac_dir/$ac_t"; then
3954 ac_aux_dir=$ac_dir
3955 ac_install_sh="$ac_aux_dir/$ac_t -c"
3956 break 2
3957 fi
3958 done
3959done
3960if test -z "$ac_aux_dir"; then
3961 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3962fi
770d76d7 3963
c971b7fa
PA
3964# These three variables are undocumented and unsupported,
3965# and are intended to be withdrawn in a future Autoconf release.
3966# They can cause serious problems if a builder's source tree is in a directory
3967# whose full name contains unusual characters.
3968ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3969ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3970ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3971
770d76d7 3972
c971b7fa
PA
3973# Make sure we can run config.sub.
3974$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3975 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3976
c971b7fa
PA
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3978$as_echo_n "checking build system type... " >&6; }
3979if test "${ac_cv_build+set}" = set; then :
3980 $as_echo_n "(cached) " >&6
770d76d7 3981else
c971b7fa
PA
3982 ac_build_alias=$build_alias
3983test "x$ac_build_alias" = x &&
3984 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3985test "x$ac_build_alias" = x &&
3986 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3987ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3988 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3989
770d76d7 3990fi
c971b7fa
PA
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3992$as_echo "$ac_cv_build" >&6; }
3993case $ac_cv_build in
3994*-*-*) ;;
3995*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3996esac
c971b7fa
PA
3997build=$ac_cv_build
3998ac_save_IFS=$IFS; IFS='-'
3999set x $ac_cv_build
4000shift
4001build_cpu=$1
4002build_vendor=$2
4003shift; shift
4004# Remember, the first character of IFS is used to create $*,
4005# except with old shells:
4006build_os=$*
4007IFS=$ac_save_IFS
4008case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4009
4010
c971b7fa
PA
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4012$as_echo_n "checking host system type... " >&6; }
4013if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4014 $as_echo_n "(cached) " >&6
4015else
c971b7fa
PA
4016 if test "x$host_alias" = x; then
4017 ac_cv_host=$ac_cv_build
81ecdfbb 4018else
c971b7fa
PA
4019 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4020 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4021fi
81ecdfbb
RW
4022
4023fi
c971b7fa
PA
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4025$as_echo "$ac_cv_host" >&6; }
4026case $ac_cv_host in
4027*-*-*) ;;
4028*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4029esac
c971b7fa
PA
4030host=$ac_cv_host
4031ac_save_IFS=$IFS; IFS='-'
4032set x $ac_cv_host
4033shift
4034host_cpu=$1
4035host_vendor=$2
4036shift; shift
4037# Remember, the first character of IFS is used to create $*,
4038# except with old shells:
4039host_os=$*
4040IFS=$ac_save_IFS
4041case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4042
4043
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4045$as_echo_n "checking target system type... " >&6; }
4046if test "${ac_cv_target+set}" = set; then :
4047 $as_echo_n "(cached) " >&6
4048else
4049 if test "x$target_alias" = x; then
4050 ac_cv_target=$ac_cv_host
4051else
4052 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4053 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4054fi
4055
4056fi
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4058$as_echo "$ac_cv_target" >&6; }
4059case $ac_cv_target in
4060*-*-*) ;;
4061*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4062esac
4063target=$ac_cv_target
4064ac_save_IFS=$IFS; IFS='-'
4065set x $ac_cv_target
4066shift
4067target_cpu=$1
4068target_vendor=$2
4069shift; shift
4070# Remember, the first character of IFS is used to create $*,
4071# except with old shells:
4072target_os=$*
4073IFS=$ac_save_IFS
4074case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4075
4076
4077# The aliases save the names the user supplied, while $host etc.
4078# will get canonicalized.
4079test -n "$target_alias" &&
4080 test "$program_prefix$program_suffix$program_transform_name" = \
4081 NONENONEs,x,x, &&
4082 program_prefix=${target_alias}-
4083
4084# The tests for host and target for $enable_largefile require
4085# canonical names.
4086
4087
81ecdfbb 4088
da2f07f1
JK
4089# As the $enable_largefile decision depends on --enable-plugins we must set it
4090# even in directories otherwise not depending on the $plugins option.
4091
4092
2974be62
AM
4093 maybe_plugins=no
4094 for ac_header in dlfcn.h
4095do :
4096 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4097"
4098if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4099 cat >>confdefs.h <<_ACEOF
4100#define HAVE_DLFCN_H 1
4101_ACEOF
4102 maybe_plugins=yes
4103fi
4104
4105done
4106
4107 for ac_header in windows.h
4108do :
4109 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4110"
4111if test "x$ac_cv_header_windows_h" = x""yes; then :
4112 cat >>confdefs.h <<_ACEOF
4113#define HAVE_WINDOWS_H 1
4114_ACEOF
4115 maybe_plugins=yes
4116fi
4117
4118done
4119
4120
4121 # Check whether --enable-plugins was given.
da2f07f1
JK
4122if test "${enable_plugins+set}" = set; then :
4123 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4124 no) plugins=no ;;
4125 *) plugins=yes
4126 if test "$maybe_plugins" != "yes" ; then
4127 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4128 fi ;;
4129 esac
da2f07f1 4130else
2974be62
AM
4131 plugins=$maybe_plugins
4132
da2f07f1
JK
4133fi
4134
2974be62
AM
4135 if test "$plugins" = "yes"; then
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4137$as_echo_n "checking for library containing dlopen... " >&6; }
4138if test "${ac_cv_search_dlopen+set}" = set; then :
4139 $as_echo_n "(cached) " >&6
4140else
4141 ac_func_search_save_LIBS=$LIBS
4142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4143/* end confdefs.h. */
4144
4145/* Override any GCC internal prototype to avoid an error.
4146 Use char because int might match the return type of a GCC
4147 builtin and then its argument prototype would still apply. */
4148#ifdef __cplusplus
4149extern "C"
4150#endif
4151char dlopen ();
4152int
4153main ()
4154{
4155return dlopen ();
4156 ;
4157 return 0;
4158}
4159_ACEOF
4160for ac_lib in '' dl; do
4161 if test -z "$ac_lib"; then
4162 ac_res="none required"
4163 else
4164 ac_res=-l$ac_lib
4165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4166 fi
4167 if ac_fn_c_try_link "$LINENO"; then :
4168 ac_cv_search_dlopen=$ac_res
4169fi
4170rm -f core conftest.err conftest.$ac_objext \
4171 conftest$ac_exeext
4172 if test "${ac_cv_search_dlopen+set}" = set; then :
4173 break
4174fi
4175done
4176if test "${ac_cv_search_dlopen+set}" = set; then :
4177
4178else
4179 ac_cv_search_dlopen=no
4180fi
4181rm conftest.$ac_ext
4182LIBS=$ac_func_search_save_LIBS
4183fi
4184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4185$as_echo "$ac_cv_search_dlopen" >&6; }
4186ac_res=$ac_cv_search_dlopen
4187if test "$ac_res" != no; then :
4188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4189
4190fi
4191
4192 fi
da2f07f1
JK
4193
4194
4195case "${host}" in
4196 sparc-*-solaris*|i[3-7]86-*-solaris*)
4197 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4198 # are mutually exclusive; and without procfs support, the bfd/ elf module
4199 # cannot provide certain routines such as elfcore_write_prpsinfo
4200 # or elfcore_write_prstatus. So unless the user explicitly requested
4201 # large-file support through the --enable-largefile switch, disable
4202 # large-file support in favor of procfs support.
4203 test "${target}" = "${host}" -a "x$plugins" = xno \
4204 && : ${enable_largefile="no"}
4205 ;;
4206esac
4207
4208# Check whether --enable-largefile was given.
4209if test "${enable_largefile+set}" = set; then :
4210 enableval=$enable_largefile;
4211fi
4212
4213if test "$enable_largefile" != no; then
4214
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4216$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4217if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4218 $as_echo_n "(cached) " >&6
4219else
4220 ac_cv_sys_largefile_CC=no
4221 if test "$GCC" != yes; then
4222 ac_save_CC=$CC
4223 while :; do
4224 # IRIX 6.2 and later do not support large files by default,
4225 # so use the C compiler's -n32 option if that helps.
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228#include <sys/types.h>
4229 /* Check that off_t can represent 2**63 - 1 correctly.
4230 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4231 since some C++ compilers masquerading as C compilers
4232 incorrectly reject 9223372036854775807. */
4233#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4234 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4235 && LARGE_OFF_T % 2147483647 == 1)
4236 ? 1 : -1];
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245 if ac_fn_c_try_compile "$LINENO"; then :
4246 break
4247fi
4248rm -f core conftest.err conftest.$ac_objext
4249 CC="$CC -n32"
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_cv_sys_largefile_CC=' -n32'; break
4252fi
4253rm -f core conftest.err conftest.$ac_objext
4254 break
4255 done
4256 CC=$ac_save_CC
4257 rm -f conftest.$ac_ext
4258 fi
4259fi
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4261$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4262 if test "$ac_cv_sys_largefile_CC" != no; then
4263 CC=$CC$ac_cv_sys_largefile_CC
4264 fi
4265
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4267$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4268if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4269 $as_echo_n "(cached) " >&6
4270else
4271 while :; do
4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273/* end confdefs.h. */
4274#include <sys/types.h>
4275 /* Check that off_t can represent 2**63 - 1 correctly.
4276 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4277 since some C++ compilers masquerading as C compilers
4278 incorrectly reject 9223372036854775807. */
4279#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4280 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4281 && LARGE_OFF_T % 2147483647 == 1)
4282 ? 1 : -1];
4283int
4284main ()
4285{
4286
4287 ;
4288 return 0;
4289}
4290_ACEOF
4291if ac_fn_c_try_compile "$LINENO"; then :
4292 ac_cv_sys_file_offset_bits=no; break
4293fi
4294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296/* end confdefs.h. */
4297#define _FILE_OFFSET_BITS 64
4298#include <sys/types.h>
4299 /* Check that off_t can represent 2**63 - 1 correctly.
4300 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4301 since some C++ compilers masquerading as C compilers
4302 incorrectly reject 9223372036854775807. */
4303#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4304 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4305 && LARGE_OFF_T % 2147483647 == 1)
4306 ? 1 : -1];
4307int
4308main ()
4309{
4310
4311 ;
4312 return 0;
4313}
4314_ACEOF
4315if ac_fn_c_try_compile "$LINENO"; then :
4316 ac_cv_sys_file_offset_bits=64; break
4317fi
4318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319 ac_cv_sys_file_offset_bits=unknown
4320 break
4321done
4322fi
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4324$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4325case $ac_cv_sys_file_offset_bits in #(
4326 no | unknown) ;;
4327 *)
4328cat >>confdefs.h <<_ACEOF
4329#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4330_ACEOF
4331;;
4332esac
4333rm -rf conftest*
4334 if test $ac_cv_sys_file_offset_bits = unknown; then
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4336$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4337if test "${ac_cv_sys_large_files+set}" = set; then :
4338 $as_echo_n "(cached) " >&6
4339else
4340 while :; do
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342/* end confdefs.h. */
4343#include <sys/types.h>
4344 /* Check that off_t can represent 2**63 - 1 correctly.
4345 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346 since some C++ compilers masquerading as C compilers
4347 incorrectly reject 9223372036854775807. */
4348#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350 && LARGE_OFF_T % 2147483647 == 1)
4351 ? 1 : -1];
4352int
4353main ()
4354{
4355
4356 ;
4357 return 0;
4358}
4359_ACEOF
4360if ac_fn_c_try_compile "$LINENO"; then :
4361 ac_cv_sys_large_files=no; break
4362fi
4363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#define _LARGE_FILES 1
4367#include <sys/types.h>
4368 /* Check that off_t can represent 2**63 - 1 correctly.
4369 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4370 since some C++ compilers masquerading as C compilers
4371 incorrectly reject 9223372036854775807. */
4372#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4373 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4374 && LARGE_OFF_T % 2147483647 == 1)
4375 ? 1 : -1];
4376int
4377main ()
4378{
4379
4380 ;
4381 return 0;
4382}
4383_ACEOF
4384if ac_fn_c_try_compile "$LINENO"; then :
4385 ac_cv_sys_large_files=1; break
4386fi
4387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388 ac_cv_sys_large_files=unknown
4389 break
4390done
4391fi
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4393$as_echo "$ac_cv_sys_large_files" >&6; }
4394case $ac_cv_sys_large_files in #(
4395 no | unknown) ;;
4396 *)
4397cat >>confdefs.h <<_ACEOF
4398#define _LARGE_FILES $ac_cv_sys_large_files
4399_ACEOF
4400;;
4401esac
4402rm -rf conftest*
4403 fi
4404fi
4405
4406
4407
81ecdfbb
RW
4408
4409
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4411$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4412if test "${am_cv_prog_cc_stdc+set}" = set; then :
4413 $as_echo_n "(cached) " >&6
4414else
4415 am_cv_prog_cc_stdc=no
4416ac_save_CC="$CC"
4417# Don't try gcc -ansi; that turns off useful extensions and
4418# breaks some systems' header files.
4419# AIX -qlanglvl=ansi
4420# Ultrix and OSF/1 -std1
4421# HP-UX 10.20 and later -Ae
4422# HP-UX older versions -Aa -D_HPUX_SOURCE
4423# SVR4 -Xc -D__EXTENSIONS__
4424for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4425do
783e057b 4426 CC="$ac_save_CC $ac_arg"
81ecdfbb 4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4428/* end confdefs.h. */
4429#include <stdarg.h>
4430#include <stdio.h>
4431#include <sys/types.h>
4432#include <sys/stat.h>
4433/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4434struct buf { int x; };
4435FILE * (*rcsopen) (struct buf *, struct stat *, int);
4436static char *e (p, i)
4437 char **p;
4438 int i;
4439{
4440 return p[i];
4441}
4442static char *f (char * (*g) (char **, int), char **p, ...)
4443{
4444 char *s;
4445 va_list v;
4446 va_start (v,p);
4447 s = g (p, va_arg (v,int));
4448 va_end (v);
4449 return s;
4450}
4451int test (int i, double x);
4452struct s1 {int (*f) (int a);};
4453struct s2 {int (*f) (double a);};
4454int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4455int argc;
4456char **argv;
4457
4458int
4459main ()
4460{
4461
4462return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4463
4464 ;
4465 return 0;
4466}
4467_ACEOF
81ecdfbb 4468if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4469 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4470fi
81ecdfbb 4471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4472done
4473CC="$ac_save_CC"
4474
4475fi
4476
4477if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4479$as_echo "none needed" >&6; }
783e057b 4480else
81ecdfbb
RW
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4482$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4483fi
4484case "x$am_cv_prog_cc_stdc" in
4485 x|xno) ;;
4486 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4487esac
4488
4869db5e
RM
4489# expand $ac_aux_dir to an absolute path
4490am_aux_dir=`cd $ac_aux_dir && pwd`
4491
4492if test x"${install_sh}" != xset; then
4493 case $am_aux_dir in
4494 *\ * | *\ *)
4495 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4496 *)
4497 install_sh="\${SHELL} $am_aux_dir/install-sh"
4498 esac
4499fi
4500
4501# Installed binaries are usually stripped using `strip' when the user
4502# run `make install-strip'. However `strip' might not be the right
4503# tool to use in cross-compilation environments, therefore Automake
4504# will honor the `STRIP' environment variable to overrule this program.
4505if test "$cross_compiling" != no; then
4506 if test -n "$ac_tool_prefix"; then
4507 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4508set dummy ${ac_tool_prefix}strip; ac_word=$2
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if test "${ac_cv_prog_STRIP+set}" = set; then :
4512 $as_echo_n "(cached) " >&6
4513else
4514 if test -n "$STRIP"; then
4515 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4516else
4517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4524 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526 break 2
4527 fi
4528done
4529 done
4530IFS=$as_save_IFS
4531
4532fi
4533fi
4534STRIP=$ac_cv_prog_STRIP
4535if test -n "$STRIP"; then
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4537$as_echo "$STRIP" >&6; }
4538else
4539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544fi
4545if test -z "$ac_cv_prog_STRIP"; then
4546 ac_ct_STRIP=$STRIP
4547 # Extract the first word of "strip", so it can be a program name with args.
4548set dummy strip; ac_word=$2
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550$as_echo_n "checking for $ac_word... " >&6; }
4551if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4552 $as_echo_n "(cached) " >&6
4553else
4554 if test -n "$ac_ct_STRIP"; then
4555 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4556else
4557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
4562 for ac_exec_ext in '' $ac_executable_extensions; do
4563 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4564 ac_cv_prog_ac_ct_STRIP="strip"
4565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566 break 2
4567 fi
4568done
4569 done
4570IFS=$as_save_IFS
4571
4572fi
4573fi
4574ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4575if test -n "$ac_ct_STRIP"; then
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4577$as_echo "$ac_ct_STRIP" >&6; }
4578else
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583 if test "x$ac_ct_STRIP" = x; then
4584 STRIP=":"
4585 else
4586 case $cross_compiling:$ac_tool_warned in
4587yes:)
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4590ac_tool_warned=yes ;;
4591esac
4592 STRIP=$ac_ct_STRIP
4593 fi
4594else
4595 STRIP="$ac_cv_prog_STRIP"
4596fi
4597
4598fi
4599INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4600
783e057b
DJ
4601
4602ac_aux_dir=
81ecdfbb
RW
4603for ac_dir in .. "$srcdir"/..; do
4604 for ac_t in install-sh install.sh shtool; do
4605 if test -f "$ac_dir/$ac_t"; then
4606 ac_aux_dir=$ac_dir
4607 ac_install_sh="$ac_aux_dir/$ac_t -c"
4608 break 2
4609 fi
4610 done
783e057b
DJ
4611done
4612if test -z "$ac_aux_dir"; then
81ecdfbb 4613 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4614fi
81ecdfbb
RW
4615
4616# These three variables are undocumented and unsupported,
4617# and are intended to be withdrawn in a future Autoconf release.
4618# They can cause serious problems if a builder's source tree is in a directory
4619# whose full name contains unusual characters.
4620ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4621ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4622ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4623
783e057b 4624
783e057b 4625
9009e1ae
MR
4626test "$program_prefix" != NONE &&
4627 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4628# Use a double $ so make ignores it.
4629test "$program_suffix" != NONE &&
4630 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4631# Double any \ or $.
4632# By default was `s,x,x', remove it if useless.
4633ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4634program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4635
81ecdfbb 4636
a417dc56
RW
4637# Dependency checking.
4638rm -rf .tst 2>/dev/null
4639mkdir .tst 2>/dev/null
4640if test -d .tst; then
4641 am__leading_dot=.
4642else
4643 am__leading_dot=_
4644fi
4645rmdir .tst 2>/dev/null
4646
4647DEPDIR="${am__leading_dot}deps"
4648
81ecdfbb 4649ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4650
4651
4652depcc="$CC" am_compiler_list=
4653
4654am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4656$as_echo_n "checking dependency style of $depcc... " >&6; }
4657if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
a417dc56
RW
4659else
4660 if test -f "$am_depcomp"; then
4661 # We make a subdir and do the tests there. Otherwise we can end up
4662 # making bogus files that we don't know about and never remove. For
4663 # instance it was reported that on HP-UX the gcc test will end up
4664 # making a dummy file named `D' -- because `-MD' means `put the output
4665 # in D'.
4666 mkdir conftest.dir
4667 # Copy depcomp to subdir because otherwise we won't find it if we're
4668 # using a relative directory.
4669 cp "$am_depcomp" conftest.dir
4670 cd conftest.dir
4671 # We will build objects and dependencies in a subdirectory because
4672 # it helps to detect inapplicable dependency modes. For instance
4673 # both Tru64's cc and ICC support -MD to output dependencies as a
4674 # side effect of compilation, but ICC will put the dependencies in
4675 # the current directory while Tru64 will put them in the object
4676 # directory.
4677 mkdir sub
4678
4679 am_cv_CC_dependencies_compiler_type=none
4680 if test "$am_compiler_list" = ""; then
4681 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4682 fi
4683 for depmode in $am_compiler_list; do
4684 if test $depmode = none; then break; fi
4685
81ecdfbb 4686 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4687 # Setup a source with many dependencies, because some compilers
4688 # like to wrap large dependency lists on column 80 (with \), and
4689 # we should not choose a depcomp mode which is confused by this.
4690 #
4691 # We need to recreate these files for each test, as the compiler may
4692 # overwrite some of them when testing with obscure command lines.
4693 # This happens at least with the AIX C compiler.
4694 : > sub/conftest.c
4695 for i in 1 2 3 4 5 6; do
4696 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4697 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4698 # Solaris 8's {/usr,}/bin/sh.
4699 touch sub/conftst$i.h
4700 done
4701 echo "include sub/conftest.Po" > confmf
4702
4703 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4704 # mode. It turns out that the SunPro C++ compiler does not properly
4705 # handle `-M -o', and we need to detect this.
4706 depcmd="depmode=$depmode \
4707 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4708 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4709 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4710 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4711 if env $depcmd > conftest.err 2>&1 &&
4712 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4713 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4714 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4715 # icc doesn't choke on unknown options, it will just issue warnings
4716 # or remarks (even with -Werror). So we grep stderr for any message
4717 # that says an option was ignored or not supported.
4718 # When given -MP, icc 7.0 and 7.1 complain thusly:
4719 # icc: Command line warning: ignoring option '-M'; no argument required
4720 # The diagnosis changed in icc 8.0:
4721 # icc: Command line remark: option '-MP' not supported
4722 if (grep 'ignoring option' conftest.err ||
4723 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4724 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4725 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4726 break
4727 fi
4728 fi
81ecdfbb 4729 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4730 sed -e 's/^/| /' < conftest.err >&5
4731 done
4732
4733 cd ..
4734 rm -rf conftest.dir
4735else
4736 am_cv_CC_dependencies_compiler_type=none
4737fi
4738
4739fi
81ecdfbb
RW
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4741$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4742if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4743then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4744else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4745
4746fi
4747
4748
4749# Check for the 'make' the user wants to use.
4750for ac_prog in make
4751do
4752 # Extract the first word of "$ac_prog", so it can be a program name with args.
4753set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
4756if test "${ac_cv_prog_MAKE+set}" = set; then :
4757 $as_echo_n "(cached) " >&6
a417dc56
RW
4758else
4759 if test -n "$MAKE"; then
4760 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4761else
4762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in $PATH
4764do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4767 for ac_exec_ext in '' $ac_executable_extensions; do
4768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4769 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4771 break 2
4772 fi
4773done
81ecdfbb
RW
4774 done
4775IFS=$as_save_IFS
a417dc56
RW
4776
4777fi
4778fi
4779MAKE=$ac_cv_prog_MAKE
4780if test -n "$MAKE"; then
81ecdfbb
RW
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4782$as_echo "$MAKE" >&6; }
a417dc56 4783else
81ecdfbb
RW
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
a417dc56
RW
4786fi
4787
81ecdfbb 4788
a417dc56
RW
4789 test -n "$MAKE" && break
4790done
4791
4792MAKE_IS_GNU=
4793case "`$MAKE --version 2>&1 | sed 1q`" in
4794 *GNU*)
4795 MAKE_IS_GNU=yes
4796 ;;
4797esac
81ecdfbb 4798 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4799 GMAKE_TRUE=
4800 GMAKE_FALSE='#'
4801else
4802 GMAKE_TRUE='#'
4803 GMAKE_FALSE=
4804fi
4805
81ecdfbb
RW
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4807$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4808set x ${MAKE-make}
4809ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4810if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4811 $as_echo_n "(cached) " >&6
a417dc56
RW
4812else
4813 cat >conftest.make <<\_ACEOF
81ecdfbb 4814SHELL = /bin/sh
a417dc56 4815all:
81ecdfbb 4816 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4817_ACEOF
4818# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4819case `${MAKE-make} -f conftest.make 2>/dev/null` in
4820 *@@@%%%=?*=@@@%%%*)
4821 eval ac_cv_prog_make_${ac_make}_set=yes;;
4822 *)
4823 eval ac_cv_prog_make_${ac_make}_set=no;;
4824esac
a417dc56
RW
4825rm -f conftest.make
4826fi
81ecdfbb
RW
4827if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4829$as_echo "yes" >&6; }
a417dc56
RW
4830 SET_MAKE=
4831else
81ecdfbb
RW
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
a417dc56
RW
4834 SET_MAKE="MAKE=${MAKE-make}"
4835fi
4836
4837
c971b7fa
PA
4838# Configure gnulib. We need to build gnulib under some other
4839# directory not "gnulib", to avoid the problem of both GDB and
4840# GDBserver wanting to build it in the same directory, when building
4841# in the source dir.
783e057b 4842
c971b7fa
PA
4843 in_src="gnulib"
4844 in_build="build-gnulib"
4845
4846 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4847 # so they do not pile up.
4848 ac_sub_configure_args=
4849 ac_prev=
4850 eval "set x $ac_configure_args"
4851 shift
4852 for ac_arg
4853 do
4854 if test -n "$ac_prev"; then
4855 ac_prev=
4856 continue
4857 fi
4858 case $ac_arg in
4859 -cache-file | --cache-file | --cache-fil | --cache-fi \
4860 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4861 ac_prev=cache_file ;;
4862 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4863 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4864 | --c=*)
4865 ;;
4866 --config-cache | -C)
4867 ;;
4868 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4869 ac_prev=srcdir ;;
4870 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4871 ;;
4872 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4873 ac_prev=prefix ;;
4874 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4875 ;;
4876 --disable-option-checking)
4877 ;;
4878 *)
4879 case $ac_arg in
4880 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4881 esac
4882 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4883 esac
4884 done
4885
4886 # Always prepend --prefix to ensure using the same prefix
4887 # in subdir configurations.
4888 ac_arg="--prefix=$prefix"
4889 case $ac_arg in
4890 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4891 esac
4892 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4893
4894 # Pass --silent
4895 if test "$silent" = yes; then
4896 ac_sub_configure_args="--silent $ac_sub_configure_args"
4897 fi
4898
4899 # Always prepend --disable-option-checking to silence warnings, since
4900 # different subdirs can have different --enable and --with options.
4901 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4902
4903 ac_popdir=`pwd`
4904 ac_dir=$in_build
4905
4906 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4907 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4908 $as_echo "$ac_msg" >&6
4909 as_dir="$ac_dir"; as_fn_mkdir_p
4910
38ea300a
PA
4911 case $srcdir in
4912 [\\/]* | ?:[\\/]* )
4913 ac_srcdir=$srcdir/$in_src ;;
4914 *) # Relative name.
4915 ac_srcdir=../$srcdir/$in_src ;;
4916 esac
c971b7fa
PA
4917
4918 cd "$ac_dir"
4919
4920 ac_sub_configure=$ac_srcdir/configure
4921
4922 # Make the cache file name correct relative to the subdirectory.
4923 case $cache_file in
4924 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4925 *) # Relative name.
4926 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4927 esac
4928
4929 { $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
4930$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4931 # The eval makes quoting arguments work.
4932 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4933 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4934 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4935
4936 cd "$ac_popdir"
783e057b 4937
c971b7fa
PA
4938
4939
4940CONFIG_OBS=
4941CONFIG_DEPS=
4942CONFIG_SRCS=
4943ENABLE_CFLAGS=
4944
4945CONFIG_ALL=
4946CONFIG_CLEAN=
4947CONFIG_INSTALL=
4948CONFIG_UNINSTALL=
4949
4950# If we haven't got the data from the intl directory,
4951# assume NLS is disabled.
4952USE_NLS=no
4953LIBINTL=
4954LIBINTL_DEP=
4955INCINTL=
4956XGETTEXT=
4957GMSGFMT=
4958POSUB=
783e057b
DJ
4959
4960if test -f ../intl/config.intl; then
4961 . ../intl/config.intl
4962fi
81ecdfbb
RW
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4964$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4965if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
783e057b 4968else
81ecdfbb
RW
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4970$as_echo "yes" >&6; }
783e057b 4971
81ecdfbb 4972$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4973
4974
81ecdfbb
RW
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4976$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4977 # Look for .po and .gmo files in the source directory.
4978 CATALOGS=
4979 XLINGUAS=
4980 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4981 # If there aren't any .gmo files the shell will give us the
4982 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4983 # weeded out.
4984 case "$cat" in *\**)
4985 continue;;
4986 esac
4987 # The quadruple backslash is collapsed to a double backslash
4988 # by the backticks, then collapsed again by the double quotes,
4989 # leaving us with one backslash in the sed expression (right
4990 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4991 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4992 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4993 # The user is allowed to set LINGUAS to a list of languages to
4994 # install catalogs for. If it's empty that means "all of them."
4995 if test "x$LINGUAS" = x; then
4996 CATALOGS="$CATALOGS $cat"
4997 XLINGUAS="$XLINGUAS $lang"
4998 else
4999 case "$LINGUAS" in *$lang*)
5000 CATALOGS="$CATALOGS $cat"
5001 XLINGUAS="$XLINGUAS $lang"
5002 ;;
5003 esac
e28b3332
DJ
5004 fi
5005 done
c971b7fa
PA
5006 LINGUAS="$XLINGUAS"
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5008$as_echo "$LINGUAS" >&6; }
5009
5010
5011 DATADIRNAME=share
5012
5013 INSTOBJEXT=.mo
5014
5015 GENCAT=gencat
5016
5017 CATOBJEXT=.gmo
e28b3332 5018
e28b3332
DJ
5019fi
5020
c971b7fa
PA
5021localedir='${datadir}/locale'
5022
5023
5024if test x"$USE_NLS" = xyes; then
5025 CONFIG_ALL="$CONFIG_ALL all-po"
5026 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5027 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5028 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5029fi
e28b3332 5030
c971b7fa
PA
5031GNULIB=build-gnulib/import
5032
5033# For Makefile dependencies.
5034GNULIB_STDINT_H=
5035if test x"$STDINT_H" != x; then
5036 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5037fi
5038
5039
c971b7fa
PA
5040PACKAGE=gdb
5041
5042cat >>confdefs.h <<_ACEOF
5043#define PACKAGE "$PACKAGE"
5044_ACEOF
5045
5046
5047
5048# We never need to detect it in this sub-configure.
5049# But preserve it for config.status --recheck.
5050
5051
5052
5053MAKEINFO_EXTRA_FLAGS=""
5054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5055$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5056if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5057 $as_echo_n "(cached) " >&6
5058else
5059 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5060 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5061 gdb_cv_have_makeinfo_click=yes
5062 else
5063 gdb_cv_have_makeinfo_click=no
5064 fi
5065fi
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5067$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5068if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5069 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5070fi
e28b3332
DJ
5071
5072
bec39cab
AC
5073
5074
81ecdfbb
RW
5075# Check whether --with-separate-debug-dir was given.
5076if test "${with_separate_debug_dir+set}" = set; then :
5077 withval=$with_separate_debug_dir;
b14b1491
TT
5078 DEBUGDIR=$withval
5079else
5080 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5081fi
5082
20e95c23 5083
783e057b
DJ
5084 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5085 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5086 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5087 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5088
783e057b
DJ
5089cat >>confdefs.h <<_ACEOF
5090#define DEBUGDIR "$ac_define_dir"
20e95c23 5091_ACEOF
20e95c23 5092
20e95c23 5093
20e95c23 5094
0c4a4063 5095
b14b1491
TT
5096 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5097 if test "x$prefix" = xNONE; then
5098 test_prefix=/usr/local
5099 else
5100 test_prefix=$prefix
5101 fi
783e057b 5102 else
b14b1491 5103 test_prefix=$exec_prefix
783e057b 5104 fi
b14b1491
TT
5105 value=0
5106 case ${ac_define_dir} in
5107 "${test_prefix}"|"${test_prefix}/"*|\
5108 '${exec_prefix}'|'${exec_prefix}/'*)
5109 value=1
5110 ;;
5111 esac
5112
5113cat >>confdefs.h <<_ACEOF
5114#define DEBUGDIR_RELOCATABLE $value
5115_ACEOF
5116
5117
5118
0c4a4063 5119
f83d8a90
DE
5120# We can't pass paths as command line arguments.
5121# Mingw32 tries to be clever and will convert the paths for us.
5122# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5123# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5124# This breaks GDB's relocatable path conversions since paths passed in
5125# config.h would not get so translated, the path prefixes no longer match.
5126
5127 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5128 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5129 ac_define_dir=`eval echo $bindir`
5130 ac_define_dir=`eval echo $ac_define_dir`
5131
5132cat >>confdefs.h <<_ACEOF
5133#define BINDIR "$ac_define_dir"
5134_ACEOF
5135
5136
5137
b14b1491
TT
5138# GDB's datadir relocation
5139
5140
5141
81ecdfbb
RW
5142# Check whether --with-gdb-datadir was given.
5143if test "${with_gdb_datadir+set}" = set; then :
5144 withval=$with_gdb_datadir;
b14b1491 5145 GDB_DATADIR=$withval
20e95c23 5146else
b14b1491 5147 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5148fi
5149
20e95c23 5150
b14b1491
TT
5151 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5152 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5153 ac_define_dir=`eval echo $GDB_DATADIR`
5154 ac_define_dir=`eval echo $ac_define_dir`
5155
5156cat >>confdefs.h <<_ACEOF
5157#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5158_ACEOF
5159
b14b1491
TT
5160
5161
0c4a4063 5162
b14b1491
TT
5163 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5164 if test "x$prefix" = xNONE; then
5165 test_prefix=/usr/local
5166 else
5167 test_prefix=$prefix
5168 fi
5169 else
5170 test_prefix=$exec_prefix
5171 fi
5172 value=0
5173 case ${ac_define_dir} in
5174 "${test_prefix}"|"${test_prefix}/"*|\
5175 '${exec_prefix}'|'${exec_prefix}/'*)
5176 value=1
5177 ;;
5178 esac
5179
5180cat >>confdefs.h <<_ACEOF
5181#define GDB_DATADIR_RELOCATABLE $value
5182_ACEOF
5183
5184
783e057b 5185
20e95c23 5186
0c4a4063 5187
81ecdfbb
RW
5188# Check whether --with-relocated-sources was given.
5189if test "${with_relocated_sources+set}" = set; then :
5190 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5191
5192 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5193 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5194 ac_define_dir=`eval echo $reloc_srcdir`
5195 ac_define_dir=`eval echo $ac_define_dir`
5196
5197cat >>confdefs.h <<_ACEOF
5198#define RELOC_SRCDIR "$ac_define_dir"
5199_ACEOF
5200
5201
5202
81ecdfbb
RW
5203fi
5204
29b0e8a2 5205
7349ff92
JK
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5207$as_echo_n "checking for default auto-load directory... " >&6; }
5208
5209# Check whether --with-auto-load-dir was given.
5210if test "${with_auto_load_dir+set}" = set; then :
5211 withval=$with_auto_load_dir;
5212else
1564a261 5213 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5214fi
5215
1564a261 5216escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5217
5218 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5219 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5220 ac_define_dir=`eval echo $escape_dir`
5221 ac_define_dir=`eval echo $ac_define_dir`
5222
5223cat >>confdefs.h <<_ACEOF
5224#define AUTO_LOAD_DIR "$ac_define_dir"
5225_ACEOF
5226
5227
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5229$as_echo "$with_auto_load_dir" >&6; }
5230
bccbefd2
JK
5231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5232$as_echo_n "checking for default auto-load safe-path... " >&6; }
5233
5234# Check whether --with-auto-load-safe-path was given.
5235if test "${with_auto_load_safe_path+set}" = set; then :
5236 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5237 with_auto_load_safe_path="/"
5238 fi
bccbefd2 5239else
7349ff92 5240 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5241fi
5242
1564a261 5243escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5244
5245 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5246 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5247 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5248 ac_define_dir=`eval echo $ac_define_dir`
5249
5250cat >>confdefs.h <<_ACEOF
6dea1fbd 5251#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5252_ACEOF
5253
5254
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5256$as_echo "$with_auto_load_safe_path" >&6; }
5257
29b0e8a2 5258
20e95c23 5259
5ae98d25 5260subdirs="$subdirs testsuite"
20e95c23
DJ
5261
5262
783e057b 5263# Check whether to support alternative target configurations
81ecdfbb
RW
5264# Check whether --enable-targets was given.
5265if test "${enable_targets+set}" = set; then :
5266 enableval=$enable_targets; case "${enableval}" in
5267 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5268 ;;
5269 no) enable_targets= ;;
5270 *) enable_targets=$enableval ;;
5271esac
81ecdfbb
RW
5272fi
5273
20e95c23 5274
783e057b 5275# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5276# Check whether --enable-64-bit-bfd was given.
5277if test "${enable_64_bit_bfd+set}" = set; then :
5278 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5279 yes) want64=true ;;
5280 no) want64=false ;;
81ecdfbb 5281 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5282esac
5283else
5284 want64=false
81ecdfbb
RW
5285fi
5286
783e057b
DJ
5287# Provide defaults for some variables set by the per-host and per-target
5288# configuration.
5289gdb_host_obs=posix-hdep.o
20e95c23 5290
783e057b
DJ
5291if test "${target}" = "${host}"; then
5292 gdb_native=yes
5293else
5294 gdb_native=no
5295fi
20e95c23 5296
783e057b 5297. $srcdir/configure.host
20e95c23 5298
783e057b 5299# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5300
783e057b
DJ
5301TARGET_OBS=
5302all_targets=
b292c783 5303HAVE_NATIVE_GCORE_TARGET=
20e95c23 5304
783e057b 5305for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5306do
783e057b
DJ
5307 if test "$targ_alias" = "all"; then
5308 all_targets=true
5309 else
5310 # Canonicalize the secondary target names.
5311 result=`$ac_config_sub $targ_alias 2>/dev/null`
5312 if test -n "$result"; then
5313 targ=$result
5314 else
5315 targ=$targ_alias
5316 fi
20e95c23 5317
783e057b 5318 . ${srcdir}/configure.tgt
20e95c23 5319
bf307134
JB
5320 if test -z "${gdb_target_obs}"; then :
5321 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5322fi
5323
783e057b
DJ
5324 # Target-specific object files
5325 for i in ${gdb_target_obs}; do
5326 case " $TARGET_OBS " in
5327 *" ${i} "*) ;;
5328 *)
5329 TARGET_OBS="$TARGET_OBS ${i}"
5330 ;;
5331 esac
5332 done
20e95c23 5333
783e057b
DJ
5334 # Check whether this target needs 64-bit CORE_ADDR
5335 if test x${want64} = xfalse; then
5336 . ${srcdir}/../bfd/config.bfd
5337 fi
b292c783
JK
5338
5339 # Check whether this target is native and supports gcore.
5340 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5341 && $gdb_have_gcore; then
5342 HAVE_NATIVE_GCORE_TARGET=1
5343 fi
783e057b 5344 fi
20e95c23
DJ
5345done
5346
783e057b
DJ
5347if test x${all_targets} = xtrue; then
5348
5349 # We want all 64-bit targets if we either:
5350 # - run on a 64-bit host or
5351 # - already require 64-bit support for some other target or
5352 # - the --enable-64-bit-bfd option was supplied
5353 # Otherwise we only support all 32-bit targets.
5354 #
5355 # NOTE: This test must be in sync with the corresponding
5356 # tests in BFD!
20e95c23 5357
783e057b 5358 if test x${want64} = xfalse; then
81ecdfbb
RW
5359 # The cast to long int works around a bug in the HP C Compiler
5360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5362# This bug is HP SR number 8606223364.
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5364$as_echo_n "checking size of long... " >&6; }
5365if test "${ac_cv_sizeof_long+set}" = set; then :
5366 $as_echo_n "(cached) " >&6
c0993dbe 5367else
81ecdfbb 5368 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5369
81ecdfbb
RW
5370else
5371 if test "$ac_cv_type_long" = yes; then
5372 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5374{ as_fn_set_status 77
5375as_fn_error "cannot compute sizeof (long)
5376See \`config.log' for more details." "$LINENO" 5; }; }
5377 else
5378 ac_cv_sizeof_long=0
5379 fi
c0993dbe 5380fi
81ecdfbb 5381
c0993dbe 5382fi
81ecdfbb
RW
5383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5384$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5385
c0993dbe 5386
c0993dbe 5387
c0993dbe
UW
5388cat >>confdefs.h <<_ACEOF
5389#define SIZEOF_LONG $ac_cv_sizeof_long
5390_ACEOF
5391
5392
5393 if test "x${ac_cv_sizeof_long}" = "x8"; then
5394 want64=true
5395 fi
5396 fi
5397 if test x${want64} = xtrue; then
5398 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5399 else
5400 TARGET_OBS='$(ALL_TARGET_OBS)'
5401 fi
5402fi
5403
5404
5405
b292c783 5406
c0993dbe
UW
5407# For other settings, only the main target counts.
5408gdb_sim=
5409gdb_osabi=
5410build_gdbserver=
5411targ=$target; . ${srcdir}/configure.tgt
5412
5413# Fetch the default architecture and default target vector from BFD.
5414targ=$target; . $srcdir/../bfd/config.bfd
5415
5416# We only want the first architecture, so strip off the others if
5417# there is more than one.
5418targ_archs=`echo $targ_archs | sed 's/ .*//'`
5419
5420if test "x$targ_archs" != x; then
5421
5422cat >>confdefs.h <<_ACEOF
5423#define DEFAULT_BFD_ARCH $targ_archs
5424_ACEOF
5425
5426fi
5427if test "x$targ_defvec" != x; then
5428
5429cat >>confdefs.h <<_ACEOF
5430#define DEFAULT_BFD_VEC $targ_defvec
5431_ACEOF
5432
5433fi
5434
c0993dbe
UW
5435# The CLI cannot be disabled yet, but may be in the future.
5436
5437# Enable CLI.
81ecdfbb
RW
5438# Check whether --enable-gdbcli was given.
5439if test "${enable_gdbcli+set}" = set; then :
5440 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5441 yes)
5442 ;;
5443 no)
81ecdfbb 5444 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5445 *)
81ecdfbb 5446 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5447 esac
5448else
5449 enable_gdbcli=yes
81ecdfbb
RW
5450fi
5451
c0993dbe
UW
5452if test x"$enable_gdbcli" = xyes; then
5453 if test -d $srcdir/cli; then
5454 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5455 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5456 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5457 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5458 fi
5459fi
5460
5461# Enable MI.
81ecdfbb
RW
5462# Check whether --enable-gdbmi was given.
5463if test "${enable_gdbmi+set}" = set; then :
5464 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5465 yes | no)
5466 ;;
5467 *)
81ecdfbb 5468 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5469 esac
5470else
5471 enable_gdbmi=yes
81ecdfbb
RW
5472fi
5473
c0993dbe
UW
5474if test x"$enable_gdbmi" = xyes; then
5475 if test -d $srcdir/mi; then
5476 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5477 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5478 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5479 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5480 fi
5481fi
5482
5483# Enable TUI.
81ecdfbb
RW
5484# Check whether --enable-tui was given.
5485if test "${enable_tui+set}" = set; then :
5486 enableval=$enable_tui; case $enableval in
3ca64bd3 5487 yes | no | auto)
c0993dbe
UW
5488 ;;
5489 *)
81ecdfbb 5490 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5491 esac
5492else
3ca64bd3 5493 enable_tui=auto
81ecdfbb
RW
5494fi
5495
c0993dbe
UW
5496
5497# Enable gdbtk.
81ecdfbb
RW
5498# Check whether --enable-gdbtk was given.
5499if test "${enable_gdbtk+set}" = set; then :
5500 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5501 yes | no)
5502 ;;
5503 *)
81ecdfbb 5504 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5505 esac
5506else
5062cc19 5507 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5508 enable_gdbtk=yes
5509 else
5510 enable_gdbtk=no
5511 fi
81ecdfbb
RW
5512fi
5513
c0993dbe
UW
5514# We unconditionally disable gdbtk tests on selected platforms.
5515case $host_os in
5516 go32* | windows*)
81ecdfbb
RW
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5518$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5519 enable_gdbtk=no ;;
5520esac
5521
05e7c244 5522# Libunwind support for ia64.
bec39cab 5523
05e7c244
JK
5524
5525# Check whether --with-libunwind-ia64 was given.
5526if test "${with_libunwind_ia64+set}" = set; then :
5527 withval=$with_libunwind_ia64;
bec39cab 5528else
05e7c244
JK
5529 with_libunwind_ia64=auto
5530fi
bec39cab 5531
05e7c244
JK
5532
5533# Backward compatibility option.
5534if test "${with_libunwind+set}" = set; then
5535 if test x"$with_libunwind_ia64" != xauto; then
5536 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5537 fi
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5539$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5540 with_libunwind_ia64="$with_libunwind"
5541fi
5542
5543case "$with_libunwind_ia64" in
5544 yes | no)
5545 ;;
5546 auto)
5547 for ac_header in libunwind-ia64.h
81ecdfbb 5548do :
b54a8fd7
PA
5549 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5550if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5551 cat >>confdefs.h <<_ACEOF
b54a8fd7 5552#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5553_ACEOF
5554
5555fi
5556
5557done
5558
05e7c244
JK
5559 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5560 ;;
5561 *)
5562 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5563 ;;
5564esac
bec39cab 5565
05e7c244 5566if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5567 for ac_header in libunwind-ia64.h
81ecdfbb 5568do :
b54a8fd7
PA
5569 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5570if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5571 cat >>confdefs.h <<_ACEOF
b54a8fd7 5572#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5573_ACEOF
5574
5575fi
5576
5577done
5578
05e7c244
JK
5579 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5580 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5581 fi
5582 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5583 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5584 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5585fi
5586
cb01cfba
JB
5587opt_curses=no
5588
81ecdfbb
RW
5589# Check whether --with-curses was given.
5590if test "${with_curses+set}" = set; then :
5591 withval=$with_curses; opt_curses=$withval
5592fi
5593
cb01cfba 5594
76a39ba7 5595prefer_curses=no
cb01cfba 5596if test "$opt_curses" = "yes"; then
76a39ba7 5597 prefer_curses=yes
cb01cfba
JB
5598fi
5599
a9322a30 5600# Profiling support.
81ecdfbb
RW
5601# Check whether --enable-profiling was given.
5602if test "${enable_profiling+set}" = set; then :
5603 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5604 yes | no)
5605 ;;
5606 *)
81ecdfbb 5607 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5608 esac
5609else
5610 enable_profiling=no
81ecdfbb 5611fi
bec39cab 5612
a9322a30
TT
5613
5614for ac_func in monstartup _mcleanup
81ecdfbb
RW
5615do :
5616 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5617ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5618eval as_val=\$$as_ac_var
5619 if test "x$as_val" = x""yes; then :
5620 cat >>confdefs.h <<_ACEOF
5621#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5622_ACEOF
a9322a30 5623
81ecdfbb
RW
5624fi
5625done
a9322a30 5626
81ecdfbb
RW
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5628$as_echo_n "checking for _etext... " >&6; }
5629if test "${ac_cv_var__etext+set}" = set; then :
5630 $as_echo_n "(cached) " >&6
5631else
5632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633/* end confdefs.h. */
5634#include <stdlib.h>
5635extern char _etext;
a9322a30
TT
5636
5637int
5638main ()
5639{
5640free (&_etext);
5641 ;
5642 return 0;
5643}
bec39cab 5644_ACEOF
81ecdfbb 5645if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5646 ac_cv_var__etext=yes
bec39cab 5647else
81ecdfbb 5648 ac_cv_var__etext=no
bec39cab 5649fi
81ecdfbb
RW
5650rm -f core conftest.err conftest.$ac_objext \
5651 conftest$ac_exeext conftest.$ac_ext
bec39cab 5652fi
81ecdfbb
RW
5653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5654$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5655if test $ac_cv_var__etext = yes; then
60ca704f 5656
81ecdfbb 5657$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5658
bec39cab 5659fi
81ecdfbb
RW
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5661$as_echo_n "checking for etext... " >&6; }
5662if test "${ac_cv_var_etext+set}" = set; then :
5663 $as_echo_n "(cached) " >&6
bec39cab 5664else
81ecdfbb 5665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5666/* end confdefs.h. */
a9322a30
TT
5667#include <stdlib.h>
5668extern char etext;
bec39cab
AC
5669
5670int
5671main ()
5672{
a9322a30 5673free (&etext);
bec39cab
AC
5674 ;
5675 return 0;
5676}
5677_ACEOF
81ecdfbb 5678if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5679 ac_cv_var_etext=yes
bec39cab 5680else
81ecdfbb 5681 ac_cv_var_etext=no
bec39cab 5682fi
81ecdfbb
RW
5683rm -f core conftest.err conftest.$ac_objext \
5684 conftest$ac_exeext conftest.$ac_ext
bec39cab 5685fi
81ecdfbb
RW
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5687$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5688if test $ac_cv_var_etext = yes; then
5689
81ecdfbb 5690$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5691
5692fi
a9322a30
TT
5693if test "$enable_profiling" = yes ; then
5694 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5695 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5696 fi
5697 PROFILE_CFLAGS=-pg
5698 OLD_CFLAGS="$CFLAGS"
5699 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5700
81ecdfbb
RW
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5702$as_echo_n "checking whether $CC supports -pg... " >&6; }
5703if test "${ac_cv_cc_supports_pg+set}" = set; then :
5704 $as_echo_n "(cached) " >&6
bec39cab 5705else
81ecdfbb 5706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5707/* end confdefs.h. */
bec39cab
AC
5708
5709int
5710main ()
5711{
a9322a30 5712int x;
bec39cab
AC
5713 ;
5714 return 0;
5715}
5716_ACEOF
81ecdfbb 5717if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5718 ac_cv_cc_supports_pg=yes
bec39cab 5719else
81ecdfbb 5720 ac_cv_cc_supports_pg=no
bec39cab 5721fi
81ecdfbb 5722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5723fi
81ecdfbb
RW
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5725$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5726
a9322a30 5727 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5728 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5729 fi
bec39cab 5730
a9322a30 5731 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5732fi
5733
c16158bc
JM
5734
5735
81ecdfbb
RW
5736# Check whether --with-pkgversion was given.
5737if test "${with_pkgversion+set}" = set; then :
5738 withval=$with_pkgversion; case "$withval" in
5739 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5740 no) PKGVERSION= ;;
5741 *) PKGVERSION="($withval) " ;;
5742 esac
5743else
5744 PKGVERSION="(GDB) "
5745
81ecdfbb 5746fi
c16158bc
JM
5747
5748
5749
5750
81ecdfbb
RW
5751
5752# Check whether --with-bugurl was given.
5753if test "${with_bugurl+set}" = set; then :
5754 withval=$with_bugurl; case "$withval" in
5755 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5756 no) BUGURL=
5757 ;;
5758 *) BUGURL="$withval"
5759 ;;
5760 esac
5761else
5762 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5763
81ecdfbb
RW
5764fi
5765
c16158bc
JM
5766 case ${BUGURL} in
5767 "")
5768 REPORT_BUGS_TO=
5769 REPORT_BUGS_TEXI=
5770 ;;
5771 *)
5772 REPORT_BUGS_TO="<$BUGURL>"
5773 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5774 ;;
5775 esac;
5776
5777
5778
5779
5780cat >>confdefs.h <<_ACEOF
5781#define PKGVERSION "$PKGVERSION"
5782_ACEOF
5783
5784
5785cat >>confdefs.h <<_ACEOF
5786#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5787_ACEOF
5788
5789
bec39cab
AC
5790# --------------------- #
5791# Checks for programs. #
5792# --------------------- #
5793
5794for ac_prog in gawk mawk nawk awk
5795do
5796 # Extract the first word of "$ac_prog", so it can be a program name with args.
5797set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799$as_echo_n "checking for $ac_word... " >&6; }
5800if test "${ac_cv_prog_AWK+set}" = set; then :
5801 $as_echo_n "(cached) " >&6
bec39cab
AC
5802else
5803 if test -n "$AWK"; then
5804 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5805else
5806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5807for as_dir in $PATH
5808do
5809 IFS=$as_save_IFS
5810 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5811 for ac_exec_ext in '' $ac_executable_extensions; do
5812 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5813 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5815 break 2
5816 fi
5817done
81ecdfbb
RW
5818 done
5819IFS=$as_save_IFS
bec39cab
AC
5820
5821fi
5822fi
5823AWK=$ac_cv_prog_AWK
5824if test -n "$AWK"; then
81ecdfbb
RW
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5826$as_echo "$AWK" >&6; }
bec39cab 5827else
81ecdfbb
RW
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829$as_echo "no" >&6; }
bec39cab
AC
5830fi
5831
bec39cab 5832
81ecdfbb 5833 test -n "$AWK" && break
bec39cab
AC
5834done
5835
c971b7fa
PA
5836# Find a good install program. We prefer a C program (faster),
5837# so one script is as good as another. But avoid the broken or
5838# incompatible versions:
5839# SysV /etc/install, /usr/sbin/install
5840# SunOS /usr/etc/install
5841# IRIX /sbin/install
5842# AIX /bin/install
5843# AmigaOS /C/install, which installs bootblocks on floppy discs
5844# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5845# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5846# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5847# OS/2's system install, which has a completely different semantic
5848# ./install, which can be erroneously created by make from ./install.sh.
5849# Reject install programs that cannot install multiple files.
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5851$as_echo_n "checking for a BSD-compatible install... " >&6; }
5852if test -z "$INSTALL"; then
5853if test "${ac_cv_path_install+set}" = set; then :
5854 $as_echo_n "(cached) " >&6
5855else
5856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 # Account for people who put trailing slashes in PATH elements.
5862case $as_dir/ in #((
5863 ./ | .// | /[cC]/* | \
5864 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5865 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5866 /usr/ucb/* ) ;;
5867 *)
5868 # OSF1 and SCO ODT 3.0 have their own names for install.
5869 # Don't use installbsd from OSF since it installs stuff as root
5870 # by default.
5871 for ac_prog in ginstall scoinst install; do
5872 for ac_exec_ext in '' $ac_executable_extensions; do
5873 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5874 if test $ac_prog = install &&
5875 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5876 # AIX install. It has an incompatible calling convention.
5877 :
5878 elif test $ac_prog = install &&
5879 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5880 # program-specific install script used by HP pwplus--don't use.
5881 :
5882 else
5883 rm -rf conftest.one conftest.two conftest.dir
5884 echo one > conftest.one
5885 echo two > conftest.two
5886 mkdir conftest.dir
5887 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5888 test -s conftest.one && test -s conftest.two &&
5889 test -s conftest.dir/conftest.one &&
5890 test -s conftest.dir/conftest.two
5891 then
5892 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5893 break 3
5894 fi
5895 fi
5896 fi
5897 done
5898 done
5899 ;;
5900esac
5901
5902 done
5903IFS=$as_save_IFS
5904
5905rm -rf conftest.one conftest.two conftest.dir
5906
5907fi
5908 if test "${ac_cv_path_install+set}" = set; then
5909 INSTALL=$ac_cv_path_install
5910 else
5911 # As a last resort, use the slow shell script. Don't cache a
5912 # value for INSTALL within a source directory, because that will
5913 # break other packages using the cache if that directory is
5914 # removed, or if the value is a relative name.
5915 INSTALL=$ac_install_sh
5916 fi
5917fi
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5919$as_echo "$INSTALL" >&6; }
5920
5921# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5922# It thinks the first close brace ends the variable substitution.
5923test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5924
5925test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5926
5927test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5928
81ecdfbb
RW
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5930$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5931LN_S=$as_ln_s
5932if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5934$as_echo "yes" >&6; }
bec39cab 5935else
81ecdfbb
RW
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5937$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5938fi
5939
5940if test -n "$ac_tool_prefix"; then
5941 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5942set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if test "${ac_cv_prog_RANLIB+set}" = set; then :
5946 $as_echo_n "(cached) " >&6
bec39cab
AC
5947else
5948 if test -n "$RANLIB"; then
5949 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5950else
5951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952for as_dir in $PATH
5953do
5954 IFS=$as_save_IFS
5955 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5956 for ac_exec_ext in '' $ac_executable_extensions; do
5957 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5958 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5960 break 2
5961 fi
5962done
81ecdfbb
RW
5963 done
5964IFS=$as_save_IFS
bec39cab
AC
5965
5966fi
5967fi
5968RANLIB=$ac_cv_prog_RANLIB
5969if test -n "$RANLIB"; then
81ecdfbb
RW
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5971$as_echo "$RANLIB" >&6; }
bec39cab 5972else
81ecdfbb
RW
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974$as_echo "no" >&6; }
bec39cab
AC
5975fi
5976
81ecdfbb 5977
bec39cab
AC
5978fi
5979if test -z "$ac_cv_prog_RANLIB"; then
5980 ac_ct_RANLIB=$RANLIB
5981 # Extract the first word of "ranlib", so it can be a program name with args.
5982set dummy ranlib; ac_word=$2
81ecdfbb
RW
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5986 $as_echo_n "(cached) " >&6
bec39cab
AC
5987else
5988 if test -n "$ac_ct_RANLIB"; then
5989 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994 IFS=$as_save_IFS
5995 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5996 for ac_exec_ext in '' $ac_executable_extensions; do
5997 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5998 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6000 break 2
6001 fi
6002done
81ecdfbb
RW
6003 done
6004IFS=$as_save_IFS
bec39cab 6005
bec39cab
AC
6006fi
6007fi
6008ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6009if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6011$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6012else
81ecdfbb
RW
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
bec39cab
AC
6015fi
6016
81ecdfbb
RW
6017 if test "x$ac_ct_RANLIB" = x; then
6018 RANLIB=":"
6019 else
6020 case $cross_compiling:$ac_tool_warned in
6021yes:)
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6024ac_tool_warned=yes ;;
6025esac
6026 RANLIB=$ac_ct_RANLIB
6027 fi
bec39cab
AC
6028else
6029 RANLIB="$ac_cv_prog_RANLIB"
6030fi
6031
6032for ac_prog in 'bison -y' byacc
6033do
6034 # Extract the first word of "$ac_prog", so it can be a program name with args.
6035set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
6038if test "${ac_cv_prog_YACC+set}" = set; then :
6039 $as_echo_n "(cached) " >&6
bec39cab
AC
6040else
6041 if test -n "$YACC"; then
6042 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6043else
6044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6049 for ac_exec_ext in '' $ac_executable_extensions; do
6050 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6051 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6053 break 2
6054 fi
6055done
81ecdfbb
RW
6056 done
6057IFS=$as_save_IFS
bec39cab
AC
6058
6059fi
6060fi
6061YACC=$ac_cv_prog_YACC
6062if test -n "$YACC"; then
81ecdfbb
RW
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6064$as_echo "$YACC" >&6; }
bec39cab 6065else
81ecdfbb
RW
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
bec39cab
AC
6068fi
6069
81ecdfbb 6070
bec39cab
AC
6071 test -n "$YACC" && break
6072done
6073test -n "$YACC" || YACC="yacc"
6074
6075
6076if test -n "$ac_tool_prefix"; then
6077 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6078set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if test "${ac_cv_prog_AR+set}" = set; then :
6082 $as_echo_n "(cached) " >&6
bec39cab
AC
6083else
6084 if test -n "$AR"; then
6085 ac_cv_prog_AR="$AR" # Let the user override the test.
6086else
6087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH
6089do
6090 IFS=$as_save_IFS
6091 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6092 for ac_exec_ext in '' $ac_executable_extensions; do
6093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6094 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6096 break 2
6097 fi
6098done
81ecdfbb
RW
6099 done
6100IFS=$as_save_IFS
bec39cab
AC
6101
6102fi
6103fi
6104AR=$ac_cv_prog_AR
6105if test -n "$AR"; then
81ecdfbb
RW
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6107$as_echo "$AR" >&6; }
bec39cab 6108else
81ecdfbb
RW
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6110$as_echo "no" >&6; }
bec39cab
AC
6111fi
6112
81ecdfbb 6113
bec39cab
AC
6114fi
6115if test -z "$ac_cv_prog_AR"; then
6116 ac_ct_AR=$AR
6117 # Extract the first word of "ar", so it can be a program name with args.
6118set dummy ar; ac_word=$2
81ecdfbb
RW
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120$as_echo_n "checking for $ac_word... " >&6; }
6121if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6122 $as_echo_n "(cached) " >&6
bec39cab
AC
6123else
6124 if test -n "$ac_ct_AR"; then
6125 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6126else
6127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130 IFS=$as_save_IFS
6131 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6132 for ac_exec_ext in '' $ac_executable_extensions; do
6133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6134 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6136 break 2
6137 fi
6138done
81ecdfbb
RW
6139 done
6140IFS=$as_save_IFS
bec39cab
AC
6141
6142fi
6143fi
6144ac_ct_AR=$ac_cv_prog_ac_ct_AR
6145if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6147$as_echo "$ac_ct_AR" >&6; }
bec39cab 6148else
81ecdfbb
RW
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6150$as_echo "no" >&6; }
bec39cab
AC
6151fi
6152
81ecdfbb
RW
6153 if test "x$ac_ct_AR" = x; then
6154 AR=""
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
bec39cab
AC
6164else
6165 AR="$ac_cv_prog_AR"
6166fi
6167
6168if test -n "$ac_tool_prefix"; then
6169 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6170set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172$as_echo_n "checking for $ac_word... " >&6; }
6173if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6174 $as_echo_n "(cached) " >&6
bec39cab
AC
6175else
6176 if test -n "$DLLTOOL"; then
6177 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6178else
6179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182 IFS=$as_save_IFS
6183 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6184 for ac_exec_ext in '' $ac_executable_extensions; do
6185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6186 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6188 break 2
6189 fi
6190done
81ecdfbb
RW
6191 done
6192IFS=$as_save_IFS
bec39cab
AC
6193
6194fi
6195fi
6196DLLTOOL=$ac_cv_prog_DLLTOOL
6197if test -n "$DLLTOOL"; then
81ecdfbb
RW
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6199$as_echo "$DLLTOOL" >&6; }
bec39cab 6200else
81ecdfbb
RW
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
bec39cab
AC
6203fi
6204
81ecdfbb 6205
bec39cab
AC
6206fi
6207if test -z "$ac_cv_prog_DLLTOOL"; then
6208 ac_ct_DLLTOOL=$DLLTOOL
6209 # Extract the first word of "dlltool", so it can be a program name with args.
6210set dummy dlltool; ac_word=$2
81ecdfbb
RW
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212$as_echo_n "checking for $ac_word... " >&6; }
6213if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6214 $as_echo_n "(cached) " >&6
bec39cab
AC
6215else
6216 if test -n "$ac_ct_DLLTOOL"; then
6217 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6218else
6219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220for as_dir in $PATH
6221do
6222 IFS=$as_save_IFS
6223 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6224 for ac_exec_ext in '' $ac_executable_extensions; do
6225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6226 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6228 break 2
6229 fi
6230done
81ecdfbb
RW
6231 done
6232IFS=$as_save_IFS
bec39cab
AC
6233
6234fi
6235fi
6236ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6237if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6239$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6240else
81ecdfbb
RW
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
bec39cab
AC
6243fi
6244
81ecdfbb
RW
6245 if test "x$ac_ct_DLLTOOL" = x; then
6246 DLLTOOL=""
6247 else
6248 case $cross_compiling:$ac_tool_warned in
6249yes:)
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6251$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6252ac_tool_warned=yes ;;
6253esac
6254 DLLTOOL=$ac_ct_DLLTOOL
6255 fi
bec39cab
AC
6256else
6257 DLLTOOL="$ac_cv_prog_DLLTOOL"
6258fi
6259
6260if test -n "$ac_tool_prefix"; then
6261 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6262set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264$as_echo_n "checking for $ac_word... " >&6; }
6265if test "${ac_cv_prog_WINDRES+set}" = set; then :
6266 $as_echo_n "(cached) " >&6
bec39cab
AC
6267else
6268 if test -n "$WINDRES"; then
6269 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6270else
6271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272for as_dir in $PATH
6273do
6274 IFS=$as_save_IFS
6275 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6276 for ac_exec_ext in '' $ac_executable_extensions; do
6277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6278 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6280 break 2
6281 fi
6282done
81ecdfbb
RW
6283 done
6284IFS=$as_save_IFS
bec39cab
AC
6285
6286fi
6287fi
6288WINDRES=$ac_cv_prog_WINDRES
6289if test -n "$WINDRES"; then
81ecdfbb
RW
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6291$as_echo "$WINDRES" >&6; }
bec39cab 6292else
81ecdfbb
RW
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }
bec39cab
AC
6295fi
6296
81ecdfbb 6297
bec39cab
AC
6298fi
6299if test -z "$ac_cv_prog_WINDRES"; then
6300 ac_ct_WINDRES=$WINDRES
6301 # Extract the first word of "windres", so it can be a program name with args.
6302set dummy windres; ac_word=$2
81ecdfbb
RW
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6304$as_echo_n "checking for $ac_word... " >&6; }
6305if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6306 $as_echo_n "(cached) " >&6
bec39cab
AC
6307else
6308 if test -n "$ac_ct_WINDRES"; then
6309 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6310else
6311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312for as_dir in $PATH
6313do
6314 IFS=$as_save_IFS
6315 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6316 for ac_exec_ext in '' $ac_executable_extensions; do
6317 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6318 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6320 break 2
6321 fi
6322done
81ecdfbb
RW
6323 done
6324IFS=$as_save_IFS
bec39cab
AC
6325
6326fi
6327fi
6328ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6329if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6331$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6332else
81ecdfbb
RW
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
c906108c 6335fi
bec39cab 6336
81ecdfbb
RW
6337 if test "x$ac_ct_WINDRES" = x; then
6338 WINDRES=""
6339 else
6340 case $cross_compiling:$ac_tool_warned in
6341yes:)
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6344ac_tool_warned=yes ;;
6345esac
6346 WINDRES=$ac_ct_WINDRES
6347 fi
c906108c 6348else
bec39cab 6349 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6350fi
6351
bec39cab 6352
036c3acb
TS
6353case $host_os in
6354 gnu*)
6355 # Needed for GNU Hurd hosts.
6356 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6357 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6358set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if test "${ac_cv_prog_MIG+set}" = set; then :
6362 $as_echo_n "(cached) " >&6
c906108c 6363else
bec39cab
AC
6364 if test -n "$MIG"; then
6365 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6366else
6367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370 IFS=$as_save_IFS
6371 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6372 for ac_exec_ext in '' $ac_executable_extensions; do
6373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6374 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6376 break 2
6377 fi
6378done
81ecdfbb
RW
6379 done
6380IFS=$as_save_IFS
bec39cab 6381
c906108c 6382fi
bec39cab
AC
6383fi
6384MIG=$ac_cv_prog_MIG
6385if test -n "$MIG"; then
81ecdfbb
RW
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6387$as_echo "$MIG" >&6; }
c906108c 6388else
81ecdfbb
RW
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; }
c906108c
SS
6391fi
6392
81ecdfbb 6393
bec39cab
AC
6394fi
6395if test -z "$ac_cv_prog_MIG"; then
6396 ac_ct_MIG=$MIG
6397 # Extract the first word of "mig", so it can be a program name with args.
6398set dummy mig; ac_word=$2
81ecdfbb
RW
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6400$as_echo_n "checking for $ac_word... " >&6; }
6401if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6402 $as_echo_n "(cached) " >&6
bec39cab
AC
6403else
6404 if test -n "$ac_ct_MIG"; then
6405 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6406else
6407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410 IFS=$as_save_IFS
6411 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6412 for ac_exec_ext in '' $ac_executable_extensions; do
6413 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6414 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6416 break 2
6417 fi
6418done
81ecdfbb
RW
6419 done
6420IFS=$as_save_IFS
c906108c 6421
bec39cab
AC
6422fi
6423fi
6424ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6425if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6427$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6428else
81ecdfbb
RW
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
bec39cab 6431fi
c906108c 6432
81ecdfbb
RW
6433 if test "x$ac_ct_MIG" = x; then
6434 MIG=""
6435 else
6436 case $cross_compiling:$ac_tool_warned in
6437yes:)
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6439$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6440ac_tool_warned=yes ;;
6441esac
6442 MIG=$ac_ct_MIG
6443 fi
bec39cab
AC
6444else
6445 MIG="$ac_cv_prog_MIG"
6446fi
c906108c 6447
036c3acb
TS
6448 if test x"$MIG" = x; then
6449 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6450 fi
6451 ;;
6452esac
c906108c 6453
bec39cab
AC
6454# ---------------------- #
6455# Checks for libraries. #
6456# ---------------------- #
c906108c 6457
bec39cab 6458# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6460$as_echo_n "checking for main in -lm... " >&6; }
6461if test "${ac_cv_lib_m_main+set}" = set; then :
6462 $as_echo_n "(cached) " >&6
bec39cab
AC
6463else
6464 ac_check_lib_save_LIBS=$LIBS
6465LIBS="-lm $LIBS"
81ecdfbb 6466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6467/* end confdefs.h. */
c906108c 6468
c906108c 6469
bec39cab
AC
6470int
6471main ()
6472{
81ecdfbb 6473return main ();
bec39cab
AC
6474 ;
6475 return 0;
6476}
6477_ACEOF
81ecdfbb 6478if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6479 ac_cv_lib_m_main=yes
6480else
81ecdfbb 6481 ac_cv_lib_m_main=no
bec39cab 6482fi
81ecdfbb
RW
6483rm -f core conftest.err conftest.$ac_objext \
6484 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6485LIBS=$ac_check_lib_save_LIBS
6486fi
81ecdfbb
RW
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6488$as_echo "$ac_cv_lib_m_main" >&6; }
6489if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6490 cat >>confdefs.h <<_ACEOF
6491#define HAVE_LIBM 1
6492_ACEOF
6493
6494 LIBS="-lm $LIBS"
c906108c 6495
c906108c 6496fi
bec39cab
AC
6497
6498
6499# We need to link with -lw to get `wctype' on Solaris before Solaris
6500# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6501# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6502# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6503ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6504if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6505
c906108c 6506else
81ecdfbb
RW
6507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6508$as_echo_n "checking for wctype in -lw... " >&6; }
6509if test "${ac_cv_lib_w_wctype+set}" = set; then :
6510 $as_echo_n "(cached) " >&6
bec39cab
AC
6511else
6512 ac_check_lib_save_LIBS=$LIBS
6513LIBS="-lw $LIBS"
81ecdfbb 6514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6515/* end confdefs.h. */
c906108c 6516
81ecdfbb
RW
6517/* Override any GCC internal prototype to avoid an error.
6518 Use char because int might match the return type of a GCC
6519 builtin and then its argument prototype would still apply. */
bec39cab
AC
6520#ifdef __cplusplus
6521extern "C"
6522#endif
bec39cab
AC
6523char wctype ();
6524int
6525main ()
6526{
81ecdfbb 6527return wctype ();
bec39cab
AC
6528 ;
6529 return 0;
6530}
6531_ACEOF
81ecdfbb 6532if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6533 ac_cv_lib_w_wctype=yes
6534else
81ecdfbb 6535 ac_cv_lib_w_wctype=no
bec39cab 6536fi
81ecdfbb
RW
6537rm -f core conftest.err conftest.$ac_objext \
6538 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6539LIBS=$ac_check_lib_save_LIBS
6540fi
81ecdfbb
RW
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6542$as_echo "$ac_cv_lib_w_wctype" >&6; }
6543if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6544 cat >>confdefs.h <<_ACEOF
6545#define HAVE_LIBW 1
6546_ACEOF
c906108c 6547
bec39cab 6548 LIBS="-lw $LIBS"
c906108c 6549
bec39cab 6550fi
c906108c 6551
bec39cab 6552fi
c906108c 6553
ddc9cd0f 6554
bec39cab 6555# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6557$as_echo_n "checking for library containing gethostbyname... " >&6; }
6558if test "${ac_cv_search_gethostbyname+set}" = set; then :
6559 $as_echo_n "(cached) " >&6
bec39cab
AC
6560else
6561 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6563/* end confdefs.h. */
ddc9cd0f 6564
81ecdfbb
RW
6565/* Override any GCC internal prototype to avoid an error.
6566 Use char because int might match the return type of a GCC
6567 builtin and then its argument prototype would still apply. */
bec39cab
AC
6568#ifdef __cplusplus
6569extern "C"
6570#endif
bec39cab
AC
6571char gethostbyname ();
6572int
6573main ()
6574{
81ecdfbb 6575return gethostbyname ();
bec39cab
AC
6576 ;
6577 return 0;
6578}
6579_ACEOF
81ecdfbb
RW
6580for ac_lib in '' nsl; do
6581 if test -z "$ac_lib"; then
6582 ac_res="none required"
6583 else
6584 ac_res=-l$ac_lib
b4e70030 6585 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6586 fi
6587 if ac_fn_c_try_link "$LINENO"; then :
6588 ac_cv_search_gethostbyname=$ac_res
6589fi
6590rm -f core conftest.err conftest.$ac_objext \
6591 conftest$ac_exeext
6592 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6593 break
6594fi
6595done
6596if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6597
bec39cab 6598else
81ecdfbb 6599 ac_cv_search_gethostbyname=no
bec39cab 6600fi
81ecdfbb 6601rm conftest.$ac_ext
bec39cab
AC
6602LIBS=$ac_func_search_save_LIBS
6603fi
81ecdfbb
RW
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6605$as_echo "$ac_cv_search_gethostbyname" >&6; }
6606ac_res=$ac_cv_search_gethostbyname
6607if test "$ac_res" != no; then :
6608 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6609
bec39cab 6610fi
96baa820 6611
c906108c 6612
b4e70030 6613# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6615$as_echo_n "checking for library containing socketpair... " >&6; }
6616if test "${ac_cv_search_socketpair+set}" = set; then :
6617 $as_echo_n "(cached) " >&6
b4e70030
JB
6618else
6619 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6621/* end confdefs.h. */
6622
81ecdfbb
RW
6623/* Override any GCC internal prototype to avoid an error.
6624 Use char because int might match the return type of a GCC
6625 builtin and then its argument prototype would still apply. */
b4e70030
JB
6626#ifdef __cplusplus
6627extern "C"
6628#endif
b4e70030
JB
6629char socketpair ();
6630int
6631main ()
6632{
81ecdfbb 6633return socketpair ();
b4e70030
JB
6634 ;
6635 return 0;
6636}
6637_ACEOF
81ecdfbb
RW
6638for ac_lib in '' socket; do
6639 if test -z "$ac_lib"; then
6640 ac_res="none required"
6641 else
6642 ac_res=-l$ac_lib
b4e70030 6643 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6644 fi
6645 if ac_fn_c_try_link "$LINENO"; then :
6646 ac_cv_search_socketpair=$ac_res
6647fi
6648rm -f core conftest.err conftest.$ac_objext \
6649 conftest$ac_exeext
6650 if test "${ac_cv_search_socketpair+set}" = set; then :
6651 break
6652fi
6653done
6654if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6655
b4e70030 6656else
81ecdfbb 6657 ac_cv_search_socketpair=no
b4e70030 6658fi
81ecdfbb 6659rm conftest.$ac_ext
b4e70030
JB
6660LIBS=$ac_func_search_save_LIBS
6661fi
81ecdfbb
RW
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6663$as_echo "$ac_cv_search_socketpair" >&6; }
6664ac_res=$ac_cv_search_socketpair
6665if test "$ac_res" != no; then :
6666 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6667
6668fi
6669
6670
233a11ab 6671# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6672
6673 # See if the user specified whether he wants zlib support or not.
6674
6675# Check whether --with-zlib was given.
6676if test "${with_zlib+set}" = set; then :
6677 withval=$with_zlib;
6678else
6679 with_zlib=auto
6680fi
6681
6682
6683 if test "$with_zlib" != "no"; then
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6685$as_echo_n "checking for library containing zlibVersion... " >&6; }
6686if test "${ac_cv_search_zlibVersion+set}" = set; then :
6687 $as_echo_n "(cached) " >&6
233a11ab
CS
6688else
6689 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6691/* end confdefs.h. */
6692
81ecdfbb
RW
6693/* Override any GCC internal prototype to avoid an error.
6694 Use char because int might match the return type of a GCC
233a11ab 6695 builtin and then its argument prototype would still apply. */
233a11ab
CS
6696#ifdef __cplusplus
6697extern "C"
6698#endif
233a11ab
CS
6699char zlibVersion ();
6700int
6701main ()
6702{
81ecdfbb 6703return zlibVersion ();
233a11ab
CS
6704 ;
6705 return 0;
6706}
6707_ACEOF
81ecdfbb
RW
6708for ac_lib in '' z; do
6709 if test -z "$ac_lib"; then
6710 ac_res="none required"
233a11ab 6711 else
81ecdfbb
RW
6712 ac_res=-l$ac_lib
6713 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6714 fi
81ecdfbb
RW
6715 if ac_fn_c_try_link "$LINENO"; then :
6716 ac_cv_search_zlibVersion=$ac_res
233a11ab 6717fi
81ecdfbb
RW
6718rm -f core conftest.err conftest.$ac_objext \
6719 conftest$ac_exeext
6720 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6721 break
233a11ab 6722fi
81ecdfbb
RW
6723done
6724if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6725
233a11ab 6726else
81ecdfbb 6727 ac_cv_search_zlibVersion=no
233a11ab 6728fi
81ecdfbb
RW
6729rm conftest.$ac_ext
6730LIBS=$ac_func_search_save_LIBS
233a11ab 6731fi
81ecdfbb
RW
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6733$as_echo "$ac_cv_search_zlibVersion" >&6; }
6734ac_res=$ac_cv_search_zlibVersion
6735if test "$ac_res" != no; then :
6736 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6737 for ac_header in zlib.h
6738do :
6739 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6740if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6741 cat >>confdefs.h <<_ACEOF
81ecdfbb 6742#define HAVE_ZLIB_H 1
233a11ab
CS
6743_ACEOF
6744
6745fi
6746
6747done
6748
6749fi
6750
b040ad30
JB
6751 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6752 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6753 fi
6754 fi
6755
233a11ab 6756
77f120bf 6757# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6759$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6760if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6761 $as_echo_n "(cached) " >&6
bec39cab
AC
6762else
6763 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6765/* end confdefs.h. */
c906108c 6766
81ecdfbb
RW
6767/* Override any GCC internal prototype to avoid an error.
6768 Use char because int might match the return type of a GCC
6769 builtin and then its argument prototype would still apply. */
bec39cab
AC
6770#ifdef __cplusplus
6771extern "C"
6772#endif
77f120bf 6773char dlgetmodinfo ();
bec39cab
AC
6774int
6775main ()
6776{
81ecdfbb 6777return dlgetmodinfo ();
bec39cab
AC
6778 ;
6779 return 0;
6780}
6781_ACEOF
81ecdfbb
RW
6782for ac_lib in '' dl xpdl; do
6783 if test -z "$ac_lib"; then
6784 ac_res="none required"
6785 else
6786 ac_res=-l$ac_lib
b4e70030 6787 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6788 fi
6789 if ac_fn_c_try_link "$LINENO"; then :
6790 ac_cv_search_dlgetmodinfo=$ac_res
6791fi
6792rm -f core conftest.err conftest.$ac_objext \
6793 conftest$ac_exeext
6794 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6795 break
6796fi
6797done
6798if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6799
4e8d927d 6800else
81ecdfbb 6801 ac_cv_search_dlgetmodinfo=no
1ba607ad 6802fi
81ecdfbb 6803rm conftest.$ac_ext
bec39cab
AC
6804LIBS=$ac_func_search_save_LIBS
6805fi
81ecdfbb
RW
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6807$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6808ac_res=$ac_cv_search_dlgetmodinfo
6809if test "$ac_res" != no; then :
6810 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6811
8bb2c122 6812fi
8bb2c122 6813
8bb2c122 6814
77f120bf 6815
77f120bf 6816
6c7a06a3 6817
81ecdfbb
RW
6818# Check whether --with-libiconv-prefix was given.
6819if test "${with_libiconv_prefix+set}" = set; then :
6820 withval=$with_libiconv_prefix;
6c7a06a3 6821 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6822 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6823 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6824 done
6825
81ecdfbb
RW
6826fi
6827
6c7a06a3 6828
f18c4681 6829 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6830 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6831
81ecdfbb
RW
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6833$as_echo_n "checking for iconv... " >&6; }
6834if test "${am_cv_func_iconv+set}" = set; then :
6835 $as_echo_n "(cached) " >&6
d542061a 6836else
6c7a06a3
TT
6837
6838 am_cv_func_iconv="no, consider installing GNU libiconv"
6839 am_cv_lib_iconv=no
6840 am_cv_use_build_libiconv=no
f0f20949 6841 am_cv_build_libiconv_path=
4edb1e84
JB
6842
6843 # If libiconv is part of the build tree, then try using it over
6844 # any system iconv.
6845 if test -d ../libiconv; then
f18c4681
JB
6846 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6847 am_save_LIBS="$LIBS"
6848 am_save_CPPFLAGS="$CPPFLAGS"
6849 LIBS="$LIBS $lib_dir/libiconv.a"
6850 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6852/* end confdefs.h. */
6c7a06a3
TT
6853#include <stdlib.h>
6854#include <iconv.h>
d542061a
UW
6855int
6856main ()
6857{
6c7a06a3 6858iconv_t cd = iconv_open("","");
f18c4681
JB
6859 iconv(cd,NULL,NULL,NULL,NULL);
6860 iconv_close(cd);
d542061a
UW
6861 ;
6862 return 0;
6863}
6864_ACEOF
81ecdfbb 6865if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6866 am_cv_use_build_libiconv=yes
f0f20949 6867 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6868 am_cv_lib_iconv=yes
6869 am_cv_func_iconv=yes
d542061a 6870fi
81ecdfbb
RW
6871rm -f core conftest.err conftest.$ac_objext \
6872 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6873 LIBS="$am_save_LIBS"
6874 CPPFLAGS="$am_save_CPPFLAGS"
6875 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6876 break
6877 fi
6878 done
4edb1e84 6879 fi
94ae1714 6880
4edb1e84 6881 # Next, try to find iconv in libc.
6c7a06a3 6882 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6884/* end confdefs.h. */
6c7a06a3
TT
6885#include <stdlib.h>
6886#include <iconv.h>
d542061a
UW
6887int
6888main ()
6889{
6c7a06a3
TT
6890iconv_t cd = iconv_open("","");
6891 iconv(cd,NULL,NULL,NULL,NULL);
6892 iconv_close(cd);
d542061a
UW
6893 ;
6894 return 0;
6895}
6896_ACEOF
81ecdfbb 6897if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6898 am_cv_func_iconv=yes
d542061a 6899fi
81ecdfbb
RW
6900rm -f core conftest.err conftest.$ac_objext \
6901 conftest$ac_exeext conftest.$ac_ext
77f120bf 6902 fi
94ae1714 6903
4edb1e84
JB
6904 # If iconv was not in libc, try -liconv. In this case, arrange to
6905 # look in the libiconv prefix, if it was specified by the user.
6906 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6907 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6908 am_save_LIBS="$LIBS"
6909 if test -n "$LIBICONV_INCLUDE"; then
6910 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6911 LIBS="$LIBS $LIBICONV_LIBDIR"
6912 fi
6913 LIBS="$LIBS -liconv"
81ecdfbb 6914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6915/* end confdefs.h. */
6c7a06a3
TT
6916#include <stdlib.h>
6917#include <iconv.h>
bec39cab
AC
6918int
6919main ()
6920{
6c7a06a3
TT
6921iconv_t cd = iconv_open("","");
6922 iconv(cd,NULL,NULL,NULL,NULL);
6923 iconv_close(cd);
bec39cab
AC
6924 ;
6925 return 0;
6926}
6927_ACEOF
81ecdfbb 6928if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6929 am_cv_lib_iconv=yes
6c7a06a3 6930 am_cv_func_iconv=yes
627af7ea 6931fi
81ecdfbb
RW
6932rm -f core conftest.err conftest.$ac_objext \
6933 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6934 LIBS="$am_save_LIBS"
fc3b640d 6935 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6936 fi
6937
6938fi
81ecdfbb
RW
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6940$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6941
6942 # Set the various flags based on the cache variables. We can't rely
6943 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6944 LIBICONV=
6945 if test "$am_cv_lib_iconv" = yes; then
6946 LIBICONV="-liconv"
94ae1714
TT
6947 else
6948 LIBICONV_LIBDIR=
6949 LIBICONV_INCLUDE=
fc3b640d
TT
6950 fi
6951 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6952 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6953 LIBICONV_LIBDIR=""
fc3b640d
TT
6954 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6955 fi
6956 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6957 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6958
6c7a06a3
TT
6959 if test "$am_cv_func_iconv" = yes; then
6960
81ecdfbb 6961$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6962
81ecdfbb
RW
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6964$as_echo_n "checking for iconv declaration... " >&6; }
6965 if test "${am_cv_proto_iconv+set}" = set; then :
6966 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6967else
6968
81ecdfbb 6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6970/* end confdefs.h. */
6971
6c7a06a3
TT
6972#include <stdlib.h>
6973#include <iconv.h>
6974extern
b4e70030 6975#ifdef __cplusplus
6c7a06a3 6976"C"
b4e70030 6977#endif
6c7a06a3
TT
6978#if defined(__STDC__) || defined(__cplusplus)
6979size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6980#else
6981size_t iconv();
6982#endif
6983
b4e70030
JB
6984int
6985main ()
6986{
6c7a06a3 6987
b4e70030
JB
6988 ;
6989 return 0;
6990}
6991_ACEOF
81ecdfbb 6992if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6993 am_cv_proto_iconv_arg1=""
4e8d927d 6994else
81ecdfbb 6995 am_cv_proto_iconv_arg1="const"
b4e70030 6996fi
81ecdfbb 6997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6998 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);"
6999fi
7000
7001 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7003 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7004$as_echo "${ac_t:-
7005 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7006
7007cat >>confdefs.h <<_ACEOF
7008#define ICONV_CONST $am_cv_proto_iconv_arg1
7009_ACEOF
7010
7011 fi
6c7a06a3
TT
7012
7013
478aac75
DE
7014# GDB may fork/exec the iconv program to get the list of supported character
7015# sets. Allow the user to specify where to find it.
7016# There are several factors affecting the choice of option name:
7017# - There is already --with-libiconv-prefix but we can't use it, it specifies
7018# the build-time location of libiconv files.
7019# - The program we need to find is iconv, which comes with glibc. The user
7020# doesn't necessarily have libiconv installed. Therefore naming this
7021# --with-libiconv-foo feels wrong.
7022# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7023# defined to work on directories not files (though it really doesn't know
7024# the difference).
7025# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7026# with --with-libiconv-prefix.
7027# Putting these together is why the option name is --with-iconv-bin.
7028
7029
7030# Check whether --with-iconv-bin was given.
7031if test "${with_iconv_bin+set}" = set; then :
7032 withval=$with_iconv_bin; iconv_bin="${withval}"
7033
7034cat >>confdefs.h <<_ACEOF
7035#define ICONV_BIN "${iconv_bin}"
7036_ACEOF
7037
7038
7039 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7040 if test "x$prefix" = xNONE; then
7041 test_prefix=/usr/local
7042 else
7043 test_prefix=$prefix
7044 fi
7045 else
7046 test_prefix=$exec_prefix
7047 fi
7048 value=0
7049 case ${iconv_bin} in
7050 "${test_prefix}"|"${test_prefix}/"*|\
7051 '${exec_prefix}'|'${exec_prefix}/'*)
7052 value=1
7053 ;;
7054 esac
7055
7056cat >>confdefs.h <<_ACEOF
7057#define ICONV_BIN_RELOCATABLE $value
7058_ACEOF
7059
7060
7061
7062fi
7063
7064
6c7a06a3
TT
7065# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
7066# There is a very specific comment in /usr/include/curses.h explaining that
7067# termcap routines built into libcurses must not be used.
7068#
7069# The symptoms we observed so far is GDB unexpectedly changing
7070# the terminal settings when tgetent is called - this is particularly
7071# visible as the output is missing carriage returns, and so rapidly
7072# becomes very hard to read.
7073#
7074# The readline configure script has already decided that libtermcap
7075# was enough for its purposes, and so decided to build readline using
7076# libtermcap. Since the TUI mode requires curses, building GDB with
7077# TUI enabled results in both libraries to be used at the same time,
7078# which is not allowed. This basically means that GDB with TUI is
7079# broken on alpha-osf.
7080
7081case $host_os in
6bcc772d
RO
7082 osf* )
7083 if test x"$enable_tui" = xyes; then
81ecdfbb 7084 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 7085 fi
6bcc772d 7086 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
7087 enable_tui=no
7088 fi
7089 ;;
7090esac
7091
cb01cfba 7092# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7093if test x"$enable_tui" != xno; then
cb01cfba
JB
7094 prefer_curses=yes
7095fi
7096
7097curses_found=no
7098if test x"$prefer_curses" = xyes; then
7099 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7100 # curses library because the latter might not provide all the
7101 # functionality we need. However, this leads to problems on systems
7102 # where the linker searches /usr/local/lib, but the compiler doesn't
7103 # search /usr/local/include, if ncurses is installed in /usr/local. A
7104 # default installation of ncurses on alpha*-dec-osf* will lead to such
7105 # a situation.
81ecdfbb
RW
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7107$as_echo_n "checking for library containing waddstr... " >&6; }
7108if test "${ac_cv_search_waddstr+set}" = set; then :
7109 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7110else
7111 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7113/* end confdefs.h. */
7114
81ecdfbb
RW
7115/* Override any GCC internal prototype to avoid an error.
7116 Use char because int might match the return type of a GCC
7117 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7118#ifdef __cplusplus
7119extern "C"
7120#endif
6c7a06a3
TT
7121char waddstr ();
7122int
7123main ()
7124{
81ecdfbb 7125return waddstr ();
6c7a06a3
TT
7126 ;
7127 return 0;
7128}
7129_ACEOF
81ecdfbb
RW
7130for ac_lib in '' ncurses cursesX curses; do
7131 if test -z "$ac_lib"; then
7132 ac_res="none required"
7133 else
7134 ac_res=-l$ac_lib
7135 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7136 fi
7137 if ac_fn_c_try_link "$LINENO"; then :
7138 ac_cv_search_waddstr=$ac_res
7139fi
7140rm -f core conftest.err conftest.$ac_objext \
7141 conftest$ac_exeext
7142 if test "${ac_cv_search_waddstr+set}" = set; then :
7143 break
7144fi
7145done
7146if test "${ac_cv_search_waddstr+set}" = set; then :
7147
6c7a06a3 7148else
81ecdfbb
RW
7149 ac_cv_search_waddstr=no
7150fi
7151rm conftest.$ac_ext
7152LIBS=$ac_func_search_save_LIBS
7153fi
7154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7155$as_echo "$ac_cv_search_waddstr" >&6; }
7156ac_res=$ac_cv_search_waddstr
7157if test "$ac_res" != no; then :
7158 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7159
7160fi
7161
7162
cb01cfba
JB
7163 if test "$ac_cv_search_waddstr" != no; then
7164 curses_found=yes
7165 fi
7166fi
7167
7168# Check whether we should enable the TUI, but only do so if we really
7169# can.
7170if test x"$enable_tui" != xno; then
7171 if test -d $srcdir/tui; then
7172 if test "$curses_found" != no; then
6c7a06a3
TT
7173 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7174 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7175 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7176 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7177 else
7178 if test x"$enable_tui" = xyes; then
81ecdfbb 7179 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7180 else
81ecdfbb
RW
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7182$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7183 fi
7184 fi
7185 fi
7186fi
7187
7188# Since GDB uses Readline, we need termcap functionality. In many
7189# cases this will be provided by the curses library, but some systems
7190# have a seperate termcap library, or no curses library at all.
7191
7192case $host_os in
7193 cygwin*)
7194 if test -d $srcdir/libtermcap; then
7195 LIBS="../libtermcap/libtermcap.a $LIBS"
7196 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7197 fi ;;
7198 go32* | *djgpp*)
7199 ac_cv_search_tgetent="none required"
7200 ;;
7201 *mingw32*)
7202 ac_cv_search_tgetent="none required"
7203 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7204 ;;
7205esac
7206
7207# These are the libraries checked by Readline.
81ecdfbb
RW
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7209$as_echo_n "checking for library containing tgetent... " >&6; }
7210if test "${ac_cv_search_tgetent+set}" = set; then :
7211 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7212else
7213 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7215/* end confdefs.h. */
7216
81ecdfbb
RW
7217/* Override any GCC internal prototype to avoid an error.
7218 Use char because int might match the return type of a GCC
7219 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7220#ifdef __cplusplus
7221extern "C"
7222#endif
6c7a06a3
TT
7223char tgetent ();
7224int
7225main ()
7226{
81ecdfbb 7227return tgetent ();
6c7a06a3
TT
7228 ;
7229 return 0;
7230}
7231_ACEOF
81ecdfbb
RW
7232for ac_lib in '' termcap tinfo curses ncurses; do
7233 if test -z "$ac_lib"; then
7234 ac_res="none required"
7235 else
7236 ac_res=-l$ac_lib
6c7a06a3 7237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7238 fi
7239 if ac_fn_c_try_link "$LINENO"; then :
7240 ac_cv_search_tgetent=$ac_res
7241fi
7242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext
7244 if test "${ac_cv_search_tgetent+set}" = set; then :
7245 break
7246fi
7247done
7248if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7249
6c7a06a3 7250else
81ecdfbb 7251 ac_cv_search_tgetent=no
6c7a06a3 7252fi
81ecdfbb 7253rm conftest.$ac_ext
6c7a06a3
TT
7254LIBS=$ac_func_search_save_LIBS
7255fi
81ecdfbb
RW
7256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7257$as_echo "$ac_cv_search_tgetent" >&6; }
7258ac_res=$ac_cv_search_tgetent
7259if test "$ac_res" != no; then :
7260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7261
06825bd1
MK
7262fi
7263
06825bd1 7264
bec39cab 7265if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7266 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7267fi
7268
3841debe 7269
81ecdfbb
RW
7270# Check whether --with-system-readline was given.
7271if test "${with_system_readline+set}" = set; then :
7272 withval=$with_system_readline;
7273fi
6a30b0a5 7274
6a30b0a5
AS
7275
7276if test "$with_system_readline" = yes; then
7277 READLINE=-lreadline
7278 READLINE_DEPS=
7279 READLINE_CFLAGS=
39037522 7280 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7281else
7282 READLINE='$(READLINE_DIR)/libreadline.a'
7283 READLINE_DEPS='$(READLINE)'
7284 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7285 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7286fi
7287
7288
7289
7290
7291
f997c383
SD
7292# Generate jit-reader.h
7293
7294# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7295TARGET_PTR=
7296
7297# The cast to long int works around a bug in the HP C Compiler
7298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7300# This bug is HP SR number 8606223364.
7301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7302$as_echo_n "checking size of unsigned long long... " >&6; }
7303if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7304 $as_echo_n "(cached) " >&6
7305else
7306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7307
7308else
7309 if test "$ac_cv_type_unsigned_long_long" = yes; then
7310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7312{ as_fn_set_status 77
7313as_fn_error "cannot compute sizeof (unsigned long long)
7314See \`config.log' for more details." "$LINENO" 5; }; }
7315 else
7316 ac_cv_sizeof_unsigned_long_long=0
7317 fi
7318fi
7319
7320fi
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7322$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7323
7324
7325
7326cat >>confdefs.h <<_ACEOF
7327#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7328_ACEOF
7329
7330
7331# The cast to long int works around a bug in the HP C Compiler
7332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7334# This bug is HP SR number 8606223364.
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7336$as_echo_n "checking size of unsigned long... " >&6; }
7337if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7338 $as_echo_n "(cached) " >&6
7339else
7340 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7341
7342else
7343 if test "$ac_cv_type_unsigned_long" = yes; then
7344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7346{ as_fn_set_status 77
7347as_fn_error "cannot compute sizeof (unsigned long)
7348See \`config.log' for more details." "$LINENO" 5; }; }
7349 else
7350 ac_cv_sizeof_unsigned_long=0
7351 fi
7352fi
7353
7354fi
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7356$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7357
7358
7359
7360cat >>confdefs.h <<_ACEOF
7361#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7362_ACEOF
7363
7364
7365# The cast to long int works around a bug in the HP C Compiler
7366# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7367# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7368# This bug is HP SR number 8606223364.
7369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7370$as_echo_n "checking size of unsigned __int128... " >&6; }
7371if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7372 $as_echo_n "(cached) " >&6
7373else
7374 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7375
7376else
7377 if test "$ac_cv_type_unsigned___int128" = yes; then
7378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7380{ as_fn_set_status 77
7381as_fn_error "cannot compute sizeof (unsigned __int128)
7382See \`config.log' for more details." "$LINENO" 5; }; }
7383 else
7384 ac_cv_sizeof_unsigned___int128=0
7385 fi
7386fi
7387
7388fi
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7390$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7391
7392
7393
7394cat >>confdefs.h <<_ACEOF
7395#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7396_ACEOF
7397
7398
7399
7400if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7401 TARGET_PTR="unsigned long"
7402elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7403 TARGET_PTR="unsigned long long"
7404elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7405 TARGET_PTR="unsigned __int128"
7406else
7407 TARGET_PTR="unsigned long"
7408fi
7409
7410
7411ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7412
7413
a2d08b9e
SD
7414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7415$as_echo_n "checking for library containing dlopen... " >&6; }
7416if test "${ac_cv_search_dlopen+set}" = set; then :
7417 $as_echo_n "(cached) " >&6
7418else
7419 ac_func_search_save_LIBS=$LIBS
7420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7421/* end confdefs.h. */
7422
7423/* Override any GCC internal prototype to avoid an error.
7424 Use char because int might match the return type of a GCC
7425 builtin and then its argument prototype would still apply. */
7426#ifdef __cplusplus
7427extern "C"
7428#endif
7429char dlopen ();
7430int
7431main ()
7432{
7433return dlopen ();
7434 ;
7435 return 0;
7436}
7437_ACEOF
7438for ac_lib in '' dl; do
7439 if test -z "$ac_lib"; then
7440 ac_res="none required"
7441 else
7442 ac_res=-l$ac_lib
7443 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7444 fi
7445 if ac_fn_c_try_link "$LINENO"; then :
7446 ac_cv_search_dlopen=$ac_res
7447fi
7448rm -f core conftest.err conftest.$ac_objext \
7449 conftest$ac_exeext
7450 if test "${ac_cv_search_dlopen+set}" = set; then :
7451 break
7452fi
7453done
7454if test "${ac_cv_search_dlopen+set}" = set; then :
7455
7456else
7457 ac_cv_search_dlopen=no
7458fi
7459rm conftest.$ac_ext
7460LIBS=$ac_func_search_save_LIBS
7461fi
7462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7463$as_echo "$ac_cv_search_dlopen" >&6; }
7464ac_res=$ac_cv_search_dlopen
7465if test "$ac_res" != no; then :
7466 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7467
7468fi
7469
7470
39037522 7471
b8e0a31c
SD
7472
7473# Check whether --with-jit-reader-dir was given.
7474if test "${with_jit_reader_dir+set}" = set; then :
7475 withval=$with_jit_reader_dir;
7476 JIT_READER_DIR=$withval
7477else
7478 JIT_READER_DIR=${libdir}/gdb
7479fi
7480
7481
7482 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7483 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7484 ac_define_dir=`eval echo $JIT_READER_DIR`
7485 ac_define_dir=`eval echo $ac_define_dir`
7486
7487cat >>confdefs.h <<_ACEOF
7488#define JIT_READER_DIR "$ac_define_dir"
7489_ACEOF
7490
7491
7492
7493
7494 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7495 if test "x$prefix" = xNONE; then
7496 test_prefix=/usr/local
7497 else
7498 test_prefix=$prefix
7499 fi
7500 else
7501 test_prefix=$exec_prefix
7502 fi
7503 value=0
7504 case ${ac_define_dir} in
7505 "${test_prefix}"|"${test_prefix}/"*|\
7506 '${exec_prefix}'|'${exec_prefix}/'*)
7507 value=1
7508 ;;
7509 esac
7510
7511cat >>confdefs.h <<_ACEOF
7512#define JIT_READER_DIR_RELOCATABLE $value
7513_ACEOF
7514
7515
7516
7517
7518
81ecdfbb
RW
7519# Check whether --with-expat was given.
7520if test "${with_expat+set}" = set; then :
7521 withval=$with_expat;
5c39566f
DJ
7522else
7523 with_expat=auto
81ecdfbb
RW
7524fi
7525
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7527$as_echo_n "checking whether to use expat... " >&6; }
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7529$as_echo "$with_expat" >&6; }
5c39566f
DJ
7530
7531if test "${with_expat}" = no; then
81ecdfbb
RW
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7533$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7534 HAVE_LIBEXPAT=no
7535else
7536
3841debe
DJ
7537 if test "X$prefix" = "XNONE"; then
7538 acl_final_prefix="$ac_default_prefix"
7539 else
7540 acl_final_prefix="$prefix"
7541 fi
7542 if test "X$exec_prefix" = "XNONE"; then
7543 acl_final_exec_prefix='${prefix}'
7544 else
7545 acl_final_exec_prefix="$exec_prefix"
7546 fi
7547 acl_save_prefix="$prefix"
7548 prefix="$acl_final_prefix"
7549 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7550 prefix="$acl_save_prefix"
7551
7552
81ecdfbb
RW
7553# Check whether --with-gnu-ld was given.
7554if test "${with_gnu_ld+set}" = set; then :
7555 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7556else
7557 with_gnu_ld=no
81ecdfbb
RW
7558fi
7559
3841debe
DJ
7560# Prepare PATH_SEPARATOR.
7561# The user is always right.
7562if test "${PATH_SEPARATOR+set}" != set; then
7563 echo "#! /bin/sh" >conf$$.sh
7564 echo "exit 0" >>conf$$.sh
7565 chmod +x conf$$.sh
7566 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7567 PATH_SEPARATOR=';'
7568 else
7569 PATH_SEPARATOR=:
7570 fi
7571 rm -f conf$$.sh
7572fi
7573ac_prog=ld
7574if test "$GCC" = yes; then
7575 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7577$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7578 case $host in
7579 *-*-mingw*)
7580 # gcc leaves a trailing carriage return which upsets mingw
7581 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7582 *)
7583 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7584 esac
7585 case $ac_prog in
7586 # Accept absolute paths.
7587 [\\/]* | [A-Za-z]:[\\/]*)
7588 re_direlt='/[^/][^/]*/\.\./'
7589 # Canonicalize the path of ld
7590 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7591 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7592 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7593 done
7594 test -z "$LD" && LD="$ac_prog"
7595 ;;
7596 "")
7597 # If it fails, then pretend we aren't using GCC.
7598 ac_prog=ld
7599 ;;
7600 *)
7601 # If it is relative, then search for the first ld in PATH.
7602 with_gnu_ld=unknown
7603 ;;
7604 esac
7605elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7607$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7608else
81ecdfbb
RW
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7610$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7611fi
81ecdfbb
RW
7612if test "${acl_cv_path_LD+set}" = set; then :
7613 $as_echo_n "(cached) " >&6
3841debe
DJ
7614else
7615 if test -z "$LD"; then
7616 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7617 for ac_dir in $PATH; do
7618 test -z "$ac_dir" && ac_dir=.
7619 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7620 acl_cv_path_LD="$ac_dir/$ac_prog"
7621 # Check to see if the program is GNU ld. I'd rather use --version,
7622 # but apparently some GNU ld's only accept -v.
7623 # Break only if it was the GNU/non-GNU ld that we prefer.
7624 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7625 test "$with_gnu_ld" != no && break
7626 else
7627 test "$with_gnu_ld" != yes && break
7628 fi
7629 fi
7630 done
7631 IFS="$ac_save_ifs"
7632else
7633 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7634fi
7635fi
7636
7637LD="$acl_cv_path_LD"
7638if test -n "$LD"; then
81ecdfbb
RW
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7640$as_echo "$LD" >&6; }
3841debe 7641else
81ecdfbb
RW
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
3841debe 7644fi
81ecdfbb
RW
7645test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7647$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7648if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7649 $as_echo_n "(cached) " >&6
3841debe
DJ
7650else
7651 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7652if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7653 acl_cv_prog_gnu_ld=yes
7654else
7655 acl_cv_prog_gnu_ld=no
7656fi
7657fi
81ecdfbb
RW
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7659$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7660with_gnu_ld=$acl_cv_prog_gnu_ld
7661
7662
7663
81ecdfbb
RW
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7665$as_echo_n "checking for shared library run path origin... " >&6; }
7666if test "${acl_cv_rpath+set}" = set; then :
7667 $as_echo_n "(cached) " >&6
3841debe
DJ
7668else
7669
7670 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7671 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7672 . ./conftest.sh
7673 rm -f ./conftest.sh
7674 acl_cv_rpath=done
7675
7676fi
81ecdfbb
RW
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7678$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7679 wl="$acl_cv_wl"
7680 libext="$acl_cv_libext"
7681 shlibext="$acl_cv_shlibext"
7682 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7683 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7684 hardcode_direct="$acl_cv_hardcode_direct"
7685 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7686 # Check whether --enable-rpath was given.
7687if test "${enable_rpath+set}" = set; then :
7688 enableval=$enable_rpath; :
3841debe
DJ
7689else
7690 enable_rpath=yes
81ecdfbb
RW
7691fi
7692
3841debe
DJ
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702 use_additional=yes
7703
7704 acl_save_prefix="$prefix"
7705 prefix="$acl_final_prefix"
7706 acl_save_exec_prefix="$exec_prefix"
7707 exec_prefix="$acl_final_exec_prefix"
7708
7709 eval additional_includedir=\"$includedir\"
7710 eval additional_libdir=\"$libdir\"
7711
7712 exec_prefix="$acl_save_exec_prefix"
7713 prefix="$acl_save_prefix"
7714
7715
81ecdfbb
RW
7716# Check whether --with-libexpat-prefix was given.
7717if test "${with_libexpat_prefix+set}" = set; then :
7718 withval=$with_libexpat_prefix;
3841debe
DJ
7719 if test "X$withval" = "Xno"; then
7720 use_additional=no
7721 else
7722 if test "X$withval" = "X"; then
7723
7724 acl_save_prefix="$prefix"
7725 prefix="$acl_final_prefix"
7726 acl_save_exec_prefix="$exec_prefix"
7727 exec_prefix="$acl_final_exec_prefix"
7728
7729 eval additional_includedir=\"$includedir\"
7730 eval additional_libdir=\"$libdir\"
7731
7732 exec_prefix="$acl_save_exec_prefix"
7733 prefix="$acl_save_prefix"
7734
7735 else
7736 additional_includedir="$withval/include"
7737 additional_libdir="$withval/lib"
7738 fi
7739 fi
7740
81ecdfbb
RW
7741fi
7742
3841debe
DJ
7743 LIBEXPAT=
7744 LTLIBEXPAT=
7745 INCEXPAT=
7746 rpathdirs=
7747 ltrpathdirs=
7748 names_already_handled=
7749 names_next_round='expat '
7750 while test -n "$names_next_round"; do
7751 names_this_round="$names_next_round"
7752 names_next_round=
7753 for name in $names_this_round; do
7754 already_handled=
7755 for n in $names_already_handled; do
7756 if test "$n" = "$name"; then
7757 already_handled=yes
7758 break
7759 fi
7760 done
7761 if test -z "$already_handled"; then
7762 names_already_handled="$names_already_handled $name"
7763 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7764 eval value=\"\$HAVE_LIB$uppername\"
7765 if test -n "$value"; then
7766 if test "$value" = yes; then
7767 eval value=\"\$LIB$uppername\"
7768 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7769 eval value=\"\$LTLIB$uppername\"
7770 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7771 else
7772 :
7773 fi
7774 else
7775 found_dir=
7776 found_la=
7777 found_so=
7778 found_a=
7779 if test $use_additional = yes; then
7780 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7781 found_dir="$additional_libdir"
7782 found_so="$additional_libdir/lib$name.$shlibext"
7783 if test -f "$additional_libdir/lib$name.la"; then
7784 found_la="$additional_libdir/lib$name.la"
7785 fi
7786 else
7787 if test -f "$additional_libdir/lib$name.$libext"; then
7788 found_dir="$additional_libdir"
7789 found_a="$additional_libdir/lib$name.$libext"
7790 if test -f "$additional_libdir/lib$name.la"; then
7791 found_la="$additional_libdir/lib$name.la"
7792 fi
7793 fi
7794 fi
7795 fi
7796 if test "X$found_dir" = "X"; then
7797 for x in $LDFLAGS $LTLIBEXPAT; do
7798
7799 acl_save_prefix="$prefix"
7800 prefix="$acl_final_prefix"
7801 acl_save_exec_prefix="$exec_prefix"
7802 exec_prefix="$acl_final_exec_prefix"
7803 eval x=\"$x\"
7804 exec_prefix="$acl_save_exec_prefix"
7805 prefix="$acl_save_prefix"
7806
7807 case "$x" in
7808 -L*)
7809 dir=`echo "X$x" | sed -e 's/^X-L//'`
7810 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7811 found_dir="$dir"
7812 found_so="$dir/lib$name.$shlibext"
7813 if test -f "$dir/lib$name.la"; then
7814 found_la="$dir/lib$name.la"
7815 fi
7816 else
7817 if test -f "$dir/lib$name.$libext"; then
7818 found_dir="$dir"
7819 found_a="$dir/lib$name.$libext"
7820 if test -f "$dir/lib$name.la"; then
7821 found_la="$dir/lib$name.la"
7822 fi
7823 fi
7824 fi
7825 ;;
7826 esac
7827 if test "X$found_dir" != "X"; then
7828 break
7829 fi
7830 done
7831 fi
7832 if test "X$found_dir" != "X"; then
7833 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7834 if test "X$found_so" != "X"; then
7835 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7836 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7837 else
7838 haveit=
7839 for x in $ltrpathdirs; do
7840 if test "X$x" = "X$found_dir"; then
7841 haveit=yes
7842 break
7843 fi
7844 done
7845 if test -z "$haveit"; then
7846 ltrpathdirs="$ltrpathdirs $found_dir"
7847 fi
7848 if test "$hardcode_direct" = yes; then
7849 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7850 else
7851 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7852 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7853 haveit=
7854 for x in $rpathdirs; do
7855 if test "X$x" = "X$found_dir"; then
7856 haveit=yes
7857 break
7858 fi
7859 done
7860 if test -z "$haveit"; then
7861 rpathdirs="$rpathdirs $found_dir"
7862 fi
7863 else
7864 haveit=
7865 for x in $LDFLAGS $LIBEXPAT; do
7866
7867 acl_save_prefix="$prefix"
7868 prefix="$acl_final_prefix"
7869 acl_save_exec_prefix="$exec_prefix"
7870 exec_prefix="$acl_final_exec_prefix"
7871 eval x=\"$x\"
7872 exec_prefix="$acl_save_exec_prefix"
7873 prefix="$acl_save_prefix"
7874
7875 if test "X$x" = "X-L$found_dir"; then
7876 haveit=yes
7877 break
7878 fi
7879 done
7880 if test -z "$haveit"; then
7881 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7882 fi
7883 if test "$hardcode_minus_L" != no; then
7884 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7885 else
7886 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7887 fi
7888 fi
7889 fi
7890 fi
7891 else
7892 if test "X$found_a" != "X"; then
7893 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7894 else
7895 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7896 fi
7897 fi
7898 additional_includedir=
7899 case "$found_dir" in
7900 */lib | */lib/)
7901 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7902 additional_includedir="$basedir/include"
7903 ;;
7904 esac
7905 if test "X$additional_includedir" != "X"; then
7906 if test "X$additional_includedir" != "X/usr/include"; then
7907 haveit=
7908 if test "X$additional_includedir" = "X/usr/local/include"; then
7909 if test -n "$GCC"; then
7910 case $host_os in
7911 linux*) haveit=yes;;
7912 esac
7913 fi
7914 fi
7915 if test -z "$haveit"; then
7916 for x in $CPPFLAGS $INCEXPAT; do
7917
7918 acl_save_prefix="$prefix"
7919 prefix="$acl_final_prefix"
7920 acl_save_exec_prefix="$exec_prefix"
7921 exec_prefix="$acl_final_exec_prefix"
7922 eval x=\"$x\"
7923 exec_prefix="$acl_save_exec_prefix"
7924 prefix="$acl_save_prefix"
7925
7926 if test "X$x" = "X-I$additional_includedir"; then
7927 haveit=yes
7928 break
7929 fi
7930 done
7931 if test -z "$haveit"; then
7932 if test -d "$additional_includedir"; then
7933 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7934 fi
7935 fi
7936 fi
7937 fi
7938 fi
7939 if test -n "$found_la"; then
7940 save_libdir="$libdir"
7941 case "$found_la" in
7942 */* | *\\*) . "$found_la" ;;
7943 *) . "./$found_la" ;;
7944 esac
7945 libdir="$save_libdir"
7946 for dep in $dependency_libs; do
7947 case "$dep" in
7948 -L*)
7949 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7950 if test "X$additional_libdir" != "X/usr/lib"; then
7951 haveit=
7952 if test "X$additional_libdir" = "X/usr/local/lib"; then
7953 if test -n "$GCC"; then
7954 case $host_os in
7955 linux*) haveit=yes;;
7956 esac
7957 fi
7958 fi
7959 if test -z "$haveit"; then
7960 haveit=
7961 for x in $LDFLAGS $LIBEXPAT; do
7962
7963 acl_save_prefix="$prefix"
7964 prefix="$acl_final_prefix"
7965 acl_save_exec_prefix="$exec_prefix"
7966 exec_prefix="$acl_final_exec_prefix"
7967 eval x=\"$x\"
7968 exec_prefix="$acl_save_exec_prefix"
7969 prefix="$acl_save_prefix"
7970
7971 if test "X$x" = "X-L$additional_libdir"; then
7972 haveit=yes
7973 break
7974 fi
7975 done
7976 if test -z "$haveit"; then
7977 if test -d "$additional_libdir"; then
7978 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7979 fi
7980 fi
7981 haveit=
7982 for x in $LDFLAGS $LTLIBEXPAT; do
7983
7984 acl_save_prefix="$prefix"
7985 prefix="$acl_final_prefix"
7986 acl_save_exec_prefix="$exec_prefix"
7987 exec_prefix="$acl_final_exec_prefix"
7988 eval x=\"$x\"
7989 exec_prefix="$acl_save_exec_prefix"
7990 prefix="$acl_save_prefix"
7991
7992 if test "X$x" = "X-L$additional_libdir"; then
7993 haveit=yes
7994 break
7995 fi
7996 done
7997 if test -z "$haveit"; then
7998 if test -d "$additional_libdir"; then
7999 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8000 fi
8001 fi
8002 fi
8003 fi
8004 ;;
8005 -R*)
8006 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8007 if test "$enable_rpath" != no; then
8008 haveit=
8009 for x in $rpathdirs; do
8010 if test "X$x" = "X$dir"; then
8011 haveit=yes
8012 break
8013 fi
8014 done
8015 if test -z "$haveit"; then
8016 rpathdirs="$rpathdirs $dir"
8017 fi
8018 haveit=
8019 for x in $ltrpathdirs; do
8020 if test "X$x" = "X$dir"; then
8021 haveit=yes
8022 break
8023 fi
8024 done
8025 if test -z "$haveit"; then
8026 ltrpathdirs="$ltrpathdirs $dir"
8027 fi
8028 fi
8029 ;;
8030 -l*)
8031 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8032 ;;
8033 *.la)
8034 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8035 ;;
8036 *)
8037 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8038 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8039 ;;
81ecdfbb
RW
8040 esac
8041 done
8042 fi
8043 else
8044 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8045 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8046 fi
8047 fi
8048 fi
8049 done
8050 done
8051 if test "X$rpathdirs" != "X"; then
8052 if test -n "$hardcode_libdir_separator"; then
8053 alldirs=
8054 for found_dir in $rpathdirs; do
8055 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8056 done
8057 acl_save_libdir="$libdir"
8058 libdir="$alldirs"
8059 eval flag=\"$hardcode_libdir_flag_spec\"
8060 libdir="$acl_save_libdir"
8061 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8062 else
8063 for found_dir in $rpathdirs; do
8064 acl_save_libdir="$libdir"
8065 libdir="$found_dir"
8066 eval flag=\"$hardcode_libdir_flag_spec\"
8067 libdir="$acl_save_libdir"
8068 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8069 done
8070 fi
8071 fi
8072 if test "X$ltrpathdirs" != "X"; then
8073 for found_dir in $ltrpathdirs; do
8074 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8075 done
8076 fi
a9322a30
TT
8077
8078
81ecdfbb 8079 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8080
81ecdfbb
RW
8081 for element in $INCEXPAT; do
8082 haveit=
8083 for x in $CPPFLAGS; do
a9322a30 8084
81ecdfbb
RW
8085 acl_save_prefix="$prefix"
8086 prefix="$acl_final_prefix"
8087 acl_save_exec_prefix="$exec_prefix"
8088 exec_prefix="$acl_final_exec_prefix"
8089 eval x=\"$x\"
8090 exec_prefix="$acl_save_exec_prefix"
8091 prefix="$acl_save_prefix"
a8111142 8092
81ecdfbb
RW
8093 if test "X$x" = "X$element"; then
8094 haveit=yes
8095 break
8096 fi
8097 done
8098 if test -z "$haveit"; then
8099 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8100 fi
8101 done
a9322a30
TT
8102
8103
81ecdfbb
RW
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8105$as_echo_n "checking for libexpat... " >&6; }
8106if test "${ac_cv_libexpat+set}" = set; then :
8107 $as_echo_n "(cached) " >&6
bec39cab 8108else
bec39cab 8109
81ecdfbb
RW
8110 ac_save_LIBS="$LIBS"
8111 LIBS="$LIBS $LIBEXPAT"
8112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8113/* end confdefs.h. */
81ecdfbb
RW
8114#include "expat.h"
8115int
8116main ()
8117{
8118XML_Parser p = XML_ParserCreate (0);
8119 ;
8120 return 0;
8121}
bec39cab 8122_ACEOF
81ecdfbb
RW
8123if ac_fn_c_try_link "$LINENO"; then :
8124 ac_cv_libexpat=yes
c906108c 8125else
81ecdfbb 8126 ac_cv_libexpat=no
bec39cab 8127fi
81ecdfbb
RW
8128rm -f core conftest.err conftest.$ac_objext \
8129 conftest$ac_exeext conftest.$ac_ext
8130 LIBS="$ac_save_LIBS"
c906108c 8131
95ca63c4 8132fi
81ecdfbb
RW
8133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8134$as_echo "$ac_cv_libexpat" >&6; }
8135 if test "$ac_cv_libexpat" = yes; then
8136 HAVE_LIBEXPAT=yes
bec39cab 8137
81ecdfbb 8138$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8139
81ecdfbb
RW
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8141$as_echo_n "checking how to link with libexpat... " >&6; }
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8143$as_echo "$LIBEXPAT" >&6; }
8144 else
8145 HAVE_LIBEXPAT=no
8146 CPPFLAGS="$ac_save_CPPFLAGS"
8147 LIBEXPAT=
8148 LTLIBEXPAT=
8149 fi
95ca63c4
CF
8150
8151
8152
7cb9022a
MK
8153
8154
bec39cab 8155
81ecdfbb
RW
8156 if test "$HAVE_LIBEXPAT" != yes; then
8157 if test "$with_expat" = yes; then
8158 as_fn_error "expat is missing or unusable" "$LINENO" 5
8159 else
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8161$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8162 fi
8163 else
8164 save_LIBS=$LIBS
8165 LIBS="$LIBS $LIBEXPAT"
8166 for ac_func in XML_StopParser
8167do :
8168 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8169if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8170 cat >>confdefs.h <<_ACEOF
81ecdfbb 8171#define HAVE_XML_STOPPARSER 1
bec39cab 8172_ACEOF
95ca63c4 8173
bec39cab 8174fi
bec39cab 8175done
95ca63c4 8176
81ecdfbb
RW
8177 LIBS=$save_LIBS
8178 fi
a9322a30
TT
8179fi
8180
d344e670
DE
8181# --------------------- #
8182# Check for libpython. #
8183# --------------------- #
8184
a9322a30 8185
a9322a30
TT
8186
8187
ec685c5e 8188
0c4a4063 8189
81ecdfbb
RW
8190# Check whether --with-python was given.
8191if test "${with_python+set}" = set; then :
8192 withval=$with_python;
bec39cab 8193else
81ecdfbb 8194 with_python=auto
bec39cab 8195fi
bec39cab 8196
81ecdfbb
RW
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8198$as_echo_n "checking whether to use python... " >&6; }
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8200$as_echo "$with_python" >&6; }
9a156167 8201
81ecdfbb
RW
8202if test "${with_python}" = no; then
8203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8204$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8205 have_libpython=no
bec39cab 8206else
81ecdfbb 8207 case "${with_python}" in
8c85a4e2 8208 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8209 if test -d ${with_python}; then
8210 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8211 python_prog="${with_python}/bin/python"
0c4a4063 8212 python_prefix=
9c4ea6c5
JB
8213 # If python does not exit ${with_python}/bin, then try in
8214 # ${with_python}. On Windows/MinGW, this is where the Python
8215 # executable is.
8216 if test ! -x "${python_prog}"; then
8217 python_prog="${with_python}/python"
8218 python_prefix=
8219 fi
e7a30f46 8220 if test ! -x "${python_prog}"; then
ec685c5e
DE
8221 # Fall back to gdb 7.0/7.1 behaviour.
8222 python_prog=missing
0c4a4063 8223 python_prefix=${with_python}
ec685c5e 8224 fi
e7a30f46 8225 elif test -x "${with_python}"; then
ec685c5e
DE
8226 # While we can't run python compiled for $host (unless host == build),
8227 # the user could write a script that provides the needed information,
8228 # so we support that.
ec685c5e 8229 python_prog=${with_python}
0c4a4063 8230 python_prefix=
ec685c5e
DE
8231 else
8232 as_fn_error "invalid value for --with-python" "$LINENO" 5
8233 fi
81ecdfbb 8234 ;;
ec685c5e
DE
8235 */*)
8236 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8237 as_fn_error "invalid value for --with-python" "$LINENO" 5
8238 ;;
ec685c5e
DE
8239 *)
8240 # The user has either specified auto, yes, or the name of the python
8241 # program assumed to be in $PATH.
8242 python_prefix=
8243 case "${with_python}" in
8244 yes | auto)
8245 if test ${build} = ${host}; then
8246 # Extract the first word of "python", so it can be a program name with args.
8247set dummy python; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if test "${ac_cv_path_python_prog_path+set}" = set; then :
8251 $as_echo_n "(cached) " >&6
8252else
8253 case $python_prog_path in
8254 [\\/]* | ?:[\\/]*)
8255 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8256 ;;
8257 *)
8258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261 IFS=$as_save_IFS
8262 test -z "$as_dir" && as_dir=.
8263 for ac_exec_ext in '' $ac_executable_extensions; do
8264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8265 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267 break 2
8268 fi
8269done
8270 done
8271IFS=$as_save_IFS
8272
8273 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8274 ;;
8275esac
8276fi
8277python_prog_path=$ac_cv_path_python_prog_path
8278if test -n "$python_prog_path"; then
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8280$as_echo "$python_prog_path" >&6; }
8281else
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283$as_echo "no" >&6; }
8284fi
8285
8286
8287 if test "${python_prog_path}" = missing; then
8288 python_prog=missing
8289 else
8290 python_prog=${python_prog_path}
8291 fi
8292 else
8293 # Not much we can do except assume the cross-compiler will find the
8294 # right files.
8295 python_prog=missing
8296 fi
8297 ;;
8298 *)
8299 # While we can't run python compiled for $host (unless host == build),
8300 # the user could write a script that provides the needed information,
8301 # so we support that.
8302 python_prog="${with_python}"
8303 # Extract the first word of "${python_prog}", so it can be a program name with args.
8304set dummy ${python_prog}; ac_word=$2
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8306$as_echo_n "checking for $ac_word... " >&6; }
8307if test "${ac_cv_path_python_prog_path+set}" = set; then :
8308 $as_echo_n "(cached) " >&6
8309else
8310 case $python_prog_path in
8311 [\\/]* | ?:[\\/]*)
8312 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8313 ;;
8314 *)
8315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8316for as_dir in $PATH
8317do
8318 IFS=$as_save_IFS
8319 test -z "$as_dir" && as_dir=.
8320 for ac_exec_ext in '' $ac_executable_extensions; do
8321 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8322 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8324 break 2
8325 fi
8326done
8327 done
8328IFS=$as_save_IFS
8329
8330 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8331 ;;
8332esac
8333fi
8334python_prog_path=$ac_cv_path_python_prog_path
8335if test -n "$python_prog_path"; then
8336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8337$as_echo "$python_prog_path" >&6; }
8338else
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8340$as_echo "no" >&6; }
8341fi
8342
8343
8344 if test "${python_prog_path}" = missing; then
8345 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8346 fi
8347 ;;
8348 esac
81ecdfbb
RW
8349 esac
8350
ec685c5e 8351 if test "${python_prog}" != missing; then
e7a30f46
DE
8352 # We have a python program to use, but it may be too old.
8353 # Don't flag an error for --with-python=auto (the default).
8354 have_python_config=yes
ec685c5e
DE
8355 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8356 if test $? != 0; then
e7a30f46
DE
8357 have_python_config=failed
8358 if test "${with_python}" != auto; then
8359 as_fn_error "failure running python-config --includes" "$LINENO" 5
8360 fi
ec685c5e
DE
8361 fi
8362 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8363 if test $? != 0; then
e7a30f46
DE
8364 have_python_config=failed
8365 if test "${with_python}" != auto; then
8366 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8367 fi
ec685c5e 8368 fi
0c4a4063
DE
8369 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8370 if test $? != 0; then
e7a30f46
DE
8371 have_python_config=failed
8372 if test "${with_python}" != auto; then
8373 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8374 fi
0c4a4063 8375 fi
ec685c5e 8376 else
ac534cba
JB
8377 # We do not have a python executable we can use to determine where
8378 # to find the Python headers and libs. We cannot guess the include
8379 # path from the python_prefix either, because that include path
8380 # depends on the Python version. So, there is nothing much we can
8381 # do except assume that the compiler will be able to find those files.
8382 python_includes=
8383 python_libs=
0c4a4063 8384 have_python_config=no
ec685c5e 8385 fi
bec39cab 8386
ec685c5e
DE
8387 # If we have python-config, only try the configuration it provides.
8388 # Otherwise fallback on the old way of trying different versions of
8389 # python in turn.
81ecdfbb 8390
ec685c5e
DE
8391 have_libpython=no
8392 if test "${have_python_config}" = yes; then
c1039e3c
JB
8393 # Determine the Python version by extracting "-lpython<version>"
8394 # part of the python_libs. <version> is usually X.Y with X and Y
8395 # being decimal numbers, but can also be XY (seen on Windows).
8396 #
8397 # The extraction is performed using sed with a regular expression.
8398 # Initially, the regexp used was using the '?' quantifier to make
8399 # the dot in the version number optional. Unfortunately, this
8400 # does not work with non-GNU versions of sed because, because of
8401 # what looks like a limitation (the '?' quantifier does not work
8402 # with back-references). We work around this limitation by using
8403 # the '*' quantifier instead. It means that, in theory, we might
8404 # match unexpected version strings such as "-lpython2..7", but
8405 # this seems unlikely in practice. And even if that happens,
8406 # an error will be triggered later on, when checking that version
8407 # number.
ec685c5e 8408 python_version=`echo " ${python_libs} " \
c1039e3c 8409 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8410 case "${python_version}" in
8411 python*)
ec685c5e
DE
8412
8413 version=${python_version}
8414
8415 new_CPPFLAGS=${python_includes}
8416 new_LIBS=${python_libs}
81ecdfbb
RW
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8418$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8419 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8420 save_LIBS=$LIBS
ec685c5e
DE
8421 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8422 LIBS="$LIBS $new_LIBS"
8423 found_usable_python=no
81ecdfbb 8424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8425/* end confdefs.h. */
ac534cba 8426#include "Python.h"
81ecdfbb
RW
8427int
8428main ()
8429{
8430Py_Initialize ();
8431 ;
8432 return 0;
8433}
bec39cab 8434_ACEOF
81ecdfbb 8435if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8436 have_libpython=${version}
8437 found_usable_python=yes
ac534cba
JB
8438 PYTHON_CPPFLAGS=$new_CPPFLAGS
8439 PYTHON_LIBS=$new_LIBS
9a156167 8440fi
81ecdfbb
RW
8441rm -f core conftest.err conftest.$ac_objext \
8442 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8443 CPPFLAGS=$save_CPPFLAGS
8444 LIBS=$save_LIBS
ec685c5e
DE
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8446$as_echo "${found_usable_python}" >&6; }
9a156167 8447
0c4a4063
DE
8448 ;;
8449 *)
ec685c5e 8450 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8451 ;;
8452 esac
e7a30f46 8453 elif test "${have_python_config}" != failed; then
ec685c5e 8454 if test "${have_libpython}" = no; then
9a156167 8455
420697bb
TT
8456 version=python2.7
8457
8458 new_CPPFLAGS=${python_includes}
8459 new_LIBS="${python_libs} -lpython2.7"
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8461$as_echo_n "checking for ${version}... " >&6; }
8462 save_CPPFLAGS=$CPPFLAGS
8463 save_LIBS=$LIBS
8464 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8465 LIBS="$LIBS $new_LIBS"
8466 found_usable_python=no
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468/* end confdefs.h. */
ac534cba 8469#include "Python.h"
420697bb
TT
8470int
8471main ()
8472{
8473Py_Initialize ();
8474 ;
8475 return 0;
8476}
8477_ACEOF
8478if ac_fn_c_try_link "$LINENO"; then :
8479 have_libpython=${version}
8480 found_usable_python=yes
ac534cba
JB
8481 PYTHON_CPPFLAGS=$new_CPPFLAGS
8482 PYTHON_LIBS=$new_LIBS
420697bb
TT
8483fi
8484rm -f core conftest.err conftest.$ac_objext \
8485 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8486 CPPFLAGS=$save_CPPFLAGS
8487 LIBS=$save_LIBS
420697bb
TT
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8489$as_echo "${found_usable_python}" >&6; }
8490
8491 fi
8492 if test "${have_libpython}" = no; then
8493
ec685c5e
DE
8494 version=python2.6
8495
8496 new_CPPFLAGS=${python_includes}
8497 new_LIBS="${python_libs} -lpython2.6"
8498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8499$as_echo_n "checking for ${version}... " >&6; }
8500 save_CPPFLAGS=$CPPFLAGS
8501 save_LIBS=$LIBS
8502 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8503 LIBS="$LIBS $new_LIBS"
8504 found_usable_python=no
8505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8506/* end confdefs.h. */
ac534cba 8507#include "Python.h"
ec685c5e
DE
8508int
8509main ()
8510{
8511Py_Initialize ();
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516if ac_fn_c_try_link "$LINENO"; then :
8517 have_libpython=${version}
8518 found_usable_python=yes
ac534cba
JB
8519 PYTHON_CPPFLAGS=$new_CPPFLAGS
8520 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8521fi
8522rm -f core conftest.err conftest.$ac_objext \
8523 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8524 CPPFLAGS=$save_CPPFLAGS
8525 LIBS=$save_LIBS
ec685c5e
DE
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8527$as_echo "${found_usable_python}" >&6; }
9a156167 8528
81ecdfbb 8529 fi
ec685c5e 8530 if test ${have_libpython} = no; then
9a156167 8531
81ecdfbb 8532 version=python2.5
9a156167 8533
ec685c5e
DE
8534 new_CPPFLAGS=${python_includes}
8535 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8537$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8538 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8539 save_LIBS=$LIBS
ec685c5e
DE
8540 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8541 LIBS="$LIBS $new_LIBS"
8542 found_usable_python=no
81ecdfbb 8543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8544/* end confdefs.h. */
ac534cba 8545#include "Python.h"
81ecdfbb
RW
8546int
8547main ()
8548{
8549Py_Initialize ();
8550 ;
8551 return 0;
8552}
436868fb 8553_ACEOF
81ecdfbb 8554if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8555 have_libpython=${version}
8556 found_usable_python=yes
ac534cba
JB
8557 PYTHON_CPPFLAGS=$new_CPPFLAGS
8558 PYTHON_LIBS=$new_LIBS
436868fb 8559fi
81ecdfbb
RW
8560rm -f core conftest.err conftest.$ac_objext \
8561 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8562 CPPFLAGS=$save_CPPFLAGS
8563 LIBS=$save_LIBS
ec685c5e
DE
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8565$as_echo "${found_usable_python}" >&6; }
a9322a30 8566
81ecdfbb 8567 fi
ec685c5e 8568 if test ${have_libpython} = no; then
a9322a30 8569
81ecdfbb 8570 version=python2.4
a9322a30 8571
ec685c5e
DE
8572 new_CPPFLAGS=${python_includes}
8573 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8575$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8576 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8577 save_LIBS=$LIBS
ec685c5e
DE
8578 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8579 LIBS="$LIBS $new_LIBS"
8580 found_usable_python=no
81ecdfbb 8581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8582/* end confdefs.h. */
ac534cba 8583#include "Python.h"
a9322a30
TT
8584int
8585main ()
8586{
81ecdfbb 8587Py_Initialize ();
a9322a30
TT
8588 ;
8589 return 0;
8590}
436868fb 8591_ACEOF
81ecdfbb 8592if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8593 have_libpython=${version}
8594 found_usable_python=yes
ac534cba
JB
8595 PYTHON_CPPFLAGS=$new_CPPFLAGS
8596 PYTHON_LIBS=$new_LIBS
436868fb 8597fi
81ecdfbb
RW
8598rm -f core conftest.err conftest.$ac_objext \
8599 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8600 CPPFLAGS=$save_CPPFLAGS
8601 LIBS=$save_LIBS
ec685c5e
DE
8602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8603$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8604
ec685c5e
DE
8605 fi
8606 fi
9c4ea6c5 8607 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8608
8609$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8610
9c4ea6c5 8611 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8612
8613$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8614
9c4ea6c5 8615 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8616
8617$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8618
9c4ea6c5 8619 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8620
8621$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8622
81ecdfbb 8623 fi
ec685c5e
DE
8624
8625 if test "${have_libpython}" = no; then
81ecdfbb
RW
8626 case "${with_python}" in
8627 yes)
8628 as_fn_error "python is missing or unusable" "$LINENO" 5
8629 ;;
8630 auto)
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8632$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8633 ;;
8634 *)
8635 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8636 ;;
8637 esac
0c4a4063
DE
8638 else
8639 if test -n "${python_prefix}"; then
8640
8641cat >>confdefs.h <<_ACEOF
8642#define WITH_PYTHON_PATH "${python_prefix}"
8643_ACEOF
8644
8645
8646 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8647 if test "x$prefix" = xNONE; then
8648 test_prefix=/usr/local
8649 else
8650 test_prefix=$prefix
8651 fi
8652 else
8653 test_prefix=$exec_prefix
8654 fi
8655 value=0
8656 case ${python_prefix} in
8657 "${test_prefix}"|"${test_prefix}/"*|\
8658 '${exec_prefix}'|'${exec_prefix}/'*)
8659 value=1
8660 ;;
8661 esac
8662
8663cat >>confdefs.h <<_ACEOF
8664#define PYTHON_PATH_RELOCATABLE $value
8665_ACEOF
8666
8667
8668 fi
81ecdfbb 8669 fi
436868fb 8670fi
436868fb 8671
ec685c5e 8672if test "${have_libpython}" != no; then
436868fb 8673
81ecdfbb 8674$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8675
81ecdfbb
RW
8676 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8677 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8678 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8679 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8680 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8681
81ecdfbb
RW
8682 # Flags needed to compile Python code (taken from python-config --cflags).
8683 # We cannot call python-config directly because it will output whatever was
8684 # used when compiling the Python interpreter itself, including flags which
8685 # would make the python-related objects be compiled differently from the
8686 # rest of GDB (e.g., -O2 and -fPIC).
8687 if test "${GCC}" = yes; then
8688 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8689 fi
436868fb 8690
81ecdfbb
RW
8691 if test "x${tentative_python_cflags}" != x; then
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8693$as_echo_n "checking compiler flags for python code... " >&6; }
8694 for flag in ${tentative_python_cflags}; do
8695 # Check that the compiler accepts it
8696 saved_CFLAGS="$CFLAGS"
8697 CFLAGS="$CFLAGS $flag"
8698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8699/* end confdefs.h. */
81ecdfbb 8700
a9322a30
TT
8701int
8702main ()
8703{
a9322a30
TT
8704
8705 ;
8706 return 0;
8707}
bec39cab 8708_ACEOF
81ecdfbb
RW
8709if ac_fn_c_try_compile "$LINENO"; then :
8710 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8711fi
81ecdfbb
RW
8712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8713 CFLAGS="$saved_CFLAGS"
8714 done
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8716$as_echo "${PYTHON_CFLAGS}" >&6; }
8717 fi
043b6510
JB
8718
8719 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8720 # #if _SGIAPI
8721 # #define siginfo __siginfo
8722 # #endif
8723 # The problem is that including Python causes some XOPEN macros to be
8724 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8725 # to false. So, we work around this issue by defining siginfo ourself
8726 # though the command-line.
c83393b9
JB
8727 #
8728 # On x64 Windows, Python's include headers, and pyconfig.h in
8729 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8730 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8731 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8732 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8733 # The issue was reported to the Python community, but still isn't
8734 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8735
043b6510
JB
8736 case "$gdb_host" in
8737 irix*) if test "${GCC}" = yes; then
8738 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8739 fi
8740 ;;
c83393b9
JB
8741 mingw64)
8742 if test "${GCC}" = yes; then
8743 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8744 fi
8745 ;;
043b6510 8746 esac
a8db4212
YPK
8747
8748 # Note that "python -m threading" cannot be used to check for
8749 # threading support due to a bug in Python 2.7.3
8750 # (http://bugs.python.org/issue15567).
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8752$as_echo_n "checking whether python supports threads... " >&6; }
8753 saved_CPPFLAGS="${CPPFLAGS}"
8754 CPPFLAGS="${PYTHON_CPPFLAGS}"
8755 # Note that the test is reversed so that python_has_threads=yes on
8756 # unexpected failures.
8757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8758/* end confdefs.h. */
8759
8760#include <Python.h>
8761#ifdef WITH_THREAD
8762# error
8763#endif
8764
8765_ACEOF
8766if ac_fn_c_try_cpp "$LINENO"; then :
8767 python_has_threads=no
8768else
8769 python_has_threads=yes
8770fi
8771rm -f conftest.err conftest.$ac_ext
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8773$as_echo "${python_has_threads}" >&6; }
8774 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 8775else
6dddc817
DE
8776 # Even if Python support is not compiled in, we need to have this file
8777 # included so that the "python" command, et.al., still exists.
8778 CONFIG_OBS="$CONFIG_OBS python.o"
8779 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 8780fi
9a156167 8781
ed3ef339
DE
8782
8783
4df42755
DE
8784 if test "${have_libpython}" != no; then
8785 HAVE_PYTHON_TRUE=
8786 HAVE_PYTHON_FALSE='#'
8787else
8788 HAVE_PYTHON_TRUE='#'
8789 HAVE_PYTHON_FALSE=
8790fi
8791
ed3ef339
DE
8792
8793# -------------------- #
8794# Check for libguile. #
8795# -------------------- #
8796
8797
e1402065
DE
8798
8799
8800
8801
8802# Check whether --with-guile was given.
8803if test "${with_guile+set}" = set; then :
8804 withval=$with_guile;
8805else
8806 with_guile=auto
8807fi
8808
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8810$as_echo_n "checking whether to use guile... " >&6; }
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8812$as_echo "$with_guile" >&6; }
8813
ed3ef339
DE
8814# Extract the first word of "pkg-config", so it can be a program name with args.
8815set dummy pkg-config; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8819 $as_echo_n "(cached) " >&6
8820else
8821 case $pkg_config_prog_path in
8822 [\\/]* | ?:[\\/]*)
8823 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8824 ;;
8825 *)
8826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH
8828do
8829 IFS=$as_save_IFS
8830 test -z "$as_dir" && as_dir=.
8831 for ac_exec_ext in '' $ac_executable_extensions; do
8832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8833 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835 break 2
8836 fi
8837done
8838 done
8839IFS=$as_save_IFS
8840
8841 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8842 ;;
8843esac
8844fi
8845pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8846if test -n "$pkg_config_prog_path"; then
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8848$as_echo "$pkg_config_prog_path" >&6; }
8849else
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855
214ab2da 8856try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
8857have_libguile=no
8858case "${with_guile}" in
8859no)
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8861$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8862 ;;
8863auto)
e1402065
DE
8864 if test "${pkg_config_prog_path}" = "missing"; then
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8866$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8867 else
ed3ef339
DE
8868
8869 pkg_config=${pkg_config_prog_path}
8870 guile_version_list=${try_guile_versions}
8871 flag_errors=no
8872
ed3ef339
DE
8873 found_usable_guile=checking
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8875$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8876 for guile_version in ${guile_version_list}; do
8877 ${pkg_config} --exists ${guile_version} 2>/dev/null
8878 if test $? != 0; then
8879 continue
8880 fi
8881 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8882 if test $? != 0; then
8883 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8884 fi
8885 new_LIBS=`${pkg_config} --libs ${guile_version}`
8886 if test $? != 0; then
8887 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8888 fi
8889 found_usable_guile=${guile_version}
8890 break
8891 done
8892 if test "${found_usable_guile}" = "checking"; then
8893 if test "${flag_errors}" = "yes"; then
8894 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8895 else
8896 found_usable_guile=no
8897 fi
8898 fi
8899 if test "${found_usable_guile}" != no; then
8900 save_CPPFLAGS=$CPPFLAGS
8901 save_LIBS=$LIBS
8902 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8903 LIBS="$LIBS $new_LIBS"
8904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8905/* end confdefs.h. */
8906#include "libguile.h"
8907int
8908main ()
8909{
8910scm_init_guile ();
8911 ;
8912 return 0;
8913}
8914_ACEOF
8915if ac_fn_c_try_link "$LINENO"; then :
8916 have_libguile=yes
8917 GUILE_CPPFLAGS=$new_CPPFLAGS
8918 GUILE_LIBS=$new_LIBS
8919else
8920 found_usable_guile=no
8921fi
8922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext conftest.$ac_ext
8924 CPPFLAGS=$save_CPPFLAGS
8925 LIBS=$save_LIBS
8926 if test "${found_usable_guile}" = no; then
8927 if test "${flag_errors}" = yes; then
8928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8930as_fn_error "linking guile version ${guile_version} test program failed
8931See \`config.log' for more details." "$LINENO" 5; }
8932 fi
8933 fi
8934 fi
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8936$as_echo "${found_usable_guile}" >&6; }
8937
e1402065 8938 fi
ed3ef339
DE
8939 ;;
8940yes)
e1402065
DE
8941 if test "${pkg_config_prog_path}" = "missing"; then
8942 as_fn_error "pkg-config not found" "$LINENO" 5
8943 fi
ed3ef339
DE
8944
8945 pkg_config=${pkg_config_prog_path}
8946 guile_version_list=${try_guile_versions}
8947 flag_errors=yes
8948
ed3ef339
DE
8949 found_usable_guile=checking
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8951$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8952 for guile_version in ${guile_version_list}; do
8953 ${pkg_config} --exists ${guile_version} 2>/dev/null
8954 if test $? != 0; then
8955 continue
8956 fi
8957 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8958 if test $? != 0; then
8959 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8960 fi
8961 new_LIBS=`${pkg_config} --libs ${guile_version}`
8962 if test $? != 0; then
8963 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8964 fi
8965 found_usable_guile=${guile_version}
8966 break
8967 done
8968 if test "${found_usable_guile}" = "checking"; then
8969 if test "${flag_errors}" = "yes"; then
8970 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8971 else
8972 found_usable_guile=no
8973 fi
8974 fi
8975 if test "${found_usable_guile}" != no; then
8976 save_CPPFLAGS=$CPPFLAGS
8977 save_LIBS=$LIBS
8978 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8979 LIBS="$LIBS $new_LIBS"
8980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8981/* end confdefs.h. */
8982#include "libguile.h"
8983int
8984main ()
8985{
8986scm_init_guile ();
8987 ;
8988 return 0;
8989}
8990_ACEOF
8991if ac_fn_c_try_link "$LINENO"; then :
8992 have_libguile=yes
8993 GUILE_CPPFLAGS=$new_CPPFLAGS
8994 GUILE_LIBS=$new_LIBS
8995else
8996 found_usable_guile=no
8997fi
8998rm -f core conftest.err conftest.$ac_objext \
8999 conftest$ac_exeext conftest.$ac_ext
9000 CPPFLAGS=$save_CPPFLAGS
9001 LIBS=$save_LIBS
9002 if test "${found_usable_guile}" = no; then
9003 if test "${flag_errors}" = yes; then
9004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9006as_fn_error "linking guile version ${guile_version} test program failed
9007See \`config.log' for more details." "$LINENO" 5; }
9008 fi
9009 fi
9010 fi
9011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9012$as_echo "${found_usable_guile}" >&6; }
9013
9014 ;;
9015[\\/]* | ?:[\\/]*)
e1402065 9016 if test -x "${with_guile}"; then
ed3ef339
DE
9017
9018 pkg_config=${with_guile}
9019 guile_version_list=${try_guile_versions}
9020 flag_errors=yes
9021
ed3ef339
DE
9022 found_usable_guile=checking
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9024$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9025 for guile_version in ${guile_version_list}; do
9026 ${pkg_config} --exists ${guile_version} 2>/dev/null
9027 if test $? != 0; then
9028 continue
9029 fi
9030 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9031 if test $? != 0; then
9032 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9033 fi
9034 new_LIBS=`${pkg_config} --libs ${guile_version}`
9035 if test $? != 0; then
9036 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9037 fi
9038 found_usable_guile=${guile_version}
9039 break
9040 done
9041 if test "${found_usable_guile}" = "checking"; then
9042 if test "${flag_errors}" = "yes"; then
9043 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9044 else
9045 found_usable_guile=no
9046 fi
9047 fi
9048 if test "${found_usable_guile}" != no; then
9049 save_CPPFLAGS=$CPPFLAGS
9050 save_LIBS=$LIBS
9051 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9052 LIBS="$LIBS $new_LIBS"
9053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9054/* end confdefs.h. */
9055#include "libguile.h"
9056int
9057main ()
9058{
9059scm_init_guile ();
9060 ;
9061 return 0;
9062}
9063_ACEOF
9064if ac_fn_c_try_link "$LINENO"; then :
9065 have_libguile=yes
9066 GUILE_CPPFLAGS=$new_CPPFLAGS
9067 GUILE_LIBS=$new_LIBS
9068else
9069 found_usable_guile=no
9070fi
9071rm -f core conftest.err conftest.$ac_objext \
9072 conftest$ac_exeext conftest.$ac_ext
9073 CPPFLAGS=$save_CPPFLAGS
9074 LIBS=$save_LIBS
9075 if test "${found_usable_guile}" = no; then
9076 if test "${flag_errors}" = yes; then
9077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9079as_fn_error "linking guile version ${guile_version} test program failed
9080See \`config.log' for more details." "$LINENO" 5; }
9081 fi
9082 fi
9083 fi
9084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9085$as_echo "${found_usable_guile}" >&6; }
9086
e1402065
DE
9087 else
9088 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9089 fi
ed3ef339
DE
9090 ;;
9091"" | */*)
9092 # Disallow --with=guile="" and --with-guile=foo/bar.
9093 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9094 ;;
9095*)
9096 # A space separate list of guile versions to try, in order.
e1402065
DE
9097 if test "${pkg_config_prog_path}" = "missing"; then
9098 as_fn_error "pkg-config not found" "$LINENO" 5
9099 fi
ed3ef339
DE
9100
9101 pkg_config=${pkg_config_prog_path}
9102 guile_version_list=${with_guile}
9103 flag_errors=yes
9104
ed3ef339
DE
9105 found_usable_guile=checking
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9107$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9108 for guile_version in ${guile_version_list}; do
9109 ${pkg_config} --exists ${guile_version} 2>/dev/null
9110 if test $? != 0; then
9111 continue
9112 fi
9113 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9114 if test $? != 0; then
9115 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9116 fi
9117 new_LIBS=`${pkg_config} --libs ${guile_version}`
9118 if test $? != 0; then
9119 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9120 fi
9121 found_usable_guile=${guile_version}
9122 break
9123 done
9124 if test "${found_usable_guile}" = "checking"; then
9125 if test "${flag_errors}" = "yes"; then
9126 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9127 else
9128 found_usable_guile=no
9129 fi
9130 fi
9131 if test "${found_usable_guile}" != no; then
9132 save_CPPFLAGS=$CPPFLAGS
9133 save_LIBS=$LIBS
9134 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9135 LIBS="$LIBS $new_LIBS"
9136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137/* end confdefs.h. */
9138#include "libguile.h"
9139int
9140main ()
9141{
9142scm_init_guile ();
9143 ;
9144 return 0;
9145}
9146_ACEOF
9147if ac_fn_c_try_link "$LINENO"; then :
9148 have_libguile=yes
9149 GUILE_CPPFLAGS=$new_CPPFLAGS
9150 GUILE_LIBS=$new_LIBS
9151else
9152 found_usable_guile=no
9153fi
9154rm -f core conftest.err conftest.$ac_objext \
9155 conftest$ac_exeext conftest.$ac_ext
9156 CPPFLAGS=$save_CPPFLAGS
9157 LIBS=$save_LIBS
9158 if test "${found_usable_guile}" = no; then
9159 if test "${flag_errors}" = yes; then
9160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9162as_fn_error "linking guile version ${guile_version} test program failed
9163See \`config.log' for more details." "$LINENO" 5; }
9164 fi
9165 fi
9166 fi
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9168$as_echo "${found_usable_guile}" >&6; }
9169
9170 ;;
9171esac
9172
e76c5d17 9173if test "${have_libguile}" != no; then
d342a0da
DE
9174 case "${with_guile}" in
9175 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9176
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9178$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9179if test "${ac_cv_guild_program_name+set}" = set; then :
9180 $as_echo_n "(cached) " >&6
9181else
d342a0da 9182 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9183
9184 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9185 # the 'guild' and 'bindir' variables. In that case, try to guess
9186 # what the program name is, at the risk of getting it wrong if
9187 # Guile was configured with '--program-suffix' or similar.
9188 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9189 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9190 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9191 fi
9192
9193fi
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9195$as_echo "$ac_cv_guild_program_name" >&6; }
9196
9197 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9198 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9199 fi
9200
9201 GUILD="$ac_cv_guild_program_name"
9202
9203
d342a0da
DE
9204 ;;
9205 *)
9206
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9208$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9209if test "${ac_cv_guild_program_name+set}" = set; then :
9210 $as_echo_n "(cached) " >&6
9211else
9212 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9213
9214 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9215 # the 'guild' and 'bindir' variables. In that case, try to guess
9216 # what the program name is, at the risk of getting it wrong if
9217 # Guile was configured with '--program-suffix' or similar.
9218 if test "x$ac_cv_guild_program_name" = "x"; then
9219 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9220 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9221 fi
9222
9223fi
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9225$as_echo "$ac_cv_guild_program_name" >&6; }
9226
9227 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9228 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9229 fi
9230
9231 GUILD="$ac_cv_guild_program_name"
9232
9233
9234 ;;
9235 esac
e76c5d17
DE
9236
9237
9238 if test "$cross_compiling" = no; then
9239 GUILD_TARGET_FLAG=
9240 else
9241 GUILD_TARGET_FLAG="--target=$host"
9242 fi
9243
9244
9245
9246
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9248$as_echo_n "checking whether guild supports this host... " >&6; }
9249if test "${ac_cv_guild_ok+set}" = set; then :
9250 $as_echo_n "(cached) " >&6
9251else
9252 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9253 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9254 ac_cv_guild_ok=yes
9255 else
9256 ac_cv_guild_ok=no
9257 fi
9258fi
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9260$as_echo "$ac_cv_guild_ok" >&6; }
9261
9262 if test "$ac_cv_guild_ok" = no; then
9263 have_libguile=no
9264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9265$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9266 fi
9267fi
9268
ed3ef339
DE
9269if test "${have_libguile}" != no; then
9270
9271$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9272
9273 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9274 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9275 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9276 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9277 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9278
9279 save_LIBS="$LIBS"
9280 save_CPPFLAGS="$CPPFLAGS"
9281 LIBS="$GUILE_LIBS"
9282 CPPFLAGS="$GUILE_CPPFLAGS"
9283 for ac_func in scm_new_smob
9284do :
9285 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9286if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9287 cat >>confdefs.h <<_ACEOF
9288#define HAVE_SCM_NEW_SMOB 1
9289_ACEOF
9290
9291fi
9292done
9293
9294 LIBS="$save_LIBS"
9295 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9296else
9297 # Even if Guile support is not compiled in, we need to have these files
9298 # included.
9299 CONFIG_OBS="$CONFIG_OBS guile.o"
9300 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9301fi
9a156167 9302
ac534cba 9303
4df42755
DE
9304 if test "${have_libguile}" != no; then
9305 HAVE_GUILE_TRUE=
9306 HAVE_GUILE_FALSE='#'
9307else
9308 HAVE_GUILE_TRUE='#'
9309 HAVE_GUILE_FALSE=
9310fi
9311
ac534cba 9312
d344e670
DE
9313# --------------------- #
9314# Check for libmcheck. #
9315# --------------------- #
9316
a8db4212
YPK
9317# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9318# but turn it off if Python is enabled with threads, since -lmcheck is
9319# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9320# and for releases.
17ef446e
PA
9321if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9322 && $development; then
9323 libmcheck_default=yes
9324else
9325 libmcheck_default=no
a8db4212
YPK
9326fi
9327
17ef446e
PA
9328 # Check whether --enable-libmcheck was given.
9329if test "${enable_libmcheck+set}" = set; then :
9330 enableval=$enable_libmcheck; case "${enableval}" in
9331 yes | y) ENABLE_LIBMCHECK="yes" ;;
9332 no | n) ENABLE_LIBMCHECK="no" ;;
9333 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9334 esac
9335fi
9336
9337
9338 if test -z "${ENABLE_LIBMCHECK}"; then
9339 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9340 fi
17ef446e
PA
9341
9342 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9344$as_echo_n "checking for main in -lmcheck... " >&6; }
9345if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9346 $as_echo_n "(cached) " >&6
9347else
9348 ac_check_lib_save_LIBS=$LIBS
9349LIBS="-lmcheck $LIBS"
9350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351/* end confdefs.h. */
9352
9353
9354int
9355main ()
9356{
9357return main ();
9358 ;
9359 return 0;
9360}
9361_ACEOF
9362if ac_fn_c_try_link "$LINENO"; then :
9363 ac_cv_lib_mcheck_main=yes
9364else
9365 ac_cv_lib_mcheck_main=no
9366fi
9367rm -f core conftest.err conftest.$ac_objext \
9368 conftest$ac_exeext conftest.$ac_ext
9369LIBS=$ac_check_lib_save_LIBS
9370fi
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9372$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9373if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9374 cat >>confdefs.h <<_ACEOF
9375#define HAVE_LIBMCHECK 1
9376_ACEOF
9377
9378 LIBS="-lmcheck $LIBS"
9379
9380fi
9381
17ef446e
PA
9382 fi
9383
9384
9385if test "$ENABLE_LIBMCHECK" = "yes" \
9386 -a "${have_libpython}" != "no" \
9387 -a "${python_has_threads}" = "yes" ; then
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9389$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9390fi
9391
81ecdfbb
RW
9392# ------------------------- #
9393# Checks for header files. #
9394# ------------------------- #
c890192f 9395
81ecdfbb
RW
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9397$as_echo_n "checking for ANSI C header files... " >&6; }
9398if test "${ac_cv_header_stdc+set}" = set; then :
9399 $as_echo_n "(cached) " >&6
bec39cab 9400else
81ecdfbb 9401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9402/* end confdefs.h. */
81ecdfbb
RW
9403#include <stdlib.h>
9404#include <stdarg.h>
9405#include <string.h>
9406#include <float.h>
9407
a9322a30
TT
9408int
9409main ()
9410{
a9322a30
TT
9411
9412 ;
9413 return 0;
9414}
bec39cab 9415_ACEOF
81ecdfbb
RW
9416if ac_fn_c_try_compile "$LINENO"; then :
9417 ac_cv_header_stdc=yes
bec39cab 9418else
81ecdfbb 9419 ac_cv_header_stdc=no
a9322a30 9420fi
81ecdfbb 9421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9422
81ecdfbb
RW
9423if test $ac_cv_header_stdc = yes; then
9424 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427#include <string.h>
bec39cab 9428
81ecdfbb
RW
9429_ACEOF
9430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9431 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9432
bec39cab 9433else
81ecdfbb
RW
9434 ac_cv_header_stdc=no
9435fi
9436rm -f conftest*
9437
9438fi
9439
9440if test $ac_cv_header_stdc = yes; then
9441 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9443/* end confdefs.h. */
9444#include <stdlib.h>
9445
bec39cab 9446_ACEOF
81ecdfbb
RW
9447if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9448 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9449
81ecdfbb
RW
9450else
9451 ac_cv_header_stdc=no
9452fi
9453rm -f conftest*
bec39cab 9454
bec39cab 9455fi
81ecdfbb
RW
9456
9457if test $ac_cv_header_stdc = yes; then
9458 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9459 if test "$cross_compiling" = yes; then :
9460 :
bec39cab 9461else
81ecdfbb 9462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9463/* end confdefs.h. */
81ecdfbb
RW
9464#include <ctype.h>
9465#include <stdlib.h>
9466#if ((' ' & 0x0FF) == 0x020)
9467# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9468# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9469#else
9470# define ISLOWER(c) \
9471 (('a' <= (c) && (c) <= 'i') \
9472 || ('j' <= (c) && (c) <= 'r') \
9473 || ('s' <= (c) && (c) <= 'z'))
9474# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9475#endif
9476
9477#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9478int
9479main ()
9480{
81ecdfbb
RW
9481 int i;
9482 for (i = 0; i < 256; i++)
9483 if (XOR (islower (i), ISLOWER (i))
9484 || toupper (i) != TOUPPER (i))
9485 return 2;
a9322a30
TT
9486 return 0;
9487}
bec39cab 9488_ACEOF
81ecdfbb
RW
9489if ac_fn_c_try_run "$LINENO"; then :
9490
bec39cab 9491else
81ecdfbb
RW
9492 ac_cv_header_stdc=no
9493fi
9494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9495 conftest.$ac_objext conftest.beam conftest.$ac_ext
9496fi
bec39cab 9497
bec39cab 9498fi
a9322a30 9499fi
81ecdfbb
RW
9500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9501$as_echo "$ac_cv_header_stdc" >&6; }
9502if test $ac_cv_header_stdc = yes; then
bec39cab 9503
81ecdfbb 9504$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9505
81ecdfbb 9506fi
bec39cab 9507
81ecdfbb 9508# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9509for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9510 thread_db.h \
0080a2f6 9511 sys/fault.h \
81ecdfbb
RW
9512 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9513 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9514 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9515 termios.h termio.h \
3447c057 9516 sgtty.h elf_hp.h \
9467110b 9517 dlfcn.h
81ecdfbb
RW
9518do :
9519 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9520ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9521eval as_val=\$$as_ac_Header
9522 if test "x$as_val" = x""yes; then :
bec39cab 9523 cat >>confdefs.h <<_ACEOF
81ecdfbb 9524#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9525_ACEOF
c906108c 9526
bec39cab 9527fi
81ecdfbb
RW
9528
9529done
9530
81ecdfbb
RW
9531for ac_header in sys/proc.h
9532do :
9533 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9534# include <sys/param.h>
9535#endif
c906108c 9536
81ecdfbb
RW
9537"
9538if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9539 cat >>confdefs.h <<_ACEOF
81ecdfbb 9540#define HAVE_SYS_PROC_H 1
bec39cab 9541_ACEOF
5ee754fc 9542
bec39cab 9543fi
81ecdfbb
RW
9544
9545done
9546
9547for ac_header in sys/user.h
9548do :
9549 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9550# include <sys/param.h>
a9322a30
TT
9551#endif
9552
81ecdfbb
RW
9553"
9554if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9555 cat >>confdefs.h <<_ACEOF
9556#define HAVE_SYS_USER_H 1
bec39cab 9557_ACEOF
bec39cab 9558
a9322a30 9559fi
bec39cab 9560
81ecdfbb 9561done
5ee754fc 9562
5ee754fc 9563
81ecdfbb
RW
9564# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9565# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9566# think that we don't have <curses.h> if we're using GCC.
9567case $host_os in
9568 solaris2.[789])
9569 if test "$GCC" = yes; then
9570
9571$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9572
9573 fi ;;
9574esac
9575for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9576do :
9577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9578ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9579eval as_val=\$$as_ac_Header
9580 if test "x$as_val" = x""yes; then :
bec39cab 9581 cat >>confdefs.h <<_ACEOF
81ecdfbb 9582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9583_ACEOF
5ee754fc
MK
9584
9585fi
9586
81ecdfbb 9587done
bec39cab 9588
81ecdfbb
RW
9589for ac_header in term.h
9590do :
9591 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9592# include <curses.h>
9593#endif
bec39cab 9594
81ecdfbb
RW
9595"
9596if test "x$ac_cv_header_term_h" = x""yes; then :
9597 cat >>confdefs.h <<_ACEOF
9598#define HAVE_TERM_H 1
a8111142 9599_ACEOF
a8111142 9600
a8111142 9601fi
a8111142 9602
81ecdfbb 9603done
a8111142
TT
9604
9605
81ecdfbb
RW
9606# ------------------------- #
9607# Checks for declarations. #
9608# ------------------------- #
a9322a30 9609
81ecdfbb
RW
9610ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9611if test "x$ac_cv_have_decl_free" = x""yes; then :
9612 ac_have_decl=1
bec39cab 9613else
81ecdfbb
RW
9614 ac_have_decl=0
9615fi
9616
9617cat >>confdefs.h <<_ACEOF
9618#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9619_ACEOF
81ecdfbb
RW
9620ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9621if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9622 ac_have_decl=1
9623else
9624 ac_have_decl=0
9625fi
9626
9627cat >>confdefs.h <<_ACEOF
9628#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9629_ACEOF
81ecdfbb
RW
9630ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9631if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9632 ac_have_decl=1
bec39cab 9633else
81ecdfbb
RW
9634 ac_have_decl=0
9635fi
bec39cab 9636
81ecdfbb
RW
9637cat >>confdefs.h <<_ACEOF
9638#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9639_ACEOF
81ecdfbb
RW
9640ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9641if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9642 ac_have_decl=1
9643else
9644 ac_have_decl=0
5ee754fc 9645fi
81ecdfbb
RW
9646
9647cat >>confdefs.h <<_ACEOF
9648#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 9649_ACEOF
5ee754fc 9650
5ee754fc 9651
81ecdfbb
RW
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9653$as_echo_n "checking for LC_MESSAGES... " >&6; }
9654if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9655 $as_echo_n "(cached) " >&6
bec39cab 9656else
81ecdfbb 9657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9658/* end confdefs.h. */
81ecdfbb 9659#include <locale.h>
a9322a30
TT
9660int
9661main ()
9662{
81ecdfbb 9663return LC_MESSAGES
a9322a30
TT
9664 ;
9665 return 0;
9666}
bec39cab 9667_ACEOF
81ecdfbb
RW
9668if ac_fn_c_try_link "$LINENO"; then :
9669 am_cv_val_LC_MESSAGES=yes
bec39cab 9670else
81ecdfbb
RW
9671 am_cv_val_LC_MESSAGES=no
9672fi
9673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext
9675fi
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9677$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9678 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9679
81ecdfbb
RW
9680$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9681
9682 fi
9683
9684
9685# ----------------------- #
9686# Checks for structures. #
9687# ----------------------- #
9688
9689ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9690if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9691
9692cat >>confdefs.h <<_ACEOF
9693#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9694_ACEOF
7eb368b3 9695
81ecdfbb 9696
7eb368b3 9697fi
81ecdfbb
RW
9698ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9699if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9700
a9322a30
TT
9701cat >>confdefs.h <<_ACEOF
9702#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9703_ACEOF
9704
a9322a30 9705
7eb368b3
NR
9706fi
9707
7eb368b3 9708
a9322a30
TT
9709# ------------------ #
9710# Checks for types. #
9711# ------------------ #
7eb368b3 9712
81ecdfbb
RW
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9714$as_echo_n "checking return type of signal handlers... " >&6; }
9715if test "${ac_cv_type_signal+set}" = set; then :
9716 $as_echo_n "(cached) " >&6
bec39cab 9717else
81ecdfbb 9718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9719/* end confdefs.h. */
a9322a30
TT
9720#include <sys/types.h>
9721#include <signal.h>
7cb9022a 9722
a9322a30
TT
9723int
9724main ()
9725{
81ecdfbb 9726return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9727 ;
9728 return 0;
9729}
bec39cab 9730_ACEOF
81ecdfbb
RW
9731if ac_fn_c_try_compile "$LINENO"; then :
9732 ac_cv_type_signal=int
bec39cab 9733else
81ecdfbb 9734 ac_cv_type_signal=void
bec39cab 9735fi
81ecdfbb 9736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9737fi
81ecdfbb
RW
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9739$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9740
a9322a30
TT
9741cat >>confdefs.h <<_ACEOF
9742#define RETSIGTYPE $ac_cv_type_signal
9743_ACEOF
5ee754fc 9744
bec39cab 9745
81ecdfbb 9746ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9747#include <sys/socket.h>
9748
81ecdfbb
RW
9749"
9750if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9751
a9322a30
TT
9752cat >>confdefs.h <<_ACEOF
9753#define HAVE_SOCKLEN_T 1
9754_ACEOF
9755
9756
9757fi
9758
9759
9760# ------------------------------------- #
9761# Checks for compiler characteristics. #
9762# ------------------------------------- #
9763
81ecdfbb
RW
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9765$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9766if test "${ac_cv_c_const+set}" = set; then :
9767 $as_echo_n "(cached) " >&6
a9322a30 9768else
81ecdfbb 9769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9770/* end confdefs.h. */
a9322a30
TT
9771
9772int
9773main ()
9774{
9775/* FIXME: Include the comments suggested by Paul. */
9776#ifndef __cplusplus
9777 /* Ultrix mips cc rejects this. */
9778 typedef int charset[2];
81ecdfbb 9779 const charset cs;
a9322a30 9780 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9781 char const *const *pcpcc;
9782 char **ppc;
a9322a30
TT
9783 /* NEC SVR4.0.2 mips cc rejects this. */
9784 struct point {int x, y;};
9785 static struct point const zero = {0,0};
9786 /* AIX XL C 1.02.0.0 rejects this.
9787 It does not let you subtract one const X* pointer from another in
9788 an arm of an if-expression whose if-part is not a constant
9789 expression */
9790 const char *g = "string";
81ecdfbb 9791 pcpcc = &g + (g ? g-g : 0);
a9322a30 9792 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9793 ++pcpcc;
9794 ppc = (char**) pcpcc;
9795 pcpcc = (char const *const *) ppc;
a9322a30
TT
9796 { /* SCO 3.2v4 cc rejects this. */
9797 char *t;
9798 char const *s = 0 ? (char *) 0 : (char const *) 0;
9799
9800 *t++ = 0;
81ecdfbb 9801 if (s) return 0;
a9322a30
TT
9802 }
9803 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9804 int x[] = {25, 17};
9805 const int *foo = &x[0];
9806 ++foo;
9807 }
9808 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9809 typedef const int *iptr;
9810 iptr p = 0;
9811 ++p;
9812 }
9813 { /* AIX XL C 1.02.0.0 rejects this saying
9814 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9815 struct s { int j; const int *ap[3]; };
9816 struct s *b; b->j = 5;
9817 }
9818 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9819 const int foo = 10;
81ecdfbb 9820 if (!foo) return 0;
a9322a30 9821 }
81ecdfbb 9822 return !cs[0] && !zero.x;
a9322a30
TT
9823#endif
9824
9825 ;
9826 return 0;
9827}
bec39cab 9828_ACEOF
81ecdfbb 9829if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9830 ac_cv_c_const=yes
5ee754fc 9831else
81ecdfbb 9832 ac_cv_c_const=no
5ee754fc 9833fi
81ecdfbb 9834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9835fi
81ecdfbb
RW
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9837$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9838if test $ac_cv_c_const = no; then
bec39cab 9839
81ecdfbb 9840$as_echo "#define const /**/" >>confdefs.h
bec39cab 9841
5ee754fc 9842fi
bec39cab 9843
81ecdfbb
RW
9844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9845$as_echo_n "checking for inline... " >&6; }
9846if test "${ac_cv_c_inline+set}" = set; then :
9847 $as_echo_n "(cached) " >&6
bec39cab 9848else
a9322a30
TT
9849 ac_cv_c_inline=no
9850for ac_kw in inline __inline__ __inline; do
81ecdfbb 9851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9852/* end confdefs.h. */
a9322a30
TT
9853#ifndef __cplusplus
9854typedef int foo_t;
9855static $ac_kw foo_t static_foo () {return 0; }
9856$ac_kw foo_t foo () {return 0; }
9857#endif
9858
bec39cab 9859_ACEOF
81ecdfbb
RW
9860if ac_fn_c_try_compile "$LINENO"; then :
9861 ac_cv_c_inline=$ac_kw
bec39cab 9862fi
81ecdfbb
RW
9863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9864 test "$ac_cv_c_inline" != no && break
a9322a30 9865done
bec39cab 9866
5ee754fc 9867fi
81ecdfbb
RW
9868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9869$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9870
a9322a30
TT
9871case $ac_cv_c_inline in
9872 inline | yes) ;;
9873 *)
9874 case $ac_cv_c_inline in
9875 no) ac_val=;;
9876 *) ac_val=$ac_cv_c_inline;;
9877 esac
9878 cat >>confdefs.h <<_ACEOF
9879#ifndef __cplusplus
9880#define inline $ac_val
9881#endif
9882_ACEOF
bec39cab
AC
9883 ;;
9884esac
bec39cab 9885
81ecdfbb
RW
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9887$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9888if test "${ac_cv_c_bigendian+set}" = set; then :
9889 $as_echo_n "(cached) " >&6
bec39cab 9890else
81ecdfbb
RW
9891 ac_cv_c_bigendian=unknown
9892 # See if we're dealing with a universal compiler.
9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9894/* end confdefs.h. */
9895#ifndef __APPLE_CC__
9896 not a universal capable compiler
9897 #endif
9898 typedef int dummy;
9899
9900_ACEOF
9901if ac_fn_c_try_compile "$LINENO"; then :
9902
9903 # Check for potential -arch flags. It is not universal unless
9904 # there are at least two -arch flags with different values.
9905 ac_arch=
9906 ac_prev=
9907 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9908 if test -n "$ac_prev"; then
9909 case $ac_word in
9910 i?86 | x86_64 | ppc | ppc64)
9911 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9912 ac_arch=$ac_word
9913 else
9914 ac_cv_c_bigendian=universal
9915 break
9916 fi
9917 ;;
9918 esac
9919 ac_prev=
9920 elif test "x$ac_word" = "x-arch"; then
9921 ac_prev=arch
9922 fi
9923 done
9924fi
9925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9926 if test $ac_cv_c_bigendian = unknown; then
9927 # See if sys/param.h defines the BYTE_ORDER macro.
9928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9929/* end confdefs.h. */
a9322a30 9930#include <sys/types.h>
81ecdfbb 9931 #include <sys/param.h>
a9322a30
TT
9932
9933int
9934main ()
9935{
81ecdfbb
RW
9936#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9937 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9938 && LITTLE_ENDIAN)
9939 bogus endian macros
9940 #endif
a9322a30
TT
9941
9942 ;
9943 return 0;
9944}
bec39cab 9945_ACEOF
81ecdfbb 9946if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9947 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9949/* end confdefs.h. */
a9322a30 9950#include <sys/types.h>
81ecdfbb 9951 #include <sys/param.h>
a9322a30
TT
9952
9953int
9954main ()
9955{
9956#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9957 not big endian
9958 #endif
a9322a30
TT
9959
9960 ;
9961 return 0;
9962}
bec39cab 9963_ACEOF
81ecdfbb 9964if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9965 ac_cv_c_bigendian=yes
5ee754fc 9966else
81ecdfbb 9967 ac_cv_c_bigendian=no
5ee754fc 9968fi
81ecdfbb
RW
9969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9970fi
9971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9972 fi
9973 if test $ac_cv_c_bigendian = unknown; then
9974 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9976/* end confdefs.h. */
9977#include <limits.h>
bec39cab 9978
81ecdfbb
RW
9979int
9980main ()
9981{
9982#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9983 bogus endian macros
9984 #endif
9985
9986 ;
9987 return 0;
9988}
7eb368b3 9989_ACEOF
81ecdfbb
RW
9990if ac_fn_c_try_compile "$LINENO"; then :
9991 # It does; now see whether it defined to _BIG_ENDIAN or not.
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9993/* end confdefs.h. */
81ecdfbb
RW
9994#include <limits.h>
9995
7eb368b3
NR
9996int
9997main ()
9998{
81ecdfbb
RW
9999#ifndef _BIG_ENDIAN
10000 not big endian
10001 #endif
10002
7eb368b3
NR
10003 ;
10004 return 0;
10005}
10006_ACEOF
81ecdfbb 10007if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10008 ac_cv_c_bigendian=yes
81ecdfbb
RW
10009else
10010 ac_cv_c_bigendian=no
a9322a30 10011fi
81ecdfbb 10012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10013fi
81ecdfbb
RW
10014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10015 fi
10016 if test $ac_cv_c_bigendian = unknown; then
10017 # Compile a test program.
10018 if test "$cross_compiling" = yes; then :
10019 # Try to guess by grepping values from an object file.
10020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021/* end confdefs.h. */
10022short int ascii_mm[] =
10023 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10024 short int ascii_ii[] =
10025 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10026 int use_ascii (int i) {
10027 return ascii_mm[i] + ascii_ii[i];
10028 }
10029 short int ebcdic_ii[] =
10030 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10031 short int ebcdic_mm[] =
10032 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10033 int use_ebcdic (int i) {
10034 return ebcdic_mm[i] + ebcdic_ii[i];
10035 }
10036 extern int foo;
7eb368b3 10037
81ecdfbb
RW
10038int
10039main ()
10040{
10041return use_ascii (foo) == use_ebcdic (foo);
10042 ;
10043 return 0;
10044}
10045_ACEOF
10046if ac_fn_c_try_compile "$LINENO"; then :
10047 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10048 ac_cv_c_bigendian=yes
10049 fi
10050 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10051 if test "$ac_cv_c_bigendian" = unknown; then
10052 ac_cv_c_bigendian=no
10053 else
10054 # finding both strings is unlikely to happen, but who knows?
10055 ac_cv_c_bigendian=unknown
10056 fi
10057 fi
7eb368b3 10058fi
81ecdfbb 10059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10060else
81ecdfbb 10061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10062/* end confdefs.h. */
81ecdfbb 10063$ac_includes_default
d3ea6809
MM
10064int
10065main ()
10066{
81ecdfbb
RW
10067
10068 /* Are we little or big endian? From Harbison&Steele. */
10069 union
10070 {
10071 long int l;
10072 char c[sizeof (long int)];
10073 } u;
10074 u.l = 1;
10075 return u.c[sizeof (long int) - 1] == 1;
10076
10077 ;
10078 return 0;
d3ea6809
MM
10079}
10080_ACEOF
81ecdfbb 10081if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10082 ac_cv_c_bigendian=no
d3ea6809 10083else
81ecdfbb 10084 ac_cv_c_bigendian=yes
d3ea6809 10085fi
81ecdfbb
RW
10086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10087 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10088fi
a9322a30 10089
81ecdfbb
RW
10090 fi
10091fi
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10093$as_echo "$ac_cv_c_bigendian" >&6; }
10094 case $ac_cv_c_bigendian in #(
10095 yes)
10096 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10097;; #(
10098 no)
10099 ;; #(
10100 universal)
10101
10102$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10103
10104 ;; #(
10105 *)
10106 as_fn_error "unknown endianness
10107 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10108 esac
d3ea6809
MM
10109
10110
a9322a30
TT
10111# ------------------------------ #
10112# Checks for library functions. #
10113# ------------------------------ #
d3ea6809 10114
a9322a30
TT
10115# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10116# for constant arguments. Useless!
81ecdfbb
RW
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10118$as_echo_n "checking for working alloca.h... " >&6; }
10119if test "${ac_cv_working_alloca_h+set}" = set; then :
10120 $as_echo_n "(cached) " >&6
d3ea6809 10121else
81ecdfbb 10122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 10123/* end confdefs.h. */
a9322a30 10124#include <alloca.h>
bec39cab
AC
10125int
10126main ()
10127{
a9322a30 10128char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 10129 if (p) return 0;
bec39cab
AC
10130 ;
10131 return 0;
10132}
10133_ACEOF
81ecdfbb 10134if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10135 ac_cv_working_alloca_h=yes
bec39cab 10136else
81ecdfbb 10137 ac_cv_working_alloca_h=no
bec39cab 10138fi
81ecdfbb
RW
10139rm -f core conftest.err conftest.$ac_objext \
10140 conftest$ac_exeext conftest.$ac_ext
bec39cab 10141fi
81ecdfbb
RW
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10143$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
10144if test $ac_cv_working_alloca_h = yes; then
10145
81ecdfbb 10146$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 10147
c906108c 10148fi
bec39cab 10149
81ecdfbb
RW
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10151$as_echo_n "checking for alloca... " >&6; }
10152if test "${ac_cv_func_alloca_works+set}" = set; then :
10153 $as_echo_n "(cached) " >&6
bec39cab 10154else
81ecdfbb 10155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10156/* end confdefs.h. */
a9322a30
TT
10157#ifdef __GNUC__
10158# define alloca __builtin_alloca
b4e70030 10159#else
a9322a30
TT
10160# ifdef _MSC_VER
10161# include <malloc.h>
10162# define alloca _alloca
10163# else
81ecdfbb 10164# ifdef HAVE_ALLOCA_H
a9322a30
TT
10165# include <alloca.h>
10166# else
10167# ifdef _AIX
10168 #pragma alloca
10169# else
10170# ifndef alloca /* predefined by HP cc +Olibcalls */
10171char *alloca ();
10172# endif
10173# endif
10174# endif
10175# endif
c906108c 10176#endif
97bf5e38 10177
bec39cab
AC
10178int
10179main ()
10180{
a9322a30 10181char *p = (char *) alloca (1);
81ecdfbb 10182 if (p) return 0;
bec39cab
AC
10183 ;
10184 return 0;
10185}
10186_ACEOF
81ecdfbb 10187if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10188 ac_cv_func_alloca_works=yes
bec39cab 10189else
81ecdfbb 10190 ac_cv_func_alloca_works=no
bec39cab 10191fi
81ecdfbb
RW
10192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
bec39cab 10194fi
81ecdfbb
RW
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10196$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
10197
10198if test $ac_cv_func_alloca_works = yes; then
10199
81ecdfbb 10200$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 10201
a9322a30
TT
10202else
10203 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10204# that cause trouble. Some versions do not even contain alloca or
10205# contain a buggy version. If you still want to use their alloca,
10206# use ar to extract alloca.o from them instead of compiling alloca.c.
10207
81ecdfbb 10208ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 10209
81ecdfbb 10210$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 10211
bec39cab 10212
81ecdfbb
RW
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10214$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10215if test "${ac_cv_os_cray+set}" = set; then :
10216 $as_echo_n "(cached) " >&6
a9322a30 10217else
81ecdfbb 10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 10219/* end confdefs.h. */
81ecdfbb 10220#if defined CRAY && ! defined CRAY2
a9322a30
TT
10221webecray
10222#else
10223wenotbecray
10224#endif
10225
10226_ACEOF
10227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10228 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10229 ac_cv_os_cray=yes
10230else
81ecdfbb 10231 ac_cv_os_cray=no
bec39cab 10232fi
81ecdfbb
RW
10233rm -f conftest*
10234
bec39cab 10235fi
81ecdfbb
RW
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10237$as_echo "$ac_cv_os_cray" >&6; }
10238if test $ac_cv_os_cray = yes; then
10239 for ac_func in _getb67 GETB67 getb67; do
10240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10242eval as_val=\$$as_ac_var
10243 if test "x$as_val" = x""yes; then :
a9322a30
TT
10244
10245cat >>confdefs.h <<_ACEOF
10246#define CRAY_STACKSEG_END $ac_func
bec39cab 10247_ACEOF
c906108c 10248
a9322a30 10249 break
c906108c
SS
10250fi
10251
a9322a30
TT
10252 done
10253fi
bec39cab 10254
81ecdfbb
RW
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10256$as_echo_n "checking stack direction for C alloca... " >&6; }
10257if test "${ac_cv_c_stack_direction+set}" = set; then :
10258 $as_echo_n "(cached) " >&6
a9322a30 10259else
81ecdfbb 10260 if test "$cross_compiling" = yes; then :
a9322a30 10261 ac_cv_c_stack_direction=0
bec39cab 10262else
81ecdfbb 10263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10264/* end confdefs.h. */
81ecdfbb 10265$ac_includes_default
a9322a30
TT
10266int
10267find_stack_direction ()
b4e70030 10268{
a9322a30
TT
10269 static char *addr = 0;
10270 auto char dummy;
10271 if (addr == 0)
10272 {
10273 addr = &dummy;
10274 return find_stack_direction ();
10275 }
10276 else
10277 return (&dummy > addr) ? 1 : -1;
b4e70030 10278}
b757528f 10279
bec39cab
AC
10280int
10281main ()
10282{
81ecdfbb 10283 return find_stack_direction () < 0;
bec39cab
AC
10284}
10285_ACEOF
81ecdfbb 10286if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10287 ac_cv_c_stack_direction=1
10288else
81ecdfbb 10289 ac_cv_c_stack_direction=-1
a9322a30 10290fi
81ecdfbb
RW
10291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10292 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10293fi
a9322a30 10294
81ecdfbb
RW
10295fi
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10297$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10298cat >>confdefs.h <<_ACEOF
10299#define STACK_DIRECTION $ac_cv_c_stack_direction
10300_ACEOF
10301
10302
10303fi
10304
a9322a30 10305for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10306do :
10307 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10308ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10309eval as_val=\$$as_ac_Header
10310 if test "x$as_val" = x""yes; then :
bec39cab 10311 cat >>confdefs.h <<_ACEOF
81ecdfbb 10312#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10313_ACEOF
b757528f 10314
b757528f 10315fi
bec39cab 10316
a9322a30 10317done
a3828db0 10318
a9322a30 10319for ac_func in getpagesize
81ecdfbb
RW
10320do :
10321 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10322if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10323 cat >>confdefs.h <<_ACEOF
81ecdfbb 10324#define HAVE_GETPAGESIZE 1
bec39cab 10325_ACEOF
bcb3dc3d 10326
bcb3dc3d
MK
10327fi
10328done
10329
81ecdfbb
RW
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10331$as_echo_n "checking for working mmap... " >&6; }
10332if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10333 $as_echo_n "(cached) " >&6
a9322a30 10334else
81ecdfbb 10335 if test "$cross_compiling" = yes; then :
a9322a30 10336 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10337else
81ecdfbb 10338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10339/* end confdefs.h. */
a9322a30
TT
10340$ac_includes_default
10341/* malloc might have been renamed as rpl_malloc. */
10342#undef malloc
bec39cab 10343
a9322a30
TT
10344/* Thanks to Mike Haertel and Jim Avera for this test.
10345 Here is a matrix of mmap possibilities:
10346 mmap private not fixed
10347 mmap private fixed at somewhere currently unmapped
10348 mmap private fixed at somewhere already mapped
10349 mmap shared not fixed
10350 mmap shared fixed at somewhere currently unmapped
10351 mmap shared fixed at somewhere already mapped
10352 For private mappings, we should verify that changes cannot be read()
10353 back from the file, nor mmap's back from the file at a different
10354 address. (There have been systems where private was not correctly
10355 implemented like the infamous i386 svr4.0, and systems where the
10356 VM page cache was not coherent with the file system buffer cache
10357 like early versions of FreeBSD and possibly contemporary NetBSD.)
10358 For shared mappings, we should conversely verify that changes get
10359 propagated back to all the places they're supposed to be.
bec39cab 10360
a9322a30
TT
10361 Grep wants private fixed already mapped.
10362 The main things grep needs to know about mmap are:
10363 * does it exist and is it safe to write into the mmap'd area
10364 * how to use it (BSD variants) */
8b9cf735 10365
a9322a30
TT
10366#include <fcntl.h>
10367#include <sys/mman.h>
8b9cf735 10368
81ecdfbb 10369#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10370char *malloc ();
a3828db0
MK
10371#endif
10372
a9322a30 10373/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10374#ifndef HAVE_GETPAGESIZE
a9322a30 10375/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10376# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10377# define HAVE_SYS_PARAM_H 1
10378# endif
10379
10380# ifdef _SC_PAGESIZE
10381# define getpagesize() sysconf(_SC_PAGESIZE)
10382# else /* no _SC_PAGESIZE */
81ecdfbb 10383# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10384# include <sys/param.h>
10385# ifdef EXEC_PAGESIZE
10386# define getpagesize() EXEC_PAGESIZE
10387# else /* no EXEC_PAGESIZE */
10388# ifdef NBPG
10389# define getpagesize() NBPG * CLSIZE
10390# ifndef CLSIZE
10391# define CLSIZE 1
10392# endif /* no CLSIZE */
10393# else /* no NBPG */
10394# ifdef NBPC
10395# define getpagesize() NBPC
10396# else /* no NBPC */
10397# ifdef PAGESIZE
10398# define getpagesize() PAGESIZE
10399# endif /* PAGESIZE */
10400# endif /* no NBPC */
10401# endif /* no NBPG */
10402# endif /* no EXEC_PAGESIZE */
10403# else /* no HAVE_SYS_PARAM_H */
10404# define getpagesize() 8192 /* punt totally */
10405# endif /* no HAVE_SYS_PARAM_H */
10406# endif /* no _SC_PAGESIZE */
10407
10408#endif /* no HAVE_GETPAGESIZE */
10409
bec39cab
AC
10410int
10411main ()
10412{
a9322a30
TT
10413 char *data, *data2, *data3;
10414 int i, pagesize;
10415 int fd;
10416
10417 pagesize = getpagesize ();
10418
10419 /* First, make a file with some known garbage in it. */
10420 data = (char *) malloc (pagesize);
10421 if (!data)
81ecdfbb 10422 return 1;
a9322a30
TT
10423 for (i = 0; i < pagesize; ++i)
10424 *(data + i) = rand ();
10425 umask (0);
10426 fd = creat ("conftest.mmap", 0600);
10427 if (fd < 0)
81ecdfbb 10428 return 1;
a9322a30 10429 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10430 return 1;
a9322a30
TT
10431 close (fd);
10432
10433 /* Next, try to mmap the file at a fixed address which already has
10434 something else allocated at it. If we can, also make sure that
10435 we see the same garbage. */
10436 fd = open ("conftest.mmap", O_RDWR);
10437 if (fd < 0)
81ecdfbb 10438 return 1;
a9322a30
TT
10439 data2 = (char *) malloc (2 * pagesize);
10440 if (!data2)
81ecdfbb
RW
10441 return 1;
10442 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10443 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10444 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10445 return 1;
a9322a30
TT
10446 for (i = 0; i < pagesize; ++i)
10447 if (*(data + i) != *(data2 + i))
81ecdfbb 10448 return 1;
a9322a30
TT
10449
10450 /* Finally, make sure that changes to the mapped area do not
10451 percolate back to the file as seen by read(). (This is a bug on
10452 some variants of i386 svr4.0.) */
10453 for (i = 0; i < pagesize; ++i)
10454 *(data2 + i) = *(data2 + i) + 1;
10455 data3 = (char *) malloc (pagesize);
10456 if (!data3)
81ecdfbb 10457 return 1;
a9322a30 10458 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10459 return 1;
a9322a30
TT
10460 for (i = 0; i < pagesize; ++i)
10461 if (*(data + i) != *(data3 + i))
81ecdfbb 10462 return 1;
a9322a30 10463 close (fd);
81ecdfbb 10464 return 0;
bec39cab
AC
10465}
10466_ACEOF
81ecdfbb 10467if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10468 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10469else
81ecdfbb 10470 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10471fi
81ecdfbb
RW
10472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10473 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10474fi
81ecdfbb 10475
a9322a30 10476fi
81ecdfbb
RW
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10478$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10479if test $ac_cv_func_mmap_fixed_mapped = yes; then
10480
81ecdfbb 10481$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10482
086ec9eb 10483fi
a9322a30 10484rm -f conftest.mmap
a3828db0 10485
81ecdfbb
RW
10486ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10487if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10488
a9322a30
TT
10489else
10490
10491cat >>confdefs.h <<_ACEOF
10492#define pid_t int
bec39cab 10493_ACEOF
086ec9eb
MK
10494
10495fi
10496
81ecdfbb
RW
10497for ac_header in vfork.h
10498do :
10499 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10500if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10501 cat >>confdefs.h <<_ACEOF
81ecdfbb 10502#define HAVE_VFORK_H 1
bec39cab 10503_ACEOF
c906108c
SS
10504
10505fi
a9322a30 10506
a3828db0 10507done
c906108c 10508
a9322a30 10509for ac_func in fork vfork
81ecdfbb
RW
10510do :
10511 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10512ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10513eval as_val=\$$as_ac_var
10514 if test "x$as_val" = x""yes; then :
a3828db0 10515 cat >>confdefs.h <<_ACEOF
81ecdfbb 10516#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10517_ACEOF
b83266a0 10518
97bf5e38 10519fi
a3828db0 10520done
b83266a0 10521
a9322a30 10522if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10524$as_echo_n "checking for working fork... " >&6; }
10525if test "${ac_cv_func_fork_works+set}" = set; then :
10526 $as_echo_n "(cached) " >&6
a9322a30 10527else
81ecdfbb 10528 if test "$cross_compiling" = yes; then :
a9322a30
TT
10529 ac_cv_func_fork_works=cross
10530else
81ecdfbb
RW
10531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10532/* end confdefs.h. */
10533$ac_includes_default
10534int
10535main ()
10536{
10537
10538 /* By Ruediger Kuhlmann. */
10539 return fork () < 0;
10540
10541 ;
10542 return 0;
10543}
a9322a30 10544_ACEOF
81ecdfbb 10545if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10546 ac_cv_func_fork_works=yes
10547else
81ecdfbb 10548 ac_cv_func_fork_works=no
a9322a30 10549fi
81ecdfbb
RW
10550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10551 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10552fi
81ecdfbb 10553
a9322a30 10554fi
81ecdfbb
RW
10555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10556$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10557
10558else
10559 ac_cv_func_fork_works=$ac_cv_func_fork
10560fi
10561if test "x$ac_cv_func_fork_works" = xcross; then
10562 case $host in
10563 *-*-amigaos* | *-*-msdosdjgpp*)
10564 # Override, as these systems have only a dummy fork() stub
10565 ac_cv_func_fork_works=no
10566 ;;
10567 *)
10568 ac_cv_func_fork_works=yes
10569 ;;
10570 esac
81ecdfbb
RW
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10572$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10573fi
10574ac_cv_func_vfork_works=$ac_cv_func_vfork
10575if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10577$as_echo_n "checking for working vfork... " >&6; }
10578if test "${ac_cv_func_vfork_works+set}" = set; then :
10579 $as_echo_n "(cached) " >&6
a9322a30 10580else
81ecdfbb 10581 if test "$cross_compiling" = yes; then :
a9322a30
TT
10582 ac_cv_func_vfork_works=cross
10583else
81ecdfbb 10584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10585/* end confdefs.h. */
10586/* Thanks to Paul Eggert for this test. */
81ecdfbb 10587$ac_includes_default
a9322a30 10588#include <sys/wait.h>
81ecdfbb 10589#ifdef HAVE_VFORK_H
a9322a30
TT
10590# include <vfork.h>
10591#endif
10592/* On some sparc systems, changes by the child to local and incoming
10593 argument registers are propagated back to the parent. The compiler
10594 is told about this with #include <vfork.h>, but some compilers
10595 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10596 static variable whose address is put into a register that is
10597 clobbered by the vfork. */
10598static void
10599#ifdef __cplusplus
10600sparc_address_test (int arg)
10601# else
10602sparc_address_test (arg) int arg;
10603#endif
10604{
10605 static pid_t child;
10606 if (!child) {
10607 child = vfork ();
10608 if (child < 0) {
10609 perror ("vfork");
10610 _exit(2);
10611 }
10612 if (!child) {
10613 arg = getpid();
10614 write(-1, "", 0);
10615 _exit (arg);
10616 }
10617 }
10618}
10619
10620int
10621main ()
10622{
10623 pid_t parent = getpid ();
10624 pid_t child;
10625
10626 sparc_address_test (0);
10627
10628 child = vfork ();
10629
10630 if (child == 0) {
10631 /* Here is another test for sparc vfork register problems. This
10632 test uses lots of local variables, at least as many local
10633 variables as main has allocated so far including compiler
10634 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10635 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10636 reuse the register of parent for one of the local variables,
10637 since it will think that parent can't possibly be used any more
10638 in this routine. Assigning to the local variable will thus
10639 munge parent in the parent process. */
10640 pid_t
10641 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10642 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10643 /* Convince the compiler that p..p7 are live; otherwise, it might
10644 use the same hardware register for all 8 local variables. */
10645 if (p != p1 || p != p2 || p != p3 || p != p4
10646 || p != p5 || p != p6 || p != p7)
10647 _exit(1);
10648
10649 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10650 from child file descriptors. If the child closes a descriptor
10651 before it execs or exits, this munges the parent's descriptor
10652 as well. Test for this by closing stdout in the child. */
10653 _exit(close(fileno(stdout)) != 0);
10654 } else {
10655 int status;
10656 struct stat st;
10657
10658 while (wait(&status) != child)
10659 ;
81ecdfbb 10660 return (
a9322a30
TT
10661 /* Was there some problem with vforking? */
10662 child < 0
10663
10664 /* Did the child fail? (This shouldn't happen.) */
10665 || status
10666
10667 /* Did the vfork/compiler bug occur? */
10668 || parent != getpid()
10669
10670 /* Did the file descriptor bug occur? */
10671 || fstat(fileno(stdout), &st) != 0
10672 );
10673 }
10674}
10675_ACEOF
81ecdfbb 10676if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10677 ac_cv_func_vfork_works=yes
10678else
81ecdfbb 10679 ac_cv_func_vfork_works=no
a9322a30 10680fi
81ecdfbb
RW
10681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10682 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10683fi
81ecdfbb 10684
a9322a30 10685fi
81ecdfbb
RW
10686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10687$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10688
10689fi;
10690if test "x$ac_cv_func_fork_works" = xcross; then
10691 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10693$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10694fi
10695
10696if test "x$ac_cv_func_vfork_works" = xyes; then
10697
81ecdfbb 10698$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10699
10700else
10701
81ecdfbb 10702$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10703
10704fi
10705if test "x$ac_cv_func_fork_works" = xyes; then
10706
81ecdfbb 10707$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10708
10709fi
10710
7313baad 10711for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10712 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10713 sbrk setpgid setpgrp setsid \
9467110b 10714 sigaction sigprocmask sigsetmask socketpair \
110ed339 10715 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d 10716 setrlimit getrlimit posix_madvise waitpid lstat \
992c7d70 10717 ptrace64 sigaltstack
81ecdfbb
RW
10718do :
10719 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10720ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10721eval as_val=\$$as_ac_var
10722 if test "x$as_val" = x""yes; then :
6c7a06a3 10723 cat >>confdefs.h <<_ACEOF
81ecdfbb 10724#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10725_ACEOF
10726
10727fi
10728done
10729
10730
81ecdfbb
RW
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10732$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10733if test "${am_cv_langinfo_codeset+set}" = set; then :
10734 $as_echo_n "(cached) " >&6
6c7a06a3 10735else
81ecdfbb 10736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10737/* end confdefs.h. */
10738#include <langinfo.h>
10739int
10740main ()
10741{
10742char* cs = nl_langinfo(CODESET);
bec39cab
AC
10743 ;
10744 return 0;
10745}
10746_ACEOF
81ecdfbb 10747if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10748 am_cv_langinfo_codeset=yes
a4db0f07 10749else
81ecdfbb 10750 am_cv_langinfo_codeset=no
a4db0f07 10751fi
81ecdfbb
RW
10752rm -f core conftest.err conftest.$ac_objext \
10753 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10754
a4db0f07 10755fi
81ecdfbb
RW
10756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10757$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10758 if test $am_cv_langinfo_codeset = yes; then
10759
81ecdfbb 10760$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10761
6c7a06a3 10762 fi
c906108c 10763
06825bd1 10764
3266f10b
TT
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10766$as_echo_n "checking for ANSI C header files... " >&6; }
10767if test "${ac_cv_header_stdc+set}" = set; then :
10768 $as_echo_n "(cached) " >&6
10769else
10770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10771/* end confdefs.h. */
10772#include <stdlib.h>
10773#include <stdarg.h>
10774#include <string.h>
10775#include <float.h>
10776
10777int
10778main ()
10779{
10780
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785if ac_fn_c_try_compile "$LINENO"; then :
10786 ac_cv_header_stdc=yes
10787else
10788 ac_cv_header_stdc=no
10789fi
10790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10791
10792if test $ac_cv_header_stdc = yes; then
10793 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795/* end confdefs.h. */
10796#include <string.h>
10797
10798_ACEOF
10799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10800 $EGREP "memchr" >/dev/null 2>&1; then :
10801
10802else
10803 ac_cv_header_stdc=no
10804fi
10805rm -f conftest*
10806
10807fi
10808
10809if test $ac_cv_header_stdc = yes; then
10810 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812/* end confdefs.h. */
10813#include <stdlib.h>
10814
10815_ACEOF
10816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10817 $EGREP "free" >/dev/null 2>&1; then :
10818
10819else
10820 ac_cv_header_stdc=no
10821fi
10822rm -f conftest*
10823
10824fi
10825
10826if test $ac_cv_header_stdc = yes; then
10827 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10828 if test "$cross_compiling" = yes; then :
10829 :
10830else
10831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832/* end confdefs.h. */
10833#include <ctype.h>
10834#include <stdlib.h>
10835#if ((' ' & 0x0FF) == 0x020)
10836# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10837# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10838#else
10839# define ISLOWER(c) \
10840 (('a' <= (c) && (c) <= 'i') \
10841 || ('j' <= (c) && (c) <= 'r') \
10842 || ('s' <= (c) && (c) <= 'z'))
10843# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10844#endif
10845
10846#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10847int
10848main ()
10849{
10850 int i;
10851 for (i = 0; i < 256; i++)
10852 if (XOR (islower (i), ISLOWER (i))
10853 || toupper (i) != TOUPPER (i))
10854 return 2;
10855 return 0;
10856}
10857_ACEOF
10858if ac_fn_c_try_run "$LINENO"; then :
10859
10860else
10861 ac_cv_header_stdc=no
10862fi
10863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10864 conftest.$ac_objext conftest.beam conftest.$ac_ext
10865fi
10866
10867fi
10868fi
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10870$as_echo "$ac_cv_header_stdc" >&6; }
10871if test $ac_cv_header_stdc = yes; then
10872
10873$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10874
3266f10b
TT
10875fi
10876
10877 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10878# for constant arguments. Useless!
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10880$as_echo_n "checking for working alloca.h... " >&6; }
10881if test "${ac_cv_working_alloca_h+set}" = set; then :
10882 $as_echo_n "(cached) " >&6
10883else
10884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885/* end confdefs.h. */
10886#include <alloca.h>
10887int
10888main ()
10889{
10890char *p = (char *) alloca (2 * sizeof (int));
10891 if (p) return 0;
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896if ac_fn_c_try_link "$LINENO"; then :
10897 ac_cv_working_alloca_h=yes
10898else
10899 ac_cv_working_alloca_h=no
10900fi
10901rm -f core conftest.err conftest.$ac_objext \
10902 conftest$ac_exeext conftest.$ac_ext
10903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10905$as_echo "$ac_cv_working_alloca_h" >&6; }
10906if test $ac_cv_working_alloca_h = yes; then
10907
10908$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10909
10910fi
10911
10912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10913$as_echo_n "checking for alloca... " >&6; }
10914if test "${ac_cv_func_alloca_works+set}" = set; then :
10915 $as_echo_n "(cached) " >&6
10916else
10917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10918/* end confdefs.h. */
10919#ifdef __GNUC__
10920# define alloca __builtin_alloca
10921#else
10922# ifdef _MSC_VER
10923# include <malloc.h>
10924# define alloca _alloca
10925# else
10926# ifdef HAVE_ALLOCA_H
10927# include <alloca.h>
10928# else
10929# ifdef _AIX
10930 #pragma alloca
10931# else
10932# ifndef alloca /* predefined by HP cc +Olibcalls */
10933char *alloca ();
10934# endif
10935# endif
10936# endif
10937# endif
10938#endif
10939
10940int
10941main ()
10942{
10943char *p = (char *) alloca (1);
10944 if (p) return 0;
10945 ;
10946 return 0;
10947}
10948_ACEOF
10949if ac_fn_c_try_link "$LINENO"; then :
10950 ac_cv_func_alloca_works=yes
10951else
10952 ac_cv_func_alloca_works=no
10953fi
10954rm -f core conftest.err conftest.$ac_objext \
10955 conftest$ac_exeext conftest.$ac_ext
10956fi
10957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10958$as_echo "$ac_cv_func_alloca_works" >&6; }
10959
10960if test $ac_cv_func_alloca_works = yes; then
10961
10962$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10963
10964else
10965 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10966# that cause trouble. Some versions do not even contain alloca or
10967# contain a buggy version. If you still want to use their alloca,
10968# use ar to extract alloca.o from them instead of compiling alloca.c.
10969
10970ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10971
10972$as_echo "#define C_ALLOCA 1" >>confdefs.h
10973
10974
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10976$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10977if test "${ac_cv_os_cray+set}" = set; then :
10978 $as_echo_n "(cached) " >&6
10979else
10980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10981/* end confdefs.h. */
10982#if defined CRAY && ! defined CRAY2
10983webecray
10984#else
10985wenotbecray
10986#endif
10987
10988_ACEOF
10989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10990 $EGREP "webecray" >/dev/null 2>&1; then :
10991 ac_cv_os_cray=yes
10992else
10993 ac_cv_os_cray=no
10994fi
10995rm -f conftest*
10996
10997fi
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10999$as_echo "$ac_cv_os_cray" >&6; }
11000if test $ac_cv_os_cray = yes; then
11001 for ac_func in _getb67 GETB67 getb67; do
11002 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11003ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11004eval as_val=\$$as_ac_var
11005 if test "x$as_val" = x""yes; then :
11006
11007cat >>confdefs.h <<_ACEOF
11008#define CRAY_STACKSEG_END $ac_func
11009_ACEOF
11010
11011 break
11012fi
11013
11014 done
11015fi
11016
11017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11018$as_echo_n "checking stack direction for C alloca... " >&6; }
11019if test "${ac_cv_c_stack_direction+set}" = set; then :
11020 $as_echo_n "(cached) " >&6
11021else
11022 if test "$cross_compiling" = yes; then :
11023 ac_cv_c_stack_direction=0
11024else
11025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026/* end confdefs.h. */
11027$ac_includes_default
11028int
11029find_stack_direction ()
11030{
11031 static char *addr = 0;
11032 auto char dummy;
11033 if (addr == 0)
11034 {
11035 addr = &dummy;
11036 return find_stack_direction ();
11037 }
11038 else
11039 return (&dummy > addr) ? 1 : -1;
11040}
11041
11042int
11043main ()
11044{
11045 return find_stack_direction () < 0;
11046}
11047_ACEOF
11048if ac_fn_c_try_run "$LINENO"; then :
11049 ac_cv_c_stack_direction=1
11050else
11051 ac_cv_c_stack_direction=-1
11052fi
11053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11054 conftest.$ac_objext conftest.beam conftest.$ac_ext
11055fi
11056
11057fi
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11059$as_echo "$ac_cv_c_stack_direction" >&6; }
11060cat >>confdefs.h <<_ACEOF
11061#define STACK_DIRECTION $ac_cv_c_stack_direction
11062_ACEOF
11063
11064
11065fi
11066
11067
11068
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11070$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11071if test "${am_cv_langinfo_codeset+set}" = set; then :
11072 $as_echo_n "(cached) " >&6
11073else
11074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h. */
11076#include <langinfo.h>
11077int
11078main ()
11079{
11080char* cs = nl_langinfo(CODESET);
11081 ;
11082 return 0;
11083}
11084_ACEOF
11085if ac_fn_c_try_link "$LINENO"; then :
11086 am_cv_langinfo_codeset=yes
11087else
11088 am_cv_langinfo_codeset=no
11089fi
11090rm -f core conftest.err conftest.$ac_objext \
11091 conftest$ac_exeext conftest.$ac_ext
11092
11093fi
11094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11095$as_echo "$am_cv_langinfo_codeset" >&6; }
11096 if test $am_cv_langinfo_codeset = yes; then
11097
11098$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11099
11100 fi
11101
11102
a3d08894 11103 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
11104do :
11105 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11106ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11107eval as_val=\$$as_ac_Header
11108 if test "x$as_val" = x""yes; then :
11109 cat >>confdefs.h <<_ACEOF
11110#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11111_ACEOF
11112
11113fi
11114
11115done
11116
11117
11118 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11119do :
11120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11121ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11122eval as_val=\$$as_ac_var
11123 if test "x$as_val" = x""yes; then :
11124 cat >>confdefs.h <<_ACEOF
11125#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11126_ACEOF
11127
11128fi
11129done
11130
11131
11132 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11133if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11134 ac_have_decl=1
11135else
11136 ac_have_decl=0
11137fi
11138
11139cat >>confdefs.h <<_ACEOF
11140#define HAVE_DECL_STRERROR $ac_have_decl
11141_ACEOF
11142ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11143if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11144 ac_have_decl=1
11145else
11146 ac_have_decl=0
11147fi
11148
11149cat >>confdefs.h <<_ACEOF
11150#define HAVE_DECL_STRSTR $ac_have_decl
11151_ACEOF
11152
11153
e9bcb658
GB
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11155$as_echo_n "checking for sigsetjmp... " >&6; }
11156if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11157 $as_echo_n "(cached) " >&6
11158else
11159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11160/* end confdefs.h. */
11161
11162#include <setjmp.h>
11163
11164int
11165main ()
11166{
11167sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11168 ;
11169 return 0;
11170}
11171_ACEOF
11172if ac_fn_c_try_compile "$LINENO"; then :
11173 gdb_cv_func_sigsetjmp=yes
11174else
11175 gdb_cv_func_sigsetjmp=no
11176fi
11177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11178fi
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11180$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11181if test $gdb_cv_func_sigsetjmp = yes; then
11182
11183$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11184
11185fi
11186
3266f10b 11187
a3828db0
MK
11188# Check the return and argument types of ptrace. No canned test for
11189# this, so roll our own.
11190gdb_ptrace_headers='
4ff70b84 11191#include <sys/types.h>
a3828db0
MK
11192#if HAVE_SYS_PTRACE_H
11193# include <sys/ptrace.h>
11194#endif
11195#if HAVE_UNISTD_H
11196# include <unistd.h>
11197#endif
11198'
11199# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11200ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11201"
11202if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11203 ac_have_decl=1
06825bd1 11204else
81ecdfbb 11205 ac_have_decl=0
06825bd1 11206fi
06825bd1 11207
a3828db0 11208cat >>confdefs.h <<_ACEOF
81ecdfbb 11209#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11210_ACEOF
81ecdfbb 11211if test $ac_have_decl = 1; then :
bec39cab 11212
a3828db0 11213else
a3828db0
MK
11214
11215 : ${gdb_cv_func_ptrace_ret='int'}
11216 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11217
06825bd1
MK
11218fi
11219
064ef605
DJ
11220# Check return type. Varargs (used on GNU/Linux) conflict with the
11221# empty argument list, so check for that explicitly.
81ecdfbb
RW
11222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11223$as_echo_n "checking return type of ptrace... " >&6; }
11224if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11225 $as_echo_n "(cached) " >&6
bec39cab 11226else
81ecdfbb 11227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11228/* end confdefs.h. */
a3828db0 11229$gdb_ptrace_headers
bec39cab
AC
11230int
11231main ()
11232{
064ef605
DJ
11233extern long ptrace (enum __ptrace_request, ...);
11234 ;
11235 return 0;
11236}
11237_ACEOF
81ecdfbb 11238if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11239 gdb_cv_func_ptrace_ret='long'
11240else
81ecdfbb 11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11242/* end confdefs.h. */
11243$gdb_ptrace_headers
11244int
11245main ()
11246{
a3828db0 11247extern int ptrace ();
bec39cab
AC
11248 ;
11249 return 0;
11250}
11251_ACEOF
81ecdfbb 11252if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11253 gdb_cv_func_ptrace_ret='int'
70f9f479 11254else
81ecdfbb 11255 gdb_cv_func_ptrace_ret='long'
70f9f479 11256fi
81ecdfbb 11257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11258fi
81ecdfbb 11259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11260fi
81ecdfbb
RW
11261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11262$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11263
a3828db0
MK
11264cat >>confdefs.h <<_ACEOF
11265#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11266_ACEOF
70f9f479 11267
a3828db0 11268# Check argument types.
81ecdfbb
RW
11269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11270$as_echo_n "checking types of arguments for ptrace... " >&6; }
11271if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11272 $as_echo_n "(cached) " >&6
bec39cab 11273else
a3828db0 11274
81ecdfbb 11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11276/* end confdefs.h. */
11277$gdb_ptrace_headers
11278int
11279main ()
11280{
11281extern long ptrace (enum __ptrace_request, ...);
11282 ;
11283 return 0;
11284}
11285_ACEOF
81ecdfbb 11286if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11287 gdb_cv_func_ptrace_args='int,int,long,long'
11288else
064ef605 11289
a3828db0
MK
11290for gdb_arg1 in 'int' 'long'; do
11291 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11292 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11293 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11295/* end confdefs.h. */
a3828db0 11296$gdb_ptrace_headers
bec39cab
AC
11297int
11298main ()
11299{
a3828db0
MK
11300
11301extern $gdb_cv_func_ptrace_ret
11302 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11303
bec39cab
AC
11304 ;
11305 return 0;
11306}
11307_ACEOF
81ecdfbb 11308if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11309 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11310 break 4;
5c7f2947 11311fi
81ecdfbb 11312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11313 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11315/* end confdefs.h. */
a3828db0 11316$gdb_ptrace_headers
bec39cab
AC
11317int
11318main ()
11319{
a3828db0
MK
11320
11321extern $gdb_cv_func_ptrace_ret
11322 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11323
bec39cab
AC
11324 ;
11325 return 0;
11326}
11327_ACEOF
81ecdfbb 11328if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11329
11330gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11331 break 5;
78434e59 11332fi
81ecdfbb 11333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11334 done
11335 done
11336 done
11337 done
11338done
11339# Provide a safe default value.
11340: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11341
064ef605 11342fi
81ecdfbb 11343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11344fi
81ecdfbb
RW
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11346$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11347ac_save_IFS=$IFS; IFS=','
11348set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11349IFS=$ac_save_IFS
11350shift
bec39cab 11351
a3828db0
MK
11352cat >>confdefs.h <<_ACEOF
11353#define PTRACE_TYPE_ARG3 $3
11354_ACEOF
11355
96d7229d
LM
11356
11357cat >>confdefs.h <<_ACEOF
11358#define PTRACE_TYPE_ARG4 $4
11359_ACEOF
11360
a3828db0
MK
11361if test -n "$5"; then
11362
11363cat >>confdefs.h <<_ACEOF
11364#define PTRACE_TYPE_ARG5 $5
bec39cab 11365_ACEOF
78434e59
MK
11366
11367fi
11368
a3828db0 11369if test "$cross_compiling" = no; then
81ecdfbb
RW
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11371$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11372if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11373 $as_echo_n "(cached) " >&6
a3828db0 11374else
81ecdfbb
RW
11375 if test "$cross_compiling" = yes; then :
11376 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11377else
81ecdfbb 11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11379/* end confdefs.h. */
81ecdfbb 11380$ac_includes_default
bec39cab
AC
11381int
11382main ()
11383{
a3828db0
MK
11384/* If this system has a BSD-style setpgrp which takes arguments,
11385 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11386 exit successfully. */
81ecdfbb 11387 return setpgrp (1,1) != -1;
bec39cab
AC
11388 ;
11389 return 0;
11390}
11391_ACEOF
81ecdfbb 11392if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11393 ac_cv_func_setpgrp_void=no
c906108c 11394else
81ecdfbb 11395 ac_cv_func_setpgrp_void=yes
c906108c 11396fi
81ecdfbb
RW
11397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11398 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11399fi
81ecdfbb 11400
a3828db0 11401fi
81ecdfbb
RW
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11403$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11404if test $ac_cv_func_setpgrp_void = yes; then
11405
81ecdfbb 11406$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11407
11408fi
a3828db0
MK
11409
11410else
81ecdfbb
RW
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11412$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11413if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11414 $as_echo_n "(cached) " >&6
97bf5e38 11415else
81ecdfbb 11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11417/* end confdefs.h. */
a3828db0
MK
11418
11419#include <unistd.h>
11420
bec39cab
AC
11421int
11422main ()
11423{
a3828db0
MK
11424
11425 if (setpgrp(1,1) == -1)
11426 exit (0);
11427 else
11428 exit (1);
11429
bec39cab
AC
11430 ;
11431 return 0;
11432}
11433_ACEOF
81ecdfbb 11434if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11435 ac_cv_func_setpgrp_void=no
c906108c 11436else
81ecdfbb 11437 ac_cv_func_setpgrp_void=yes
c906108c 11438fi
81ecdfbb 11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11440fi
81ecdfbb
RW
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11442$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11443if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11444 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11445
a3828db0 11446fi
c906108c
SS
11447fi
11448
a3828db0
MK
11449# Assume we'll default to using the included libiberty regex.
11450gdb_use_included_regex=yes
11451
11452# However, if the system regex is GNU regex, then default to *not*
11453# using the included regex.
81ecdfbb
RW
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11455$as_echo_n "checking for GNU regex... " >&6; }
11456if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11457 $as_echo_n "(cached) " >&6
bec39cab 11458else
81ecdfbb 11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11460/* end confdefs.h. */
a3828db0 11461#include <gnu-versions.h>
bec39cab
AC
11462int
11463main ()
11464{
81ecdfbb
RW
11465#define REGEX_INTERFACE_VERSION 1
11466#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11467# error "Version mismatch"
11468#endif
5c45e068
MK
11469 ;
11470 return 0;
11471}
11472_ACEOF
81ecdfbb
RW
11473if ac_fn_c_try_compile "$LINENO"; then :
11474 gdb_cv_have_gnu_regex=yes
5c45e068 11475else
81ecdfbb
RW
11476 gdb_cv_have_gnu_regex=no
11477fi
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11479fi
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11481$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11482if test $gdb_cv_have_gnu_regex = yes; then
11483 gdb_use_included_regex=no
5c45e068 11484fi
81ecdfbb
RW
11485
11486
11487# Check whether --with-included-regex was given.
11488if test "${with_included_regex+set}" = set; then :
11489 withval=$with_included_regex; gdb_with_regex=$withval
11490else
11491 gdb_with_regex=$gdb_use_included_regex
c906108c 11492fi
81ecdfbb
RW
11493
11494if test "$gdb_with_regex" = yes; then
11495
11496$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11497
c906108c 11498fi
81ecdfbb
RW
11499
11500# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11501ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11502#include <sys/proc.h>
11503
11504"
11505if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11506
5c45e068 11507cat >>confdefs.h <<_ACEOF
a3828db0 11508#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11509_ACEOF
c906108c 11510
5c45e068 11511
97bf5e38 11512fi
c906108c 11513
5c45e068 11514
a3828db0 11515# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11517$as_echo_n "checking for struct lwp... " >&6; }
11518if test "${gdb_cv_struct_lwp+set}" = set; then :
11519 $as_echo_n "(cached) " >&6
bec39cab 11520else
81ecdfbb 11521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11522/* end confdefs.h. */
a3828db0
MK
11523#include <sys/param.h>
11524#include <sys/lwp.h>
bec39cab
AC
11525int
11526main ()
11527{
a3828db0 11528struct lwp l;
bec39cab
AC
11529 ;
11530 return 0;
11531}
11532_ACEOF
81ecdfbb 11533if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11534 gdb_cv_struct_lwp=yes
c906108c 11535else
81ecdfbb 11536 gdb_cv_struct_lwp=no
c906108c 11537fi
81ecdfbb 11538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11539fi
81ecdfbb
RW
11540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11541$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11542if test $gdb_cv_struct_lwp = yes; then
c906108c 11543
81ecdfbb 11544$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11545
97bf5e38 11546fi
c906108c 11547
a3828db0 11548# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11550$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11551if test "${gdb_cv_struct_reg+set}" = set; then :
11552 $as_echo_n "(cached) " >&6
bec39cab 11553else
81ecdfbb 11554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11555/* end confdefs.h. */
a3828db0
MK
11556#include <sys/types.h>
11557#include <machine/reg.h>
bec39cab
AC
11558int
11559main ()
11560{
a3828db0 11561struct reg r;
bec39cab
AC
11562 ;
11563 return 0;
11564}
11565_ACEOF
81ecdfbb 11566if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11567 gdb_cv_struct_reg=yes
27ca5dad 11568else
81ecdfbb 11569 gdb_cv_struct_reg=no
27ca5dad 11570fi
81ecdfbb 11571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11572fi
81ecdfbb
RW
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11574$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11575if test $gdb_cv_struct_reg = yes; then
bec39cab 11576
81ecdfbb 11577$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11578
11579fi
97bf5e38 11580
a3828db0
MK
11581# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11582# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11583ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11584"
11585if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11586
11587cat >>confdefs.h <<_ACEOF
a3828db0 11588#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11589_ACEOF
3862412b 11590
5c45e068 11591
97bf5e38 11592fi
81ecdfbb
RW
11593ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11594"
11595if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11596
11597cat >>confdefs.h <<_ACEOF
a3828db0 11598#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11599_ACEOF
3862412b 11600
5c45e068 11601
97bf5e38 11602fi
3862412b 11603
5c45e068 11604
6fea9e18
L
11605# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11606# Older amd64 Linux's don't have the fs_base and gs_base members of
11607# `struct user_regs_struct'.
11608ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11609"
11610if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11611
11612cat >>confdefs.h <<_ACEOF
11613#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11614_ACEOF
11615
11616
11617fi
11618ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11619"
11620if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11621
11622cat >>confdefs.h <<_ACEOF
11623#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11624_ACEOF
11625
11626
11627fi
11628
11629
a3828db0 11630# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11632$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11633if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11634 $as_echo_n "(cached) " >&6
451928c5 11635else
81ecdfbb 11636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11637/* end confdefs.h. */
a3828db0 11638#include <sys/ptrace.h>
bec39cab
AC
11639int
11640main ()
11641{
a3828db0 11642PTRACE_GETREGS;
bec39cab
AC
11643 ;
11644 return 0;
11645}
11646_ACEOF
81ecdfbb 11647if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11648 gdb_cv_have_ptrace_getregs=yes
451928c5 11649else
81ecdfbb 11650 gdb_cv_have_ptrace_getregs=no
451928c5 11651fi
81ecdfbb 11652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11653fi
11654
81ecdfbb
RW
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11656$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11657if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11658
81ecdfbb 11659$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11660
97bf5e38 11661fi
451928c5 11662
a3828db0 11663# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11665$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11666if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11667 $as_echo_n "(cached) " >&6
451928c5 11668else
81ecdfbb 11669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11670/* end confdefs.h. */
a3828db0 11671#include <sys/ptrace.h>
bec39cab
AC
11672int
11673main ()
11674{
a3828db0 11675PTRACE_GETFPXREGS;
bec39cab
AC
11676 ;
11677 return 0;
11678}
11679_ACEOF
81ecdfbb 11680if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11681 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11682else
81ecdfbb 11683 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11684fi
81ecdfbb 11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11686fi
11687
81ecdfbb
RW
11688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11689$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11690if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11691
81ecdfbb 11692$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11693
97bf5e38 11694fi
451928c5 11695
a3828db0 11696# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11698$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11699if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11700 $as_echo_n "(cached) " >&6
3862412b 11701else
81ecdfbb 11702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11703/* end confdefs.h. */
a3828db0
MK
11704#include <sys/types.h>
11705#include <sys/ptrace.h>
bec39cab
AC
11706int
11707main ()
11708{
a3828db0 11709PT_GETDBREGS;
bec39cab
AC
11710 ;
11711 return 0;
11712}
11713_ACEOF
81ecdfbb 11714if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11715 gdb_cv_have_pt_getdbregs=yes
3862412b 11716else
81ecdfbb 11717 gdb_cv_have_pt_getdbregs=no
3862412b 11718fi
81ecdfbb 11719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11720fi
11721
81ecdfbb
RW
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11723$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11724if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11725
81ecdfbb 11726$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11727
97bf5e38 11728fi
3862412b 11729
a3828db0 11730# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11732$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11733if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11734 $as_echo_n "(cached) " >&6
3862412b 11735else
81ecdfbb 11736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11737/* end confdefs.h. */
a3828db0
MK
11738#include <sys/types.h>
11739#include <sys/ptrace.h>
bec39cab
AC
11740int
11741main ()
11742{
a3828db0 11743PT_GETXMMREGS;
bec39cab
AC
11744 ;
11745 return 0;
11746}
11747_ACEOF
81ecdfbb 11748if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11749 gdb_cv_have_pt_getxmmregs=yes
3862412b 11750else
81ecdfbb 11751 gdb_cv_have_pt_getxmmregs=no
3862412b 11752fi
81ecdfbb 11753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11754fi
11755
81ecdfbb
RW
11756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11757$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11758if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11759
81ecdfbb 11760$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11761
97bf5e38 11762fi
3862412b 11763
05b4bd79 11764# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11765
11766if test "${target}" = "${host}"; then
11767 case "${host}" in
7b00db47 11768 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11769
81ecdfbb 11770$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11771
11772 ;;
c162e8c9 11773 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11774
81ecdfbb 11775$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11776
11777 ;;
11778 mips-sgi-irix5*)
11779 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11780
81ecdfbb 11781$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11782
11783 ;;
11784 esac
11785fi
11786
11787if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11789$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11790 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11791 $as_echo_n "(cached) " >&6
596c9d4b 11792else
81ecdfbb 11793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11794/* end confdefs.h. */
596c9d4b
KB
11795
11796#define _SYSCALL32
d30c5336
JK
11797/* Needed for new procfs interface on sparc-solaris. */
11798#define _STRUCTURED_PROC 1
596c9d4b 11799#include <sys/procfs.h>
bec39cab
AC
11800int
11801main ()
11802{
97bf5e38 11803gregset_t avar
bec39cab
AC
11804 ;
11805 return 0;
11806}
11807_ACEOF
81ecdfbb 11808if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11809 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11810else
81ecdfbb 11811 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11812
596c9d4b 11813fi
81ecdfbb 11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11815fi
11816
97bf5e38 11817 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11818
81ecdfbb 11819$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11820
11821 fi
81ecdfbb
RW
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11823$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11824
81ecdfbb
RW
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11826$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11827 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11828 $as_echo_n "(cached) " >&6
d84dd0c5 11829else
81ecdfbb 11830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11831/* end confdefs.h. */
97bf5e38
MK
11832
11833#define _SYSCALL32
d30c5336
JK
11834/* Needed for new procfs interface on sparc-solaris. */
11835#define _STRUCTURED_PROC 1
d84dd0c5 11836#include <sys/procfs.h>
bec39cab
AC
11837int
11838main ()
11839{
97bf5e38 11840fpregset_t avar
bec39cab
AC
11841 ;
11842 return 0;
11843}
11844_ACEOF
81ecdfbb 11845if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11846 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11847else
81ecdfbb 11848 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11849
d84dd0c5 11850fi
81ecdfbb 11851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11852fi
11853
97bf5e38 11854 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11855
81ecdfbb 11856$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11857
97bf5e38 11858 fi
81ecdfbb
RW
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11860$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11861
81ecdfbb
RW
11862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11863$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11864 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11865 $as_echo_n "(cached) " >&6
c906108c 11866else
81ecdfbb 11867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11868/* end confdefs.h. */
c906108c 11869
97bf5e38 11870#define _SYSCALL32
d30c5336
JK
11871/* Needed for new procfs interface on sparc-solaris. */
11872#define _STRUCTURED_PROC 1
97bf5e38 11873#include <sys/procfs.h>
bec39cab
AC
11874int
11875main ()
11876{
97bf5e38 11877prgregset_t avar
bec39cab
AC
11878 ;
11879 return 0;
11880}
11881_ACEOF
81ecdfbb 11882if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11883 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11884else
81ecdfbb 11885 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11886
c906108c 11887fi
81ecdfbb 11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11889fi
11890
97bf5e38 11891 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11892
81ecdfbb 11893$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11894
97bf5e38 11895 fi
81ecdfbb
RW
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11897$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11898
81ecdfbb
RW
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11900$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11901 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11902 $as_echo_n "(cached) " >&6
d45fe813 11903else
81ecdfbb 11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11905/* end confdefs.h. */
97bf5e38
MK
11906
11907#define _SYSCALL32
d30c5336
JK
11908/* Needed for new procfs interface on sparc-solaris. */
11909#define _STRUCTURED_PROC 1
97bf5e38 11910#include <sys/procfs.h>
bec39cab
AC
11911int
11912main ()
11913{
97bf5e38 11914prfpregset_t avar
bec39cab
AC
11915 ;
11916 return 0;
11917}
11918_ACEOF
81ecdfbb 11919if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11920 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11921else
81ecdfbb 11922 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11923
d45fe813 11924fi
81ecdfbb 11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11926fi
11927
97bf5e38 11928 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11929
81ecdfbb 11930$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11931
97bf5e38 11932 fi
81ecdfbb
RW
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11934$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11935
81ecdfbb
RW
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11937$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11938 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11939 $as_echo_n "(cached) " >&6
d45fe813 11940else
81ecdfbb 11941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11942/* end confdefs.h. */
97bf5e38
MK
11943
11944#define _SYSCALL32
d30c5336
JK
11945/* Needed for new procfs interface on sparc-solaris. */
11946#define _STRUCTURED_PROC 1
97bf5e38 11947#include <sys/procfs.h>
bec39cab
AC
11948int
11949main ()
11950{
97bf5e38 11951prgregset32_t avar
bec39cab
AC
11952 ;
11953 return 0;
11954}
11955_ACEOF
81ecdfbb 11956if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11957 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11958else
81ecdfbb 11959 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11960
d45fe813 11961fi
81ecdfbb 11962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11963fi
11964
97bf5e38 11965 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11966
81ecdfbb 11967$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11968
97bf5e38 11969 fi
81ecdfbb
RW
11970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11971$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11972
81ecdfbb
RW
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11974$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11975 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11976 $as_echo_n "(cached) " >&6
d45fe813 11977else
81ecdfbb 11978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11979/* end confdefs.h. */
97bf5e38 11980
d45fe813 11981#define _SYSCALL32
d30c5336
JK
11982/* Needed for new procfs interface on sparc-solaris. */
11983#define _STRUCTURED_PROC 1
97bf5e38 11984#include <sys/procfs.h>
bec39cab
AC
11985int
11986main ()
11987{
97bf5e38 11988lwpid_t avar
bec39cab
AC
11989 ;
11990 return 0;
11991}
11992_ACEOF
81ecdfbb 11993if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11994 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11995else
81ecdfbb 11996 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11997
d45fe813 11998fi
81ecdfbb 11999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12000fi
12001
97bf5e38 12002 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12003
81ecdfbb 12004$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12005
97bf5e38 12006 fi
81ecdfbb
RW
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12008$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12009
81ecdfbb
RW
12010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12011$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12012 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12013 $as_echo_n "(cached) " >&6
c906108c 12014else
81ecdfbb 12015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12016/* end confdefs.h. */
c906108c 12017
97bf5e38 12018#define _SYSCALL32
d30c5336
JK
12019/* Needed for new procfs interface on sparc-solaris. */
12020#define _STRUCTURED_PROC 1
97bf5e38 12021#include <sys/procfs.h>
bec39cab
AC
12022int
12023main ()
12024{
97bf5e38 12025psaddr_t avar
bec39cab
AC
12026 ;
12027 return 0;
12028}
12029_ACEOF
81ecdfbb 12030if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12031 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12032else
81ecdfbb 12033 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12034
c906108c 12035fi
81ecdfbb 12036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12037fi
12038
97bf5e38 12039 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12040
81ecdfbb 12041$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12042
97bf5e38 12043 fi
81ecdfbb
RW
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12045$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12046
81ecdfbb
RW
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12048$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12049 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12050 $as_echo_n "(cached) " >&6
c906108c 12051else
81ecdfbb 12052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12053/* end confdefs.h. */
c906108c 12054
97bf5e38 12055#define _SYSCALL32
d30c5336
JK
12056/* Needed for new procfs interface on sparc-solaris. */
12057#define _STRUCTURED_PROC 1
97bf5e38 12058#include <sys/procfs.h>
bec39cab
AC
12059int
12060main ()
12061{
97bf5e38 12062prsysent_t avar
bec39cab
AC
12063 ;
12064 return 0;
12065}
12066_ACEOF
81ecdfbb 12067if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12068 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12069else
81ecdfbb 12070 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12071
c906108c 12072fi
81ecdfbb 12073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12074fi
12075
97bf5e38 12076 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12077
81ecdfbb 12078$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12079
97bf5e38 12080 fi
81ecdfbb
RW
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12082$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12083
81ecdfbb
RW
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12085$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12086 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12087 $as_echo_n "(cached) " >&6
c906108c 12088else
81ecdfbb 12089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12090/* end confdefs.h. */
c906108c 12091
97bf5e38 12092#define _SYSCALL32
d30c5336
JK
12093/* Needed for new procfs interface on sparc-solaris. */
12094#define _STRUCTURED_PROC 1
97bf5e38 12095#include <sys/procfs.h>
bec39cab
AC
12096int
12097main ()
12098{
97bf5e38 12099pr_sigset_t avar
bec39cab
AC
12100 ;
12101 return 0;
12102}
12103_ACEOF
81ecdfbb 12104if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12105 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12106else
81ecdfbb 12107 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12108
c906108c 12109fi
81ecdfbb 12110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12111fi
12112
97bf5e38 12113 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12114
81ecdfbb 12115$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12116
97bf5e38 12117 fi
81ecdfbb
RW
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12119$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12120
81ecdfbb
RW
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12122$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12123 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12124 $as_echo_n "(cached) " >&6
c906108c 12125else
81ecdfbb 12126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12127/* end confdefs.h. */
c906108c 12128
97bf5e38 12129#define _SYSCALL32
d30c5336
JK
12130/* Needed for new procfs interface on sparc-solaris. */
12131#define _STRUCTURED_PROC 1
97bf5e38 12132#include <sys/procfs.h>
bec39cab
AC
12133int
12134main ()
12135{
97bf5e38 12136pr_sigaction64_t avar
bec39cab
AC
12137 ;
12138 return 0;
12139}
12140_ACEOF
81ecdfbb 12141if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12142 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12143else
81ecdfbb 12144 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12145
c906108c 12146fi
81ecdfbb 12147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12148fi
12149
97bf5e38 12150 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12151
81ecdfbb 12152$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12153
97bf5e38 12154 fi
81ecdfbb
RW
12155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12156$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12157
81ecdfbb
RW
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12159$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12160 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12161 $as_echo_n "(cached) " >&6
97bf5e38 12162else
81ecdfbb 12163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12164/* end confdefs.h. */
97bf5e38
MK
12165
12166#define _SYSCALL32
d30c5336
JK
12167/* Needed for new procfs interface on sparc-solaris. */
12168#define _STRUCTURED_PROC 1
97bf5e38 12169#include <sys/procfs.h>
bec39cab
AC
12170int
12171main ()
12172{
97bf5e38 12173pr_siginfo64_t avar
bec39cab
AC
12174 ;
12175 return 0;
12176}
12177_ACEOF
81ecdfbb 12178if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12179 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12180else
81ecdfbb 12181 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12182
97bf5e38 12183fi
81ecdfbb 12184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12185fi
c906108c 12186
97bf5e38 12187 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12188
81ecdfbb 12189$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12190
97bf5e38 12191 fi
81ecdfbb
RW
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12193$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12194
12195
97bf5e38
MK
12196
12197
12198
97bf5e38 12199 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12201$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12202 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12203 $as_echo_n "(cached) " >&6
c906108c 12204else
81ecdfbb 12205 if test "$cross_compiling" = yes; then :
97bf5e38 12206 gdb_cv_prfpregset_t_broken=yes
c906108c 12207else
81ecdfbb 12208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12209/* end confdefs.h. */
97bf5e38
MK
12210#include <sys/procfs.h>
12211 int main ()
12212 {
12213 if (sizeof (prfpregset_t) == sizeof (void *))
12214 return 1;
12215 return 0;
12216 }
bec39cab 12217_ACEOF
81ecdfbb 12218if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12219 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12220else
12221 gdb_cv_prfpregset_t_broken=yes
c906108c 12222fi
81ecdfbb
RW
12223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12224 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12225fi
81ecdfbb 12226
c906108c
SS
12227fi
12228
81ecdfbb
RW
12229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12230$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12231 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12232
81ecdfbb 12233$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12234
97bf5e38
MK
12235 fi
12236 fi
c906108c 12237fi
c906108c 12238
bc8bcb4b 12239# Check if the compiler supports the `long long' type.
c906108c 12240
81ecdfbb
RW
12241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12242$as_echo_n "checking for long long support in compiler... " >&6; }
12243if test "${gdb_cv_c_long_long+set}" = set; then :
12244 $as_echo_n "(cached) " >&6
97bf5e38 12245else
81ecdfbb 12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12247/* end confdefs.h. */
bc8bcb4b 12248extern long long foo;
bec39cab
AC
12249int
12250main ()
12251{
bc8bcb4b 12252switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12253 ;
12254 return 0;
12255}
12256_ACEOF
81ecdfbb 12257if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12258 gdb_cv_c_long_long=yes
12259else
81ecdfbb 12260 gdb_cv_c_long_long=no
97bf5e38 12261fi
81ecdfbb 12262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12263fi
81ecdfbb
RW
12264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12265$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12266if test $gdb_cv_c_long_long != yes; then
12267 # libdecnumber requires long long.
12268 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12269fi
12270
bc8bcb4b 12271# Check if the compiler and runtime support printing long longs.
97bf5e38 12272
81ecdfbb
RW
12273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12274$as_echo_n "checking for long long support in printf... " >&6; }
12275if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12276 $as_echo_n "(cached) " >&6
97bf5e38 12277else
81ecdfbb 12278 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12279 gdb_cv_printf_has_long_long=no
12280else
81ecdfbb 12281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12282/* end confdefs.h. */
bc8bcb4b
MK
12283$ac_includes_default
12284int
12285main ()
12286{
12287char buf[32];
97bf5e38
MK
12288 long long l = 0;
12289 l = (l << 16) + 0x0123;
12290 l = (l << 16) + 0x4567;
12291 l = (l << 16) + 0x89ab;
12292 l = (l << 16) + 0xcdef;
12293 sprintf (buf, "0x%016llx", l);
12294 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12295 ;
12296 return 0;
c906108c 12297}
bec39cab 12298_ACEOF
81ecdfbb 12299if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12300 gdb_cv_printf_has_long_long=yes
12301else
81ecdfbb 12302 gdb_cv_printf_has_long_long=no
97bf5e38 12303fi
81ecdfbb
RW
12304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12305 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12306fi
81ecdfbb 12307
97bf5e38 12308fi
81ecdfbb
RW
12309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12310$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12311if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12312
81ecdfbb 12313$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12314
12315fi
97bf5e38 12316
1a619819
LM
12317# Check if the compiler and runtime support printing decfloats.
12318
81ecdfbb
RW
12319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12320$as_echo_n "checking for decfloat support in printf... " >&6; }
12321if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12322 $as_echo_n "(cached) " >&6
1a619819 12323else
81ecdfbb 12324 if test "$cross_compiling" = yes; then :
1a619819
LM
12325 gdb_cv_printf_has_decfloat=no
12326else
81ecdfbb 12327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12328/* end confdefs.h. */
12329$ac_includes_default
12330int
12331main ()
12332{
12333char buf[64];
12334 _Decimal32 d32 = 1.2345df;
12335 _Decimal64 d64 = 1.2345dd;
12336 _Decimal128 d128 = 1.2345dl;
12337 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12338 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12339 ;
12340 return 0;
12341}
12342_ACEOF
81ecdfbb 12343if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12344 gdb_cv_printf_has_decfloat=yes
12345else
81ecdfbb 12346 gdb_cv_printf_has_decfloat=no
1a619819 12347fi
81ecdfbb
RW
12348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12349 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12350fi
81ecdfbb 12351
1a619819 12352fi
81ecdfbb
RW
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12354$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12355if test $gdb_cv_printf_has_decfloat = yes; then
12356
81ecdfbb 12357$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12358
12359fi
12360
bc8bcb4b
MK
12361# Check if the compiler supports the `long double' type. We can't use
12362# AC_C_LONG_DOUBLE because that one does additional checks on the
12363# constants defined in <float.h> that fail on some systems,
12364# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12365
81ecdfbb
RW
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12367$as_echo_n "checking for long double support in compiler... " >&6; }
12368if test "${gdb_cv_c_long_double+set}" = set; then :
12369 $as_echo_n "(cached) " >&6
97bf5e38 12370else
81ecdfbb 12371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12372/* end confdefs.h. */
97bf5e38 12373long double foo;
bec39cab 12374_ACEOF
81ecdfbb 12375if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12376 gdb_cv_c_long_double=yes
97bf5e38 12377else
81ecdfbb 12378 gdb_cv_c_long_double=no
97bf5e38 12379fi
81ecdfbb 12380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12381fi
81ecdfbb
RW
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12383$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12384if test $gdb_cv_c_long_double = yes; then
c906108c 12385
81ecdfbb 12386$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12387
12388fi
12389
bc8bcb4b 12390# Check if the compiler and runtime support printing long doubles.
97bf5e38 12391
81ecdfbb
RW
12392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12393$as_echo_n "checking for long double support in printf... " >&6; }
12394if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12395 $as_echo_n "(cached) " >&6
97bf5e38 12396else
81ecdfbb 12397 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12398 gdb_cv_printf_has_long_double=no
12399else
81ecdfbb 12400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12401/* end confdefs.h. */
bc8bcb4b
MK
12402$ac_includes_default
12403int
12404main ()
12405{
12406char buf[16];
97bf5e38
MK
12407 long double f = 3.141592653;
12408 sprintf (buf, "%Lg", f);
12409 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12410 ;
12411 return 0;
97bf5e38 12412}
bec39cab 12413_ACEOF
81ecdfbb 12414if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12415 gdb_cv_printf_has_long_double=yes
c906108c 12416else
81ecdfbb 12417 gdb_cv_printf_has_long_double=no
c906108c 12418fi
81ecdfbb
RW
12419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12420 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12421fi
81ecdfbb 12422
c906108c 12423fi
81ecdfbb
RW
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12425$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12426if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12427
81ecdfbb 12428$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12429
12430fi
97bf5e38 12431
bc8bcb4b 12432# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12433
81ecdfbb
RW
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12435$as_echo_n "checking for long double support in scanf... " >&6; }
12436if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12437 $as_echo_n "(cached) " >&6
97bf5e38 12438else
81ecdfbb 12439 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12440 gdb_cv_scanf_has_long_double=no
12441else
81ecdfbb 12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12443/* end confdefs.h. */
bc8bcb4b
MK
12444#include <stdio.h>
12445int
12446main ()
12447{
12448char *buf = "3.141592653";
97bf5e38
MK
12449 long double f = 0;
12450 sscanf (buf, "%Lg", &f);
12451 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12452 ;
12453 return 0;
97bf5e38 12454}
bec39cab 12455_ACEOF
81ecdfbb 12456if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12457 gdb_cv_scanf_has_long_double=yes
12458else
81ecdfbb 12459 gdb_cv_scanf_has_long_double=no
97bf5e38 12460fi
81ecdfbb
RW
12461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12462 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12463fi
81ecdfbb 12464
c906108c 12465fi
81ecdfbb
RW
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12467$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12468if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12469
81ecdfbb 12470$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12471
12472fi
c906108c 12473
438013df
AO
12474case ${host_os} in
12475aix*)
81ecdfbb
RW
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12477$as_echo_n "checking for -bbigtoc option... " >&6; }
12478if test "${gdb_cv_bigtoc+set}" = set; then :
12479 $as_echo_n "(cached) " >&6
438013df 12480else
bec39cab 12481
438013df
AO
12482 SAVE_LDFLAGS=$LDFLAGS
12483
12484 case $GCC in
12485 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12486 *) gdb_cv_bigtoc=-bbigtoc ;;
12487 esac
12488
12489 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12491/* end confdefs.h. */
438013df 12492
bec39cab
AC
12493int
12494main ()
12495{
438013df 12496int i;
bec39cab
AC
12497 ;
12498 return 0;
12499}
12500_ACEOF
81ecdfbb 12501if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12502
81ecdfbb
RW
12503else
12504 gdb_cv_bigtoc=
438013df 12505fi
81ecdfbb
RW
12506rm -f core conftest.err conftest.$ac_objext \
12507 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12508 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12509
bec39cab 12510fi
81ecdfbb
RW
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12512$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12513 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12514 ;;
12515esac
12516
38f6b338 12517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12518$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12519dynamic_list=false
12520if test "${gdb_native}" = yes; then
12521 # The dynamically loaded libthread_db needs access to symbols in the gdb
12522 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12523 # may not be supported there.
12524 old_LDFLAGS="$LDFLAGS"
12525 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12526 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12527 LDFLAGS="$LDFLAGS $RDYNAMIC"
12528 if test "${have_libpython}" = no; then
12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12530/* end confdefs.h. */
12531
12532int
12533main ()
12534{
12535
12536 ;
12537 return 0;
12538}
12539_ACEOF
12540if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12541 dynamic_list=true
12542fi
12543rm -f core conftest.err conftest.$ac_objext \
12544 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12545 else
12546 # Workaround http://bugs.python.org/issue4434 where static
12547 # libpythonX.Y.a would get its symbols required for
12548 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12549 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12550 old_CFLAGS="$CFLAGS"
12551 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12552 old_LIBS="$LIBS"
12553 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12554 if test "$cross_compiling" = yes; then :
3bebe2f2 12555 true
f6528abd 12556else
3bebe2f2
JK
12557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12558/* end confdefs.h. */
12559#include "${have_libpython}/Python.h"
12560int
12561main ()
12562{
12563int err;
38f6b338
JK
12564 Py_Initialize ();
12565 err = PyRun_SimpleString ("import itertools\n");
12566 Py_Finalize ();
12567 return err == 0 ? 0 : 1;
3bebe2f2
JK
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572if ac_fn_c_try_run "$LINENO"; then :
12573 dynamic_list=true
12574fi
12575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12576 conftest.$ac_objext conftest.beam conftest.$ac_ext
12577fi
12578
8c1fb155 12579 LIBS="$old_LIBS"
38f6b338
JK
12580 CFLAGS="$old_CFLAGS"
12581 fi
12582 LDFLAGS="$old_LDFLAGS"
12583fi
12584if $dynamic_list; then
12585 found="-Wl,--dynamic-list"
12586 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12587else
38f6b338
JK
12588 found="-rdynamic"
12589 RDYNAMIC="-rdynamic"
f6528abd 12590fi
f6528abd 12591
38f6b338 12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12593$as_echo "$found" >&6; }
0407b3f1 12594
f6528abd 12595
0407b3f1 12596if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12597 case ${host_os} in
c906108c 12598 solaris*)
d92419e5
JB
12599 # See if thread_db library is around for Solaris thread debugging.
12600 # Note that we must explicitly test for version 1 of the library
12601 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12602 # the same API.
81ecdfbb
RW
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12604$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12605 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12607$as_echo "yes" >&6; }
60ca704f 12608
81ecdfbb 12609$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12610
3483b318 12611 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12612 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12614$as_echo_n "checking for dlopen in -ldl... " >&6; }
12615if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12616 $as_echo_n "(cached) " >&6
c906108c 12617else
bec39cab 12618 ac_check_lib_save_LIBS=$LIBS
c906108c 12619LIBS="-ldl $LIBS"
81ecdfbb 12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12621/* end confdefs.h. */
12622
81ecdfbb
RW
12623/* Override any GCC internal prototype to avoid an error.
12624 Use char because int might match the return type of a GCC
12625 builtin and then its argument prototype would still apply. */
bec39cab
AC
12626#ifdef __cplusplus
12627extern "C"
12628#endif
bec39cab
AC
12629char dlopen ();
12630int
12631main ()
12632{
81ecdfbb 12633return dlopen ();
bec39cab
AC
12634 ;
12635 return 0;
12636}
12637_ACEOF
81ecdfbb 12638if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12639 ac_cv_lib_dl_dlopen=yes
12640else
81ecdfbb 12641 ac_cv_lib_dl_dlopen=no
bec39cab 12642fi
81ecdfbb
RW
12643rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12645LIBS=$ac_check_lib_save_LIBS
12646fi
81ecdfbb
RW
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12648$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12649if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12650 cat >>confdefs.h <<_ACEOF
12651#define HAVE_LIBDL 1
12652_ACEOF
c906108c
SS
12653
12654 LIBS="-ldl $LIBS"
12655
c906108c
SS
12656fi
12657
f6528abd 12658 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12659 # Sun randomly tweaked the prototypes in <proc_service.h>
12660 # at one point.
81ecdfbb
RW
12661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12662$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12663 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12664 $as_echo_n "(cached) " >&6
c906108c 12665else
bec39cab 12666
81ecdfbb 12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12668/* end confdefs.h. */
c906108c
SS
12669
12670 #include <proc_service.h>
12671 ps_err_e ps_pdwrite
12672 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12673
bec39cab
AC
12674int
12675main ()
12676{
12677
12678 ;
12679 return 0;
12680}
12681_ACEOF
81ecdfbb 12682if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12683 gdb_cv_proc_service_is_old=no
12684else
81ecdfbb 12685 gdb_cv_proc_service_is_old=yes
c906108c 12686fi
81ecdfbb 12687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12688
c906108c
SS
12689fi
12690
81ecdfbb
RW
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12692$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12693 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12694
81ecdfbb 12695$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12696
12697 fi
12698 else
81ecdfbb
RW
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12700$as_echo "no" >&6; }
c906108c
SS
12701 fi
12702 ;;
d92419e5 12703 aix*)
81ecdfbb
RW
12704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12705$as_echo_n "checking for AiX thread debugging library... " >&6; }
12706 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12707 $as_echo_n "(cached) " >&6
bec39cab 12708else
81ecdfbb 12709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12710/* end confdefs.h. */
d92419e5 12711#include <sys/pthdebug.h>
bec39cab
AC
12712int
12713main ()
12714{
d92419e5
JB
12715#ifndef PTHDB_VERSION_3
12716 #error
12717 #endif
bec39cab
AC
12718 ;
12719 return 0;
12720}
12721_ACEOF
81ecdfbb 12722if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12723 gdb_cv_have_aix_thread_debug=yes
12724else
81ecdfbb 12725 gdb_cv_have_aix_thread_debug=no
d92419e5 12726fi
81ecdfbb 12727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12728fi
12729
81ecdfbb
RW
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12731$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12732 if test $gdb_cv_have_aix_thread_debug = yes; then
12733 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12734 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12735 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12736
12737 # Older versions of AIX do not provide the declaration for
12738 # the getthrds function (it appears that it was introduced
12739 # with AIX 6.x).
12740 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12741"
12742if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12743 ac_have_decl=1
12744else
12745 ac_have_decl=0
12746fi
12747
12748cat >>confdefs.h <<_ACEOF
12749#define HAVE_DECL_GETTHRDS $ac_have_decl
12750_ACEOF
12751
d92419e5
JB
12752 fi
12753 ;;
c906108c 12754 esac
bec39cab 12755
c906108c
SS
12756fi
12757
3f47be5c 12758if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12760$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12761if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12762 $as_echo_n "(cached) " >&6
bec39cab 12763else
81ecdfbb 12764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12765/* end confdefs.h. */
3f47be5c 12766#include <thread_db.h>
bec39cab
AC
12767int
12768main ()
12769{
3f47be5c 12770int i = TD_NOTALLOC;
bec39cab
AC
12771 ;
12772 return 0;
12773}
12774_ACEOF
81ecdfbb 12775if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12776 gdb_cv_thread_db_h_has_td_notalloc=yes
12777else
81ecdfbb 12778 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12779
3f47be5c 12780fi
81ecdfbb 12781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12782
bec39cab 12783fi
81ecdfbb
RW
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12785$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12787$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12788if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12789 $as_echo_n "(cached) " >&6
59f80f10 12790else
81ecdfbb 12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12792/* end confdefs.h. */
12793#include <thread_db.h>
12794int
12795main ()
12796{
12797int i = TD_VERSION;
12798 ;
12799 return 0;
12800}
12801_ACEOF
81ecdfbb 12802if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12803 gdb_cv_thread_db_h_has_td_version=yes
12804else
81ecdfbb 12805 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12806
12807fi
81ecdfbb 12808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12809
12810fi
81ecdfbb
RW
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12812$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12814$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12815if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12816 $as_echo_n "(cached) " >&6
59f80f10 12817else
81ecdfbb 12818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12819/* end confdefs.h. */
12820#include <thread_db.h>
12821int
12822main ()
12823{
12824int i = TD_NOTLS;
12825 ;
12826 return 0;
12827}
12828_ACEOF
81ecdfbb 12829if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12830 gdb_cv_thread_db_h_has_td_notls=yes
12831else
81ecdfbb 12832 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12833
12834fi
81ecdfbb 12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12836
12837fi
81ecdfbb
RW
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12839$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12840fi
12841if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12842
81ecdfbb 12843$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12844
59f80f10
DJ
12845fi
12846if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12847
81ecdfbb 12848$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12849
12850fi
12851if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12852
81ecdfbb 12853$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12854
3f47be5c
EZ
12855fi
12856
b757528f 12857if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12859$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12860if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12861 $as_echo_n "(cached) " >&6
bec39cab 12862else
81ecdfbb 12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12864/* end confdefs.h. */
b757528f 12865#include <sys/syscall.h>
bec39cab
AC
12866int
12867main ()
12868{
b757528f 12869int i = __NR_tkill;
bec39cab
AC
12870 ;
12871 return 0;
12872}
12873_ACEOF
81ecdfbb 12874if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12875 gdb_cv_sys_syscall_h_has_tkill=yes
12876else
81ecdfbb 12877 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12878
b757528f 12879fi
81ecdfbb 12880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12881
bec39cab 12882fi
81ecdfbb
RW
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12884$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12885fi
99c1d451
TT
12886if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12887 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12888if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12889
81ecdfbb 12890$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12891
99c1d451
TT
12892
12893fi
12894
b757528f
JJ
12895fi
12896
81ecdfbb
RW
12897ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12898"
12899if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12900 ac_have_decl=1
10568435 12901else
81ecdfbb 12902 ac_have_decl=0
10568435 12903fi
10568435
JK
12904
12905cat >>confdefs.h <<_ACEOF
81ecdfbb 12906#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12907_ACEOF
12908
12909
81ecdfbb
RW
12910if test "$cross_compiling" = yes; then :
12911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12912/* end confdefs.h. */
12913#include <sys/personality.h>
12914int
12915main ()
12916{
12917
12918# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12919# define ADDR_NO_RANDOMIZE 0x0040000
12920# endif
12921 /* Test the flag could be set and stays set. */
12922 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12923 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12924 return 1
12925 ;
12926 return 0;
12927}
12928_ACEOF
81ecdfbb 12929if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12930 have_personality=true
12931else
81ecdfbb 12932 have_personality=false
10568435 12933fi
81ecdfbb
RW
12934rm -f core conftest.err conftest.$ac_objext \
12935 conftest$ac_exeext conftest.$ac_ext
10568435 12936else
81ecdfbb 12937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12938/* end confdefs.h. */
12939#include <sys/personality.h>
12940int
12941main ()
12942{
12943
12944# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12945# define ADDR_NO_RANDOMIZE 0x0040000
12946# endif
12947 /* Test the flag could be set and stays set. */
12948 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12949 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12950 return 1
12951 ;
12952 return 0;
12953}
12954_ACEOF
81ecdfbb 12955if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12956 have_personality=true
12957else
81ecdfbb 12958 have_personality=false
10568435 12959fi
81ecdfbb
RW
12960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12962fi
81ecdfbb 12963
10568435
JK
12964if $have_personality
12965then
12966
81ecdfbb 12967$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12968
12969fi
12970
e655c1a2
PA
12971case $host_os in
12972 go32* | *djgpp*)
12973 gdbinit=gdb.ini
12974 ;;
12975 *)
12976 gdbinit=.gdbinit
12977 ;;
12978esac
12979
12980cat >>confdefs.h <<_ACEOF
12981#define GDBINIT "$gdbinit"
12982_ACEOF
12983
12984
fb40c209 12985
f83d8a90
DE
12986# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12987# except that the argument to --with-sysroot is optional.
12988# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12989if test "x$with_sysroot" = xyes; then
12990 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12991fi
bec39cab 12992
81ecdfbb
RW
12993# Check whether --with-sysroot was given.
12994if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12995 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12996else
12997 TARGET_SYSTEM_ROOT=
12998fi
030292b7 12999
030292b7 13000
f83d8a90
DE
13001 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13002 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13003 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
13004 ac_define_dir=`eval echo $ac_define_dir`
030292b7 13005
f83d8a90
DE
13006cat >>confdefs.h <<_ACEOF
13007#define TARGET_SYSTEM_ROOT "$ac_define_dir"
13008_ACEOF
bec39cab 13009
030292b7 13010
b14b1491 13011
f83d8a90
DE
13012
13013 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13014 if test "x$prefix" = xNONE; then
13015 test_prefix=/usr/local
13016 else
13017 test_prefix=$prefix
13018 fi
13019 else
13020 test_prefix=$exec_prefix
13021 fi
13022 value=0
13023 case ${ac_define_dir} in
13024 "${test_prefix}"|"${test_prefix}/"*|\
13025 '${exec_prefix}'|'${exec_prefix}/'*)
13026 value=1
13027 ;;
13028 esac
13029
13030cat >>confdefs.h <<_ACEOF
13031#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
13032_ACEOF
030292b7
DJ
13033
13034
13035
16e7150e 13036
16e7150e 13037
81ecdfbb
RW
13038# Check whether --with-system-gdbinit was given.
13039if test "${with_system_gdbinit+set}" = set; then :
13040 withval=$with_system_gdbinit;
b14b1491
TT
13041 SYSTEM_GDBINIT=$withval
13042else
13043 SYSTEM_GDBINIT=
81ecdfbb
RW
13044fi
13045
16e7150e
JG
13046
13047 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13048 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13049 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13050 ac_define_dir=`eval echo $ac_define_dir`
13051
13052cat >>confdefs.h <<_ACEOF
13053#define SYSTEM_GDBINIT "$ac_define_dir"
13054_ACEOF
13055
13056
13057
0c4a4063 13058
b14b1491
TT
13059 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13060 if test "x$prefix" = xNONE; then
13061 test_prefix=/usr/local
13062 else
13063 test_prefix=$prefix
13064 fi
13065 else
13066 test_prefix=$exec_prefix
13067 fi
13068 value=0
13069 case ${ac_define_dir} in
13070 "${test_prefix}"|"${test_prefix}/"*|\
13071 '${exec_prefix}'|'${exec_prefix}/'*)
13072 value=1
13073 ;;
13074 esac
16e7150e 13075
b14b1491
TT
13076cat >>confdefs.h <<_ACEOF
13077#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13078_ACEOF
13079
b14b1491 13080
16e7150e 13081
0c4a4063 13082
81ecdfbb
RW
13083# Check whether --enable-werror was given.
13084if test "${enable_werror+set}" = set; then :
13085 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13086 yes | y) ERROR_ON_WARNING="yes" ;;
13087 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13088 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13089 esac
81ecdfbb
RW
13090fi
13091
094a342e 13092
a68ffae9
JK
13093# Enable -Werror by default when using gcc. Turn it off for releases.
13094if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
13095 ERROR_ON_WARNING=yes
13096fi
13097
13098WERROR_CFLAGS=""
13099if test "${ERROR_ON_WARNING}" = yes ; then
13100 WERROR_CFLAGS="-Werror"
13101fi
13102
aa79a185 13103build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 13104-Wpointer-sign \
1cb5e2a4 13105-Wno-unused -Wunused-value -Wunused-function \
352b3eda 13106-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 13107-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 13108-Wold-style-declaration -Wold-style-definition"
a3b362c4 13109
3526781e
DJ
13110# Enable -Wno-format by default when using gcc on mingw since many
13111# GCC versions complain about %I64.
13112case "${host}" in
13113 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 13114 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
13115esac
13116
81ecdfbb
RW
13117# Check whether --enable-build-warnings was given.
13118if test "${enable_build_warnings+set}" = set; then :
13119 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13120 yes) ;;
13121 no) build_warnings="-w";;
13122 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13123 build_warnings="${build_warnings} ${t}";;
13124 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13125 build_warnings="${t} ${build_warnings}";;
13126 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13127esac
d4f3574e 13128if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13129 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13130fi
81ecdfbb
RW
13131fi
13132# Check whether --enable-gdb-build-warnings was given.
13133if test "${enable_gdb_build_warnings+set}" = set; then :
13134 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13135 yes) ;;
13136 no) build_warnings="-w";;
13137 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13138 build_warnings="${build_warnings} ${t}";;
13139 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13140 build_warnings="${t} ${build_warnings}";;
13141 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13142esac
13143if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13144 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13145fi
81ecdfbb
RW
13146fi
13147WARN_CFLAGS=""
c906108c
SS
13148if test "x${build_warnings}" != x -a "x$GCC" = xyes
13149then
81ecdfbb
RW
13150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13151$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13152 # Separate out the -Werror flag as some files just cannot be
13153 # compiled with it enabled.
13154 for w in ${build_warnings}; do
13155 case $w in
13156 -Werr*) WERROR_CFLAGS=-Werror ;;
13157 *) # Check that GCC accepts it
4536bbc6
AC
13158 saved_CFLAGS="$CFLAGS"
13159 CFLAGS="$CFLAGS $w"
81ecdfbb 13160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13161/* end confdefs.h. */
4536bbc6 13162
bec39cab
AC
13163int
13164main ()
13165{
4536bbc6 13166
bec39cab
AC
13167 ;
13168 return 0;
13169}
13170_ACEOF
81ecdfbb 13171if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13172 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13173fi
81ecdfbb 13174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13175 CFLAGS="$saved_CFLAGS"
746a987d
AC
13176 esac
13177 done
81ecdfbb
RW
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13179$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13180fi
13181
13182
104c1213 13183
7a292a7a 13184# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13186$as_echo_n "checking for cygwin... " >&6; }
13187if test "${gdb_cv_os_cygwin+set}" = set; then :
13188 $as_echo_n "(cached) " >&6
bec39cab 13189else
81ecdfbb 13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13191/* end confdefs.h. */
7a292a7a
SS
13192
13193#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13194lose
13195#endif
bec39cab 13196_ACEOF
7a292a7a 13197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 13198 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
13199 gdb_cv_os_cygwin=yes
13200else
7a292a7a
SS
13201 gdb_cv_os_cygwin=no
13202fi
13203rm -f conftest*
13204
13205fi
81ecdfbb
RW
13206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13207$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13208
aff38e61 13209
3eb25fda 13210SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13211case ${host} in
95cbc983
AC
13212 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13213 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13214 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13215esac
13216
13217
cd0fc7c3
SS
13218# libreadline needs libuser32.a in a cygwin environment
13219WIN32LIBS=
13220if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13221 WIN32LIBS="-luser32"
13222 case "${target}" in
13223 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13224 ;;
13225 esac
cd0fc7c3 13226fi
c906108c 13227
b4505029
MM
13228# The ser-tcp.c module requires sockets.
13229case ${host} in
13230 *mingw32*)
13231
81ecdfbb 13232$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13233
13234 WIN32LIBS="$WIN32LIBS -lws2_32"
13235 ;;
13236esac
13237
7a292a7a 13238
31d99776 13239# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13240
13241 OLD_CFLAGS=$CFLAGS
13242 OLD_LDFLAGS=$LDFLAGS
13243 OLD_LIBS=$LIBS
13244 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13245 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13246 # always want our bfd.
13247 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13248 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13249 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
def63ff0
TT
13250 LIBS="-lbfd -liberty $intl $LIBS"
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13252$as_echo_n "checking for ELF support in BFD... " >&6; }
13253if test "${gdb_cv_var_elf+set}" = set; then :
13254 $as_echo_n "(cached) " >&6
31d99776 13255else
81ecdfbb 13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13257/* end confdefs.h. */
13258#include <stdlib.h>
def63ff0
TT
13259 #include "bfd.h"
13260 #include "elf-bfd.h"
31d99776
DJ
13261
13262int
13263main ()
13264{
def63ff0 13265return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13266 ;
13267 return 0;
13268}
13269_ACEOF
81ecdfbb 13270if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13271 gdb_cv_var_elf=yes
13272else
81ecdfbb 13273 gdb_cv_var_elf=no
31d99776 13274fi
81ecdfbb
RW
13275rm -f core conftest.err conftest.$ac_objext \
13276 conftest$ac_exeext conftest.$ac_ext
31d99776 13277fi
81ecdfbb
RW
13278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13279$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13280 CFLAGS=$OLD_CFLAGS
13281 LDFLAGS=$OLD_LDFLAGS
13282 LIBS=$OLD_LIBS
31d99776 13283if test $gdb_cv_var_elf = yes; then
55aa24fb 13284 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 13285
81ecdfbb 13286$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13287
075ff26d
JK
13288 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13289 if test "$plugins" = "yes"; then
a48b32c0
L
13290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13291$as_echo_n "checking for library containing dlopen... " >&6; }
13292if test "${ac_cv_search_dlopen+set}" = set; then :
13293 $as_echo_n "(cached) " >&6
13294else
13295 ac_func_search_save_LIBS=$LIBS
13296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13297/* end confdefs.h. */
13298
13299/* Override any GCC internal prototype to avoid an error.
13300 Use char because int might match the return type of a GCC
13301 builtin and then its argument prototype would still apply. */
13302#ifdef __cplusplus
13303extern "C"
13304#endif
13305char dlopen ();
13306int
13307main ()
13308{
13309return dlopen ();
13310 ;
13311 return 0;
13312}
13313_ACEOF
13314for ac_lib in '' dl; do
13315 if test -z "$ac_lib"; then
13316 ac_res="none required"
13317 else
13318 ac_res=-l$ac_lib
13319 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13320 fi
13321 if ac_fn_c_try_link "$LINENO"; then :
13322 ac_cv_search_dlopen=$ac_res
13323fi
13324rm -f core conftest.err conftest.$ac_objext \
13325 conftest$ac_exeext
13326 if test "${ac_cv_search_dlopen+set}" = set; then :
13327 break
13328fi
13329done
13330if test "${ac_cv_search_dlopen+set}" = set; then :
13331
13332else
13333 ac_cv_search_dlopen=no
13334fi
13335rm conftest.$ac_ext
13336LIBS=$ac_func_search_save_LIBS
13337fi
13338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13339$as_echo "$ac_cv_search_dlopen" >&6; }
13340ac_res=$ac_cv_search_dlopen
13341if test "$ac_res" != no; then :
13342 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13343
13344fi
13345
075ff26d 13346 fi
31d99776 13347fi
31d99776 13348
4f05add4
TT
13349# Add macho support to GDB, but only if BFD includes it.
13350
13351 OLD_CFLAGS=$CFLAGS
13352 OLD_LDFLAGS=$LDFLAGS
13353 OLD_LIBS=$LIBS
13354 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13355 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13356 # always want our bfd.
13357 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13358 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13359 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
4f05add4
TT
13360 LIBS="-lbfd -liberty $intl $LIBS"
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13362$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13363if test "${gdb_cv_var_macho+set}" = set; then :
13364 $as_echo_n "(cached) " >&6
13365else
13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13367/* end confdefs.h. */
13368#include <stdlib.h>
13369 #include "bfd.h"
13370 #include "mach-o.h"
13371
13372int
13373main ()
13374{
13375return bfd_mach_o_lookup_command (NULL, 0, NULL);
13376 ;
13377 return 0;
13378}
13379_ACEOF
13380if ac_fn_c_try_link "$LINENO"; then :
13381 gdb_cv_var_macho=yes
13382else
13383 gdb_cv_var_macho=no
13384fi
13385rm -f core conftest.err conftest.$ac_objext \
13386 conftest$ac_exeext conftest.$ac_ext
13387fi
13388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13389$as_echo "$gdb_cv_var_macho" >&6; }
13390 CFLAGS=$OLD_CFLAGS
13391 LDFLAGS=$OLD_LDFLAGS
13392 LIBS=$OLD_LIBS
13393if test $gdb_cv_var_macho = yes; then
13394 CONFIG_OBS="$CONFIG_OBS machoread.o"
13395fi
13396
b2259038
TT
13397# Add SOM support to GDB, but only if BFD includes it.
13398
13399 OLD_CFLAGS=$CFLAGS
13400 OLD_LDFLAGS=$LDFLAGS
13401 OLD_LIBS=$LIBS
13402 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13403 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13404 # always want our bfd.
13405 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13406 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13407 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
b2259038
TT
13408 LIBS="-lbfd -liberty $intl $LIBS"
13409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13410$as_echo_n "checking for SOM support in BFD... " >&6; }
13411if test "${gdb_cv_var_som+set}" = set; then :
13412 $as_echo_n "(cached) " >&6
13413else
13414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415/* end confdefs.h. */
13416#include <stdlib.h>
13417 #include "bfd.h"
13418 #include "som.h"
13419
13420int
13421main ()
13422{
13423return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13424 ;
13425 return 0;
13426}
13427_ACEOF
13428if ac_fn_c_try_link "$LINENO"; then :
13429 gdb_cv_var_som=yes
13430else
13431 gdb_cv_var_som=no
13432fi
13433rm -f core conftest.err conftest.$ac_objext \
13434 conftest$ac_exeext conftest.$ac_ext
13435fi
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13437$as_echo "$gdb_cv_var_som" >&6; }
13438 CFLAGS=$OLD_CFLAGS
13439 LDFLAGS=$OLD_LDFLAGS
13440 LIBS=$OLD_LIBS
13441if test $gdb_cv_var_som = yes; then
13442 CONFIG_OBS="$CONFIG_OBS somread.o"
13443fi
13444
121ce6e5
DJ
13445# Add any host-specific objects to GDB.
13446CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13447
608e2dbb
TT
13448# If building on ELF, look for lzma support for embedded compressed debug info.
13449if test $gdb_cv_var_elf = yes; then
13450
13451# Check whether --with-lzma was given.
13452if test "${with_lzma+set}" = set; then :
13453 withval=$with_lzma;
13454else
13455 with_lzma=auto
13456fi
13457
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13459$as_echo_n "checking whether to use lzma... " >&6; }
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13461$as_echo "$with_lzma" >&6; }
13462
13463 if test "${with_lzma}" != no; then
13464
13465
13466
13467
13468
13469
13470
13471
13472 use_additional=yes
13473
13474 acl_save_prefix="$prefix"
13475 prefix="$acl_final_prefix"
13476 acl_save_exec_prefix="$exec_prefix"
13477 exec_prefix="$acl_final_exec_prefix"
13478
13479 eval additional_includedir=\"$includedir\"
13480 eval additional_libdir=\"$libdir\"
13481
13482 exec_prefix="$acl_save_exec_prefix"
13483 prefix="$acl_save_prefix"
13484
13485
13486# Check whether --with-liblzma-prefix was given.
13487if test "${with_liblzma_prefix+set}" = set; then :
13488 withval=$with_liblzma_prefix;
13489 if test "X$withval" = "Xno"; then
13490 use_additional=no
13491 else
13492 if test "X$withval" = "X"; then
13493
13494 acl_save_prefix="$prefix"
13495 prefix="$acl_final_prefix"
13496 acl_save_exec_prefix="$exec_prefix"
13497 exec_prefix="$acl_final_exec_prefix"
13498
13499 eval additional_includedir=\"$includedir\"
13500 eval additional_libdir=\"$libdir\"
13501
13502 exec_prefix="$acl_save_exec_prefix"
13503 prefix="$acl_save_prefix"
13504
13505 else
13506 additional_includedir="$withval/include"
13507 additional_libdir="$withval/lib"
13508 fi
13509 fi
13510
13511fi
13512
13513 LIBLZMA=
13514 LTLIBLZMA=
13515 INCLZMA=
13516 rpathdirs=
13517 ltrpathdirs=
13518 names_already_handled=
13519 names_next_round='lzma '
13520 while test -n "$names_next_round"; do
13521 names_this_round="$names_next_round"
13522 names_next_round=
13523 for name in $names_this_round; do
13524 already_handled=
13525 for n in $names_already_handled; do
13526 if test "$n" = "$name"; then
13527 already_handled=yes
13528 break
13529 fi
13530 done
13531 if test -z "$already_handled"; then
13532 names_already_handled="$names_already_handled $name"
13533 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13534 eval value=\"\$HAVE_LIB$uppername\"
13535 if test -n "$value"; then
13536 if test "$value" = yes; then
13537 eval value=\"\$LIB$uppername\"
13538 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13539 eval value=\"\$LTLIB$uppername\"
13540 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13541 else
13542 :
13543 fi
13544 else
13545 found_dir=
13546 found_la=
13547 found_so=
13548 found_a=
13549 if test $use_additional = yes; then
13550 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13551 found_dir="$additional_libdir"
13552 found_so="$additional_libdir/lib$name.$shlibext"
13553 if test -f "$additional_libdir/lib$name.la"; then
13554 found_la="$additional_libdir/lib$name.la"
13555 fi
13556 else
13557 if test -f "$additional_libdir/lib$name.$libext"; then
13558 found_dir="$additional_libdir"
13559 found_a="$additional_libdir/lib$name.$libext"
13560 if test -f "$additional_libdir/lib$name.la"; then
13561 found_la="$additional_libdir/lib$name.la"
13562 fi
13563 fi
13564 fi
13565 fi
13566 if test "X$found_dir" = "X"; then
13567 for x in $LDFLAGS $LTLIBLZMA; do
13568
13569 acl_save_prefix="$prefix"
13570 prefix="$acl_final_prefix"
13571 acl_save_exec_prefix="$exec_prefix"
13572 exec_prefix="$acl_final_exec_prefix"
13573 eval x=\"$x\"
13574 exec_prefix="$acl_save_exec_prefix"
13575 prefix="$acl_save_prefix"
13576
13577 case "$x" in
13578 -L*)
13579 dir=`echo "X$x" | sed -e 's/^X-L//'`
13580 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13581 found_dir="$dir"
13582 found_so="$dir/lib$name.$shlibext"
13583 if test -f "$dir/lib$name.la"; then
13584 found_la="$dir/lib$name.la"
13585 fi
13586 else
13587 if test -f "$dir/lib$name.$libext"; then
13588 found_dir="$dir"
13589 found_a="$dir/lib$name.$libext"
13590 if test -f "$dir/lib$name.la"; then
13591 found_la="$dir/lib$name.la"
13592 fi
13593 fi
13594 fi
13595 ;;
13596 esac
13597 if test "X$found_dir" != "X"; then
13598 break
13599 fi
13600 done
13601 fi
13602 if test "X$found_dir" != "X"; then
13603 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13604 if test "X$found_so" != "X"; then
13605 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13606 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13607 else
13608 haveit=
13609 for x in $ltrpathdirs; do
13610 if test "X$x" = "X$found_dir"; then
13611 haveit=yes
13612 break
13613 fi
13614 done
13615 if test -z "$haveit"; then
13616 ltrpathdirs="$ltrpathdirs $found_dir"
13617 fi
13618 if test "$hardcode_direct" = yes; then
13619 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13620 else
13621 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13622 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13623 haveit=
13624 for x in $rpathdirs; do
13625 if test "X$x" = "X$found_dir"; then
13626 haveit=yes
13627 break
13628 fi
13629 done
13630 if test -z "$haveit"; then
13631 rpathdirs="$rpathdirs $found_dir"
13632 fi
13633 else
13634 haveit=
13635 for x in $LDFLAGS $LIBLZMA; do
13636
13637 acl_save_prefix="$prefix"
13638 prefix="$acl_final_prefix"
13639 acl_save_exec_prefix="$exec_prefix"
13640 exec_prefix="$acl_final_exec_prefix"
13641 eval x=\"$x\"
13642 exec_prefix="$acl_save_exec_prefix"
13643 prefix="$acl_save_prefix"
13644
13645 if test "X$x" = "X-L$found_dir"; then
13646 haveit=yes
13647 break
13648 fi
13649 done
13650 if test -z "$haveit"; then
13651 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13652 fi
13653 if test "$hardcode_minus_L" != no; then
13654 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13655 else
13656 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13657 fi
13658 fi
13659 fi
13660 fi
13661 else
13662 if test "X$found_a" != "X"; then
13663 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13664 else
13665 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13666 fi
13667 fi
13668 additional_includedir=
13669 case "$found_dir" in
13670 */lib | */lib/)
13671 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13672 additional_includedir="$basedir/include"
13673 ;;
13674 esac
13675 if test "X$additional_includedir" != "X"; then
13676 if test "X$additional_includedir" != "X/usr/include"; then
13677 haveit=
13678 if test "X$additional_includedir" = "X/usr/local/include"; then
13679 if test -n "$GCC"; then
13680 case $host_os in
13681 linux*) haveit=yes;;
13682 esac
13683 fi
13684 fi
13685 if test -z "$haveit"; then
13686 for x in $CPPFLAGS $INCLZMA; do
13687
13688 acl_save_prefix="$prefix"
13689 prefix="$acl_final_prefix"
13690 acl_save_exec_prefix="$exec_prefix"
13691 exec_prefix="$acl_final_exec_prefix"
13692 eval x=\"$x\"
13693 exec_prefix="$acl_save_exec_prefix"
13694 prefix="$acl_save_prefix"
13695
13696 if test "X$x" = "X-I$additional_includedir"; then
13697 haveit=yes
13698 break
13699 fi
13700 done
13701 if test -z "$haveit"; then
13702 if test -d "$additional_includedir"; then
13703 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13704 fi
13705 fi
13706 fi
13707 fi
13708 fi
13709 if test -n "$found_la"; then
13710 save_libdir="$libdir"
13711 case "$found_la" in
13712 */* | *\\*) . "$found_la" ;;
13713 *) . "./$found_la" ;;
13714 esac
13715 libdir="$save_libdir"
13716 for dep in $dependency_libs; do
13717 case "$dep" in
13718 -L*)
13719 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13720 if test "X$additional_libdir" != "X/usr/lib"; then
13721 haveit=
13722 if test "X$additional_libdir" = "X/usr/local/lib"; then
13723 if test -n "$GCC"; then
13724 case $host_os in
13725 linux*) haveit=yes;;
13726 esac
13727 fi
13728 fi
13729 if test -z "$haveit"; then
13730 haveit=
13731 for x in $LDFLAGS $LIBLZMA; do
13732
13733 acl_save_prefix="$prefix"
13734 prefix="$acl_final_prefix"
13735 acl_save_exec_prefix="$exec_prefix"
13736 exec_prefix="$acl_final_exec_prefix"
13737 eval x=\"$x\"
13738 exec_prefix="$acl_save_exec_prefix"
13739 prefix="$acl_save_prefix"
13740
13741 if test "X$x" = "X-L$additional_libdir"; then
13742 haveit=yes
13743 break
13744 fi
13745 done
13746 if test -z "$haveit"; then
13747 if test -d "$additional_libdir"; then
13748 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13749 fi
13750 fi
13751 haveit=
13752 for x in $LDFLAGS $LTLIBLZMA; do
13753
13754 acl_save_prefix="$prefix"
13755 prefix="$acl_final_prefix"
13756 acl_save_exec_prefix="$exec_prefix"
13757 exec_prefix="$acl_final_exec_prefix"
13758 eval x=\"$x\"
13759 exec_prefix="$acl_save_exec_prefix"
13760 prefix="$acl_save_prefix"
13761
13762 if test "X$x" = "X-L$additional_libdir"; then
13763 haveit=yes
13764 break
13765 fi
13766 done
13767 if test -z "$haveit"; then
13768 if test -d "$additional_libdir"; then
13769 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13770 fi
13771 fi
13772 fi
13773 fi
13774 ;;
13775 -R*)
13776 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13777 if test "$enable_rpath" != no; then
13778 haveit=
13779 for x in $rpathdirs; do
13780 if test "X$x" = "X$dir"; then
13781 haveit=yes
13782 break
13783 fi
13784 done
13785 if test -z "$haveit"; then
13786 rpathdirs="$rpathdirs $dir"
13787 fi
13788 haveit=
13789 for x in $ltrpathdirs; do
13790 if test "X$x" = "X$dir"; then
13791 haveit=yes
13792 break
13793 fi
13794 done
13795 if test -z "$haveit"; then
13796 ltrpathdirs="$ltrpathdirs $dir"
13797 fi
13798 fi
13799 ;;
13800 -l*)
13801 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13802 ;;
13803 *.la)
13804 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13805 ;;
13806 *)
13807 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13808 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13809 ;;
13810 esac
13811 done
13812 fi
13813 else
13814 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13815 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13816 fi
13817 fi
13818 fi
13819 done
13820 done
13821 if test "X$rpathdirs" != "X"; then
13822 if test -n "$hardcode_libdir_separator"; then
13823 alldirs=
13824 for found_dir in $rpathdirs; do
13825 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13826 done
13827 acl_save_libdir="$libdir"
13828 libdir="$alldirs"
13829 eval flag=\"$hardcode_libdir_flag_spec\"
13830 libdir="$acl_save_libdir"
13831 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13832 else
13833 for found_dir in $rpathdirs; do
13834 acl_save_libdir="$libdir"
13835 libdir="$found_dir"
13836 eval flag=\"$hardcode_libdir_flag_spec\"
13837 libdir="$acl_save_libdir"
13838 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13839 done
13840 fi
13841 fi
13842 if test "X$ltrpathdirs" != "X"; then
13843 for found_dir in $ltrpathdirs; do
13844 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13845 done
13846 fi
13847
13848
13849 ac_save_CPPFLAGS="$CPPFLAGS"
13850
13851 for element in $INCLZMA; do
13852 haveit=
13853 for x in $CPPFLAGS; do
13854
13855 acl_save_prefix="$prefix"
13856 prefix="$acl_final_prefix"
13857 acl_save_exec_prefix="$exec_prefix"
13858 exec_prefix="$acl_final_exec_prefix"
13859 eval x=\"$x\"
13860 exec_prefix="$acl_save_exec_prefix"
13861 prefix="$acl_save_prefix"
13862
13863 if test "X$x" = "X$element"; then
13864 haveit=yes
13865 break
13866 fi
13867 done
13868 if test -z "$haveit"; then
13869 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13870 fi
13871 done
13872
13873
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13875$as_echo_n "checking for liblzma... " >&6; }
13876if test "${ac_cv_liblzma+set}" = set; then :
13877 $as_echo_n "(cached) " >&6
13878else
13879
13880 ac_save_LIBS="$LIBS"
13881 LIBS="$LIBS $LIBLZMA"
13882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13883/* end confdefs.h. */
13884#include "lzma.h"
13885int
13886main ()
13887{
13888lzma_index_iter iter;
13889 lzma_index_iter_init (&iter, 0);
13890 lzma_mf_is_supported (LZMA_MF_HC3);
13891 ;
13892 return 0;
13893}
13894_ACEOF
13895if ac_fn_c_try_link "$LINENO"; then :
13896 ac_cv_liblzma=yes
13897else
13898 ac_cv_liblzma=no
13899fi
13900rm -f core conftest.err conftest.$ac_objext \
13901 conftest$ac_exeext conftest.$ac_ext
13902 LIBS="$ac_save_LIBS"
13903
13904fi
13905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13906$as_echo "$ac_cv_liblzma" >&6; }
13907 if test "$ac_cv_liblzma" = yes; then
13908 HAVE_LIBLZMA=yes
13909
13910$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13911
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13913$as_echo_n "checking how to link with liblzma... " >&6; }
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13915$as_echo "$LIBLZMA" >&6; }
13916 else
13917 HAVE_LIBLZMA=no
13918 CPPFLAGS="$ac_save_CPPFLAGS"
13919 LIBLZMA=
13920 LTLIBLZMA=
13921 fi
13922
13923
13924
13925
13926
13927
13928 if test "$HAVE_LIBLZMA" != yes; then
13929 if test "$with_lzma" = yes; then
13930 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13931 fi
13932 fi
13933 fi
13934fi
13935
3fc11d3e
JM
13936LIBGUI="../libgui/src/libgui.a"
13937GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13938
13939
7a292a7a 13940
3fc11d3e
JM
13941WIN32LDAPP=
13942
13943
13944
d91670b9 13945case "${host}" in
686a5eed 13946*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13947 configdir="win"
13948 ;;
13949*)
13950 configdir="unix"
13951 ;;
13952esac
3fc11d3e
JM
13953
13954GDBTKLIBS=
13955if test "${enable_gdbtk}" = "yes"; then
13956
d1c3b63a
KS
13957 # Gdbtk must have an absolute path to srcdir in order to run
13958 # properly when not installed.
13959 here=`pwd`
13960 cd ${srcdir}
13961 GDBTK_SRC_DIR=`pwd`
13962 cd $here
13963
bec39cab 13964
5062cc19
KS
13965 #
13966 # Ok, lets find the tcl configuration
13967 # First, look for one uninstalled.
13968 # the alternative search directory is invoked by --with-tcl
13969 #
3fc11d3e 13970
5062cc19
KS
13971 if test x"${no_tcl}" = x ; then
13972 # we reset no_tcl in case something fails here
13973 no_tcl=true
bec39cab 13974
81ecdfbb
RW
13975# Check whether --with-tcl was given.
13976if test "${with_tcl+set}" = set; then :
13977 withval=$with_tcl; with_tclconfig=${withval}
13978fi
13979
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13981$as_echo_n "checking for Tcl configuration... " >&6; }
13982 if test "${ac_cv_c_tclconfig+set}" = set; then :
13983 $as_echo_n "(cached) " >&6
3fc11d3e 13984else
bec39cab 13985
3fc11d3e 13986
5062cc19
KS
13987 # First check to see if --with-tcl was specified.
13988 case "${host}" in
13989 *-*-cygwin*) platDir="win" ;;
13990 *) platDir="unix" ;;
13991 esac
13992 if test x"${with_tclconfig}" != x ; then
13993 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13994 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13995 else
81ecdfbb 13996 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13997 fi
13998 fi
13999
14000 # then check for a private Tcl installation
14001 if test x"${ac_cv_c_tclconfig}" = x ; then
14002 for i in \
14003 ../tcl \
14004 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14005 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14006 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14007 ../../tcl \
14008 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14009 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14010 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14011 ../../../tcl \
14012 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14013 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14014 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14015 if test -f "$i/$platDir/tclConfig.sh" ; then
14016 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14017 break
14018 fi
14019 done
14020 fi
14021
14022 # on Darwin, check in Framework installation locations
14023 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14024 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14025 `ls -d /Library/Frameworks 2>/dev/null` \
14026 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14027 `ls -d /System/Library/Frameworks 2>/dev/null` \
14028 ; do
14029 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14030 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14031 break
14032 fi
14033 done
14034 fi
14035
14036 # check in a few common install locations
14037 if test x"${ac_cv_c_tclconfig}" = x ; then
14038 for i in `ls -d ${libdir} 2>/dev/null` \
14039 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14040 `ls -d ${prefix}/lib 2>/dev/null` \
14041 `ls -d /usr/local/lib 2>/dev/null` \
14042 `ls -d /usr/contrib/lib 2>/dev/null` \
14043 `ls -d /usr/lib 2>/dev/null` \
14044 ; do
14045 if test -f "$i/tclConfig.sh" ; then
14046 ac_cv_c_tclconfig=`(cd $i; pwd)`
14047 break
14048 fi
14049 done
14050 fi
3fc11d3e 14051
5062cc19
KS
14052 # check in a few other private locations
14053 if test x"${ac_cv_c_tclconfig}" = x ; then
14054 for i in \
14055 ${srcdir}/../tcl \
14056 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14057 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14058 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14059 if test -f "$i/$platDir/tclConfig.sh" ; then
14060 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14061 break
14062 fi
14063 done
14064 fi
bec39cab 14065
3fc11d3e
JM
14066fi
14067
5062cc19
KS
14068
14069 if test x"${ac_cv_c_tclconfig}" = x ; then
14070 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14072$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14073 else
14074 no_tcl=
14075 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14077$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14078 fi
14079 fi
3fc11d3e 14080
bec39cab 14081
85541719
DE
14082 # If $no_tk is nonempty, then we can't do Tk, and there is no
14083 # point to doing Tcl.
bec39cab 14084
5062cc19
KS
14085 #
14086 # Ok, lets find the tk configuration
14087 # First, look for one uninstalled.
14088 # the alternative search directory is invoked by --with-tk
14089 #
3fc11d3e 14090
5062cc19
KS
14091 if test x"${no_tk}" = x ; then
14092 # we reset no_tk in case something fails here
14093 no_tk=true
bec39cab 14094
81ecdfbb
RW
14095# Check whether --with-tk was given.
14096if test "${with_tk+set}" = set; then :
14097 withval=$with_tk; with_tkconfig=${withval}
14098fi
14099
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14101$as_echo_n "checking for Tk configuration... " >&6; }
14102 if test "${ac_cv_c_tkconfig+set}" = set; then :
14103 $as_echo_n "(cached) " >&6
bec39cab 14104else
3fc11d3e
JM
14105
14106
5062cc19
KS
14107 # First check to see if --with-tkconfig was specified.
14108 if test x"${with_tkconfig}" != x ; then
14109 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14110 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14111 else
81ecdfbb 14112 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14113 fi
14114 fi
3fc11d3e 14115
5062cc19
KS
14116 # then check for a private Tk library
14117 case "${host}" in
14118 *-*-cygwin*) platDir="win" ;;
14119 *) platDir="unix" ;;
14120 esac
14121 if test x"${ac_cv_c_tkconfig}" = x ; then
14122 for i in \
14123 ../tk \
14124 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14125 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14126 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14127 ../../tk \
14128 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14129 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14130 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14131 ../../../tk \
14132 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14133 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14134 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14135 if test -f "$i/$platDir/tkConfig.sh" ; then
14136 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14137 break
14138 fi
14139 done
14140 fi
14141
14142 # on Darwin, check in Framework installation locations
14143 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14144 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14145 `ls -d /Library/Frameworks 2>/dev/null` \
14146 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14147 `ls -d /System/Library/Frameworks 2>/dev/null` \
14148 ; do
14149 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14150 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14151 break
14152 fi
14153 done
14154 fi
14155
14156 # check in a few common install locations
14157 if test x"${ac_cv_c_tkconfig}" = x ; then
14158 for i in `ls -d ${libdir} 2>/dev/null` \
14159 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14160 `ls -d ${prefix}/lib 2>/dev/null` \
14161 `ls -d /usr/local/lib 2>/dev/null` \
14162 `ls -d /usr/contrib/lib 2>/dev/null` \
14163 `ls -d /usr/lib 2>/dev/null` \
14164 ; do
14165 if test -f "$i/tkConfig.sh" ; then
14166 ac_cv_c_tkconfig=`(cd $i; pwd)`
14167 break
14168 fi
14169 done
14170 fi
14171 # check in a few other private locations
14172 if test x"${ac_cv_c_tkconfig}" = x ; then
14173 for i in \
14174 ${srcdir}/../tk \
14175 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14176 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14177 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14178 if test -f "$i/$platDir/tkConfig.sh" ; then
14179 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14180 break
14181 fi
14182 done
14183 fi
3fc11d3e 14184
3fc11d3e
JM
14185fi
14186
14187
5062cc19
KS
14188 if test x"${ac_cv_c_tkconfig}" = x ; then
14189 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14191$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14192 else
14193 no_tk=
14194 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14196$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14197 fi
3fc11d3e 14198 fi
dd2504ab 14199
dd2504ab 14200
85541719
DE
14201 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14202
81ecdfbb
RW
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14204$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14205
14206 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14208$as_echo "loading" >&6; }
85541719
DE
14209 . ${TCL_BIN_DIR}/tclConfig.sh
14210 else
81ecdfbb
RW
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14212$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14213 fi
14214
14215 # eval is required to do the TCL_DBGX substitution
14216 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14217 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14218
14219 # If the TCL_BIN_DIR is the build directory (not the install directory),
14220 # then set the common variable name to the value of the build variables.
14221 # For example, the variable TCL_LIB_SPEC will be set to the value
14222 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14223 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14224 # installed and uninstalled version of Tcl.
14225 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14226 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14227 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14228 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14229 elif test "`uname -s`" = "Darwin"; then
14230 # If Tcl was built as a framework, attempt to use the libraries
14231 # from the framework at the given location so that linking works
a68ffae9 14232 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14233 case ${TCL_DEFS} in
14234 *TCL_FRAMEWORK*)
14235 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14236 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14237 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14238 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14239 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14240 break
14241 fi
14242 done
14243 fi
14244 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14245 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14246 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14247 fi
14248 ;;
14249 esac
14250 fi
14251
14252 # eval is required to do the TCL_DBGX substitution
14253 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14254 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14255 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14256 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272 # Check for in-tree tcl
14273 here=`pwd`
14274 cd ${srcdir}/..
14275 topdir=`pwd`
14276 cd ${here}
14277
14278 intree="no"
14279 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14280 intree="yes"
14281 fi
14282
14283 # Find Tcl private headers
14284 if test x"${intree}" = xno; then
14285
81ecdfbb
RW
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14287$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14288 private_dir=""
14289 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14290 if test -f ${dir}/tclInt.h ; then
14291 private_dir=${dir}
14292 fi
14293
14294 if test x"${private_dir}" = x; then
81ecdfbb 14295 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14296 else
14297 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14299$as_echo "${private_dir}" >&6; }
85541719
DE
14300 fi
14301
14302 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14303 TCL_LIBRARY="${TCL_LIB_SPEC}"
14304 TCL_DEPS=""
14305 else
14306 # If building tcl in the same src tree, private headers
14307 # are not needed, but we need to be sure to use the right
14308 # headers library
14309 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14310 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14311 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14312 fi
14313
14314
14315
14316
14317
81ecdfbb
RW
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14319$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14320
5062cc19 14321 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14323$as_echo "loading" >&6; }
5062cc19 14324 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14325 else
81ecdfbb
RW
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14327$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14328 fi
bec39cab 14329
5062cc19
KS
14330 # eval is required to do the TK_DBGX substitution
14331 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14332 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14333
14334 # If the TK_BIN_DIR is the build directory (not the install directory),
14335 # then set the common variable name to the value of the build variables.
14336 # For example, the variable TK_LIB_SPEC will be set to the value
14337 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14338 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14339 # installed and uninstalled version of Tcl.
85541719 14340 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14341 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14342 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14343 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14344 elif test "`uname -s`" = "Darwin"; then
14345 # If Tk was built as a framework, attempt to use the libraries
14346 # from the framework at the given location so that linking works
a68ffae9 14347 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14348 case ${TK_DEFS} in
14349 *TK_FRAMEWORK*)
85541719 14350 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14351 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14352 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14353 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14354 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14355 break
14356 fi
14357 done
14358 fi
85541719 14359 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14360 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14361 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14362 fi
14363 ;;
14364 esac
3fc11d3e
JM
14365 fi
14366
5062cc19
KS
14367 # eval is required to do the TK_DBGX substitution
14368 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14369 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14370 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14371 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14372
3fc11d3e
JM
14373
14374
bec39cab
AC
14375
14376
14377
14378
14379
14380
14381
3fc11d3e 14382
3fc11d3e 14383
bec39cab 14384
bec39cab 14385
85541719
DE
14386 # Check for in-tree Tk
14387 intree="no"
14388 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14389 intree="yes"
14390 fi
3fc11d3e 14391
85541719
DE
14392 # Find Tk private headers
14393 if test x"${intree}" = xno; then
3fc11d3e 14394
81ecdfbb
RW
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14396$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14397 private_dir=""
14398 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14399 if test -f ${dir}/tkInt.h; then
14400 private_dir=${dir}
3fc11d3e 14401 fi
bec39cab 14402
5062cc19 14403 if test x"${private_dir}" = x; then
81ecdfbb 14404 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14405 else
5062cc19 14406 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14408$as_echo "${private_dir}" >&6; }
3fc11d3e 14409 fi
3fc11d3e 14410
85541719
DE
14411 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14412 TK_LIBRARY=${TK_LIB_SPEC}
14413 TK_DEPS=""
14414 else
14415 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14416 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14417 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14418 fi
3fc11d3e
JM
14419
14420
3fc11d3e
JM
14421
14422
3fc11d3e 14423
85541719 14424 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14425
85541719
DE
14426 # Include some libraries that Tcl and Tk want.
14427 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14428 # Yes, the ordering seems wrong here. But it isn't.
14429 # TK_LIBS is the list of libraries that need to be linked
14430 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14431 # were in LIBS then any link tests after this point would
14432 # try to include things like `$(LIBGUI)', which wouldn't work.
14433 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14434
85541719
DE
14435 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14436 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14437 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14438 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14439 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14440 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14441 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14442
85541719
DE
14443 if test x$gdb_cv_os_cygwin = xyes; then
14444 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14445 WIN32LDAPP="-Wl,--subsystem,console"
14446 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14447 fi
ffc6a242 14448
81ecdfbb 14449 subdirs="$subdirs gdbtk"
3ace7edb 14450
85541719 14451 fi
3fc11d3e
JM
14452fi
14453
14454
14455
14456
14457
14458
14459
14460
81ecdfbb
RW
14461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14462$as_echo_n "checking for X... " >&6; }
bec39cab 14463
c906108c 14464
81ecdfbb
RW
14465# Check whether --with-x was given.
14466if test "${with_x+set}" = set; then :
14467 withval=$with_x;
14468fi
c906108c
SS
14469
14470# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14471if test "x$with_x" = xno; then
14472 # The user explicitly disabled X.
14473 have_x=disabled
14474else
81ecdfbb
RW
14475 case $x_includes,$x_libraries in #(
14476 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14477 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14478 $as_echo_n "(cached) " >&6
c906108c
SS
14479else
14480 # One or both of the vars are not set, and there is no cached value.
bec39cab 14481ac_x_includes=no ac_x_libraries=no
81ecdfbb 14482rm -f -r conftest.dir
bec39cab
AC
14483if mkdir conftest.dir; then
14484 cd conftest.dir
bec39cab 14485 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14486incroot:
14487 @echo incroot='${INCROOT}'
14488usrlibdir:
14489 @echo usrlibdir='${USRLIBDIR}'
14490libdir:
14491 @echo libdir='${LIBDIR}'
14492_ACEOF
14493 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14494 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14495 for ac_var in incroot usrlibdir libdir; do
14496 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14497 done
c906108c 14498 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14499 for ac_extension in a so sl dylib la dll; do
14500 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14501 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14502 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14503 fi
14504 done
14505 # Screen out bogus values from the imake configuration. They are
14506 # bogus both because they are the default anyway, and because
14507 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14508 case $ac_im_incroot in
81ecdfbb 14509 /usr/include) ac_x_includes= ;;
bec39cab 14510 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14511 esac
bec39cab 14512 case $ac_im_usrlibdir in
81ecdfbb 14513 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14514 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14515 esac
14516 fi
14517 cd ..
81ecdfbb 14518 rm -f -r conftest.dir
c906108c
SS
14519fi
14520
bec39cab
AC
14521# Standard set of common directories for X headers.
14522# Check X11 before X11Rn because it is often a symlink to the current release.
14523ac_x_header_dirs='
14524/usr/X11/include
81ecdfbb 14525/usr/X11R7/include
bec39cab
AC
14526/usr/X11R6/include
14527/usr/X11R5/include
14528/usr/X11R4/include
14529
14530/usr/include/X11
81ecdfbb 14531/usr/include/X11R7
bec39cab
AC
14532/usr/include/X11R6
14533/usr/include/X11R5
14534/usr/include/X11R4
14535
14536/usr/local/X11/include
81ecdfbb 14537/usr/local/X11R7/include
bec39cab
AC
14538/usr/local/X11R6/include
14539/usr/local/X11R5/include
14540/usr/local/X11R4/include
14541
14542/usr/local/include/X11
81ecdfbb 14543/usr/local/include/X11R7
bec39cab
AC
14544/usr/local/include/X11R6
14545/usr/local/include/X11R5
14546/usr/local/include/X11R4
14547
14548/usr/X386/include
14549/usr/x386/include
14550/usr/XFree86/include/X11
14551
14552/usr/include
14553/usr/local/include
14554/usr/unsupported/include
14555/usr/athena/include
14556/usr/local/x11r5/include
14557/usr/lpp/Xamples/include
14558
14559/usr/openwin/include
14560/usr/openwin/share/include'
14561
14562if test "$ac_x_includes" = no; then
81ecdfbb 14563 # Guess where to find include files, by looking for Xlib.h.
c906108c 14564 # First, try using that file with no special directory specified.
81ecdfbb 14565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14566/* end confdefs.h. */
81ecdfbb 14567#include <X11/Xlib.h>
bec39cab 14568_ACEOF
81ecdfbb 14569if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14570 # We can compile using X headers with no special include directory.
14571ac_x_includes=
14572else
bec39cab 14573 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14574 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14575 ac_x_includes=$ac_dir
14576 break
14577 fi
14578done
c906108c 14579fi
bec39cab
AC
14580rm -f conftest.err conftest.$ac_ext
14581fi # $ac_x_includes = no
c906108c 14582
bec39cab 14583if test "$ac_x_libraries" = no; then
c906108c 14584 # Check for the libraries.
c906108c
SS
14585 # See if we find them without any special options.
14586 # Don't add to $LIBS permanently.
bec39cab 14587 ac_save_LIBS=$LIBS
81ecdfbb
RW
14588 LIBS="-lX11 $LIBS"
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14590/* end confdefs.h. */
81ecdfbb 14591#include <X11/Xlib.h>
bec39cab
AC
14592int
14593main ()
14594{
81ecdfbb 14595XrmInitialize ()
bec39cab
AC
14596 ;
14597 return 0;
14598}
14599_ACEOF
81ecdfbb 14600if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14601 LIBS=$ac_save_LIBS
c906108c
SS
14602# We can link X programs with no special library path.
14603ac_x_libraries=
14604else
81ecdfbb
RW
14605 LIBS=$ac_save_LIBS
14606for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14607do
bec39cab 14608 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14609 for ac_extension in a so sl dylib la dll; do
14610 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14611 ac_x_libraries=$ac_dir
14612 break 2
14613 fi
14614 done
14615done
14616fi
81ecdfbb
RW
14617rm -f core conftest.err conftest.$ac_objext \
14618 conftest$ac_exeext conftest.$ac_ext
bec39cab 14619fi # $ac_x_libraries = no
c906108c 14620
81ecdfbb
RW
14621case $ac_x_includes,$ac_x_libraries in #(
14622 no,* | *,no | *\'*)
14623 # Didn't find X, or a directory has "'" in its name.
14624 ac_cv_have_x="have_x=no";; #(
14625 *)
14626 # Record where we found X for the cache.
14627 ac_cv_have_x="have_x=yes\
14628 ac_x_includes='$ac_x_includes'\
14629 ac_x_libraries='$ac_x_libraries'"
14630esac
c906108c 14631fi
81ecdfbb
RW
14632;; #(
14633 *) have_x=yes;;
14634 esac
c906108c
SS
14635 eval "$ac_cv_have_x"
14636fi # $with_x != no
14637
14638if test "$have_x" != yes; then
81ecdfbb
RW
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14640$as_echo "$have_x" >&6; }
c906108c
SS
14641 no_x=yes
14642else
14643 # If each of the values was on the command line, it overrides each guess.
14644 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14645 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14646 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14647 ac_cv_have_x="have_x=yes\
14648 ac_x_includes='$x_includes'\
14649 ac_x_libraries='$x_libraries'"
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14651$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14652fi
14653
14654
bec39cab 14655# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14656# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14657# This code just checks for a few cases where we'd like to ignore those
14658# definitions, even when they're present in the '.mt' file. These cases
14659# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14660# not part of the source tree.
7a292a7a 14661#
81ecdfbb
RW
14662# Check whether --enable-sim was given.
14663if test "${enable_sim+set}" = set; then :
14664 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14665 echo "enableval = ${enableval}";
14666 case "${enableval}" in
14667 yes) ignore_sim=false ;;
14668 no) ignore_sim=true ;;
14669 *) ignore_sim=false ;;
14670 esac
14671else
14672 ignore_sim=false
81ecdfbb
RW
14673fi
14674
7a292a7a
SS
14675
14676if test ! -d "${srcdir}/../sim"; then
14677 ignore_sim=true
14678fi
14679
9b624dbe
UW
14680SIM=
14681SIM_OBS=
14682if test "${ignore_sim}" = "false"; then
14683 if test x"${gdb_sim}" != x ; then
14684 SIM="${gdb_sim}"
14685 SIM_OBS="remote-sim.o"
60ca704f 14686
81ecdfbb 14687$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14688
9b624dbe 14689 fi
7a292a7a
SS
14690fi
14691
14692
14693
c906108c
SS
14694
14695
14696
14697
14698
14699
dfcd3bfb 14700
e56ac5c3
AC
14701
14702
b3a90332
AC
14703
14704
c35f4ffc 14705# List of host floatformats.
bec39cab
AC
14706
14707cat >>confdefs.h <<_ACEOF
c35f4ffc 14708#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14709_ACEOF
c35f4ffc 14710
bec39cab
AC
14711
14712cat >>confdefs.h <<_ACEOF
c35f4ffc 14713#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14714_ACEOF
14715
c35f4ffc 14716
bec39cab 14717cat >>confdefs.h <<_ACEOF
c35f4ffc 14718#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14719_ACEOF
c35f4ffc
AC
14720
14721
c906108c
SS
14722# target_subdir is used by the testsuite to find the target libraries.
14723target_subdir=
14724if test "${host}" != "${target}"; then
14725 target_subdir="${target_alias}/"
14726fi
14727
14728
14729frags=
771b4502 14730if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14731 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14732 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14733 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14734 fi
14735 frags="$frags $host_makefile_frag"
14736else
14737 host_makefile_frag=/dev/null
c906108c 14738fi
c906108c 14739
c906108c
SS
14740
14741
14742
771b4502 14743if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14744# We pick this up from the host configuration file (.mh) because we
14745# do not have a native configuration Makefile fragment.
c906108c
SS
14746nativefile=`sed -n '
14747s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14748' ${host_makefile_frag}`
c906108c
SS
14749fi
14750
14751
b00a8037 14752if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14753
14754cat >>confdefs.h <<_ACEOF
b00a8037 14755#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14756_ACEOF
b00a8037
DJ
14757
14758fi
14759
8dcde887 14760# Enable multi-ice-gdb-server.
81ecdfbb
RW
14761# Check whether --enable-multi-ice was given.
14762if test "${enable_multi_ice+set}" = set; then :
14763 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14764 yes | no)
14765 ;;
81ecdfbb 14766 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14767 esac
81ecdfbb 14768fi
b4e70030 14769
81ecdfbb
RW
14770if test "x$enable_multi_ice" = xyes; then
14771 subdirs="$subdirs multi-ice"
3ace7edb 14772
a85f51e7
DJ
14773fi
14774
496c0e1b
JB
14775# Check whether --enable-gdbserver was given.
14776if test "${enable_gdbserver+set}" = set; then :
14777 enableval=$enable_gdbserver; case "${enableval}" in
14778 yes| no|auto) ;;
14779 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14780esac
14781else
14782 enable_gdbserver=auto
14783fi
14784
14785
14786# We only build gdbserver automatically in a native configuration, and
14787# only if the user did not explicitly disable its build.
14788if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14790$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14791 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14793$as_echo "yes" >&6; }
14794 subdirs="$subdirs gdbserver"
3ace7edb 14795
496c0e1b 14796 gdbserver_build_enabled=yes
8dcde887 14797 else
81ecdfbb
RW
14798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14799$as_echo "no" >&6; }
8dcde887
MK
14800 fi
14801fi
14802
496c0e1b
JB
14803# If the user explicitly request the gdbserver to be built, verify that
14804# we were in fact able to enable it.
14805if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14806 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14807fi
14808
393fd4c3
YQ
14809# Check for babeltrace and babeltrace-ctf
14810
14811# Check whether --with-babeltrace was given.
14812if test "${with_babeltrace+set}" = set; then :
14813 withval=$with_babeltrace;
14814else
14815 with_babeltrace=auto
14816fi
14817
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14819$as_echo_n "checking whether to use babeltrace... " >&6; }
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14821$as_echo "$with_babeltrace" >&6; }
14822
14823if test "x$with_babeltrace" = "xno"; then
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14825$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14826else
14827 # Append -Werror to CFLAGS so that configure can catch the warning
14828 # "assignment from incompatible pointer type", which is related to
14829 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14830 # in GDB, while babeltrace 1.0.3 is broken.
14831 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14832 # safe to save and restore CFLAGS here.
14833 saved_CFLAGS=$CFLAGS
14834 CFLAGS="$CFLAGS -Werror"
14835
14836
14837
14838
14839
14840
14841
14842
14843 use_additional=yes
14844
14845 acl_save_prefix="$prefix"
14846 prefix="$acl_final_prefix"
14847 acl_save_exec_prefix="$exec_prefix"
14848 exec_prefix="$acl_final_exec_prefix"
14849
14850 eval additional_includedir=\"$includedir\"
14851 eval additional_libdir=\"$libdir\"
14852
14853 exec_prefix="$acl_save_exec_prefix"
14854 prefix="$acl_save_prefix"
14855
14856
14857# Check whether --with-libbabeltrace-prefix was given.
14858if test "${with_libbabeltrace_prefix+set}" = set; then :
14859 withval=$with_libbabeltrace_prefix;
14860 if test "X$withval" = "Xno"; then
14861 use_additional=no
14862 else
14863 if test "X$withval" = "X"; then
14864
14865 acl_save_prefix="$prefix"
14866 prefix="$acl_final_prefix"
14867 acl_save_exec_prefix="$exec_prefix"
14868 exec_prefix="$acl_final_exec_prefix"
14869
14870 eval additional_includedir=\"$includedir\"
14871 eval additional_libdir=\"$libdir\"
14872
14873 exec_prefix="$acl_save_exec_prefix"
14874 prefix="$acl_save_prefix"
14875
14876 else
14877 additional_includedir="$withval/include"
14878 additional_libdir="$withval/lib"
14879 fi
14880 fi
14881
14882fi
14883
14884 LIBBABELTRACE=
14885 LTLIBBABELTRACE=
14886 INCBABELTRACE=
14887 rpathdirs=
14888 ltrpathdirs=
14889 names_already_handled=
14890 names_next_round='babeltrace babeltrace-ctf'
14891 while test -n "$names_next_round"; do
14892 names_this_round="$names_next_round"
14893 names_next_round=
14894 for name in $names_this_round; do
14895 already_handled=
14896 for n in $names_already_handled; do
14897 if test "$n" = "$name"; then
14898 already_handled=yes
14899 break
14900 fi
14901 done
14902 if test -z "$already_handled"; then
14903 names_already_handled="$names_already_handled $name"
14904 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14905 eval value=\"\$HAVE_LIB$uppername\"
14906 if test -n "$value"; then
14907 if test "$value" = yes; then
14908 eval value=\"\$LIB$uppername\"
14909 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14910 eval value=\"\$LTLIB$uppername\"
14911 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14912 else
14913 :
14914 fi
14915 else
14916 found_dir=
14917 found_la=
14918 found_so=
14919 found_a=
14920 if test $use_additional = yes; then
14921 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14922 found_dir="$additional_libdir"
14923 found_so="$additional_libdir/lib$name.$shlibext"
14924 if test -f "$additional_libdir/lib$name.la"; then
14925 found_la="$additional_libdir/lib$name.la"
14926 fi
14927 else
14928 if test -f "$additional_libdir/lib$name.$libext"; then
14929 found_dir="$additional_libdir"
14930 found_a="$additional_libdir/lib$name.$libext"
14931 if test -f "$additional_libdir/lib$name.la"; then
14932 found_la="$additional_libdir/lib$name.la"
14933 fi
14934 fi
14935 fi
14936 fi
14937 if test "X$found_dir" = "X"; then
14938 for x in $LDFLAGS $LTLIBBABELTRACE; do
14939
14940 acl_save_prefix="$prefix"
14941 prefix="$acl_final_prefix"
14942 acl_save_exec_prefix="$exec_prefix"
14943 exec_prefix="$acl_final_exec_prefix"
14944 eval x=\"$x\"
14945 exec_prefix="$acl_save_exec_prefix"
14946 prefix="$acl_save_prefix"
14947
14948 case "$x" in
14949 -L*)
14950 dir=`echo "X$x" | sed -e 's/^X-L//'`
14951 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14952 found_dir="$dir"
14953 found_so="$dir/lib$name.$shlibext"
14954 if test -f "$dir/lib$name.la"; then
14955 found_la="$dir/lib$name.la"
14956 fi
14957 else
14958 if test -f "$dir/lib$name.$libext"; then
14959 found_dir="$dir"
14960 found_a="$dir/lib$name.$libext"
14961 if test -f "$dir/lib$name.la"; then
14962 found_la="$dir/lib$name.la"
14963 fi
14964 fi
14965 fi
14966 ;;
14967 esac
14968 if test "X$found_dir" != "X"; then
14969 break
14970 fi
14971 done
14972 fi
14973 if test "X$found_dir" != "X"; then
14974 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14975 if test "X$found_so" != "X"; then
14976 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14977 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14978 else
14979 haveit=
14980 for x in $ltrpathdirs; do
14981 if test "X$x" = "X$found_dir"; then
14982 haveit=yes
14983 break
14984 fi
14985 done
14986 if test -z "$haveit"; then
14987 ltrpathdirs="$ltrpathdirs $found_dir"
14988 fi
14989 if test "$hardcode_direct" = yes; then
14990 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14991 else
14992 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14993 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14994 haveit=
14995 for x in $rpathdirs; do
14996 if test "X$x" = "X$found_dir"; then
14997 haveit=yes
14998 break
14999 fi
15000 done
15001 if test -z "$haveit"; then
15002 rpathdirs="$rpathdirs $found_dir"
15003 fi
15004 else
15005 haveit=
15006 for x in $LDFLAGS $LIBBABELTRACE; do
15007
15008 acl_save_prefix="$prefix"
15009 prefix="$acl_final_prefix"
15010 acl_save_exec_prefix="$exec_prefix"
15011 exec_prefix="$acl_final_exec_prefix"
15012 eval x=\"$x\"
15013 exec_prefix="$acl_save_exec_prefix"
15014 prefix="$acl_save_prefix"
15015
15016 if test "X$x" = "X-L$found_dir"; then
15017 haveit=yes
15018 break
15019 fi
15020 done
15021 if test -z "$haveit"; then
15022 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15023 fi
15024 if test "$hardcode_minus_L" != no; then
15025 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15026 else
15027 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15028 fi
15029 fi
15030 fi
15031 fi
15032 else
15033 if test "X$found_a" != "X"; then
15034 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15035 else
15036 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15037 fi
15038 fi
15039 additional_includedir=
15040 case "$found_dir" in
15041 */lib | */lib/)
15042 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15043 additional_includedir="$basedir/include"
15044 ;;
15045 esac
15046 if test "X$additional_includedir" != "X"; then
15047 if test "X$additional_includedir" != "X/usr/include"; then
15048 haveit=
15049 if test "X$additional_includedir" = "X/usr/local/include"; then
15050 if test -n "$GCC"; then
15051 case $host_os in
15052 linux*) haveit=yes;;
15053 esac
15054 fi
15055 fi
15056 if test -z "$haveit"; then
15057 for x in $CPPFLAGS $INCBABELTRACE; do
15058
15059 acl_save_prefix="$prefix"
15060 prefix="$acl_final_prefix"
15061 acl_save_exec_prefix="$exec_prefix"
15062 exec_prefix="$acl_final_exec_prefix"
15063 eval x=\"$x\"
15064 exec_prefix="$acl_save_exec_prefix"
15065 prefix="$acl_save_prefix"
15066
15067 if test "X$x" = "X-I$additional_includedir"; then
15068 haveit=yes
15069 break
15070 fi
15071 done
15072 if test -z "$haveit"; then
15073 if test -d "$additional_includedir"; then
15074 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15075 fi
15076 fi
15077 fi
15078 fi
15079 fi
15080 if test -n "$found_la"; then
15081 save_libdir="$libdir"
15082 case "$found_la" in
15083 */* | *\\*) . "$found_la" ;;
15084 *) . "./$found_la" ;;
15085 esac
15086 libdir="$save_libdir"
15087 for dep in $dependency_libs; do
15088 case "$dep" in
15089 -L*)
15090 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15091 if test "X$additional_libdir" != "X/usr/lib"; then
15092 haveit=
15093 if test "X$additional_libdir" = "X/usr/local/lib"; then
15094 if test -n "$GCC"; then
15095 case $host_os in
15096 linux*) haveit=yes;;
15097 esac
15098 fi
15099 fi
15100 if test -z "$haveit"; then
15101 haveit=
15102 for x in $LDFLAGS $LIBBABELTRACE; do
15103
15104 acl_save_prefix="$prefix"
15105 prefix="$acl_final_prefix"
15106 acl_save_exec_prefix="$exec_prefix"
15107 exec_prefix="$acl_final_exec_prefix"
15108 eval x=\"$x\"
15109 exec_prefix="$acl_save_exec_prefix"
15110 prefix="$acl_save_prefix"
15111
15112 if test "X$x" = "X-L$additional_libdir"; then
15113 haveit=yes
15114 break
15115 fi
15116 done
15117 if test -z "$haveit"; then
15118 if test -d "$additional_libdir"; then
15119 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15120 fi
15121 fi
15122 haveit=
15123 for x in $LDFLAGS $LTLIBBABELTRACE; do
15124
15125 acl_save_prefix="$prefix"
15126 prefix="$acl_final_prefix"
15127 acl_save_exec_prefix="$exec_prefix"
15128 exec_prefix="$acl_final_exec_prefix"
15129 eval x=\"$x\"
15130 exec_prefix="$acl_save_exec_prefix"
15131 prefix="$acl_save_prefix"
15132
15133 if test "X$x" = "X-L$additional_libdir"; then
15134 haveit=yes
15135 break
15136 fi
15137 done
15138 if test -z "$haveit"; then
15139 if test -d "$additional_libdir"; then
15140 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15141 fi
15142 fi
15143 fi
15144 fi
15145 ;;
15146 -R*)
15147 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15148 if test "$enable_rpath" != no; then
15149 haveit=
15150 for x in $rpathdirs; do
15151 if test "X$x" = "X$dir"; then
15152 haveit=yes
15153 break
15154 fi
15155 done
15156 if test -z "$haveit"; then
15157 rpathdirs="$rpathdirs $dir"
15158 fi
15159 haveit=
15160 for x in $ltrpathdirs; do
15161 if test "X$x" = "X$dir"; then
15162 haveit=yes
15163 break
15164 fi
15165 done
15166 if test -z "$haveit"; then
15167 ltrpathdirs="$ltrpathdirs $dir"
15168 fi
15169 fi
15170 ;;
15171 -l*)
15172 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15173 ;;
15174 *.la)
15175 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15176 ;;
15177 *)
15178 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15179 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15180 ;;
15181 esac
15182 done
15183 fi
15184 else
15185 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15186 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15187 fi
15188 fi
15189 fi
15190 done
15191 done
15192 if test "X$rpathdirs" != "X"; then
15193 if test -n "$hardcode_libdir_separator"; then
15194 alldirs=
15195 for found_dir in $rpathdirs; do
15196 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15197 done
15198 acl_save_libdir="$libdir"
15199 libdir="$alldirs"
15200 eval flag=\"$hardcode_libdir_flag_spec\"
15201 libdir="$acl_save_libdir"
15202 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15203 else
15204 for found_dir in $rpathdirs; do
15205 acl_save_libdir="$libdir"
15206 libdir="$found_dir"
15207 eval flag=\"$hardcode_libdir_flag_spec\"
15208 libdir="$acl_save_libdir"
15209 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15210 done
15211 fi
15212 fi
15213 if test "X$ltrpathdirs" != "X"; then
15214 for found_dir in $ltrpathdirs; do
15215 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15216 done
15217 fi
15218
15219
15220 ac_save_CPPFLAGS="$CPPFLAGS"
15221
15222 for element in $INCBABELTRACE; do
15223 haveit=
15224 for x in $CPPFLAGS; do
15225
15226 acl_save_prefix="$prefix"
15227 prefix="$acl_final_prefix"
15228 acl_save_exec_prefix="$exec_prefix"
15229 exec_prefix="$acl_final_exec_prefix"
15230 eval x=\"$x\"
15231 exec_prefix="$acl_save_exec_prefix"
15232 prefix="$acl_save_prefix"
15233
15234 if test "X$x" = "X$element"; then
15235 haveit=yes
15236 break
15237 fi
15238 done
15239 if test -z "$haveit"; then
15240 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15241 fi
15242 done
15243
15244
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15246$as_echo_n "checking for libbabeltrace... " >&6; }
15247if test "${ac_cv_libbabeltrace+set}" = set; then :
15248 $as_echo_n "(cached) " >&6
15249else
15250
15251 ac_save_LIBS="$LIBS"
15252 LIBS="$LIBS $LIBBABELTRACE"
15253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15254/* end confdefs.h. */
15255#include <babeltrace/babeltrace.h>
15256 #include <babeltrace/ctf/events.h>
15257 #include <babeltrace/ctf/iterator.h>
15258int
15259main ()
15260{
15261struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15262 struct bt_ctf_event *event = NULL;
15263 const struct bt_definition *scope;
15264
65c749e7 15265 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
15266 scope = bt_ctf_get_top_level_scope (event,
15267 BT_STREAM_EVENT_HEADER);
15268 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15269
15270 ;
15271 return 0;
15272}
15273_ACEOF
15274if ac_fn_c_try_link "$LINENO"; then :
15275 ac_cv_libbabeltrace=yes
15276else
15277 ac_cv_libbabeltrace=no
15278fi
15279rm -f core conftest.err conftest.$ac_objext \
15280 conftest$ac_exeext conftest.$ac_ext
15281 LIBS="$ac_save_LIBS"
15282
15283fi
15284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15285$as_echo "$ac_cv_libbabeltrace" >&6; }
15286 if test "$ac_cv_libbabeltrace" = yes; then
15287 HAVE_LIBBABELTRACE=yes
15288
15289$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15290
15291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15292$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15294$as_echo "$LIBBABELTRACE" >&6; }
15295 else
15296 HAVE_LIBBABELTRACE=no
15297 CPPFLAGS="$ac_save_CPPFLAGS"
15298 LIBBABELTRACE=
15299 LTLIBBABELTRACE=
15300 fi
15301
15302
15303
15304
15305
15306
15307 CFLAGS=$saved_CFLAGS
15308
15309 if test "$HAVE_LIBBABELTRACE" != yes; then
15310 if test "$with_babeltrace" = yes; then
15311 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15312 else
15313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15314$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15315 fi
15316 fi
15317fi
15318
db985757 15319# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15320# to an empty version.
c906108c
SS
15321
15322files=
15323links=
5a2402b8 15324
c906108c
SS
15325rm -f nm.h
15326if test "${nativefile}" != ""; then
0f475e27
AC
15327 case "${nativefile}" in
15328 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15329 * ) GDB_NM_FILE="${nativefile}"
15330 esac
5a2402b8
AC
15331 files="${files} ${GDB_NM_FILE}"
15332 links="${links} nm.h"
60ca704f
SE
15333
15334cat >>confdefs.h <<_ACEOF
b78960be 15335#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15336_ACEOF
5a2402b8 15337
c906108c 15338fi
5a2402b8
AC
15339
15340
bec39cab
AC
15341ac_sources="$files"
15342ac_dests="$links"
15343while test -n "$ac_sources"; do
15344 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15345 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15346 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15347done
81ecdfbb 15348ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15349
15350
c906108c
SS
15351
15352
c906108c 15353
81ecdfbb 15354$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15355
bec39cab 15356
b292c783
JK
15357# Undo the $ec_script escaping suitable for Makefile.
15358transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15359GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15360if test "x$GDB_TRANSFORM_NAME" = x; then
15361 GDB_TRANSFORM_NAME=gdb
15362fi
15363
15364GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15365if test "x$GCORE_TRANSFORM_NAME" = x; then
15366 GCORE_TRANSFORM_NAME=gcore
15367fi
15368
15369ac_config_files="$ac_config_files gcore"
15370
15371
c971b7fa 15372ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15373
15374ac_config_commands="$ac_config_commands default"
89a34d1b 15375
bec39cab
AC
15376cat >confcache <<\_ACEOF
15377# This file is a shell script that caches the results of configure
15378# tests run on this system so they can be shared between configure
15379# scripts and configure runs, see configure's option --config-cache.
15380# It is not useful on other systems. If it contains results you don't
15381# want to keep, you may remove or edit it.
15382#
15383# config.status only pays attention to the cache file if you give it
15384# the --recheck option to rerun configure.
15385#
15386# `ac_cv_env_foo' variables (set or unset) will be overridden when
15387# loading this file, other *unset* `ac_cv_foo' will be assigned the
15388# following values.
15389
15390_ACEOF
15391
15392# The following way of writing the cache mishandles newlines in values,
15393# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15394# So, we kill variables containing newlines.
bec39cab
AC
15395# Ultrix sh set writes to stderr and can't be redirected directly,
15396# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15397(
15398 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15399 eval ac_val=\$$ac_var
15400 case $ac_val in #(
15401 *${as_nl}*)
15402 case $ac_var in #(
15403 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15404$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15405 esac
15406 case $ac_var in #(
15407 _ | IFS | as_nl) ;; #(
15408 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15409 *) { eval $ac_var=; unset $ac_var;} ;;
15410 esac ;;
15411 esac
15412 done
15413
bec39cab 15414 (set) 2>&1 |
81ecdfbb
RW
15415 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15416 *${as_nl}ac_space=\ *)
15417 # `set' does not quote correctly, so add quotes: double-quote
15418 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15419 sed -n \
15420 "s/'/'\\\\''/g;
15421 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15422 ;; #(
bec39cab
AC
15423 *)
15424 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15425 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15426 ;;
81ecdfbb
RW
15427 esac |
15428 sort
15429) |
bec39cab 15430 sed '
81ecdfbb 15431 /^ac_cv_env_/b end
bec39cab 15432 t clear
81ecdfbb 15433 :clear
bec39cab
AC
15434 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15435 t end
81ecdfbb
RW
15436 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15437 :end' >>confcache
15438if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15439 if test -w "$cache_file"; then
15440 test "x$cache_file" != "x/dev/null" &&
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15442$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15443 cat confcache >$cache_file
15444 else
81ecdfbb
RW
15445 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15446$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15447 fi
15448fi
15449rm -f confcache
15450
15451test "x$prefix" = xNONE && prefix=$ac_default_prefix
15452# Let make expand exec_prefix.
15453test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15454
bec39cab
AC
15455DEFS=-DHAVE_CONFIG_H
15456
15457ac_libobjs=
15458ac_ltlibobjs=
15459for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15460 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15461 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15462 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15463 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15464 # will be set to the directory where LIBOBJS objects are built.
15465 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15466 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15467done
15468LIBOBJS=$ac_libobjs
15469
15470LTLIBOBJS=$ac_ltlibobjs
15471
15472
85981d60 15473if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15474 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15475Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15476fi
a417dc56 15477if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15478 as_fn_error "conditional \"GMAKE\" was never defined.
15479Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15480fi
4df42755
DE
15481if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15482 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15483Usually this means the macro was only invoked conditionally." "$LINENO" 5
15484fi
15485if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15486 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15487Usually this means the macro was only invoked conditionally." "$LINENO" 5
15488fi
81ecdfbb
RW
15489
15490
bec39cab 15491: ${CONFIG_STATUS=./config.status}
81ecdfbb 15492ac_write_fail=0
bec39cab
AC
15493ac_clean_files_save=$ac_clean_files
15494ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15495{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15496$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15497as_write_fail=0
15498cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15499#! $SHELL
15500# Generated by $as_me.
15501# Run this file to recreate the current configuration.
15502# Compiler output produced by configure, useful for debugging
15503# configure, is in config.log if it exists.
15504
15505debug=false
15506ac_cs_recheck=false
15507ac_cs_silent=false
bec39cab 15508
81ecdfbb
RW
15509SHELL=\${CONFIG_SHELL-$SHELL}
15510export SHELL
15511_ASEOF
15512cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15513## -------------------- ##
15514## M4sh Initialization. ##
15515## -------------------- ##
15516
15517# Be more Bourne compatible
15518DUALCASE=1; export DUALCASE # for MKS sh
15519if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15520 emulate sh
15521 NULLCMD=:
81ecdfbb 15522 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15523 # is contrary to our usage. Disable this feature.
15524 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15525 setopt NO_GLOB_SUBST
15526else
15527 case `(set -o) 2>/dev/null` in #(
15528 *posix*) :
15529 set -o posix ;; #(
15530 *) :
15531 ;;
15532esac
bec39cab 15533fi
bec39cab 15534
81ecdfbb
RW
15535
15536as_nl='
15537'
15538export as_nl
15539# Printing a long string crashes Solaris 7 /usr/bin/printf.
15540as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15541as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15542as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15543# Prefer a ksh shell builtin over an external printf program on Solaris,
15544# but without wasting forks for bash or zsh.
15545if test -z "$BASH_VERSION$ZSH_VERSION" \
15546 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15547 as_echo='print -r --'
15548 as_echo_n='print -rn --'
15549elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15550 as_echo='printf %s\n'
15551 as_echo_n='printf %s'
15552else
15553 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15554 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15555 as_echo_n='/usr/ucb/echo -n'
15556 else
15557 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15558 as_echo_n_body='eval
15559 arg=$1;
15560 case $arg in #(
15561 *"$as_nl"*)
15562 expr "X$arg" : "X\\(.*\\)$as_nl";
15563 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15564 esac;
15565 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15566 '
15567 export as_echo_n_body
15568 as_echo_n='sh -c $as_echo_n_body as_echo'
15569 fi
15570 export as_echo_body
15571 as_echo='sh -c $as_echo_body as_echo'
15572fi
15573
15574# The user is always right.
15575if test "${PATH_SEPARATOR+set}" != set; then
15576 PATH_SEPARATOR=:
15577 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15578 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15579 PATH_SEPARATOR=';'
15580 }
bec39cab
AC
15581fi
15582
15583
81ecdfbb
RW
15584# IFS
15585# We need space, tab and new line, in precisely that order. Quoting is
15586# there to prevent editors from complaining about space-tab.
15587# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15588# splitting by setting IFS to empty value.)
15589IFS=" "" $as_nl"
15590
15591# Find who we are. Look in the path if we contain no directory separator.
15592case $0 in #((
15593 *[\\/]* ) as_myself=$0 ;;
15594 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15595for as_dir in $PATH
15596do
15597 IFS=$as_save_IFS
15598 test -z "$as_dir" && as_dir=.
15599 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15600 done
15601IFS=$as_save_IFS
15602
15603 ;;
15604esac
15605# We did not find ourselves, most probably we were run as `sh COMMAND'
15606# in which case we are not to be found in the path.
15607if test "x$as_myself" = x; then
15608 as_myself=$0
15609fi
15610if test ! -f "$as_myself"; then
15611 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15612 exit 1
15613fi
15614
15615# Unset variables that we do not need and which cause bugs (e.g. in
15616# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15617# suppresses any "Segmentation fault" message there. '((' could
15618# trigger a bug in pdksh 5.2.14.
15619for as_var in BASH_ENV ENV MAIL MAILPATH
15620do eval test x\${$as_var+set} = xset \
15621 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15622done
bec39cab
AC
15623PS1='$ '
15624PS2='> '
15625PS4='+ '
15626
15627# NLS nuisances.
81ecdfbb
RW
15628LC_ALL=C
15629export LC_ALL
15630LANGUAGE=C
15631export LANGUAGE
15632
15633# CDPATH.
15634(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15635
15636
15637# as_fn_error ERROR [LINENO LOG_FD]
15638# ---------------------------------
15639# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15640# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15641# script with status $?, using 1 if that was 0.
15642as_fn_error ()
15643{
15644 as_status=$?; test $as_status -eq 0 && as_status=1
15645 if test "$3"; then
15646 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15647 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15648 fi
15649 $as_echo "$as_me: error: $1" >&2
15650 as_fn_exit $as_status
15651} # as_fn_error
15652
15653
15654# as_fn_set_status STATUS
15655# -----------------------
15656# Set $? to STATUS, without forking.
15657as_fn_set_status ()
15658{
15659 return $1
15660} # as_fn_set_status
15661
15662# as_fn_exit STATUS
15663# -----------------
15664# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15665as_fn_exit ()
15666{
15667 set +e
15668 as_fn_set_status $1
15669 exit $1
15670} # as_fn_exit
15671
15672# as_fn_unset VAR
15673# ---------------
15674# Portably unset VAR.
15675as_fn_unset ()
15676{
15677 { eval $1=; unset $1;}
15678}
15679as_unset=as_fn_unset
15680# as_fn_append VAR VALUE
15681# ----------------------
15682# Append the text in VALUE to the end of the definition contained in VAR. Take
15683# advantage of any shell optimizations that allow amortized linear growth over
15684# repeated appends, instead of the typical quadratic growth present in naive
15685# implementations.
15686if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15687 eval 'as_fn_append ()
15688 {
15689 eval $1+=\$2
15690 }'
15691else
15692 as_fn_append ()
15693 {
15694 eval $1=\$$1\$2
15695 }
15696fi # as_fn_append
15697
15698# as_fn_arith ARG...
15699# ------------------
15700# Perform arithmetic evaluation on the ARGs, and store the result in the
15701# global $as_val. Take advantage of shells that can avoid forks. The arguments
15702# must be portable across $(()) and expr.
15703if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15704 eval 'as_fn_arith ()
15705 {
15706 as_val=$(( $* ))
15707 }'
15708else
15709 as_fn_arith ()
15710 {
15711 as_val=`expr "$@" || test $? -eq 1`
15712 }
15713fi # as_fn_arith
bec39cab 15714
81ecdfbb
RW
15715
15716if expr a : '\(a\)' >/dev/null 2>&1 &&
15717 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15718 as_expr=expr
15719else
15720 as_expr=false
15721fi
15722
81ecdfbb 15723if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15724 as_basename=basename
15725else
15726 as_basename=false
15727fi
15728
81ecdfbb
RW
15729if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15730 as_dirname=dirname
15731else
15732 as_dirname=false
15733fi
bec39cab 15734
81ecdfbb 15735as_me=`$as_basename -- "$0" ||
bec39cab
AC
15736$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15737 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15738 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15739$as_echo X/"$0" |
15740 sed '/^.*\/\([^/][^/]*\)\/*$/{
15741 s//\1/
15742 q
15743 }
15744 /^X\/\(\/\/\)$/{
15745 s//\1/
15746 q
15747 }
15748 /^X\/\(\/\).*/{
15749 s//\1/
15750 q
15751 }
15752 s/.*/./; q'`
b4e70030 15753
b4e70030
JB
15754# Avoid depending upon Character Ranges.
15755as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15756as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15757as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15758as_cr_digits='0123456789'
15759as_cr_alnum=$as_cr_Letters$as_cr_digits
15760
81ecdfbb
RW
15761ECHO_C= ECHO_N= ECHO_T=
15762case `echo -n x` in #(((((
15763-n*)
15764 case `echo 'xy\c'` in
15765 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15766 xy) ECHO_C='\c';;
15767 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15768 ECHO_T=' ';;
15769 esac;;
15770*)
15771 ECHO_N='-n';;
bec39cab
AC
15772esac
15773
81ecdfbb
RW
15774rm -f conf$$ conf$$.exe conf$$.file
15775if test -d conf$$.dir; then
15776 rm -f conf$$.dir/conf$$.file
bec39cab 15777else
81ecdfbb
RW
15778 rm -f conf$$.dir
15779 mkdir conf$$.dir 2>/dev/null
bec39cab 15780fi
81ecdfbb
RW
15781if (echo >conf$$.file) 2>/dev/null; then
15782 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15783 as_ln_s='ln -s'
81ecdfbb
RW
15784 # ... but there are two gotchas:
15785 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15786 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15787 # In both cases, we have to default to `cp -p'.
15788 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15789 as_ln_s='cp -p'
15790 elif ln conf$$.file conf$$ 2>/dev/null; then
15791 as_ln_s=ln
15792 else
15793 as_ln_s='cp -p'
b4e70030 15794 fi
bec39cab
AC
15795else
15796 as_ln_s='cp -p'
15797fi
81ecdfbb
RW
15798rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15799rmdir conf$$.dir 2>/dev/null
15800
15801
15802# as_fn_mkdir_p
15803# -------------
15804# Create "$as_dir" as a directory, including parents if necessary.
15805as_fn_mkdir_p ()
15806{
15807
15808 case $as_dir in #(
15809 -*) as_dir=./$as_dir;;
15810 esac
15811 test -d "$as_dir" || eval $as_mkdir_p || {
15812 as_dirs=
15813 while :; do
15814 case $as_dir in #(
15815 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15816 *) as_qdir=$as_dir;;
15817 esac
15818 as_dirs="'$as_qdir' $as_dirs"
15819 as_dir=`$as_dirname -- "$as_dir" ||
15820$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15821 X"$as_dir" : 'X\(//\)[^/]' \| \
15822 X"$as_dir" : 'X\(//\)$' \| \
15823 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15824$as_echo X"$as_dir" |
15825 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15826 s//\1/
15827 q
15828 }
15829 /^X\(\/\/\)[^/].*/{
15830 s//\1/
15831 q
15832 }
15833 /^X\(\/\/\)$/{
15834 s//\1/
15835 q
15836 }
15837 /^X\(\/\).*/{
15838 s//\1/
15839 q
15840 }
15841 s/.*/./; q'`
15842 test -d "$as_dir" && break
15843 done
15844 test -z "$as_dirs" || eval "mkdir $as_dirs"
15845 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15846
bec39cab 15847
81ecdfbb 15848} # as_fn_mkdir_p
bec39cab 15849if mkdir -p . 2>/dev/null; then
81ecdfbb 15850 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15851else
15852 test -d ./-p && rmdir ./-p
15853 as_mkdir_p=false
15854fi
15855
81ecdfbb
RW
15856if test -x / >/dev/null 2>&1; then
15857 as_test_x='test -x'
15858else
15859 if ls -dL / >/dev/null 2>&1; then
15860 as_ls_L_option=L
15861 else
15862 as_ls_L_option=
15863 fi
15864 as_test_x='
15865 eval sh -c '\''
15866 if test -d "$1"; then
15867 test -d "$1/.";
15868 else
15869 case $1 in #(
15870 -*)set "./$1";;
15871 esac;
15872 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15873 ???[sx]*):;;*)false;;esac;fi
15874 '\'' sh
15875 '
15876fi
15877as_executable_p=$as_test_x
bec39cab
AC
15878
15879# Sed expression to map a string onto a valid CPP name.
15880as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15881
15882# Sed expression to map a string onto a valid variable name.
15883as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15884
15885
bec39cab 15886exec 6>&1
81ecdfbb
RW
15887## ----------------------------------- ##
15888## Main body of $CONFIG_STATUS script. ##
15889## ----------------------------------- ##
15890_ASEOF
15891test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15892
15893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15894# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15895# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15896# values after options handling.
15897ac_log="
bec39cab 15898This file was extended by $as_me, which was
81ecdfbb 15899generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15900
15901 CONFIG_FILES = $CONFIG_FILES
15902 CONFIG_HEADERS = $CONFIG_HEADERS
15903 CONFIG_LINKS = $CONFIG_LINKS
15904 CONFIG_COMMANDS = $CONFIG_COMMANDS
15905 $ $0 $@
15906
81ecdfbb
RW
15907on `(hostname || uname -n) 2>/dev/null | sed 1q`
15908"
15909
bec39cab
AC
15910_ACEOF
15911
81ecdfbb
RW
15912case $ac_config_files in *"
15913"*) set x $ac_config_files; shift; ac_config_files=$*;;
15914esac
234b45d4 15915
81ecdfbb
RW
15916case $ac_config_headers in *"
15917"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15918esac
b4e70030 15919
b4e70030 15920
81ecdfbb
RW
15921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15922# Files that config.status was made for.
15923config_files="$ac_config_files"
15924config_headers="$ac_config_headers"
15925config_links="$ac_config_links"
15926config_commands="$ac_config_commands"
234b45d4 15927
81ecdfbb 15928_ACEOF
b4e70030 15929
81ecdfbb 15930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15931ac_cs_usage="\
81ecdfbb
RW
15932\`$as_me' instantiates files and other configuration actions
15933from templates according to the current configuration. Unless the files
15934and actions are specified as TAGs, all are instantiated by default.
234b45d4 15935
81ecdfbb 15936Usage: $0 [OPTION]... [TAG]...
234b45d4 15937
bec39cab 15938 -h, --help print this help, then exit
81ecdfbb
RW
15939 -V, --version print version number and configuration settings, then exit
15940 -q, --quiet, --silent
15941 do not print progress messages
bec39cab
AC
15942 -d, --debug don't remove temporary files
15943 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15944 --file=FILE[:TEMPLATE]
15945 instantiate the configuration file FILE
15946 --header=FILE[:TEMPLATE]
15947 instantiate the configuration header FILE
234b45d4 15948
bec39cab
AC
15949Configuration files:
15950$config_files
234b45d4 15951
bec39cab
AC
15952Configuration headers:
15953$config_headers
234b45d4 15954
bec39cab
AC
15955Configuration links:
15956$config_links
234b45d4 15957
bec39cab
AC
15958Configuration commands:
15959$config_commands
15960
81ecdfbb 15961Report bugs to the package provider."
b4e70030 15962
81ecdfbb
RW
15963_ACEOF
15964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15965ac_cs_version="\\
15966config.status
81ecdfbb
RW
15967configured by $0, generated by GNU Autoconf 2.64,
15968 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15969
81ecdfbb 15970Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15971This config.status script is free software; the Free Software Foundation
15972gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15973
15974ac_pwd='$ac_pwd'
15975srcdir='$srcdir'
15976INSTALL='$INSTALL'
81ecdfbb
RW
15977AWK='$AWK'
15978test -n "\$AWK" || AWK=awk
bec39cab
AC
15979_ACEOF
15980
81ecdfbb
RW
15981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15982# The default lists apply if the user does not specify any file.
bec39cab
AC
15983ac_need_defaults=:
15984while test $# != 0
15985do
15986 case $1 in
15987 --*=*)
81ecdfbb
RW
15988 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15989 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15990 ac_shift=:
c906108c 15991 ;;
81ecdfbb 15992 *)
bec39cab
AC
15993 ac_option=$1
15994 ac_optarg=$2
15995 ac_shift=shift
c906108c 15996 ;;
bec39cab 15997 esac
c906108c 15998
bec39cab
AC
15999 case $ac_option in
16000 # Handling of the options.
bec39cab
AC
16001 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16002 ac_cs_recheck=: ;;
81ecdfbb
RW
16003 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16004 $as_echo "$ac_cs_version"; exit ;;
16005 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16006 debug=: ;;
16007 --file | --fil | --fi | --f )
16008 $ac_shift
81ecdfbb
RW
16009 case $ac_optarg in
16010 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16011 esac
16012 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16013 ac_need_defaults=false;;
16014 --header | --heade | --head | --hea )
16015 $ac_shift
81ecdfbb
RW
16016 case $ac_optarg in
16017 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16018 esac
16019 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16020 ac_need_defaults=false;;
81ecdfbb
RW
16021 --he | --h)
16022 # Conflict between --help and --header
16023 as_fn_error "ambiguous option: \`$1'
16024Try \`$0 --help' for more information.";;
16025 --help | --hel | -h )
16026 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16027 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16028 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16029 ac_cs_silent=: ;;
c906108c 16030
bec39cab 16031 # This is an error.
81ecdfbb
RW
16032 -*) as_fn_error "unrecognized option: \`$1'
16033Try \`$0 --help' for more information." ;;
c906108c 16034
81ecdfbb
RW
16035 *) as_fn_append ac_config_targets " $1"
16036 ac_need_defaults=false ;;
c906108c 16037
bec39cab
AC
16038 esac
16039 shift
16040done
c906108c 16041
bec39cab 16042ac_configure_extra_args=
c906108c 16043
bec39cab
AC
16044if $ac_cs_silent; then
16045 exec 6>/dev/null
16046 ac_configure_extra_args="$ac_configure_extra_args --silent"
16047fi
c906108c 16048
bec39cab 16049_ACEOF
81ecdfbb 16050cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16051if \$ac_cs_recheck; then
81ecdfbb
RW
16052 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16053 shift
16054 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16055 CONFIG_SHELL='$SHELL'
16056 export CONFIG_SHELL
16057 exec "\$@"
bec39cab
AC
16058fi
16059
16060_ACEOF
81ecdfbb
RW
16061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16062exec 5>>config.log
16063{
16064 echo
16065 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16066## Running $as_me. ##
16067_ASBOX
16068 $as_echo "$ac_log"
16069} >&5
bec39cab 16070
81ecdfbb
RW
16071_ACEOF
16072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16073#
81ecdfbb 16074# INIT-COMMANDS
c906108c 16075#
a417dc56 16076ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16077
bec39cab
AC
16078_ACEOF
16079
81ecdfbb 16080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16081
81ecdfbb 16082# Handling of arguments.
bec39cab 16083for ac_config_target in $ac_config_targets
c906108c 16084do
81ecdfbb
RW
16085 case $ac_config_target in
16086 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16087 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16088 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16089 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16090 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16091 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16092 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16093 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16094 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16095 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16096
16097 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16098 esac
16099done
16100
81ecdfbb 16101
bec39cab
AC
16102# If the user did not use the arguments to specify the items to instantiate,
16103# then the envvar interface is used. Set only those that are not.
16104# We use the long form for the default assignment because of an extremely
16105# bizarre bug on SunOS 4.1.3.
16106if $ac_need_defaults; then
16107 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16108 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16109 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16110 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16111fi
16112
b4e70030 16113# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16114# simply because there is no reason against having it here, and in addition,
b4e70030 16115# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16116# Hook for its removal unless debugging.
16117# Note that there is a small window in which the directory will not be cleaned:
16118# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16119$debug ||
16120{
81ecdfbb
RW
16121 tmp=
16122 trap 'exit_status=$?
16123 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16124' 0
16125 trap 'as_fn_exit 1' 1 2 13 15
16126}
16127# Create a (secure) tmp directory for tmp files.
16128
16129{
16130 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16131 test -n "$tmp" && test -d "$tmp"
16132} ||
16133{
16134 tmp=./conf$$-$RANDOM
16135 (umask 077 && mkdir "$tmp")
16136} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16137
16138# Set up the scripts for CONFIG_FILES section.
16139# No need to generate them if there are no CONFIG_FILES.
16140# This happens for instance with `./config.status config.h'.
16141if test -n "$CONFIG_FILES"; then
16142
16143if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16144 ac_cs_awk_getline=:
16145 ac_cs_awk_pipe_init=
16146 ac_cs_awk_read_file='
16147 while ((getline aline < (F[key])) > 0)
16148 print(aline)
16149 close(F[key])'
16150 ac_cs_awk_pipe_fini=
16151else
16152 ac_cs_awk_getline=false
16153 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16154 ac_cs_awk_read_file='
16155 print "|#_!!_#|"
16156 print "cat " F[key] " &&"
16157 '$ac_cs_awk_pipe_init
16158 # The final `:' finishes the AND list.
16159 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16160fi
16161ac_cr=`echo X | tr X '\015'`
16162# On cygwin, bash can eat \r inside `` if the user requested igncr.
16163# But we know of no other shell where ac_cr would be empty at this
16164# point, so we can use a bashism as a fallback.
16165if test "x$ac_cr" = x; then
16166 eval ac_cr=\$\'\\r\'
16167fi
16168ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16169if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16170 ac_cs_awk_cr='\r'
16171else
16172 ac_cs_awk_cr=$ac_cr
16173fi
16174
16175echo 'BEGIN {' >"$tmp/subs1.awk" &&
16176_ACEOF
16177
16178# Create commands to substitute file output variables.
16179{
16180 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16181 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16182 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16183 echo "_ACAWK" &&
16184 echo "_ACEOF"
16185} >conf$$files.sh &&
16186. ./conf$$files.sh ||
16187 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16188rm -f conf$$files.sh
16189
16190{
16191 echo "cat >conf$$subs.awk <<_ACEOF" &&
16192 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16193 echo "_ACEOF"
16194} >conf$$subs.sh ||
16195 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16196ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16197ac_delim='%!_!# '
16198for ac_last_try in false false false false false :; do
16199 . ./conf$$subs.sh ||
16200 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16201
16202 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16203 if test $ac_delim_n = $ac_delim_num; then
16204 break
16205 elif $ac_last_try; then
16206 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16207 else
16208 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16209 fi
16210done
16211rm -f conf$$subs.sh
16212
16213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16214cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16215_ACEOF
16216sed -n '
16217h
16218s/^/S["/; s/!.*/"]=/
16219p
16220g
16221s/^[^!]*!//
16222:repl
16223t repl
16224s/'"$ac_delim"'$//
16225t delim
16226:nl
16227h
16228s/\(.\{148\}\).*/\1/
16229t more1
16230s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16231p
16232n
16233b repl
16234:more1
16235s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16236p
16237g
16238s/.\{148\}//
16239t nl
16240:delim
16241h
16242s/\(.\{148\}\).*/\1/
16243t more2
16244s/["\\]/\\&/g; s/^/"/; s/$/"/
16245p
16246b
16247:more2
16248s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16249p
16250g
16251s/.\{148\}//
16252t delim
16253' <conf$$subs.awk | sed '
16254/^[^""]/{
16255 N
16256 s/\n//
16257}
16258' >>$CONFIG_STATUS || ac_write_fail=1
16259rm -f conf$$subs.awk
16260cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16261_ACAWK
16262cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16263 for (key in S) S_is_set[key] = 1
16264 FS = "\a"
16265 \$ac_cs_awk_pipe_init
16266}
16267{
16268 line = $ 0
16269 nfields = split(line, field, "@")
16270 substed = 0
16271 len = length(field[1])
16272 for (i = 2; i < nfields; i++) {
16273 key = field[i]
16274 keylen = length(key)
16275 if (S_is_set[key]) {
16276 value = S[key]
16277 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16278 len += length(value) + length(field[++i])
16279 substed = 1
16280 } else
16281 len += 1 + keylen
16282 }
16283 if (nfields == 3 && !substed) {
16284 key = field[2]
16285 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16286 \$ac_cs_awk_read_file
16287 next
16288 }
16289 }
16290 print line
b4e70030 16291}
81ecdfbb
RW
16292\$ac_cs_awk_pipe_fini
16293_ACAWK
16294_ACEOF
16295cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16296if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16297 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16298else
16299 cat
16300fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16301 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16302_ACEOF
16303
16304# VPATH may cause trouble with some makes, so we remove $(srcdir),
16305# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16306# trailing colons and then remove the whole line if VPATH becomes empty
16307# (actually we leave an empty line to preserve line numbers).
16308if test "x$srcdir" = x.; then
16309 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16310s/:*\$(srcdir):*/:/
16311s/:*\${srcdir}:*/:/
16312s/:*@srcdir@:*/:/
16313s/^\([^=]*=[ ]*\):*/\1/
16314s/:*$//
16315s/^[^=]*=[ ]*$//
16316}'
16317fi
16318
16319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16320fi # test -n "$CONFIG_FILES"
16321
16322# Set up the scripts for CONFIG_HEADERS section.
16323# No need to generate them if there are no CONFIG_HEADERS.
16324# This happens for instance with `./config.status Makefile'.
16325if test -n "$CONFIG_HEADERS"; then
16326cat >"$tmp/defines.awk" <<\_ACAWK ||
16327BEGIN {
16328_ACEOF
16329
16330# Transform confdefs.h into an awk script `defines.awk', embedded as
16331# here-document in config.status, that substitutes the proper values into
16332# config.h.in to produce config.h.
4e8d927d 16333
81ecdfbb
RW
16334# Create a delimiter string that does not exist in confdefs.h, to ease
16335# handling of long lines.
16336ac_delim='%!_!# '
16337for ac_last_try in false false :; do
16338 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16339 if test -z "$ac_t"; then
16340 break
16341 elif $ac_last_try; then
16342 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16343 else
16344 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16345 fi
16346done
4e8d927d 16347
81ecdfbb
RW
16348# For the awk script, D is an array of macro values keyed by name,
16349# likewise P contains macro parameters if any. Preserve backslash
16350# newline sequences.
16351
16352ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16353sed -n '
16354s/.\{148\}/&'"$ac_delim"'/g
16355t rset
16356:rset
16357s/^[ ]*#[ ]*define[ ][ ]*/ /
16358t def
16359d
16360:def
16361s/\\$//
16362t bsnl
16363s/["\\]/\\&/g
16364s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16365D["\1"]=" \3"/p
16366s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16367d
16368:bsnl
16369s/["\\]/\\&/g
16370s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16371D["\1"]=" \3\\\\\\n"\\/p
16372t cont
16373s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16374t cont
16375d
16376:cont
16377n
16378s/.\{148\}/&'"$ac_delim"'/g
16379t clear
16380:clear
16381s/\\$//
16382t bsnlc
16383s/["\\]/\\&/g; s/^/"/; s/$/"/p
16384d
16385:bsnlc
16386s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16387b cont
16388' <confdefs.h | sed '
16389s/'"$ac_delim"'/"\\\
16390"/g' >>$CONFIG_STATUS || ac_write_fail=1
16391
16392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16393 for (key in D) D_is_set[key] = 1
16394 FS = "\a"
16395}
16396/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16397 line = \$ 0
16398 split(line, arg, " ")
16399 if (arg[1] == "#") {
16400 defundef = arg[2]
16401 mac1 = arg[3]
16402 } else {
16403 defundef = substr(arg[1], 2)
16404 mac1 = arg[2]
16405 }
16406 split(mac1, mac2, "(") #)
16407 macro = mac2[1]
16408 prefix = substr(line, 1, index(line, defundef) - 1)
16409 if (D_is_set[macro]) {
16410 # Preserve the white space surrounding the "#".
16411 print prefix "define", macro P[macro] D[macro]
16412 next
16413 } else {
16414 # Replace #undef with comments. This is necessary, for example,
16415 # in the case of _POSIX_SOURCE, which is predefined and required
16416 # on some systems where configure will not decide to define it.
16417 if (defundef == "undef") {
16418 print "/*", prefix defundef, macro, "*/"
16419 next
16420 }
16421 }
b4e70030 16422}
81ecdfbb
RW
16423{ print }
16424_ACAWK
b4e70030 16425_ACEOF
81ecdfbb
RW
16426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16427 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16428fi # test -n "$CONFIG_HEADERS"
4e8d927d 16429
4e8d927d 16430
81ecdfbb
RW
16431eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16432shift
16433for ac_tag
16434do
16435 case $ac_tag in
16436 :[FHLC]) ac_mode=$ac_tag; continue;;
16437 esac
16438 case $ac_mode$ac_tag in
16439 :[FHL]*:*);;
16440 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16441 :[FH]-) ac_tag=-:-;;
16442 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16443 esac
16444 ac_save_IFS=$IFS
16445 IFS=:
16446 set x $ac_tag
16447 IFS=$ac_save_IFS
16448 shift
16449 ac_file=$1
16450 shift
4e8d927d 16451
81ecdfbb
RW
16452 case $ac_mode in
16453 :L) ac_source=$1;;
16454 :[FH])
16455 ac_file_inputs=
16456 for ac_f
16457 do
16458 case $ac_f in
16459 -) ac_f="$tmp/stdin";;
16460 *) # Look for the file first in the build tree, then in the source tree
16461 # (if the path is not absolute). The absolute path cannot be DOS-style,
16462 # because $ac_f cannot contain `:'.
16463 test -f "$ac_f" ||
16464 case $ac_f in
16465 [\\/$]*) false;;
16466 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16467 esac ||
16468 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16469 esac
16470 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16471 as_fn_append ac_file_inputs " '$ac_f'"
16472 done
16473
16474 # Let's still pretend it is `configure' which instantiates (i.e., don't
16475 # use $as_me), people would be surprised to read:
16476 # /* config.h. Generated by config.status. */
16477 configure_input='Generated from '`
16478 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16479 `' by configure.'
16480 if test x"$ac_file" != x-; then
16481 configure_input="$ac_file. $configure_input"
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16483$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16484 fi
81ecdfbb
RW
16485 # Neutralize special characters interpreted by sed in replacement strings.
16486 case $configure_input in #(
16487 *\&* | *\|* | *\\* )
16488 ac_sed_conf_input=`$as_echo "$configure_input" |
16489 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16490 *) ac_sed_conf_input=$configure_input;;
16491 esac
4e8d927d 16492
81ecdfbb
RW
16493 case $ac_tag in
16494 *:-:* | *:-) cat >"$tmp/stdin" \
16495 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16496 esac
16497 ;;
c906108c
SS
16498 esac
16499
81ecdfbb 16500 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16501$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16502 X"$ac_file" : 'X\(//\)[^/]' \| \
16503 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16504 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16505$as_echo X"$ac_file" |
16506 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16507 s//\1/
16508 q
16509 }
16510 /^X\(\/\/\)[^/].*/{
16511 s//\1/
16512 q
16513 }
16514 /^X\(\/\/\)$/{
16515 s//\1/
16516 q
16517 }
16518 /^X\(\/\).*/{
16519 s//\1/
16520 q
16521 }
16522 s/.*/./; q'`
16523 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16524 ac_builddir=.
16525
81ecdfbb
RW
16526case "$ac_dir" in
16527.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16528*)
16529 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16530 # A ".." for each directory in $ac_dir_suffix.
16531 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16532 case $ac_top_builddir_sub in
16533 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16534 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16535 esac ;;
16536esac
16537ac_abs_top_builddir=$ac_pwd
16538ac_abs_builddir=$ac_pwd$ac_dir_suffix
16539# for backward compatibility:
16540ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16541
16542case $srcdir in
81ecdfbb 16543 .) # We are building in place.
bec39cab 16544 ac_srcdir=.
81ecdfbb
RW
16545 ac_top_srcdir=$ac_top_builddir_sub
16546 ac_abs_top_srcdir=$ac_pwd ;;
16547 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16548 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16549 ac_top_srcdir=$srcdir
16550 ac_abs_top_srcdir=$srcdir ;;
16551 *) # Relative name.
16552 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16553 ac_top_srcdir=$ac_top_build_prefix$srcdir
16554 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16555esac
81ecdfbb 16556ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16557
c906108c 16558
81ecdfbb
RW
16559 case $ac_mode in
16560 :F)
16561 #
16562 # CONFIG_FILE
16563 #
c906108c 16564
bec39cab
AC
16565 case $INSTALL in
16566 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16567 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16568 esac
81ecdfbb 16569_ACEOF
121ce6e5 16570
81ecdfbb
RW
16571cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16572# If the template does not know about datarootdir, expand it.
16573# FIXME: This hack should be removed a few years after 2.60.
16574ac_datarootdir_hack=; ac_datarootdir_seen=
16575ac_sed_dataroot='
16576/datarootdir/ {
16577 p
16578 q
16579}
16580/@datadir@/p
16581/@docdir@/p
16582/@infodir@/p
16583/@localedir@/p
16584/@mandir@/p'
16585case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16586*datarootdir*) ac_datarootdir_seen=yes;;
16587*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16589$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16590_ACEOF
16591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16592 ac_datarootdir_hack='
16593 s&@datadir@&$datadir&g
16594 s&@docdir@&$docdir&g
16595 s&@infodir@&$infodir&g
16596 s&@localedir@&$localedir&g
16597 s&@mandir@&$mandir&g
16598 s&\\\${datarootdir}&$datarootdir&g' ;;
16599esac
4e8d927d 16600_ACEOF
81ecdfbb
RW
16601
16602# Neutralize VPATH when `$srcdir' = `.'.
16603# Shell code in configure.ac might set extrasub.
16604# FIXME: do we really want to maintain this feature?
16605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16606ac_sed_extra="$ac_vpsub
bec39cab
AC
16607$extrasub
16608_ACEOF
81ecdfbb 16609cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16610:t
16611/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16612s|@configure_input@|$ac_sed_conf_input|;t t
16613s&@top_builddir@&$ac_top_builddir_sub&;t t
16614s&@top_build_prefix@&$ac_top_build_prefix&;t t
16615s&@srcdir@&$ac_srcdir&;t t
16616s&@abs_srcdir@&$ac_abs_srcdir&;t t
16617s&@top_srcdir@&$ac_top_srcdir&;t t
16618s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16619s&@builddir@&$ac_builddir&;t t
16620s&@abs_builddir@&$ac_abs_builddir&;t t
16621s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16622s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16623$ac_datarootdir_hack
16624"
16625eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16626if $ac_cs_awk_getline; then
16627 $AWK -f "$tmp/subs.awk"
16628else
16629 $AWK -f "$tmp/subs.awk" | $SHELL
16630fi >$tmp/out \
16631 || as_fn_error "could not create $ac_file" "$LINENO" 5
16632
16633test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16634 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16635 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16637which seems to be undefined. Please make sure it is defined." >&5
16638$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16639which seems to be undefined. Please make sure it is defined." >&2;}
16640
16641 rm -f "$tmp/stdin"
bec39cab 16642 case $ac_file in
81ecdfbb
RW
16643 -) cat "$tmp/out" && rm -f "$tmp/out";;
16644 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16645 esac \
16646 || as_fn_error "could not create $ac_file" "$LINENO" 5
16647 ;;
16648 :H)
16649 #
16650 # CONFIG_HEADER
16651 #
bec39cab 16652 if test x"$ac_file" != x-; then
81ecdfbb
RW
16653 {
16654 $as_echo "/* $configure_input */" \
16655 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16656 } >"$tmp/config.h" \
16657 || as_fn_error "could not create $ac_file" "$LINENO" 5
16658 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16659 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16660$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16661 else
81ecdfbb
RW
16662 rm -f "$ac_file"
16663 mv "$tmp/config.h" "$ac_file" \
16664 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16665 fi
16666 else
81ecdfbb
RW
16667 $as_echo "/* $configure_input */" \
16668 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16669 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16670 fi
81ecdfbb
RW
16671 ;;
16672 :L)
16673 #
16674 # CONFIG_LINK
16675 #
c906108c 16676
81ecdfbb
RW
16677 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16678 :
b4e70030 16679 else
81ecdfbb
RW
16680 # Prefer the file from the source tree if names are identical.
16681 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16682 ac_source=$srcdir/$ac_source
16683 fi
b4e70030 16684
81ecdfbb
RW
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16686$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16687
81ecdfbb
RW
16688 if test ! -r "$ac_source"; then
16689 as_fn_error "$ac_source: file not found" "$LINENO" 5
16690 fi
16691 rm -f "$ac_file"
bec39cab 16692
81ecdfbb
RW
16693 # Try a relative symlink, then a hard link, then a copy.
16694 case $srcdir in
16695 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16696 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16697 esac
16698 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16699 ln "$ac_source" "$ac_file" 2>/dev/null ||
16700 cp -p "$ac_source" "$ac_file" ||
16701 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16702 fi
16703 ;;
16704 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16705$as_echo "$as_me: executing $ac_file commands" >&6;}
16706 ;;
c906108c 16707 esac
b4e70030 16708
bec39cab 16709
81ecdfbb
RW
16710 case $ac_file$ac_mode in
16711 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16712 "gcore":F) chmod +x gcore ;;
81ecdfbb 16713 "default":C)
c906108c
SS
16714case x$CONFIG_HEADERS in
16715xconfig.h:config.in)
16716echo > stamp-h ;;
16717esac
bec39cab 16718 ;;
81ecdfbb 16719
bec39cab 16720 esac
81ecdfbb 16721done # for ac_tag
c906108c 16722
bec39cab 16723
81ecdfbb 16724as_fn_exit 0
bec39cab 16725_ACEOF
bec39cab
AC
16726ac_clean_files=$ac_clean_files_save
16727
81ecdfbb
RW
16728test $ac_write_fail = 0 ||
16729 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16730
bec39cab
AC
16731
16732# configure is writing to config.log, and then calls config.status.
16733# config.status does its own redirection, appending to config.log.
16734# Unfortunately, on DOS this fails, as config.log is still kept open
16735# by configure, so config.status won't be able to write to it; its
16736# output is simply discarded. So we exec the FD to /dev/null,
16737# effectively closing config.log, so it can be properly (re)opened and
16738# appended to by config.status. When coming back to configure, we
16739# need to make the FD available again.
16740if test "$no_create" != yes; then
16741 ac_cs_success=:
16742 ac_config_status_args=
16743 test "$silent" = yes &&
16744 ac_config_status_args="$ac_config_status_args --quiet"
16745 exec 5>/dev/null
16746 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16747 exec 5>>config.log
16748 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16749 # would make configure fail if this is the last instruction.
81ecdfbb 16750 $ac_cs_success || as_fn_exit $?
bec39cab 16751fi
c906108c 16752
bec39cab 16753#
81ecdfbb 16754# CONFIG_SUBDIRS section.
bec39cab 16755#
c906108c
SS
16756if test "$no_recursion" != yes; then
16757
81ecdfbb
RW
16758 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16759 # so they do not pile up.
c906108c
SS
16760 ac_sub_configure_args=
16761 ac_prev=
fdc59709
PB
16762 eval "set x $ac_configure_args"
16763 shift
16764 for ac_arg
16765 do
c906108c
SS
16766 if test -n "$ac_prev"; then
16767 ac_prev=
16768 continue
16769 fi
bec39cab 16770 case $ac_arg in
c906108c
SS
16771 -cache-file | --cache-file | --cache-fil | --cache-fi \
16772 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16773 ac_prev=cache_file ;;
16774 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16775 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16776 | --c=*)
16777 ;;
16778 --config-cache | -C)
c906108c
SS
16779 ;;
16780 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16781 ac_prev=srcdir ;;
16782 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16783 ;;
bec39cab
AC
16784 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16785 ac_prev=prefix ;;
16786 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16787 ;;
81ecdfbb
RW
16788 --disable-option-checking)
16789 ;;
fdc59709
PB
16790 *)
16791 case $ac_arg in
81ecdfbb 16792 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16793 esac
81ecdfbb 16794 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16795 esac
16796 done
16797
bec39cab
AC
16798 # Always prepend --prefix to ensure using the same prefix
16799 # in subdir configurations.
fdc59709
PB
16800 ac_arg="--prefix=$prefix"
16801 case $ac_arg in
81ecdfbb 16802 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16803 esac
81ecdfbb
RW
16804 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16805
16806 # Pass --silent
16807 if test "$silent" = yes; then
16808 ac_sub_configure_args="--silent $ac_sub_configure_args"
16809 fi
16810
16811 # Always prepend --disable-option-checking to silence warnings, since
16812 # different subdirs can have different --enable and --with options.
16813 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16814
b4e70030 16815 ac_popdir=`pwd`
bec39cab 16816 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16817
16818 # Do not complain, so a configure script can configure whichever
16819 # parts of a large source tree are present.
fdc59709 16820 test -d "$srcdir/$ac_dir" || continue
c906108c 16821
81ecdfbb
RW
16822 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16823 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16824 $as_echo "$ac_msg" >&6
16825 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16826 ac_builddir=.
16827
81ecdfbb
RW
16828case "$ac_dir" in
16829.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16830*)
16831 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16832 # A ".." for each directory in $ac_dir_suffix.
16833 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16834 case $ac_top_builddir_sub in
16835 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16836 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16837 esac ;;
16838esac
16839ac_abs_top_builddir=$ac_pwd
16840ac_abs_builddir=$ac_pwd$ac_dir_suffix
16841# for backward compatibility:
16842ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16843
16844case $srcdir in
81ecdfbb 16845 .) # We are building in place.
bec39cab 16846 ac_srcdir=.
81ecdfbb
RW
16847 ac_top_srcdir=$ac_top_builddir_sub
16848 ac_abs_top_srcdir=$ac_pwd ;;
16849 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16850 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16851 ac_top_srcdir=$srcdir
16852 ac_abs_top_srcdir=$srcdir ;;
16853 *) # Relative name.
16854 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16855 ac_top_srcdir=$ac_top_build_prefix$srcdir
16856 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16857esac
81ecdfbb 16858ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16859
c906108c 16860
fdc59709 16861 cd "$ac_dir"
c906108c
SS
16862
16863 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16864 if test -f "$ac_srcdir/configure.gnu"; then
16865 ac_sub_configure=$ac_srcdir/configure.gnu
16866 elif test -f "$ac_srcdir/configure"; then
16867 ac_sub_configure=$ac_srcdir/configure
16868 elif test -f "$ac_srcdir/configure.in"; then
16869 # This should be Cygnus configure.
16870 ac_sub_configure=$ac_aux_dir/configure
c906108c 16871 else
81ecdfbb
RW
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16873$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16874 ac_sub_configure=
16875 fi
16876
16877 # The recursion is here.
16878 if test -n "$ac_sub_configure"; then
c906108c 16879 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16880 case $cache_file in
16881 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16882 *) # Relative name.
16883 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16884 esac
c906108c 16885
81ecdfbb
RW
16886 { $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
16887$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16888 # The eval makes quoting arguments work.
fdc59709
PB
16889 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16890 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16891 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16892 fi
16893
fdc59709 16894 cd "$ac_popdir"
c906108c
SS
16895 done
16896fi
81ecdfbb
RW
16897if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16899$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16900fi
c906108c
SS
16901
16902
16903exit 0
This page took 2.527732 seconds and 4 git commands to generate.