daily update
[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
da2f07f1
JK
1485 --enable-plugins Enable support for plugins (defaults no)
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
81ecdfbb
RW
1896# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1897# --------------------------------------------
1898# Tries to find the compile-time value of EXPR in a program that includes
1899# INCLUDES, setting VAR accordingly. Returns whether the value could be
1900# computed
1901ac_fn_c_compute_int ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 if test "$cross_compiling" = yes; then
1905 # Depending upon the size, compute the lo and hi bounds.
1906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912static int test_array [1 - 2 * !(($2) >= 0)];
1913test_array [0] = 0
bec39cab 1914
81ecdfbb
RW
1915 ;
1916 return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 ac_lo=0 ac_mid=0
1921 while :; do
1922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923/* end confdefs.h. */
1924$4
1925int
1926main ()
1927{
1928static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1929test_array [0] = 0
bec39cab 1930
81ecdfbb
RW
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 ac_hi=$ac_mid; break
1937else
1938 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1939 if test $ac_lo -le $ac_mid; then
1940 ac_lo= ac_hi=
1941 break
1942 fi
1943 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1944fi
81ecdfbb
RW
1945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1946 done
c906108c 1947else
81ecdfbb
RW
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954static int test_array [1 - 2 * !(($2) < 0)];
1955test_array [0] = 0
bec39cab 1956
81ecdfbb
RW
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962 ac_hi=-1 ac_mid=-1
1963 while :; do
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$4
1967int
1968main ()
1969{
1970static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1971test_array [0] = 0
bec39cab 1972
81ecdfbb
RW
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978 ac_lo=$ac_mid; break
1979else
1980 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1981 if test $ac_mid -le $ac_hi; then
1982 ac_lo= ac_hi=
1983 break
1984 fi
1985 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988 done
1989else
1990 ac_lo= ac_hi=
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993fi
1994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1995# Binary search between lo and hi bounds.
1996while test "x$ac_lo" != "x$ac_hi"; do
1997 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2005test_array [0] = 0
bec39cab 2006
81ecdfbb
RW
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_hi=$ac_mid
2013else
2014 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017done
2018case $ac_lo in #((
2019?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2020'') ac_retval=1 ;;
2021esac
2022 else
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026static long int longval () { return $2; }
2027static unsigned long int ulongval () { return $2; }
2028#include <stdio.h>
2029#include <stdlib.h>
2030int
2031main ()
2032{
bec39cab 2033
81ecdfbb
RW
2034 FILE *f = fopen ("conftest.val", "w");
2035 if (! f)
2036 return 1;
2037 if (($2) < 0)
2038 {
2039 long int i = longval ();
2040 if (i != ($2))
2041 return 1;
2042 fprintf (f, "%ld", i);
2043 }
2044 else
2045 {
2046 unsigned long int i = ulongval ();
2047 if (i != ($2))
2048 return 1;
2049 fprintf (f, "%lu", i);
2050 }
2051 /* Do not output a trailing newline, as this causes \r\n confusion
2052 on some platforms. */
2053 return ferror (f) || fclose (f) != 0;
bec39cab 2054
81ecdfbb
RW
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_run "$LINENO"; then :
2060 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2061else
2062 ac_retval=1
2063fi
2064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2065 conftest.$ac_objext conftest.beam conftest.$ac_ext
2066rm -f conftest.val
bec39cab 2067
81ecdfbb
RW
2068 fi
2069 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2070 return $ac_retval
bec39cab 2071
81ecdfbb 2072} # ac_fn_c_compute_int
bec39cab 2073
c971b7fa
PA
2074# ac_fn_c_try_link LINENO
2075# -----------------------
2076# Try to link conftest.$ac_ext, and return whether this succeeded.
2077ac_fn_c_try_link ()
2078{
2079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080 rm -f conftest.$ac_objext conftest$ac_exeext
2081 if { { ac_try="$ac_link"
2082case "(($ac_try" in
2083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2084 *) ac_try_echo=$ac_try;;
2085esac
2086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2087$as_echo "$ac_try_echo"; } >&5
2088 (eval "$ac_link") 2>conftest.err
2089 ac_status=$?
2090 if test -s conftest.err; then
2091 grep -v '^ *+' conftest.err >conftest.er1
2092 cat conftest.er1 >&5
2093 mv -f conftest.er1 conftest.err
2094 fi
2095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2096 test $ac_status = 0; } && {
2097 test -z "$ac_c_werror_flag" ||
2098 test ! -s conftest.err
2099 } && test -s conftest$ac_exeext && {
2100 test "$cross_compiling" = yes ||
2101 $as_test_x conftest$ac_exeext
2102 }; then :
2103 ac_retval=0
2104else
2105 $as_echo "$as_me: failed program was:" >&5
2106sed 's/^/| /' conftest.$ac_ext >&5
2107
2108 ac_retval=1
2109fi
2110 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2111 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2112 # interfere with the next link command; also delete a directory that is
2113 # left behind by Apple's compiler. We do this before executing the actions.
2114 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2115 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2116 return $ac_retval
2117
2118} # ac_fn_c_try_link
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
4093# Check whether --enable-plugins was given.
4094if test "${enable_plugins+set}" = set; then :
4095 enableval=$enable_plugins; case "${enableval}" in
4096 yes | "") plugins=yes ;;
4097 no) plugins=no ;;
4098 *) plugins=yes ;;
4099 esac
4100else
4101 plugins=no
4102fi
4103
4104
4105
4106case "${host}" in
4107 sparc-*-solaris*|i[3-7]86-*-solaris*)
4108 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4109 # are mutually exclusive; and without procfs support, the bfd/ elf module
4110 # cannot provide certain routines such as elfcore_write_prpsinfo
4111 # or elfcore_write_prstatus. So unless the user explicitly requested
4112 # large-file support through the --enable-largefile switch, disable
4113 # large-file support in favor of procfs support.
4114 test "${target}" = "${host}" -a "x$plugins" = xno \
4115 && : ${enable_largefile="no"}
4116 ;;
4117esac
4118
4119# Check whether --enable-largefile was given.
4120if test "${enable_largefile+set}" = set; then :
4121 enableval=$enable_largefile;
4122fi
4123
4124if test "$enable_largefile" != no; then
4125
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4127$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4128if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4129 $as_echo_n "(cached) " >&6
4130else
4131 ac_cv_sys_largefile_CC=no
4132 if test "$GCC" != yes; then
4133 ac_save_CC=$CC
4134 while :; do
4135 # IRIX 6.2 and later do not support large files by default,
4136 # so use the C compiler's -n32 option if that helps.
4137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <sys/types.h>
4140 /* Check that off_t can represent 2**63 - 1 correctly.
4141 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4142 since some C++ compilers masquerading as C compilers
4143 incorrectly reject 9223372036854775807. */
4144#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4145 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4146 && LARGE_OFF_T % 2147483647 == 1)
4147 ? 1 : -1];
4148int
4149main ()
4150{
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
4156 if ac_fn_c_try_compile "$LINENO"; then :
4157 break
4158fi
4159rm -f core conftest.err conftest.$ac_objext
4160 CC="$CC -n32"
4161 if ac_fn_c_try_compile "$LINENO"; then :
4162 ac_cv_sys_largefile_CC=' -n32'; break
4163fi
4164rm -f core conftest.err conftest.$ac_objext
4165 break
4166 done
4167 CC=$ac_save_CC
4168 rm -f conftest.$ac_ext
4169 fi
4170fi
4171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4172$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4173 if test "$ac_cv_sys_largefile_CC" != no; then
4174 CC=$CC$ac_cv_sys_largefile_CC
4175 fi
4176
4177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4178$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4179if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4180 $as_echo_n "(cached) " >&6
4181else
4182 while :; do
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184/* end confdefs.h. */
4185#include <sys/types.h>
4186 /* Check that off_t can represent 2**63 - 1 correctly.
4187 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4188 since some C++ compilers masquerading as C compilers
4189 incorrectly reject 9223372036854775807. */
4190#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4191 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4192 && LARGE_OFF_T % 2147483647 == 1)
4193 ? 1 : -1];
4194int
4195main ()
4196{
4197
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202if ac_fn_c_try_compile "$LINENO"; then :
4203 ac_cv_sys_file_offset_bits=no; break
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4207/* end confdefs.h. */
4208#define _FILE_OFFSET_BITS 64
4209#include <sys/types.h>
4210 /* Check that off_t can represent 2**63 - 1 correctly.
4211 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4212 since some C++ compilers masquerading as C compilers
4213 incorrectly reject 9223372036854775807. */
4214#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4215 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4216 && LARGE_OFF_T % 2147483647 == 1)
4217 ? 1 : -1];
4218int
4219main ()
4220{
4221
4222 ;
4223 return 0;
4224}
4225_ACEOF
4226if ac_fn_c_try_compile "$LINENO"; then :
4227 ac_cv_sys_file_offset_bits=64; break
4228fi
4229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_cv_sys_file_offset_bits=unknown
4231 break
4232done
4233fi
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4235$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4236case $ac_cv_sys_file_offset_bits in #(
4237 no | unknown) ;;
4238 *)
4239cat >>confdefs.h <<_ACEOF
4240#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4241_ACEOF
4242;;
4243esac
4244rm -rf conftest*
4245 if test $ac_cv_sys_file_offset_bits = unknown; then
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4247$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4248if test "${ac_cv_sys_large_files+set}" = set; then :
4249 $as_echo_n "(cached) " >&6
4250else
4251 while :; do
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253/* end confdefs.h. */
4254#include <sys/types.h>
4255 /* Check that off_t can represent 2**63 - 1 correctly.
4256 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4257 since some C++ compilers masquerading as C compilers
4258 incorrectly reject 9223372036854775807. */
4259#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4260 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4261 && LARGE_OFF_T % 2147483647 == 1)
4262 ? 1 : -1];
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
4271if ac_fn_c_try_compile "$LINENO"; then :
4272 ac_cv_sys_large_files=no; break
4273fi
4274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276/* end confdefs.h. */
4277#define _LARGE_FILES 1
4278#include <sys/types.h>
4279 /* Check that off_t can represent 2**63 - 1 correctly.
4280 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4281 since some C++ compilers masquerading as C compilers
4282 incorrectly reject 9223372036854775807. */
4283#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4284 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4285 && LARGE_OFF_T % 2147483647 == 1)
4286 ? 1 : -1];
4287int
4288main ()
4289{
4290
4291 ;
4292 return 0;
4293}
4294_ACEOF
4295if ac_fn_c_try_compile "$LINENO"; then :
4296 ac_cv_sys_large_files=1; break
4297fi
4298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299 ac_cv_sys_large_files=unknown
4300 break
4301done
4302fi
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4304$as_echo "$ac_cv_sys_large_files" >&6; }
4305case $ac_cv_sys_large_files in #(
4306 no | unknown) ;;
4307 *)
4308cat >>confdefs.h <<_ACEOF
4309#define _LARGE_FILES $ac_cv_sys_large_files
4310_ACEOF
4311;;
4312esac
4313rm -rf conftest*
4314 fi
4315fi
4316
4317
4318
81ecdfbb
RW
4319
4320
4321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4322$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4323if test "${am_cv_prog_cc_stdc+set}" = set; then :
4324 $as_echo_n "(cached) " >&6
4325else
4326 am_cv_prog_cc_stdc=no
4327ac_save_CC="$CC"
4328# Don't try gcc -ansi; that turns off useful extensions and
4329# breaks some systems' header files.
4330# AIX -qlanglvl=ansi
4331# Ultrix and OSF/1 -std1
4332# HP-UX 10.20 and later -Ae
4333# HP-UX older versions -Aa -D_HPUX_SOURCE
4334# SVR4 -Xc -D__EXTENSIONS__
4335for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4336do
783e057b 4337 CC="$ac_save_CC $ac_arg"
81ecdfbb 4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4339/* end confdefs.h. */
4340#include <stdarg.h>
4341#include <stdio.h>
4342#include <sys/types.h>
4343#include <sys/stat.h>
4344/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4345struct buf { int x; };
4346FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347static char *e (p, i)
4348 char **p;
4349 int i;
4350{
4351 return p[i];
4352}
4353static char *f (char * (*g) (char **, int), char **p, ...)
4354{
4355 char *s;
4356 va_list v;
4357 va_start (v,p);
4358 s = g (p, va_arg (v,int));
4359 va_end (v);
4360 return s;
4361}
4362int test (int i, double x);
4363struct s1 {int (*f) (int a);};
4364struct s2 {int (*f) (double a);};
4365int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366int argc;
4367char **argv;
4368
4369int
4370main ()
4371{
4372
4373return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4374
4375 ;
4376 return 0;
4377}
4378_ACEOF
81ecdfbb 4379if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4380 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4381fi
81ecdfbb 4382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4383done
4384CC="$ac_save_CC"
4385
4386fi
4387
4388if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4390$as_echo "none needed" >&6; }
783e057b 4391else
81ecdfbb
RW
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4393$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4394fi
4395case "x$am_cv_prog_cc_stdc" in
4396 x|xno) ;;
4397 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4398esac
4399
4869db5e
RM
4400# expand $ac_aux_dir to an absolute path
4401am_aux_dir=`cd $ac_aux_dir && pwd`
4402
4403if test x"${install_sh}" != xset; then
4404 case $am_aux_dir in
4405 *\ * | *\ *)
4406 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4407 *)
4408 install_sh="\${SHELL} $am_aux_dir/install-sh"
4409 esac
4410fi
4411
4412# Installed binaries are usually stripped using `strip' when the user
4413# run `make install-strip'. However `strip' might not be the right
4414# tool to use in cross-compilation environments, therefore Automake
4415# will honor the `STRIP' environment variable to overrule this program.
4416if test "$cross_compiling" != no; then
4417 if test -n "$ac_tool_prefix"; then
4418 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4419set dummy ${ac_tool_prefix}strip; ac_word=$2
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4421$as_echo_n "checking for $ac_word... " >&6; }
4422if test "${ac_cv_prog_STRIP+set}" = set; then :
4423 $as_echo_n "(cached) " >&6
4424else
4425 if test -n "$STRIP"; then
4426 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4427else
4428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431 IFS=$as_save_IFS
4432 test -z "$as_dir" && as_dir=.
4433 for ac_exec_ext in '' $ac_executable_extensions; do
4434 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4435 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4436 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4437 break 2
4438 fi
4439done
4440 done
4441IFS=$as_save_IFS
4442
4443fi
4444fi
4445STRIP=$ac_cv_prog_STRIP
4446if test -n "$STRIP"; then
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4448$as_echo "$STRIP" >&6; }
4449else
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4451$as_echo "no" >&6; }
4452fi
4453
4454
4455fi
4456if test -z "$ac_cv_prog_STRIP"; then
4457 ac_ct_STRIP=$STRIP
4458 # Extract the first word of "strip", so it can be a program name with args.
4459set dummy strip; ac_word=$2
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4461$as_echo_n "checking for $ac_word... " >&6; }
4462if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4463 $as_echo_n "(cached) " >&6
4464else
4465 if test -n "$ac_ct_STRIP"; then
4466 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4467else
4468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in $PATH
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4475 ac_cv_prog_ac_ct_STRIP="strip"
4476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4477 break 2
4478 fi
4479done
4480 done
4481IFS=$as_save_IFS
4482
4483fi
4484fi
4485ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4486if test -n "$ac_ct_STRIP"; then
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4488$as_echo "$ac_ct_STRIP" >&6; }
4489else
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4491$as_echo "no" >&6; }
4492fi
4493
4494 if test "x$ac_ct_STRIP" = x; then
4495 STRIP=":"
4496 else
4497 case $cross_compiling:$ac_tool_warned in
4498yes:)
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4501ac_tool_warned=yes ;;
4502esac
4503 STRIP=$ac_ct_STRIP
4504 fi
4505else
4506 STRIP="$ac_cv_prog_STRIP"
4507fi
4508
4509fi
4510INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4511
783e057b
DJ
4512
4513ac_aux_dir=
81ecdfbb
RW
4514for ac_dir in .. "$srcdir"/..; do
4515 for ac_t in install-sh install.sh shtool; do
4516 if test -f "$ac_dir/$ac_t"; then
4517 ac_aux_dir=$ac_dir
4518 ac_install_sh="$ac_aux_dir/$ac_t -c"
4519 break 2
4520 fi
4521 done
783e057b
DJ
4522done
4523if test -z "$ac_aux_dir"; then
81ecdfbb 4524 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4525fi
81ecdfbb
RW
4526
4527# These three variables are undocumented and unsupported,
4528# and are intended to be withdrawn in a future Autoconf release.
4529# They can cause serious problems if a builder's source tree is in a directory
4530# whose full name contains unusual characters.
4531ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4532ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4533ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4534
783e057b 4535
783e057b 4536
9009e1ae
MR
4537test "$program_prefix" != NONE &&
4538 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4539# Use a double $ so make ignores it.
4540test "$program_suffix" != NONE &&
4541 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4542# Double any \ or $.
4543# By default was `s,x,x', remove it if useless.
4544ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4545program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4546
81ecdfbb 4547
a417dc56
RW
4548# Dependency checking.
4549rm -rf .tst 2>/dev/null
4550mkdir .tst 2>/dev/null
4551if test -d .tst; then
4552 am__leading_dot=.
4553else
4554 am__leading_dot=_
4555fi
4556rmdir .tst 2>/dev/null
4557
4558DEPDIR="${am__leading_dot}deps"
4559
81ecdfbb 4560ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4561
4562
4563depcc="$CC" am_compiler_list=
4564
4565am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4567$as_echo_n "checking dependency style of $depcc... " >&6; }
4568if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4569 $as_echo_n "(cached) " >&6
a417dc56
RW
4570else
4571 if test -f "$am_depcomp"; then
4572 # We make a subdir and do the tests there. Otherwise we can end up
4573 # making bogus files that we don't know about and never remove. For
4574 # instance it was reported that on HP-UX the gcc test will end up
4575 # making a dummy file named `D' -- because `-MD' means `put the output
4576 # in D'.
4577 mkdir conftest.dir
4578 # Copy depcomp to subdir because otherwise we won't find it if we're
4579 # using a relative directory.
4580 cp "$am_depcomp" conftest.dir
4581 cd conftest.dir
4582 # We will build objects and dependencies in a subdirectory because
4583 # it helps to detect inapplicable dependency modes. For instance
4584 # both Tru64's cc and ICC support -MD to output dependencies as a
4585 # side effect of compilation, but ICC will put the dependencies in
4586 # the current directory while Tru64 will put them in the object
4587 # directory.
4588 mkdir sub
4589
4590 am_cv_CC_dependencies_compiler_type=none
4591 if test "$am_compiler_list" = ""; then
4592 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4593 fi
4594 for depmode in $am_compiler_list; do
4595 if test $depmode = none; then break; fi
4596
81ecdfbb 4597 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4598 # Setup a source with many dependencies, because some compilers
4599 # like to wrap large dependency lists on column 80 (with \), and
4600 # we should not choose a depcomp mode which is confused by this.
4601 #
4602 # We need to recreate these files for each test, as the compiler may
4603 # overwrite some of them when testing with obscure command lines.
4604 # This happens at least with the AIX C compiler.
4605 : > sub/conftest.c
4606 for i in 1 2 3 4 5 6; do
4607 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4608 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4609 # Solaris 8's {/usr,}/bin/sh.
4610 touch sub/conftst$i.h
4611 done
4612 echo "include sub/conftest.Po" > confmf
4613
4614 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4615 # mode. It turns out that the SunPro C++ compiler does not properly
4616 # handle `-M -o', and we need to detect this.
4617 depcmd="depmode=$depmode \
4618 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4619 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4620 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4621 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4622 if env $depcmd > conftest.err 2>&1 &&
4623 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4624 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4625 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4626 # icc doesn't choke on unknown options, it will just issue warnings
4627 # or remarks (even with -Werror). So we grep stderr for any message
4628 # that says an option was ignored or not supported.
4629 # When given -MP, icc 7.0 and 7.1 complain thusly:
4630 # icc: Command line warning: ignoring option '-M'; no argument required
4631 # The diagnosis changed in icc 8.0:
4632 # icc: Command line remark: option '-MP' not supported
4633 if (grep 'ignoring option' conftest.err ||
4634 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4635 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4636 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4637 break
4638 fi
4639 fi
81ecdfbb 4640 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4641 sed -e 's/^/| /' < conftest.err >&5
4642 done
4643
4644 cd ..
4645 rm -rf conftest.dir
4646else
4647 am_cv_CC_dependencies_compiler_type=none
4648fi
4649
4650fi
81ecdfbb
RW
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4652$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4653if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4654then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4655else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4656
4657fi
4658
4659
4660# Check for the 'make' the user wants to use.
4661for ac_prog in make
4662do
4663 # Extract the first word of "$ac_prog", so it can be a program name with args.
4664set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if test "${ac_cv_prog_MAKE+set}" = set; then :
4668 $as_echo_n "(cached) " >&6
a417dc56
RW
4669else
4670 if test -n "$MAKE"; then
4671 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4672else
4673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in $PATH
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4678 for ac_exec_ext in '' $ac_executable_extensions; do
4679 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4680 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4682 break 2
4683 fi
4684done
81ecdfbb
RW
4685 done
4686IFS=$as_save_IFS
a417dc56
RW
4687
4688fi
4689fi
4690MAKE=$ac_cv_prog_MAKE
4691if test -n "$MAKE"; then
81ecdfbb
RW
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4693$as_echo "$MAKE" >&6; }
a417dc56 4694else
81ecdfbb
RW
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
a417dc56
RW
4697fi
4698
81ecdfbb 4699
a417dc56
RW
4700 test -n "$MAKE" && break
4701done
4702
4703MAKE_IS_GNU=
4704case "`$MAKE --version 2>&1 | sed 1q`" in
4705 *GNU*)
4706 MAKE_IS_GNU=yes
4707 ;;
4708esac
81ecdfbb 4709 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4710 GMAKE_TRUE=
4711 GMAKE_FALSE='#'
4712else
4713 GMAKE_TRUE='#'
4714 GMAKE_FALSE=
4715fi
4716
81ecdfbb
RW
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4718$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4719set x ${MAKE-make}
4720ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4721if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4722 $as_echo_n "(cached) " >&6
a417dc56
RW
4723else
4724 cat >conftest.make <<\_ACEOF
81ecdfbb 4725SHELL = /bin/sh
a417dc56 4726all:
81ecdfbb 4727 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4728_ACEOF
4729# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4730case `${MAKE-make} -f conftest.make 2>/dev/null` in
4731 *@@@%%%=?*=@@@%%%*)
4732 eval ac_cv_prog_make_${ac_make}_set=yes;;
4733 *)
4734 eval ac_cv_prog_make_${ac_make}_set=no;;
4735esac
a417dc56
RW
4736rm -f conftest.make
4737fi
81ecdfbb
RW
4738if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4740$as_echo "yes" >&6; }
a417dc56
RW
4741 SET_MAKE=
4742else
81ecdfbb
RW
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
a417dc56
RW
4745 SET_MAKE="MAKE=${MAKE-make}"
4746fi
4747
4748
c971b7fa
PA
4749# Configure gnulib. We need to build gnulib under some other
4750# directory not "gnulib", to avoid the problem of both GDB and
4751# GDBserver wanting to build it in the same directory, when building
4752# in the source dir.
783e057b 4753
c971b7fa
PA
4754 in_src="gnulib"
4755 in_build="build-gnulib"
4756
4757 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4758 # so they do not pile up.
4759 ac_sub_configure_args=
4760 ac_prev=
4761 eval "set x $ac_configure_args"
4762 shift
4763 for ac_arg
4764 do
4765 if test -n "$ac_prev"; then
4766 ac_prev=
4767 continue
4768 fi
4769 case $ac_arg in
4770 -cache-file | --cache-file | --cache-fil | --cache-fi \
4771 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4772 ac_prev=cache_file ;;
4773 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4774 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4775 | --c=*)
4776 ;;
4777 --config-cache | -C)
4778 ;;
4779 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4780 ac_prev=srcdir ;;
4781 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4782 ;;
4783 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4784 ac_prev=prefix ;;
4785 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4786 ;;
4787 --disable-option-checking)
4788 ;;
4789 *)
4790 case $ac_arg in
4791 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4792 esac
4793 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4794 esac
4795 done
4796
4797 # Always prepend --prefix to ensure using the same prefix
4798 # in subdir configurations.
4799 ac_arg="--prefix=$prefix"
4800 case $ac_arg in
4801 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4802 esac
4803 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4804
4805 # Pass --silent
4806 if test "$silent" = yes; then
4807 ac_sub_configure_args="--silent $ac_sub_configure_args"
4808 fi
4809
4810 # Always prepend --disable-option-checking to silence warnings, since
4811 # different subdirs can have different --enable and --with options.
4812 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4813
4814 ac_popdir=`pwd`
4815 ac_dir=$in_build
4816
4817 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4818 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4819 $as_echo "$ac_msg" >&6
4820 as_dir="$ac_dir"; as_fn_mkdir_p
4821
38ea300a
PA
4822 case $srcdir in
4823 [\\/]* | ?:[\\/]* )
4824 ac_srcdir=$srcdir/$in_src ;;
4825 *) # Relative name.
4826 ac_srcdir=../$srcdir/$in_src ;;
4827 esac
c971b7fa
PA
4828
4829 cd "$ac_dir"
4830
4831 ac_sub_configure=$ac_srcdir/configure
4832
4833 # Make the cache file name correct relative to the subdirectory.
4834 case $cache_file in
4835 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4836 *) # Relative name.
4837 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4838 esac
4839
4840 { $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
4841$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4842 # The eval makes quoting arguments work.
4843 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4844 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4845 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4846
4847 cd "$ac_popdir"
783e057b 4848
c971b7fa
PA
4849
4850
4851CONFIG_OBS=
4852CONFIG_DEPS=
4853CONFIG_SRCS=
4854ENABLE_CFLAGS=
4855
4856CONFIG_ALL=
4857CONFIG_CLEAN=
4858CONFIG_INSTALL=
4859CONFIG_UNINSTALL=
4860
4861# If we haven't got the data from the intl directory,
4862# assume NLS is disabled.
4863USE_NLS=no
4864LIBINTL=
4865LIBINTL_DEP=
4866INCINTL=
4867XGETTEXT=
4868GMSGFMT=
4869POSUB=
783e057b
DJ
4870
4871if test -f ../intl/config.intl; then
4872 . ../intl/config.intl
4873fi
81ecdfbb
RW
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4875$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4876if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878$as_echo "no" >&6; }
783e057b 4879else
81ecdfbb
RW
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4881$as_echo "yes" >&6; }
783e057b 4882
81ecdfbb 4883$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4884
4885
81ecdfbb
RW
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4887$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4888 # Look for .po and .gmo files in the source directory.
4889 CATALOGS=
4890 XLINGUAS=
4891 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4892 # If there aren't any .gmo files the shell will give us the
4893 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4894 # weeded out.
4895 case "$cat" in *\**)
4896 continue;;
4897 esac
4898 # The quadruple backslash is collapsed to a double backslash
4899 # by the backticks, then collapsed again by the double quotes,
4900 # leaving us with one backslash in the sed expression (right
4901 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4902 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4903 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4904 # The user is allowed to set LINGUAS to a list of languages to
4905 # install catalogs for. If it's empty that means "all of them."
4906 if test "x$LINGUAS" = x; then
4907 CATALOGS="$CATALOGS $cat"
4908 XLINGUAS="$XLINGUAS $lang"
4909 else
4910 case "$LINGUAS" in *$lang*)
4911 CATALOGS="$CATALOGS $cat"
4912 XLINGUAS="$XLINGUAS $lang"
4913 ;;
4914 esac
e28b3332
DJ
4915 fi
4916 done
c971b7fa
PA
4917 LINGUAS="$XLINGUAS"
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4919$as_echo "$LINGUAS" >&6; }
4920
4921
4922 DATADIRNAME=share
4923
4924 INSTOBJEXT=.mo
4925
4926 GENCAT=gencat
4927
4928 CATOBJEXT=.gmo
e28b3332 4929
e28b3332
DJ
4930fi
4931
c971b7fa
PA
4932localedir='${datadir}/locale'
4933
4934
4935if test x"$USE_NLS" = xyes; then
4936 CONFIG_ALL="$CONFIG_ALL all-po"
4937 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4938 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4939 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4940fi
e28b3332 4941
c971b7fa
PA
4942GNULIB=build-gnulib/import
4943
4944# For Makefile dependencies.
4945GNULIB_STDINT_H=
4946if test x"$STDINT_H" != x; then
4947 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4948fi
4949
4950
c971b7fa
PA
4951PACKAGE=gdb
4952
4953cat >>confdefs.h <<_ACEOF
4954#define PACKAGE "$PACKAGE"
4955_ACEOF
4956
4957
4958
4959# We never need to detect it in this sub-configure.
4960# But preserve it for config.status --recheck.
4961
4962
4963
4964MAKEINFO_EXTRA_FLAGS=""
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4966$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4967if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4971 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4972 gdb_cv_have_makeinfo_click=yes
4973 else
4974 gdb_cv_have_makeinfo_click=no
4975 fi
4976fi
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4978$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4979if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4980 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4981fi
e28b3332
DJ
4982
4983
bec39cab
AC
4984
4985
81ecdfbb
RW
4986# Check whether --with-separate-debug-dir was given.
4987if test "${with_separate_debug_dir+set}" = set; then :
4988 withval=$with_separate_debug_dir;
b14b1491
TT
4989 DEBUGDIR=$withval
4990else
4991 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4992fi
4993
20e95c23 4994
783e057b
DJ
4995 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4996 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4997 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4998 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4999
783e057b
DJ
5000cat >>confdefs.h <<_ACEOF
5001#define DEBUGDIR "$ac_define_dir"
20e95c23 5002_ACEOF
20e95c23 5003
20e95c23 5004
20e95c23 5005
0c4a4063 5006
b14b1491
TT
5007 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5008 if test "x$prefix" = xNONE; then
5009 test_prefix=/usr/local
5010 else
5011 test_prefix=$prefix
5012 fi
783e057b 5013 else
b14b1491 5014 test_prefix=$exec_prefix
783e057b 5015 fi
b14b1491
TT
5016 value=0
5017 case ${ac_define_dir} in
5018 "${test_prefix}"|"${test_prefix}/"*|\
5019 '${exec_prefix}'|'${exec_prefix}/'*)
5020 value=1
5021 ;;
5022 esac
5023
5024cat >>confdefs.h <<_ACEOF
5025#define DEBUGDIR_RELOCATABLE $value
5026_ACEOF
5027
5028
5029
0c4a4063 5030
f83d8a90
DE
5031# We can't pass paths as command line arguments.
5032# Mingw32 tries to be clever and will convert the paths for us.
5033# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5034# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5035# This breaks GDB's relocatable path conversions since paths passed in
5036# config.h would not get so translated, the path prefixes no longer match.
5037
5038 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5039 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5040 ac_define_dir=`eval echo $bindir`
5041 ac_define_dir=`eval echo $ac_define_dir`
5042
5043cat >>confdefs.h <<_ACEOF
5044#define BINDIR "$ac_define_dir"
5045_ACEOF
5046
5047
5048
b14b1491
TT
5049# GDB's datadir relocation
5050
5051
5052
81ecdfbb
RW
5053# Check whether --with-gdb-datadir was given.
5054if test "${with_gdb_datadir+set}" = set; then :
5055 withval=$with_gdb_datadir;
b14b1491 5056 GDB_DATADIR=$withval
20e95c23 5057else
b14b1491 5058 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5059fi
5060
20e95c23 5061
b14b1491
TT
5062 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5063 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5064 ac_define_dir=`eval echo $GDB_DATADIR`
5065 ac_define_dir=`eval echo $ac_define_dir`
5066
5067cat >>confdefs.h <<_ACEOF
5068#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5069_ACEOF
5070
b14b1491
TT
5071
5072
0c4a4063 5073
b14b1491
TT
5074 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5075 if test "x$prefix" = xNONE; then
5076 test_prefix=/usr/local
5077 else
5078 test_prefix=$prefix
5079 fi
5080 else
5081 test_prefix=$exec_prefix
5082 fi
5083 value=0
5084 case ${ac_define_dir} in
5085 "${test_prefix}"|"${test_prefix}/"*|\
5086 '${exec_prefix}'|'${exec_prefix}/'*)
5087 value=1
5088 ;;
5089 esac
5090
5091cat >>confdefs.h <<_ACEOF
5092#define GDB_DATADIR_RELOCATABLE $value
5093_ACEOF
5094
5095
783e057b 5096
20e95c23 5097
0c4a4063 5098
81ecdfbb
RW
5099# Check whether --with-relocated-sources was given.
5100if test "${with_relocated_sources+set}" = set; then :
5101 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5102
5103 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5104 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5105 ac_define_dir=`eval echo $reloc_srcdir`
5106 ac_define_dir=`eval echo $ac_define_dir`
5107
5108cat >>confdefs.h <<_ACEOF
5109#define RELOC_SRCDIR "$ac_define_dir"
5110_ACEOF
5111
5112
5113
81ecdfbb
RW
5114fi
5115
29b0e8a2 5116
7349ff92
JK
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5118$as_echo_n "checking for default auto-load directory... " >&6; }
5119
5120# Check whether --with-auto-load-dir was given.
5121if test "${with_auto_load_dir+set}" = set; then :
5122 withval=$with_auto_load_dir;
5123else
1564a261 5124 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5125fi
5126
1564a261 5127escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5128
5129 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5130 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5131 ac_define_dir=`eval echo $escape_dir`
5132 ac_define_dir=`eval echo $ac_define_dir`
5133
5134cat >>confdefs.h <<_ACEOF
5135#define AUTO_LOAD_DIR "$ac_define_dir"
5136_ACEOF
5137
5138
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5140$as_echo "$with_auto_load_dir" >&6; }
5141
bccbefd2
JK
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5143$as_echo_n "checking for default auto-load safe-path... " >&6; }
5144
5145# Check whether --with-auto-load-safe-path was given.
5146if test "${with_auto_load_safe_path+set}" = set; then :
5147 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5148 with_auto_load_safe_path="/"
5149 fi
bccbefd2 5150else
7349ff92 5151 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5152fi
5153
1564a261 5154escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5155
5156 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5158 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5159 ac_define_dir=`eval echo $ac_define_dir`
5160
5161cat >>confdefs.h <<_ACEOF
6dea1fbd 5162#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5163_ACEOF
5164
5165
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5167$as_echo "$with_auto_load_safe_path" >&6; }
5168
29b0e8a2 5169
20e95c23 5170
5ae98d25 5171subdirs="$subdirs testsuite"
20e95c23
DJ
5172
5173
783e057b 5174# Check whether to support alternative target configurations
81ecdfbb
RW
5175# Check whether --enable-targets was given.
5176if test "${enable_targets+set}" = set; then :
5177 enableval=$enable_targets; case "${enableval}" in
5178 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5179 ;;
5180 no) enable_targets= ;;
5181 *) enable_targets=$enableval ;;
5182esac
81ecdfbb
RW
5183fi
5184
20e95c23 5185
783e057b 5186# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5187# Check whether --enable-64-bit-bfd was given.
5188if test "${enable_64_bit_bfd+set}" = set; then :
5189 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5190 yes) want64=true ;;
5191 no) want64=false ;;
81ecdfbb 5192 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5193esac
5194else
5195 want64=false
81ecdfbb
RW
5196fi
5197
783e057b
DJ
5198# Provide defaults for some variables set by the per-host and per-target
5199# configuration.
5200gdb_host_obs=posix-hdep.o
20e95c23 5201
783e057b
DJ
5202if test "${target}" = "${host}"; then
5203 gdb_native=yes
5204else
5205 gdb_native=no
5206fi
20e95c23 5207
783e057b 5208. $srcdir/configure.host
20e95c23 5209
783e057b 5210# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5211
783e057b
DJ
5212TARGET_OBS=
5213all_targets=
b292c783 5214HAVE_NATIVE_GCORE_TARGET=
20e95c23 5215
783e057b 5216for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5217do
783e057b
DJ
5218 if test "$targ_alias" = "all"; then
5219 all_targets=true
5220 else
5221 # Canonicalize the secondary target names.
5222 result=`$ac_config_sub $targ_alias 2>/dev/null`
5223 if test -n "$result"; then
5224 targ=$result
5225 else
5226 targ=$targ_alias
5227 fi
20e95c23 5228
783e057b 5229 . ${srcdir}/configure.tgt
20e95c23 5230
bf307134
JB
5231 if test -z "${gdb_target_obs}"; then :
5232 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5233fi
5234
783e057b
DJ
5235 # Target-specific object files
5236 for i in ${gdb_target_obs}; do
5237 case " $TARGET_OBS " in
5238 *" ${i} "*) ;;
5239 *)
5240 TARGET_OBS="$TARGET_OBS ${i}"
5241 ;;
5242 esac
5243 done
20e95c23 5244
783e057b
DJ
5245 # Check whether this target needs 64-bit CORE_ADDR
5246 if test x${want64} = xfalse; then
5247 . ${srcdir}/../bfd/config.bfd
5248 fi
b292c783
JK
5249
5250 # Check whether this target is native and supports gcore.
5251 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5252 && $gdb_have_gcore; then
5253 HAVE_NATIVE_GCORE_TARGET=1
5254 fi
783e057b 5255 fi
20e95c23
DJ
5256done
5257
783e057b
DJ
5258if test x${all_targets} = xtrue; then
5259
5260 # We want all 64-bit targets if we either:
5261 # - run on a 64-bit host or
5262 # - already require 64-bit support for some other target or
5263 # - the --enable-64-bit-bfd option was supplied
5264 # Otherwise we only support all 32-bit targets.
5265 #
5266 # NOTE: This test must be in sync with the corresponding
5267 # tests in BFD!
20e95c23 5268
783e057b 5269 if test x${want64} = xfalse; then
81ecdfbb
RW
5270 # The cast to long int works around a bug in the HP C Compiler
5271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5273# This bug is HP SR number 8606223364.
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5275$as_echo_n "checking size of long... " >&6; }
5276if test "${ac_cv_sizeof_long+set}" = set; then :
5277 $as_echo_n "(cached) " >&6
c0993dbe 5278else
81ecdfbb 5279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5280
81ecdfbb
RW
5281else
5282 if test "$ac_cv_type_long" = yes; then
5283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5285{ as_fn_set_status 77
5286as_fn_error "cannot compute sizeof (long)
5287See \`config.log' for more details." "$LINENO" 5; }; }
5288 else
5289 ac_cv_sizeof_long=0
5290 fi
c0993dbe 5291fi
81ecdfbb 5292
c0993dbe 5293fi
81ecdfbb
RW
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5295$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5296
c0993dbe 5297
c0993dbe 5298
c0993dbe
UW
5299cat >>confdefs.h <<_ACEOF
5300#define SIZEOF_LONG $ac_cv_sizeof_long
5301_ACEOF
5302
5303
5304 if test "x${ac_cv_sizeof_long}" = "x8"; then
5305 want64=true
5306 fi
5307 fi
5308 if test x${want64} = xtrue; then
5309 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5310 else
5311 TARGET_OBS='$(ALL_TARGET_OBS)'
5312 fi
5313fi
5314
5315
5316
b292c783 5317
c0993dbe
UW
5318# For other settings, only the main target counts.
5319gdb_sim=
5320gdb_osabi=
5321build_gdbserver=
5322targ=$target; . ${srcdir}/configure.tgt
5323
5324# Fetch the default architecture and default target vector from BFD.
5325targ=$target; . $srcdir/../bfd/config.bfd
5326
5327# We only want the first architecture, so strip off the others if
5328# there is more than one.
5329targ_archs=`echo $targ_archs | sed 's/ .*//'`
5330
5331if test "x$targ_archs" != x; then
5332
5333cat >>confdefs.h <<_ACEOF
5334#define DEFAULT_BFD_ARCH $targ_archs
5335_ACEOF
5336
5337fi
5338if test "x$targ_defvec" != x; then
5339
5340cat >>confdefs.h <<_ACEOF
5341#define DEFAULT_BFD_VEC $targ_defvec
5342_ACEOF
5343
5344fi
5345
c0993dbe
UW
5346# The CLI cannot be disabled yet, but may be in the future.
5347
5348# Enable CLI.
81ecdfbb
RW
5349# Check whether --enable-gdbcli was given.
5350if test "${enable_gdbcli+set}" = set; then :
5351 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5352 yes)
5353 ;;
5354 no)
81ecdfbb 5355 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5356 *)
81ecdfbb 5357 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5358 esac
5359else
5360 enable_gdbcli=yes
81ecdfbb
RW
5361fi
5362
c0993dbe
UW
5363if test x"$enable_gdbcli" = xyes; then
5364 if test -d $srcdir/cli; then
5365 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5366 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5367 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5368 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5369 fi
5370fi
5371
5372# Enable MI.
81ecdfbb
RW
5373# Check whether --enable-gdbmi was given.
5374if test "${enable_gdbmi+set}" = set; then :
5375 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5376 yes | no)
5377 ;;
5378 *)
81ecdfbb 5379 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5380 esac
5381else
5382 enable_gdbmi=yes
81ecdfbb
RW
5383fi
5384
c0993dbe
UW
5385if test x"$enable_gdbmi" = xyes; then
5386 if test -d $srcdir/mi; then
5387 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5388 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5389 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5390 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5391 fi
5392fi
5393
5394# Enable TUI.
81ecdfbb
RW
5395# Check whether --enable-tui was given.
5396if test "${enable_tui+set}" = set; then :
5397 enableval=$enable_tui; case $enableval in
3ca64bd3 5398 yes | no | auto)
c0993dbe
UW
5399 ;;
5400 *)
81ecdfbb 5401 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5402 esac
5403else
3ca64bd3 5404 enable_tui=auto
81ecdfbb
RW
5405fi
5406
c0993dbe
UW
5407
5408# Enable gdbtk.
81ecdfbb
RW
5409# Check whether --enable-gdbtk was given.
5410if test "${enable_gdbtk+set}" = set; then :
5411 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5412 yes | no)
5413 ;;
5414 *)
81ecdfbb 5415 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5416 esac
5417else
5062cc19 5418 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5419 enable_gdbtk=yes
5420 else
5421 enable_gdbtk=no
5422 fi
81ecdfbb
RW
5423fi
5424
c0993dbe
UW
5425# We unconditionally disable gdbtk tests on selected platforms.
5426case $host_os in
5427 go32* | windows*)
81ecdfbb
RW
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5429$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5430 enable_gdbtk=no ;;
5431esac
5432
05e7c244 5433# Libunwind support for ia64.
bec39cab 5434
05e7c244
JK
5435
5436# Check whether --with-libunwind-ia64 was given.
5437if test "${with_libunwind_ia64+set}" = set; then :
5438 withval=$with_libunwind_ia64;
bec39cab 5439else
05e7c244
JK
5440 with_libunwind_ia64=auto
5441fi
bec39cab 5442
05e7c244
JK
5443
5444# Backward compatibility option.
5445if test "${with_libunwind+set}" = set; then
5446 if test x"$with_libunwind_ia64" != xauto; then
5447 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5448 fi
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5450$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5451 with_libunwind_ia64="$with_libunwind"
5452fi
5453
5454case "$with_libunwind_ia64" in
5455 yes | no)
5456 ;;
5457 auto)
5458 for ac_header in libunwind-ia64.h
81ecdfbb 5459do :
b54a8fd7
PA
5460 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5461if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5462 cat >>confdefs.h <<_ACEOF
b54a8fd7 5463#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5464_ACEOF
5465
5466fi
5467
5468done
5469
05e7c244
JK
5470 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5471 ;;
5472 *)
5473 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5474 ;;
5475esac
bec39cab 5476
05e7c244 5477if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5478 for ac_header in libunwind-ia64.h
81ecdfbb 5479do :
b54a8fd7
PA
5480 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5481if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5482 cat >>confdefs.h <<_ACEOF
b54a8fd7 5483#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5484_ACEOF
5485
5486fi
5487
5488done
5489
05e7c244
JK
5490 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5491 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5492 fi
5493 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5494 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5495 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5496fi
5497
cb01cfba
JB
5498opt_curses=no
5499
81ecdfbb
RW
5500# Check whether --with-curses was given.
5501if test "${with_curses+set}" = set; then :
5502 withval=$with_curses; opt_curses=$withval
5503fi
5504
cb01cfba 5505
76a39ba7 5506prefer_curses=no
cb01cfba 5507if test "$opt_curses" = "yes"; then
76a39ba7 5508 prefer_curses=yes
cb01cfba
JB
5509fi
5510
a9322a30 5511# Profiling support.
81ecdfbb
RW
5512# Check whether --enable-profiling was given.
5513if test "${enable_profiling+set}" = set; then :
5514 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5515 yes | no)
5516 ;;
5517 *)
81ecdfbb 5518 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5519 esac
5520else
5521 enable_profiling=no
81ecdfbb 5522fi
bec39cab 5523
a9322a30
TT
5524
5525for ac_func in monstartup _mcleanup
81ecdfbb
RW
5526do :
5527 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5528ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5529eval as_val=\$$as_ac_var
5530 if test "x$as_val" = x""yes; then :
5531 cat >>confdefs.h <<_ACEOF
5532#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5533_ACEOF
a9322a30 5534
81ecdfbb
RW
5535fi
5536done
a9322a30 5537
81ecdfbb
RW
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5539$as_echo_n "checking for _etext... " >&6; }
5540if test "${ac_cv_var__etext+set}" = set; then :
5541 $as_echo_n "(cached) " >&6
5542else
5543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5544/* end confdefs.h. */
5545#include <stdlib.h>
5546extern char _etext;
a9322a30
TT
5547
5548int
5549main ()
5550{
5551free (&_etext);
5552 ;
5553 return 0;
5554}
bec39cab 5555_ACEOF
81ecdfbb 5556if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5557 ac_cv_var__etext=yes
bec39cab 5558else
81ecdfbb 5559 ac_cv_var__etext=no
bec39cab 5560fi
81ecdfbb
RW
5561rm -f core conftest.err conftest.$ac_objext \
5562 conftest$ac_exeext conftest.$ac_ext
bec39cab 5563fi
81ecdfbb
RW
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5565$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5566if test $ac_cv_var__etext = yes; then
60ca704f 5567
81ecdfbb 5568$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5569
bec39cab 5570fi
81ecdfbb
RW
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5572$as_echo_n "checking for etext... " >&6; }
5573if test "${ac_cv_var_etext+set}" = set; then :
5574 $as_echo_n "(cached) " >&6
bec39cab 5575else
81ecdfbb 5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5577/* end confdefs.h. */
a9322a30
TT
5578#include <stdlib.h>
5579extern char etext;
bec39cab
AC
5580
5581int
5582main ()
5583{
a9322a30 5584free (&etext);
bec39cab
AC
5585 ;
5586 return 0;
5587}
5588_ACEOF
81ecdfbb 5589if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5590 ac_cv_var_etext=yes
bec39cab 5591else
81ecdfbb 5592 ac_cv_var_etext=no
bec39cab 5593fi
81ecdfbb
RW
5594rm -f core conftest.err conftest.$ac_objext \
5595 conftest$ac_exeext conftest.$ac_ext
bec39cab 5596fi
81ecdfbb
RW
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5598$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5599if test $ac_cv_var_etext = yes; then
5600
81ecdfbb 5601$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5602
5603fi
a9322a30
TT
5604if test "$enable_profiling" = yes ; then
5605 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5606 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5607 fi
5608 PROFILE_CFLAGS=-pg
5609 OLD_CFLAGS="$CFLAGS"
5610 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5611
81ecdfbb
RW
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5613$as_echo_n "checking whether $CC supports -pg... " >&6; }
5614if test "${ac_cv_cc_supports_pg+set}" = set; then :
5615 $as_echo_n "(cached) " >&6
bec39cab 5616else
81ecdfbb 5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5618/* end confdefs.h. */
bec39cab
AC
5619
5620int
5621main ()
5622{
a9322a30 5623int x;
bec39cab
AC
5624 ;
5625 return 0;
5626}
5627_ACEOF
81ecdfbb 5628if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5629 ac_cv_cc_supports_pg=yes
bec39cab 5630else
81ecdfbb 5631 ac_cv_cc_supports_pg=no
bec39cab 5632fi
81ecdfbb 5633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5634fi
81ecdfbb
RW
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5636$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5637
a9322a30 5638 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5639 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5640 fi
bec39cab 5641
a9322a30 5642 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5643fi
5644
c16158bc
JM
5645
5646
81ecdfbb
RW
5647# Check whether --with-pkgversion was given.
5648if test "${with_pkgversion+set}" = set; then :
5649 withval=$with_pkgversion; case "$withval" in
5650 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5651 no) PKGVERSION= ;;
5652 *) PKGVERSION="($withval) " ;;
5653 esac
5654else
5655 PKGVERSION="(GDB) "
5656
81ecdfbb 5657fi
c16158bc
JM
5658
5659
5660
5661
81ecdfbb
RW
5662
5663# Check whether --with-bugurl was given.
5664if test "${with_bugurl+set}" = set; then :
5665 withval=$with_bugurl; case "$withval" in
5666 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5667 no) BUGURL=
5668 ;;
5669 *) BUGURL="$withval"
5670 ;;
5671 esac
5672else
5673 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5674
81ecdfbb
RW
5675fi
5676
c16158bc
JM
5677 case ${BUGURL} in
5678 "")
5679 REPORT_BUGS_TO=
5680 REPORT_BUGS_TEXI=
5681 ;;
5682 *)
5683 REPORT_BUGS_TO="<$BUGURL>"
5684 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5685 ;;
5686 esac;
5687
5688
5689
5690
5691cat >>confdefs.h <<_ACEOF
5692#define PKGVERSION "$PKGVERSION"
5693_ACEOF
5694
5695
5696cat >>confdefs.h <<_ACEOF
5697#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5698_ACEOF
5699
5700
bec39cab
AC
5701# --------------------- #
5702# Checks for programs. #
5703# --------------------- #
5704
5705for ac_prog in gawk mawk nawk awk
5706do
5707 # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_prog_AWK+set}" = set; then :
5712 $as_echo_n "(cached) " >&6
bec39cab
AC
5713else
5714 if test -n "$AWK"; then
5715 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5716else
5717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718for as_dir in $PATH
5719do
5720 IFS=$as_save_IFS
5721 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5722 for ac_exec_ext in '' $ac_executable_extensions; do
5723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5724 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5726 break 2
5727 fi
5728done
81ecdfbb
RW
5729 done
5730IFS=$as_save_IFS
bec39cab
AC
5731
5732fi
5733fi
5734AWK=$ac_cv_prog_AWK
5735if test -n "$AWK"; then
81ecdfbb
RW
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5737$as_echo "$AWK" >&6; }
bec39cab 5738else
81ecdfbb
RW
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740$as_echo "no" >&6; }
bec39cab
AC
5741fi
5742
bec39cab 5743
81ecdfbb 5744 test -n "$AWK" && break
bec39cab
AC
5745done
5746
c971b7fa
PA
5747# Find a good install program. We prefer a C program (faster),
5748# so one script is as good as another. But avoid the broken or
5749# incompatible versions:
5750# SysV /etc/install, /usr/sbin/install
5751# SunOS /usr/etc/install
5752# IRIX /sbin/install
5753# AIX /bin/install
5754# AmigaOS /C/install, which installs bootblocks on floppy discs
5755# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5756# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5757# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5758# OS/2's system install, which has a completely different semantic
5759# ./install, which can be erroneously created by make from ./install.sh.
5760# Reject install programs that cannot install multiple files.
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5762$as_echo_n "checking for a BSD-compatible install... " >&6; }
5763if test -z "$INSTALL"; then
5764if test "${ac_cv_path_install+set}" = set; then :
5765 $as_echo_n "(cached) " >&6
5766else
5767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770 IFS=$as_save_IFS
5771 test -z "$as_dir" && as_dir=.
5772 # Account for people who put trailing slashes in PATH elements.
5773case $as_dir/ in #((
5774 ./ | .// | /[cC]/* | \
5775 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5776 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5777 /usr/ucb/* ) ;;
5778 *)
5779 # OSF1 and SCO ODT 3.0 have their own names for install.
5780 # Don't use installbsd from OSF since it installs stuff as root
5781 # by default.
5782 for ac_prog in ginstall scoinst install; do
5783 for ac_exec_ext in '' $ac_executable_extensions; do
5784 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5785 if test $ac_prog = install &&
5786 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5787 # AIX install. It has an incompatible calling convention.
5788 :
5789 elif test $ac_prog = install &&
5790 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5791 # program-specific install script used by HP pwplus--don't use.
5792 :
5793 else
5794 rm -rf conftest.one conftest.two conftest.dir
5795 echo one > conftest.one
5796 echo two > conftest.two
5797 mkdir conftest.dir
5798 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5799 test -s conftest.one && test -s conftest.two &&
5800 test -s conftest.dir/conftest.one &&
5801 test -s conftest.dir/conftest.two
5802 then
5803 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5804 break 3
5805 fi
5806 fi
5807 fi
5808 done
5809 done
5810 ;;
5811esac
5812
5813 done
5814IFS=$as_save_IFS
5815
5816rm -rf conftest.one conftest.two conftest.dir
5817
5818fi
5819 if test "${ac_cv_path_install+set}" = set; then
5820 INSTALL=$ac_cv_path_install
5821 else
5822 # As a last resort, use the slow shell script. Don't cache a
5823 # value for INSTALL within a source directory, because that will
5824 # break other packages using the cache if that directory is
5825 # removed, or if the value is a relative name.
5826 INSTALL=$ac_install_sh
5827 fi
5828fi
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5830$as_echo "$INSTALL" >&6; }
5831
5832# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5833# It thinks the first close brace ends the variable substitution.
5834test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5835
5836test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5837
5838test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5839
81ecdfbb
RW
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5841$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5842LN_S=$as_ln_s
5843if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5845$as_echo "yes" >&6; }
bec39cab 5846else
81ecdfbb
RW
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5848$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5849fi
5850
5851if test -n "$ac_tool_prefix"; then
5852 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5853set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if test "${ac_cv_prog_RANLIB+set}" = set; then :
5857 $as_echo_n "(cached) " >&6
bec39cab
AC
5858else
5859 if test -n "$RANLIB"; then
5860 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5861else
5862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5863for as_dir in $PATH
5864do
5865 IFS=$as_save_IFS
5866 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5867 for ac_exec_ext in '' $ac_executable_extensions; do
5868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5869 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5871 break 2
5872 fi
5873done
81ecdfbb
RW
5874 done
5875IFS=$as_save_IFS
bec39cab
AC
5876
5877fi
5878fi
5879RANLIB=$ac_cv_prog_RANLIB
5880if test -n "$RANLIB"; then
81ecdfbb
RW
5881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5882$as_echo "$RANLIB" >&6; }
bec39cab 5883else
81ecdfbb
RW
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
bec39cab
AC
5886fi
5887
81ecdfbb 5888
bec39cab
AC
5889fi
5890if test -z "$ac_cv_prog_RANLIB"; then
5891 ac_ct_RANLIB=$RANLIB
5892 # Extract the first word of "ranlib", so it can be a program name with args.
5893set dummy ranlib; ac_word=$2
81ecdfbb
RW
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5897 $as_echo_n "(cached) " >&6
bec39cab
AC
5898else
5899 if test -n "$ac_ct_RANLIB"; then
5900 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5901else
5902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905 IFS=$as_save_IFS
5906 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5907 for ac_exec_ext in '' $ac_executable_extensions; do
5908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5909 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5911 break 2
5912 fi
5913done
81ecdfbb
RW
5914 done
5915IFS=$as_save_IFS
bec39cab 5916
bec39cab
AC
5917fi
5918fi
5919ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5920if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5922$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5923else
81ecdfbb
RW
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
bec39cab
AC
5926fi
5927
81ecdfbb
RW
5928 if test "x$ac_ct_RANLIB" = x; then
5929 RANLIB=":"
5930 else
5931 case $cross_compiling:$ac_tool_warned in
5932yes:)
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5935ac_tool_warned=yes ;;
5936esac
5937 RANLIB=$ac_ct_RANLIB
5938 fi
bec39cab
AC
5939else
5940 RANLIB="$ac_cv_prog_RANLIB"
5941fi
5942
5943for ac_prog in 'bison -y' byacc
5944do
5945 # Extract the first word of "$ac_prog", so it can be a program name with args.
5946set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948$as_echo_n "checking for $ac_word... " >&6; }
5949if test "${ac_cv_prog_YACC+set}" = set; then :
5950 $as_echo_n "(cached) " >&6
bec39cab
AC
5951else
5952 if test -n "$YACC"; then
5953 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5954else
5955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958 IFS=$as_save_IFS
5959 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5960 for ac_exec_ext in '' $ac_executable_extensions; do
5961 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5962 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5964 break 2
5965 fi
5966done
81ecdfbb
RW
5967 done
5968IFS=$as_save_IFS
bec39cab
AC
5969
5970fi
5971fi
5972YACC=$ac_cv_prog_YACC
5973if test -n "$YACC"; then
81ecdfbb
RW
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5975$as_echo "$YACC" >&6; }
bec39cab 5976else
81ecdfbb
RW
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
bec39cab
AC
5979fi
5980
81ecdfbb 5981
bec39cab
AC
5982 test -n "$YACC" && break
5983done
5984test -n "$YACC" || YACC="yacc"
5985
5986
5987if test -n "$ac_tool_prefix"; then
5988 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5989set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if test "${ac_cv_prog_AR+set}" = set; then :
5993 $as_echo_n "(cached) " >&6
bec39cab
AC
5994else
5995 if test -n "$AR"; then
5996 ac_cv_prog_AR="$AR" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6003 for ac_exec_ext in '' $ac_executable_extensions; do
6004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6005 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6007 break 2
6008 fi
6009done
81ecdfbb
RW
6010 done
6011IFS=$as_save_IFS
bec39cab
AC
6012
6013fi
6014fi
6015AR=$ac_cv_prog_AR
6016if test -n "$AR"; then
81ecdfbb
RW
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6018$as_echo "$AR" >&6; }
bec39cab 6019else
81ecdfbb
RW
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
bec39cab
AC
6022fi
6023
81ecdfbb 6024
bec39cab
AC
6025fi
6026if test -z "$ac_cv_prog_AR"; then
6027 ac_ct_AR=$AR
6028 # Extract the first word of "ar", so it can be a program name with args.
6029set dummy ar; ac_word=$2
81ecdfbb
RW
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6033 $as_echo_n "(cached) " >&6
bec39cab
AC
6034else
6035 if test -n "$ac_ct_AR"; then
6036 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6043 for ac_exec_ext in '' $ac_executable_extensions; do
6044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6045 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6047 break 2
6048 fi
6049done
81ecdfbb
RW
6050 done
6051IFS=$as_save_IFS
bec39cab
AC
6052
6053fi
6054fi
6055ac_ct_AR=$ac_cv_prog_ac_ct_AR
6056if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6058$as_echo "$ac_ct_AR" >&6; }
bec39cab 6059else
81ecdfbb
RW
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
bec39cab
AC
6062fi
6063
81ecdfbb
RW
6064 if test "x$ac_ct_AR" = x; then
6065 AR=""
6066 else
6067 case $cross_compiling:$ac_tool_warned in
6068yes:)
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6071ac_tool_warned=yes ;;
6072esac
6073 AR=$ac_ct_AR
6074 fi
bec39cab
AC
6075else
6076 AR="$ac_cv_prog_AR"
6077fi
6078
6079if test -n "$ac_tool_prefix"; then
6080 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6081set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6083$as_echo_n "checking for $ac_word... " >&6; }
6084if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6085 $as_echo_n "(cached) " >&6
bec39cab
AC
6086else
6087 if test -n "$DLLTOOL"; then
6088 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6089else
6090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH
6092do
6093 IFS=$as_save_IFS
6094 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6095 for ac_exec_ext in '' $ac_executable_extensions; do
6096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6097 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6099 break 2
6100 fi
6101done
81ecdfbb
RW
6102 done
6103IFS=$as_save_IFS
bec39cab
AC
6104
6105fi
6106fi
6107DLLTOOL=$ac_cv_prog_DLLTOOL
6108if test -n "$DLLTOOL"; then
81ecdfbb
RW
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6110$as_echo "$DLLTOOL" >&6; }
bec39cab 6111else
81ecdfbb
RW
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
bec39cab
AC
6114fi
6115
81ecdfbb 6116
bec39cab
AC
6117fi
6118if test -z "$ac_cv_prog_DLLTOOL"; then
6119 ac_ct_DLLTOOL=$DLLTOOL
6120 # Extract the first word of "dlltool", so it can be a program name with args.
6121set dummy dlltool; ac_word=$2
81ecdfbb
RW
6122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6123$as_echo_n "checking for $ac_word... " >&6; }
6124if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6125 $as_echo_n "(cached) " >&6
bec39cab
AC
6126else
6127 if test -n "$ac_ct_DLLTOOL"; then
6128 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6129else
6130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6131for as_dir in $PATH
6132do
6133 IFS=$as_save_IFS
6134 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6135 for ac_exec_ext in '' $ac_executable_extensions; do
6136 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6137 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6139 break 2
6140 fi
6141done
81ecdfbb
RW
6142 done
6143IFS=$as_save_IFS
bec39cab
AC
6144
6145fi
6146fi
6147ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6148if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6150$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6151else
81ecdfbb
RW
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153$as_echo "no" >&6; }
bec39cab
AC
6154fi
6155
81ecdfbb
RW
6156 if test "x$ac_ct_DLLTOOL" = x; then
6157 DLLTOOL=""
6158 else
6159 case $cross_compiling:$ac_tool_warned in
6160yes:)
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6163ac_tool_warned=yes ;;
6164esac
6165 DLLTOOL=$ac_ct_DLLTOOL
6166 fi
bec39cab
AC
6167else
6168 DLLTOOL="$ac_cv_prog_DLLTOOL"
6169fi
6170
6171if test -n "$ac_tool_prefix"; then
6172 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6173set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6175$as_echo_n "checking for $ac_word... " >&6; }
6176if test "${ac_cv_prog_WINDRES+set}" = set; then :
6177 $as_echo_n "(cached) " >&6
bec39cab
AC
6178else
6179 if test -n "$WINDRES"; then
6180 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6181else
6182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6187 for ac_exec_ext in '' $ac_executable_extensions; do
6188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6189 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6191 break 2
6192 fi
6193done
81ecdfbb
RW
6194 done
6195IFS=$as_save_IFS
bec39cab
AC
6196
6197fi
6198fi
6199WINDRES=$ac_cv_prog_WINDRES
6200if test -n "$WINDRES"; then
81ecdfbb
RW
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6202$as_echo "$WINDRES" >&6; }
bec39cab 6203else
81ecdfbb
RW
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
bec39cab
AC
6206fi
6207
81ecdfbb 6208
bec39cab
AC
6209fi
6210if test -z "$ac_cv_prog_WINDRES"; then
6211 ac_ct_WINDRES=$WINDRES
6212 # Extract the first word of "windres", so it can be a program name with args.
6213set dummy windres; ac_word=$2
81ecdfbb
RW
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6217 $as_echo_n "(cached) " >&6
bec39cab
AC
6218else
6219 if test -n "$ac_ct_WINDRES"; then
6220 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6221else
6222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225 IFS=$as_save_IFS
6226 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6227 for ac_exec_ext in '' $ac_executable_extensions; do
6228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6229 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6231 break 2
6232 fi
6233done
81ecdfbb
RW
6234 done
6235IFS=$as_save_IFS
bec39cab
AC
6236
6237fi
6238fi
6239ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6240if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6242$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6243else
81ecdfbb
RW
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
c906108c 6246fi
bec39cab 6247
81ecdfbb
RW
6248 if test "x$ac_ct_WINDRES" = x; then
6249 WINDRES=""
6250 else
6251 case $cross_compiling:$ac_tool_warned in
6252yes:)
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6255ac_tool_warned=yes ;;
6256esac
6257 WINDRES=$ac_ct_WINDRES
6258 fi
c906108c 6259else
bec39cab 6260 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6261fi
6262
bec39cab 6263
036c3acb
TS
6264case $host_os in
6265 gnu*)
6266 # Needed for GNU Hurd hosts.
6267 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6268 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6269set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6271$as_echo_n "checking for $ac_word... " >&6; }
6272if test "${ac_cv_prog_MIG+set}" = set; then :
6273 $as_echo_n "(cached) " >&6
c906108c 6274else
bec39cab
AC
6275 if test -n "$MIG"; then
6276 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6277else
6278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH
6280do
6281 IFS=$as_save_IFS
6282 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6283 for ac_exec_ext in '' $ac_executable_extensions; do
6284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6285 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6287 break 2
6288 fi
6289done
81ecdfbb
RW
6290 done
6291IFS=$as_save_IFS
bec39cab 6292
c906108c 6293fi
bec39cab
AC
6294fi
6295MIG=$ac_cv_prog_MIG
6296if test -n "$MIG"; then
81ecdfbb
RW
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6298$as_echo "$MIG" >&6; }
c906108c 6299else
81ecdfbb
RW
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6301$as_echo "no" >&6; }
c906108c
SS
6302fi
6303
81ecdfbb 6304
bec39cab
AC
6305fi
6306if test -z "$ac_cv_prog_MIG"; then
6307 ac_ct_MIG=$MIG
6308 # Extract the first word of "mig", so it can be a program name with args.
6309set dummy mig; ac_word=$2
81ecdfbb
RW
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311$as_echo_n "checking for $ac_word... " >&6; }
6312if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6313 $as_echo_n "(cached) " >&6
bec39cab
AC
6314else
6315 if test -n "$ac_ct_MIG"; then
6316 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6317else
6318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319for as_dir in $PATH
6320do
6321 IFS=$as_save_IFS
6322 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6323 for ac_exec_ext in '' $ac_executable_extensions; do
6324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6325 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6327 break 2
6328 fi
6329done
81ecdfbb
RW
6330 done
6331IFS=$as_save_IFS
c906108c 6332
bec39cab
AC
6333fi
6334fi
6335ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6336if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6338$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6339else
81ecdfbb
RW
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
bec39cab 6342fi
c906108c 6343
81ecdfbb
RW
6344 if test "x$ac_ct_MIG" = x; then
6345 MIG=""
6346 else
6347 case $cross_compiling:$ac_tool_warned in
6348yes:)
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6351ac_tool_warned=yes ;;
6352esac
6353 MIG=$ac_ct_MIG
6354 fi
bec39cab
AC
6355else
6356 MIG="$ac_cv_prog_MIG"
6357fi
c906108c 6358
036c3acb
TS
6359 if test x"$MIG" = x; then
6360 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6361 fi
6362 ;;
6363esac
c906108c 6364
bec39cab
AC
6365# ---------------------- #
6366# Checks for libraries. #
6367# ---------------------- #
c906108c 6368
bec39cab 6369# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6371$as_echo_n "checking for main in -lm... " >&6; }
6372if test "${ac_cv_lib_m_main+set}" = set; then :
6373 $as_echo_n "(cached) " >&6
bec39cab
AC
6374else
6375 ac_check_lib_save_LIBS=$LIBS
6376LIBS="-lm $LIBS"
81ecdfbb 6377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6378/* end confdefs.h. */
c906108c 6379
c906108c 6380
bec39cab
AC
6381int
6382main ()
6383{
81ecdfbb 6384return main ();
bec39cab
AC
6385 ;
6386 return 0;
6387}
6388_ACEOF
81ecdfbb 6389if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6390 ac_cv_lib_m_main=yes
6391else
81ecdfbb 6392 ac_cv_lib_m_main=no
bec39cab 6393fi
81ecdfbb
RW
6394rm -f core conftest.err conftest.$ac_objext \
6395 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6396LIBS=$ac_check_lib_save_LIBS
6397fi
81ecdfbb
RW
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6399$as_echo "$ac_cv_lib_m_main" >&6; }
6400if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6401 cat >>confdefs.h <<_ACEOF
6402#define HAVE_LIBM 1
6403_ACEOF
6404
6405 LIBS="-lm $LIBS"
c906108c 6406
c906108c 6407fi
bec39cab
AC
6408
6409
6410# We need to link with -lw to get `wctype' on Solaris before Solaris
6411# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6412# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6413# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6414ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6415if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6416
c906108c 6417else
81ecdfbb
RW
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6419$as_echo_n "checking for wctype in -lw... " >&6; }
6420if test "${ac_cv_lib_w_wctype+set}" = set; then :
6421 $as_echo_n "(cached) " >&6
bec39cab
AC
6422else
6423 ac_check_lib_save_LIBS=$LIBS
6424LIBS="-lw $LIBS"
81ecdfbb 6425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6426/* end confdefs.h. */
c906108c 6427
81ecdfbb
RW
6428/* Override any GCC internal prototype to avoid an error.
6429 Use char because int might match the return type of a GCC
6430 builtin and then its argument prototype would still apply. */
bec39cab
AC
6431#ifdef __cplusplus
6432extern "C"
6433#endif
bec39cab
AC
6434char wctype ();
6435int
6436main ()
6437{
81ecdfbb 6438return wctype ();
bec39cab
AC
6439 ;
6440 return 0;
6441}
6442_ACEOF
81ecdfbb 6443if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6444 ac_cv_lib_w_wctype=yes
6445else
81ecdfbb 6446 ac_cv_lib_w_wctype=no
bec39cab 6447fi
81ecdfbb
RW
6448rm -f core conftest.err conftest.$ac_objext \
6449 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6450LIBS=$ac_check_lib_save_LIBS
6451fi
81ecdfbb
RW
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6453$as_echo "$ac_cv_lib_w_wctype" >&6; }
6454if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6455 cat >>confdefs.h <<_ACEOF
6456#define HAVE_LIBW 1
6457_ACEOF
c906108c 6458
bec39cab 6459 LIBS="-lw $LIBS"
c906108c 6460
bec39cab 6461fi
c906108c 6462
bec39cab 6463fi
c906108c 6464
ddc9cd0f 6465
bec39cab 6466# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6468$as_echo_n "checking for library containing gethostbyname... " >&6; }
6469if test "${ac_cv_search_gethostbyname+set}" = set; then :
6470 $as_echo_n "(cached) " >&6
bec39cab
AC
6471else
6472 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6474/* end confdefs.h. */
ddc9cd0f 6475
81ecdfbb
RW
6476/* Override any GCC internal prototype to avoid an error.
6477 Use char because int might match the return type of a GCC
6478 builtin and then its argument prototype would still apply. */
bec39cab
AC
6479#ifdef __cplusplus
6480extern "C"
6481#endif
bec39cab
AC
6482char gethostbyname ();
6483int
6484main ()
6485{
81ecdfbb 6486return gethostbyname ();
bec39cab
AC
6487 ;
6488 return 0;
6489}
6490_ACEOF
81ecdfbb
RW
6491for ac_lib in '' nsl; do
6492 if test -z "$ac_lib"; then
6493 ac_res="none required"
6494 else
6495 ac_res=-l$ac_lib
b4e70030 6496 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6497 fi
6498 if ac_fn_c_try_link "$LINENO"; then :
6499 ac_cv_search_gethostbyname=$ac_res
6500fi
6501rm -f core conftest.err conftest.$ac_objext \
6502 conftest$ac_exeext
6503 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6504 break
6505fi
6506done
6507if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6508
bec39cab 6509else
81ecdfbb 6510 ac_cv_search_gethostbyname=no
bec39cab 6511fi
81ecdfbb 6512rm conftest.$ac_ext
bec39cab
AC
6513LIBS=$ac_func_search_save_LIBS
6514fi
81ecdfbb
RW
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6516$as_echo "$ac_cv_search_gethostbyname" >&6; }
6517ac_res=$ac_cv_search_gethostbyname
6518if test "$ac_res" != no; then :
6519 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6520
bec39cab 6521fi
96baa820 6522
c906108c 6523
b4e70030 6524# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6526$as_echo_n "checking for library containing socketpair... " >&6; }
6527if test "${ac_cv_search_socketpair+set}" = set; then :
6528 $as_echo_n "(cached) " >&6
b4e70030
JB
6529else
6530 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6532/* end confdefs.h. */
6533
81ecdfbb
RW
6534/* Override any GCC internal prototype to avoid an error.
6535 Use char because int might match the return type of a GCC
6536 builtin and then its argument prototype would still apply. */
b4e70030
JB
6537#ifdef __cplusplus
6538extern "C"
6539#endif
b4e70030
JB
6540char socketpair ();
6541int
6542main ()
6543{
81ecdfbb 6544return socketpair ();
b4e70030
JB
6545 ;
6546 return 0;
6547}
6548_ACEOF
81ecdfbb
RW
6549for ac_lib in '' socket; do
6550 if test -z "$ac_lib"; then
6551 ac_res="none required"
6552 else
6553 ac_res=-l$ac_lib
b4e70030 6554 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6555 fi
6556 if ac_fn_c_try_link "$LINENO"; then :
6557 ac_cv_search_socketpair=$ac_res
6558fi
6559rm -f core conftest.err conftest.$ac_objext \
6560 conftest$ac_exeext
6561 if test "${ac_cv_search_socketpair+set}" = set; then :
6562 break
6563fi
6564done
6565if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6566
b4e70030 6567else
81ecdfbb 6568 ac_cv_search_socketpair=no
b4e70030 6569fi
81ecdfbb 6570rm conftest.$ac_ext
b4e70030
JB
6571LIBS=$ac_func_search_save_LIBS
6572fi
81ecdfbb
RW
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6574$as_echo "$ac_cv_search_socketpair" >&6; }
6575ac_res=$ac_cv_search_socketpair
6576if test "$ac_res" != no; then :
6577 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6578
6579fi
6580
6581
233a11ab 6582# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6583
6584 # See if the user specified whether he wants zlib support or not.
6585
6586# Check whether --with-zlib was given.
6587if test "${with_zlib+set}" = set; then :
6588 withval=$with_zlib;
6589else
6590 with_zlib=auto
6591fi
6592
6593
6594 if test "$with_zlib" != "no"; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6596$as_echo_n "checking for library containing zlibVersion... " >&6; }
6597if test "${ac_cv_search_zlibVersion+set}" = set; then :
6598 $as_echo_n "(cached) " >&6
233a11ab
CS
6599else
6600 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6602/* end confdefs.h. */
6603
81ecdfbb
RW
6604/* Override any GCC internal prototype to avoid an error.
6605 Use char because int might match the return type of a GCC
233a11ab 6606 builtin and then its argument prototype would still apply. */
233a11ab
CS
6607#ifdef __cplusplus
6608extern "C"
6609#endif
233a11ab
CS
6610char zlibVersion ();
6611int
6612main ()
6613{
81ecdfbb 6614return zlibVersion ();
233a11ab
CS
6615 ;
6616 return 0;
6617}
6618_ACEOF
81ecdfbb
RW
6619for ac_lib in '' z; do
6620 if test -z "$ac_lib"; then
6621 ac_res="none required"
233a11ab 6622 else
81ecdfbb
RW
6623 ac_res=-l$ac_lib
6624 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6625 fi
81ecdfbb
RW
6626 if ac_fn_c_try_link "$LINENO"; then :
6627 ac_cv_search_zlibVersion=$ac_res
233a11ab 6628fi
81ecdfbb
RW
6629rm -f core conftest.err conftest.$ac_objext \
6630 conftest$ac_exeext
6631 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6632 break
233a11ab 6633fi
81ecdfbb
RW
6634done
6635if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6636
233a11ab 6637else
81ecdfbb 6638 ac_cv_search_zlibVersion=no
233a11ab 6639fi
81ecdfbb
RW
6640rm conftest.$ac_ext
6641LIBS=$ac_func_search_save_LIBS
233a11ab 6642fi
81ecdfbb
RW
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6644$as_echo "$ac_cv_search_zlibVersion" >&6; }
6645ac_res=$ac_cv_search_zlibVersion
6646if test "$ac_res" != no; then :
6647 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6648 for ac_header in zlib.h
6649do :
6650 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6651if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6652 cat >>confdefs.h <<_ACEOF
81ecdfbb 6653#define HAVE_ZLIB_H 1
233a11ab
CS
6654_ACEOF
6655
6656fi
6657
6658done
6659
6660fi
6661
b040ad30
JB
6662 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6663 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6664 fi
6665 fi
6666
233a11ab 6667
77f120bf 6668# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6670$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6671if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6672 $as_echo_n "(cached) " >&6
bec39cab
AC
6673else
6674 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6676/* end confdefs.h. */
c906108c 6677
81ecdfbb
RW
6678/* Override any GCC internal prototype to avoid an error.
6679 Use char because int might match the return type of a GCC
6680 builtin and then its argument prototype would still apply. */
bec39cab
AC
6681#ifdef __cplusplus
6682extern "C"
6683#endif
77f120bf 6684char dlgetmodinfo ();
bec39cab
AC
6685int
6686main ()
6687{
81ecdfbb 6688return dlgetmodinfo ();
bec39cab
AC
6689 ;
6690 return 0;
6691}
6692_ACEOF
81ecdfbb
RW
6693for ac_lib in '' dl xpdl; do
6694 if test -z "$ac_lib"; then
6695 ac_res="none required"
6696 else
6697 ac_res=-l$ac_lib
b4e70030 6698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6699 fi
6700 if ac_fn_c_try_link "$LINENO"; then :
6701 ac_cv_search_dlgetmodinfo=$ac_res
6702fi
6703rm -f core conftest.err conftest.$ac_objext \
6704 conftest$ac_exeext
6705 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6706 break
6707fi
6708done
6709if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6710
4e8d927d 6711else
81ecdfbb 6712 ac_cv_search_dlgetmodinfo=no
1ba607ad 6713fi
81ecdfbb 6714rm conftest.$ac_ext
bec39cab
AC
6715LIBS=$ac_func_search_save_LIBS
6716fi
81ecdfbb
RW
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6718$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6719ac_res=$ac_cv_search_dlgetmodinfo
6720if test "$ac_res" != no; then :
6721 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6722
8bb2c122 6723fi
8bb2c122 6724
8bb2c122 6725
77f120bf 6726
77f120bf 6727
6c7a06a3 6728
81ecdfbb
RW
6729# Check whether --with-libiconv-prefix was given.
6730if test "${with_libiconv_prefix+set}" = set; then :
6731 withval=$with_libiconv_prefix;
6c7a06a3 6732 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6733 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6734 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6735 done
6736
81ecdfbb
RW
6737fi
6738
6c7a06a3 6739
f18c4681 6740 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6741 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6742
81ecdfbb
RW
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6744$as_echo_n "checking for iconv... " >&6; }
6745if test "${am_cv_func_iconv+set}" = set; then :
6746 $as_echo_n "(cached) " >&6
d542061a 6747else
6c7a06a3
TT
6748
6749 am_cv_func_iconv="no, consider installing GNU libiconv"
6750 am_cv_lib_iconv=no
6751 am_cv_use_build_libiconv=no
f0f20949 6752 am_cv_build_libiconv_path=
4edb1e84
JB
6753
6754 # If libiconv is part of the build tree, then try using it over
6755 # any system iconv.
6756 if test -d ../libiconv; then
f18c4681
JB
6757 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6758 am_save_LIBS="$LIBS"
6759 am_save_CPPFLAGS="$CPPFLAGS"
6760 LIBS="$LIBS $lib_dir/libiconv.a"
6761 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6763/* end confdefs.h. */
6c7a06a3
TT
6764#include <stdlib.h>
6765#include <iconv.h>
d542061a
UW
6766int
6767main ()
6768{
6c7a06a3 6769iconv_t cd = iconv_open("","");
f18c4681
JB
6770 iconv(cd,NULL,NULL,NULL,NULL);
6771 iconv_close(cd);
d542061a
UW
6772 ;
6773 return 0;
6774}
6775_ACEOF
81ecdfbb 6776if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6777 am_cv_use_build_libiconv=yes
f0f20949 6778 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6779 am_cv_lib_iconv=yes
6780 am_cv_func_iconv=yes
d542061a 6781fi
81ecdfbb
RW
6782rm -f core conftest.err conftest.$ac_objext \
6783 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6784 LIBS="$am_save_LIBS"
6785 CPPFLAGS="$am_save_CPPFLAGS"
6786 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6787 break
6788 fi
6789 done
4edb1e84 6790 fi
94ae1714 6791
4edb1e84 6792 # Next, try to find iconv in libc.
6c7a06a3 6793 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6795/* end confdefs.h. */
6c7a06a3
TT
6796#include <stdlib.h>
6797#include <iconv.h>
d542061a
UW
6798int
6799main ()
6800{
6c7a06a3
TT
6801iconv_t cd = iconv_open("","");
6802 iconv(cd,NULL,NULL,NULL,NULL);
6803 iconv_close(cd);
d542061a
UW
6804 ;
6805 return 0;
6806}
6807_ACEOF
81ecdfbb 6808if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6809 am_cv_func_iconv=yes
d542061a 6810fi
81ecdfbb
RW
6811rm -f core conftest.err conftest.$ac_objext \
6812 conftest$ac_exeext conftest.$ac_ext
77f120bf 6813 fi
94ae1714 6814
4edb1e84
JB
6815 # If iconv was not in libc, try -liconv. In this case, arrange to
6816 # look in the libiconv prefix, if it was specified by the user.
6817 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6818 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6819 am_save_LIBS="$LIBS"
6820 if test -n "$LIBICONV_INCLUDE"; then
6821 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6822 LIBS="$LIBS $LIBICONV_LIBDIR"
6823 fi
6824 LIBS="$LIBS -liconv"
81ecdfbb 6825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6826/* end confdefs.h. */
6c7a06a3
TT
6827#include <stdlib.h>
6828#include <iconv.h>
bec39cab
AC
6829int
6830main ()
6831{
6c7a06a3
TT
6832iconv_t cd = iconv_open("","");
6833 iconv(cd,NULL,NULL,NULL,NULL);
6834 iconv_close(cd);
bec39cab
AC
6835 ;
6836 return 0;
6837}
6838_ACEOF
81ecdfbb 6839if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6840 am_cv_lib_iconv=yes
6c7a06a3 6841 am_cv_func_iconv=yes
627af7ea 6842fi
81ecdfbb
RW
6843rm -f core conftest.err conftest.$ac_objext \
6844 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6845 LIBS="$am_save_LIBS"
fc3b640d 6846 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6847 fi
6848
6849fi
81ecdfbb
RW
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6851$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6852
6853 # Set the various flags based on the cache variables. We can't rely
6854 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6855 LIBICONV=
6856 if test "$am_cv_lib_iconv" = yes; then
6857 LIBICONV="-liconv"
94ae1714
TT
6858 else
6859 LIBICONV_LIBDIR=
6860 LIBICONV_INCLUDE=
fc3b640d
TT
6861 fi
6862 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6863 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6864 LIBICONV_LIBDIR=""
fc3b640d
TT
6865 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6866 fi
6867 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6868 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6869
6c7a06a3
TT
6870 if test "$am_cv_func_iconv" = yes; then
6871
81ecdfbb 6872$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6873
81ecdfbb
RW
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6875$as_echo_n "checking for iconv declaration... " >&6; }
6876 if test "${am_cv_proto_iconv+set}" = set; then :
6877 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6878else
6879
81ecdfbb 6880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6881/* end confdefs.h. */
6882
6c7a06a3
TT
6883#include <stdlib.h>
6884#include <iconv.h>
6885extern
b4e70030 6886#ifdef __cplusplus
6c7a06a3 6887"C"
b4e70030 6888#endif
6c7a06a3
TT
6889#if defined(__STDC__) || defined(__cplusplus)
6890size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6891#else
6892size_t iconv();
6893#endif
6894
b4e70030
JB
6895int
6896main ()
6897{
6c7a06a3 6898
b4e70030
JB
6899 ;
6900 return 0;
6901}
6902_ACEOF
81ecdfbb 6903if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6904 am_cv_proto_iconv_arg1=""
4e8d927d 6905else
81ecdfbb 6906 am_cv_proto_iconv_arg1="const"
b4e70030 6907fi
81ecdfbb 6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6909 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);"
6910fi
6911
6912 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6914 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6915$as_echo "${ac_t:-
6916 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6917
6918cat >>confdefs.h <<_ACEOF
6919#define ICONV_CONST $am_cv_proto_iconv_arg1
6920_ACEOF
6921
6922 fi
6c7a06a3
TT
6923
6924
478aac75
DE
6925# GDB may fork/exec the iconv program to get the list of supported character
6926# sets. Allow the user to specify where to find it.
6927# There are several factors affecting the choice of option name:
6928# - There is already --with-libiconv-prefix but we can't use it, it specifies
6929# the build-time location of libiconv files.
6930# - The program we need to find is iconv, which comes with glibc. The user
6931# doesn't necessarily have libiconv installed. Therefore naming this
6932# --with-libiconv-foo feels wrong.
6933# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6934# defined to work on directories not files (though it really doesn't know
6935# the difference).
6936# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6937# with --with-libiconv-prefix.
6938# Putting these together is why the option name is --with-iconv-bin.
6939
6940
6941# Check whether --with-iconv-bin was given.
6942if test "${with_iconv_bin+set}" = set; then :
6943 withval=$with_iconv_bin; iconv_bin="${withval}"
6944
6945cat >>confdefs.h <<_ACEOF
6946#define ICONV_BIN "${iconv_bin}"
6947_ACEOF
6948
6949
6950 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6951 if test "x$prefix" = xNONE; then
6952 test_prefix=/usr/local
6953 else
6954 test_prefix=$prefix
6955 fi
6956 else
6957 test_prefix=$exec_prefix
6958 fi
6959 value=0
6960 case ${iconv_bin} in
6961 "${test_prefix}"|"${test_prefix}/"*|\
6962 '${exec_prefix}'|'${exec_prefix}/'*)
6963 value=1
6964 ;;
6965 esac
6966
6967cat >>confdefs.h <<_ACEOF
6968#define ICONV_BIN_RELOCATABLE $value
6969_ACEOF
6970
6971
6972
6973fi
6974
6975
6c7a06a3
TT
6976# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6977# There is a very specific comment in /usr/include/curses.h explaining that
6978# termcap routines built into libcurses must not be used.
6979#
6980# The symptoms we observed so far is GDB unexpectedly changing
6981# the terminal settings when tgetent is called - this is particularly
6982# visible as the output is missing carriage returns, and so rapidly
6983# becomes very hard to read.
6984#
6985# The readline configure script has already decided that libtermcap
6986# was enough for its purposes, and so decided to build readline using
6987# libtermcap. Since the TUI mode requires curses, building GDB with
6988# TUI enabled results in both libraries to be used at the same time,
6989# which is not allowed. This basically means that GDB with TUI is
6990# broken on alpha-osf.
6991
6992case $host_os in
6bcc772d
RO
6993 osf* )
6994 if test x"$enable_tui" = xyes; then
81ecdfbb 6995 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6996 fi
6bcc772d 6997 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6998 enable_tui=no
6999 fi
7000 ;;
7001esac
7002
cb01cfba 7003# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7004if test x"$enable_tui" != xno; then
cb01cfba
JB
7005 prefer_curses=yes
7006fi
7007
7008curses_found=no
7009if test x"$prefer_curses" = xyes; then
7010 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7011 # curses library because the latter might not provide all the
7012 # functionality we need. However, this leads to problems on systems
7013 # where the linker searches /usr/local/lib, but the compiler doesn't
7014 # search /usr/local/include, if ncurses is installed in /usr/local. A
7015 # default installation of ncurses on alpha*-dec-osf* will lead to such
7016 # a situation.
81ecdfbb
RW
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7018$as_echo_n "checking for library containing waddstr... " >&6; }
7019if test "${ac_cv_search_waddstr+set}" = set; then :
7020 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7021else
7022 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7024/* end confdefs.h. */
7025
81ecdfbb
RW
7026/* Override any GCC internal prototype to avoid an error.
7027 Use char because int might match the return type of a GCC
7028 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7029#ifdef __cplusplus
7030extern "C"
7031#endif
6c7a06a3
TT
7032char waddstr ();
7033int
7034main ()
7035{
81ecdfbb 7036return waddstr ();
6c7a06a3
TT
7037 ;
7038 return 0;
7039}
7040_ACEOF
81ecdfbb
RW
7041for ac_lib in '' ncurses cursesX curses; do
7042 if test -z "$ac_lib"; then
7043 ac_res="none required"
7044 else
7045 ac_res=-l$ac_lib
7046 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7047 fi
7048 if ac_fn_c_try_link "$LINENO"; then :
7049 ac_cv_search_waddstr=$ac_res
7050fi
7051rm -f core conftest.err conftest.$ac_objext \
7052 conftest$ac_exeext
7053 if test "${ac_cv_search_waddstr+set}" = set; then :
7054 break
7055fi
7056done
7057if test "${ac_cv_search_waddstr+set}" = set; then :
7058
6c7a06a3 7059else
81ecdfbb
RW
7060 ac_cv_search_waddstr=no
7061fi
7062rm conftest.$ac_ext
7063LIBS=$ac_func_search_save_LIBS
7064fi
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7066$as_echo "$ac_cv_search_waddstr" >&6; }
7067ac_res=$ac_cv_search_waddstr
7068if test "$ac_res" != no; then :
7069 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7070
7071fi
7072
7073
cb01cfba
JB
7074 if test "$ac_cv_search_waddstr" != no; then
7075 curses_found=yes
7076 fi
7077fi
7078
7079# Check whether we should enable the TUI, but only do so if we really
7080# can.
7081if test x"$enable_tui" != xno; then
7082 if test -d $srcdir/tui; then
7083 if test "$curses_found" != no; then
6c7a06a3
TT
7084 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7085 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7086 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7087 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7088 else
7089 if test x"$enable_tui" = xyes; then
81ecdfbb 7090 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7091 else
81ecdfbb
RW
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7093$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7094 fi
7095 fi
7096 fi
7097fi
7098
7099# Since GDB uses Readline, we need termcap functionality. In many
7100# cases this will be provided by the curses library, but some systems
7101# have a seperate termcap library, or no curses library at all.
7102
7103case $host_os in
7104 cygwin*)
7105 if test -d $srcdir/libtermcap; then
7106 LIBS="../libtermcap/libtermcap.a $LIBS"
7107 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7108 fi ;;
7109 go32* | *djgpp*)
7110 ac_cv_search_tgetent="none required"
7111 ;;
7112 *mingw32*)
7113 ac_cv_search_tgetent="none required"
7114 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7115 ;;
7116esac
7117
7118# These are the libraries checked by Readline.
81ecdfbb
RW
7119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7120$as_echo_n "checking for library containing tgetent... " >&6; }
7121if test "${ac_cv_search_tgetent+set}" = set; then :
7122 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7123else
7124 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7126/* end confdefs.h. */
7127
81ecdfbb
RW
7128/* Override any GCC internal prototype to avoid an error.
7129 Use char because int might match the return type of a GCC
7130 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7131#ifdef __cplusplus
7132extern "C"
7133#endif
6c7a06a3
TT
7134char tgetent ();
7135int
7136main ()
7137{
81ecdfbb 7138return tgetent ();
6c7a06a3
TT
7139 ;
7140 return 0;
7141}
7142_ACEOF
81ecdfbb
RW
7143for ac_lib in '' termcap tinfo curses ncurses; do
7144 if test -z "$ac_lib"; then
7145 ac_res="none required"
7146 else
7147 ac_res=-l$ac_lib
6c7a06a3 7148 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7149 fi
7150 if ac_fn_c_try_link "$LINENO"; then :
7151 ac_cv_search_tgetent=$ac_res
7152fi
7153rm -f core conftest.err conftest.$ac_objext \
7154 conftest$ac_exeext
7155 if test "${ac_cv_search_tgetent+set}" = set; then :
7156 break
7157fi
7158done
7159if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7160
6c7a06a3 7161else
81ecdfbb 7162 ac_cv_search_tgetent=no
6c7a06a3 7163fi
81ecdfbb 7164rm conftest.$ac_ext
6c7a06a3
TT
7165LIBS=$ac_func_search_save_LIBS
7166fi
81ecdfbb
RW
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7168$as_echo "$ac_cv_search_tgetent" >&6; }
7169ac_res=$ac_cv_search_tgetent
7170if test "$ac_res" != no; then :
7171 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7172
06825bd1
MK
7173fi
7174
06825bd1 7175
bec39cab 7176if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7177 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7178fi
7179
3841debe 7180
81ecdfbb
RW
7181# Check whether --with-system-readline was given.
7182if test "${with_system_readline+set}" = set; then :
7183 withval=$with_system_readline;
7184fi
6a30b0a5 7185
6a30b0a5
AS
7186
7187if test "$with_system_readline" = yes; then
7188 READLINE=-lreadline
7189 READLINE_DEPS=
7190 READLINE_CFLAGS=
39037522 7191 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7192else
7193 READLINE='$(READLINE_DIR)/libreadline.a'
7194 READLINE_DEPS='$(READLINE)'
7195 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7196 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7197fi
7198
7199
7200
7201
7202
f997c383
SD
7203# Generate jit-reader.h
7204
7205# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7206TARGET_PTR=
7207
7208# The cast to long int works around a bug in the HP C Compiler
7209# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7210# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7211# This bug is HP SR number 8606223364.
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7213$as_echo_n "checking size of unsigned long long... " >&6; }
7214if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7215 $as_echo_n "(cached) " >&6
7216else
7217 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7218
7219else
7220 if test "$ac_cv_type_unsigned_long_long" = yes; then
7221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7223{ as_fn_set_status 77
7224as_fn_error "cannot compute sizeof (unsigned long long)
7225See \`config.log' for more details." "$LINENO" 5; }; }
7226 else
7227 ac_cv_sizeof_unsigned_long_long=0
7228 fi
7229fi
7230
7231fi
7232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7233$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7234
7235
7236
7237cat >>confdefs.h <<_ACEOF
7238#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7239_ACEOF
7240
7241
7242# The cast to long int works around a bug in the HP C Compiler
7243# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7244# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7245# This bug is HP SR number 8606223364.
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7247$as_echo_n "checking size of unsigned long... " >&6; }
7248if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7249 $as_echo_n "(cached) " >&6
7250else
7251 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7252
7253else
7254 if test "$ac_cv_type_unsigned_long" = yes; then
7255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7257{ as_fn_set_status 77
7258as_fn_error "cannot compute sizeof (unsigned long)
7259See \`config.log' for more details." "$LINENO" 5; }; }
7260 else
7261 ac_cv_sizeof_unsigned_long=0
7262 fi
7263fi
7264
7265fi
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7267$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7268
7269
7270
7271cat >>confdefs.h <<_ACEOF
7272#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7273_ACEOF
7274
7275
7276# The cast to long int works around a bug in the HP C Compiler
7277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7279# This bug is HP SR number 8606223364.
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7281$as_echo_n "checking size of unsigned __int128... " >&6; }
7282if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7283 $as_echo_n "(cached) " >&6
7284else
7285 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7286
7287else
7288 if test "$ac_cv_type_unsigned___int128" = yes; then
7289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7291{ as_fn_set_status 77
7292as_fn_error "cannot compute sizeof (unsigned __int128)
7293See \`config.log' for more details." "$LINENO" 5; }; }
7294 else
7295 ac_cv_sizeof_unsigned___int128=0
7296 fi
7297fi
7298
7299fi
7300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7301$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7302
7303
7304
7305cat >>confdefs.h <<_ACEOF
7306#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7307_ACEOF
7308
7309
7310
7311if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7312 TARGET_PTR="unsigned long"
7313elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7314 TARGET_PTR="unsigned long long"
7315elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7316 TARGET_PTR="unsigned __int128"
7317else
7318 TARGET_PTR="unsigned long"
7319fi
7320
7321
7322ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7323
7324
a2d08b9e
SD
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7326$as_echo_n "checking for library containing dlopen... " >&6; }
7327if test "${ac_cv_search_dlopen+set}" = set; then :
7328 $as_echo_n "(cached) " >&6
7329else
7330 ac_func_search_save_LIBS=$LIBS
7331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7332/* end confdefs.h. */
7333
7334/* Override any GCC internal prototype to avoid an error.
7335 Use char because int might match the return type of a GCC
7336 builtin and then its argument prototype would still apply. */
7337#ifdef __cplusplus
7338extern "C"
7339#endif
7340char dlopen ();
7341int
7342main ()
7343{
7344return dlopen ();
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349for ac_lib in '' dl; do
7350 if test -z "$ac_lib"; then
7351 ac_res="none required"
7352 else
7353 ac_res=-l$ac_lib
7354 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7355 fi
7356 if ac_fn_c_try_link "$LINENO"; then :
7357 ac_cv_search_dlopen=$ac_res
7358fi
7359rm -f core conftest.err conftest.$ac_objext \
7360 conftest$ac_exeext
7361 if test "${ac_cv_search_dlopen+set}" = set; then :
7362 break
7363fi
7364done
7365if test "${ac_cv_search_dlopen+set}" = set; then :
7366
7367else
7368 ac_cv_search_dlopen=no
7369fi
7370rm conftest.$ac_ext
7371LIBS=$ac_func_search_save_LIBS
7372fi
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7374$as_echo "$ac_cv_search_dlopen" >&6; }
7375ac_res=$ac_cv_search_dlopen
7376if test "$ac_res" != no; then :
7377 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7378
7379fi
7380
7381
39037522 7382
b8e0a31c
SD
7383
7384# Check whether --with-jit-reader-dir was given.
7385if test "${with_jit_reader_dir+set}" = set; then :
7386 withval=$with_jit_reader_dir;
7387 JIT_READER_DIR=$withval
7388else
7389 JIT_READER_DIR=${libdir}/gdb
7390fi
7391
7392
7393 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7394 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7395 ac_define_dir=`eval echo $JIT_READER_DIR`
7396 ac_define_dir=`eval echo $ac_define_dir`
7397
7398cat >>confdefs.h <<_ACEOF
7399#define JIT_READER_DIR "$ac_define_dir"
7400_ACEOF
7401
7402
7403
7404
7405 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7406 if test "x$prefix" = xNONE; then
7407 test_prefix=/usr/local
7408 else
7409 test_prefix=$prefix
7410 fi
7411 else
7412 test_prefix=$exec_prefix
7413 fi
7414 value=0
7415 case ${ac_define_dir} in
7416 "${test_prefix}"|"${test_prefix}/"*|\
7417 '${exec_prefix}'|'${exec_prefix}/'*)
7418 value=1
7419 ;;
7420 esac
7421
7422cat >>confdefs.h <<_ACEOF
7423#define JIT_READER_DIR_RELOCATABLE $value
7424_ACEOF
7425
7426
7427
7428
7429
81ecdfbb
RW
7430# Check whether --with-expat was given.
7431if test "${with_expat+set}" = set; then :
7432 withval=$with_expat;
5c39566f
DJ
7433else
7434 with_expat=auto
81ecdfbb
RW
7435fi
7436
7437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7438$as_echo_n "checking whether to use expat... " >&6; }
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7440$as_echo "$with_expat" >&6; }
5c39566f
DJ
7441
7442if test "${with_expat}" = no; then
81ecdfbb
RW
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7444$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7445 HAVE_LIBEXPAT=no
7446else
7447
3841debe
DJ
7448 if test "X$prefix" = "XNONE"; then
7449 acl_final_prefix="$ac_default_prefix"
7450 else
7451 acl_final_prefix="$prefix"
7452 fi
7453 if test "X$exec_prefix" = "XNONE"; then
7454 acl_final_exec_prefix='${prefix}'
7455 else
7456 acl_final_exec_prefix="$exec_prefix"
7457 fi
7458 acl_save_prefix="$prefix"
7459 prefix="$acl_final_prefix"
7460 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7461 prefix="$acl_save_prefix"
7462
7463
81ecdfbb
RW
7464# Check whether --with-gnu-ld was given.
7465if test "${with_gnu_ld+set}" = set; then :
7466 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7467else
7468 with_gnu_ld=no
81ecdfbb
RW
7469fi
7470
3841debe
DJ
7471# Prepare PATH_SEPARATOR.
7472# The user is always right.
7473if test "${PATH_SEPARATOR+set}" != set; then
7474 echo "#! /bin/sh" >conf$$.sh
7475 echo "exit 0" >>conf$$.sh
7476 chmod +x conf$$.sh
7477 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7478 PATH_SEPARATOR=';'
7479 else
7480 PATH_SEPARATOR=:
7481 fi
7482 rm -f conf$$.sh
7483fi
7484ac_prog=ld
7485if test "$GCC" = yes; then
7486 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7488$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7489 case $host in
7490 *-*-mingw*)
7491 # gcc leaves a trailing carriage return which upsets mingw
7492 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7493 *)
7494 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7495 esac
7496 case $ac_prog in
7497 # Accept absolute paths.
7498 [\\/]* | [A-Za-z]:[\\/]*)
7499 re_direlt='/[^/][^/]*/\.\./'
7500 # Canonicalize the path of ld
7501 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7502 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7503 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7504 done
7505 test -z "$LD" && LD="$ac_prog"
7506 ;;
7507 "")
7508 # If it fails, then pretend we aren't using GCC.
7509 ac_prog=ld
7510 ;;
7511 *)
7512 # If it is relative, then search for the first ld in PATH.
7513 with_gnu_ld=unknown
7514 ;;
7515 esac
7516elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7518$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7519else
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7521$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7522fi
81ecdfbb
RW
7523if test "${acl_cv_path_LD+set}" = set; then :
7524 $as_echo_n "(cached) " >&6
3841debe
DJ
7525else
7526 if test -z "$LD"; then
7527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7528 for ac_dir in $PATH; do
7529 test -z "$ac_dir" && ac_dir=.
7530 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7531 acl_cv_path_LD="$ac_dir/$ac_prog"
7532 # Check to see if the program is GNU ld. I'd rather use --version,
7533 # but apparently some GNU ld's only accept -v.
7534 # Break only if it was the GNU/non-GNU ld that we prefer.
7535 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7536 test "$with_gnu_ld" != no && break
7537 else
7538 test "$with_gnu_ld" != yes && break
7539 fi
7540 fi
7541 done
7542 IFS="$ac_save_ifs"
7543else
7544 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7545fi
7546fi
7547
7548LD="$acl_cv_path_LD"
7549if test -n "$LD"; then
81ecdfbb
RW
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7551$as_echo "$LD" >&6; }
3841debe 7552else
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
3841debe 7555fi
81ecdfbb
RW
7556test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7558$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7559if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7560 $as_echo_n "(cached) " >&6
3841debe
DJ
7561else
7562 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7563if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7564 acl_cv_prog_gnu_ld=yes
7565else
7566 acl_cv_prog_gnu_ld=no
7567fi
7568fi
81ecdfbb
RW
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7570$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7571with_gnu_ld=$acl_cv_prog_gnu_ld
7572
7573
7574
81ecdfbb
RW
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7576$as_echo_n "checking for shared library run path origin... " >&6; }
7577if test "${acl_cv_rpath+set}" = set; then :
7578 $as_echo_n "(cached) " >&6
3841debe
DJ
7579else
7580
7581 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7582 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7583 . ./conftest.sh
7584 rm -f ./conftest.sh
7585 acl_cv_rpath=done
7586
7587fi
81ecdfbb
RW
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7589$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7590 wl="$acl_cv_wl"
7591 libext="$acl_cv_libext"
7592 shlibext="$acl_cv_shlibext"
7593 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7594 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7595 hardcode_direct="$acl_cv_hardcode_direct"
7596 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7597 # Check whether --enable-rpath was given.
7598if test "${enable_rpath+set}" = set; then :
7599 enableval=$enable_rpath; :
3841debe
DJ
7600else
7601 enable_rpath=yes
81ecdfbb
RW
7602fi
7603
3841debe
DJ
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613 use_additional=yes
7614
7615 acl_save_prefix="$prefix"
7616 prefix="$acl_final_prefix"
7617 acl_save_exec_prefix="$exec_prefix"
7618 exec_prefix="$acl_final_exec_prefix"
7619
7620 eval additional_includedir=\"$includedir\"
7621 eval additional_libdir=\"$libdir\"
7622
7623 exec_prefix="$acl_save_exec_prefix"
7624 prefix="$acl_save_prefix"
7625
7626
81ecdfbb
RW
7627# Check whether --with-libexpat-prefix was given.
7628if test "${with_libexpat_prefix+set}" = set; then :
7629 withval=$with_libexpat_prefix;
3841debe
DJ
7630 if test "X$withval" = "Xno"; then
7631 use_additional=no
7632 else
7633 if test "X$withval" = "X"; then
7634
7635 acl_save_prefix="$prefix"
7636 prefix="$acl_final_prefix"
7637 acl_save_exec_prefix="$exec_prefix"
7638 exec_prefix="$acl_final_exec_prefix"
7639
7640 eval additional_includedir=\"$includedir\"
7641 eval additional_libdir=\"$libdir\"
7642
7643 exec_prefix="$acl_save_exec_prefix"
7644 prefix="$acl_save_prefix"
7645
7646 else
7647 additional_includedir="$withval/include"
7648 additional_libdir="$withval/lib"
7649 fi
7650 fi
7651
81ecdfbb
RW
7652fi
7653
3841debe
DJ
7654 LIBEXPAT=
7655 LTLIBEXPAT=
7656 INCEXPAT=
7657 rpathdirs=
7658 ltrpathdirs=
7659 names_already_handled=
7660 names_next_round='expat '
7661 while test -n "$names_next_round"; do
7662 names_this_round="$names_next_round"
7663 names_next_round=
7664 for name in $names_this_round; do
7665 already_handled=
7666 for n in $names_already_handled; do
7667 if test "$n" = "$name"; then
7668 already_handled=yes
7669 break
7670 fi
7671 done
7672 if test -z "$already_handled"; then
7673 names_already_handled="$names_already_handled $name"
7674 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7675 eval value=\"\$HAVE_LIB$uppername\"
7676 if test -n "$value"; then
7677 if test "$value" = yes; then
7678 eval value=\"\$LIB$uppername\"
7679 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7680 eval value=\"\$LTLIB$uppername\"
7681 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7682 else
7683 :
7684 fi
7685 else
7686 found_dir=
7687 found_la=
7688 found_so=
7689 found_a=
7690 if test $use_additional = yes; then
7691 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7692 found_dir="$additional_libdir"
7693 found_so="$additional_libdir/lib$name.$shlibext"
7694 if test -f "$additional_libdir/lib$name.la"; then
7695 found_la="$additional_libdir/lib$name.la"
7696 fi
7697 else
7698 if test -f "$additional_libdir/lib$name.$libext"; then
7699 found_dir="$additional_libdir"
7700 found_a="$additional_libdir/lib$name.$libext"
7701 if test -f "$additional_libdir/lib$name.la"; then
7702 found_la="$additional_libdir/lib$name.la"
7703 fi
7704 fi
7705 fi
7706 fi
7707 if test "X$found_dir" = "X"; then
7708 for x in $LDFLAGS $LTLIBEXPAT; do
7709
7710 acl_save_prefix="$prefix"
7711 prefix="$acl_final_prefix"
7712 acl_save_exec_prefix="$exec_prefix"
7713 exec_prefix="$acl_final_exec_prefix"
7714 eval x=\"$x\"
7715 exec_prefix="$acl_save_exec_prefix"
7716 prefix="$acl_save_prefix"
7717
7718 case "$x" in
7719 -L*)
7720 dir=`echo "X$x" | sed -e 's/^X-L//'`
7721 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7722 found_dir="$dir"
7723 found_so="$dir/lib$name.$shlibext"
7724 if test -f "$dir/lib$name.la"; then
7725 found_la="$dir/lib$name.la"
7726 fi
7727 else
7728 if test -f "$dir/lib$name.$libext"; then
7729 found_dir="$dir"
7730 found_a="$dir/lib$name.$libext"
7731 if test -f "$dir/lib$name.la"; then
7732 found_la="$dir/lib$name.la"
7733 fi
7734 fi
7735 fi
7736 ;;
7737 esac
7738 if test "X$found_dir" != "X"; then
7739 break
7740 fi
7741 done
7742 fi
7743 if test "X$found_dir" != "X"; then
7744 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7745 if test "X$found_so" != "X"; then
7746 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7747 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7748 else
7749 haveit=
7750 for x in $ltrpathdirs; do
7751 if test "X$x" = "X$found_dir"; then
7752 haveit=yes
7753 break
7754 fi
7755 done
7756 if test -z "$haveit"; then
7757 ltrpathdirs="$ltrpathdirs $found_dir"
7758 fi
7759 if test "$hardcode_direct" = yes; then
7760 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7761 else
7762 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7763 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7764 haveit=
7765 for x in $rpathdirs; do
7766 if test "X$x" = "X$found_dir"; then
7767 haveit=yes
7768 break
7769 fi
7770 done
7771 if test -z "$haveit"; then
7772 rpathdirs="$rpathdirs $found_dir"
7773 fi
7774 else
7775 haveit=
7776 for x in $LDFLAGS $LIBEXPAT; do
7777
7778 acl_save_prefix="$prefix"
7779 prefix="$acl_final_prefix"
7780 acl_save_exec_prefix="$exec_prefix"
7781 exec_prefix="$acl_final_exec_prefix"
7782 eval x=\"$x\"
7783 exec_prefix="$acl_save_exec_prefix"
7784 prefix="$acl_save_prefix"
7785
7786 if test "X$x" = "X-L$found_dir"; then
7787 haveit=yes
7788 break
7789 fi
7790 done
7791 if test -z "$haveit"; then
7792 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7793 fi
7794 if test "$hardcode_minus_L" != no; then
7795 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7796 else
7797 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7798 fi
7799 fi
7800 fi
7801 fi
7802 else
7803 if test "X$found_a" != "X"; then
7804 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7805 else
7806 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7807 fi
7808 fi
7809 additional_includedir=
7810 case "$found_dir" in
7811 */lib | */lib/)
7812 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7813 additional_includedir="$basedir/include"
7814 ;;
7815 esac
7816 if test "X$additional_includedir" != "X"; then
7817 if test "X$additional_includedir" != "X/usr/include"; then
7818 haveit=
7819 if test "X$additional_includedir" = "X/usr/local/include"; then
7820 if test -n "$GCC"; then
7821 case $host_os in
7822 linux*) haveit=yes;;
7823 esac
7824 fi
7825 fi
7826 if test -z "$haveit"; then
7827 for x in $CPPFLAGS $INCEXPAT; do
7828
7829 acl_save_prefix="$prefix"
7830 prefix="$acl_final_prefix"
7831 acl_save_exec_prefix="$exec_prefix"
7832 exec_prefix="$acl_final_exec_prefix"
7833 eval x=\"$x\"
7834 exec_prefix="$acl_save_exec_prefix"
7835 prefix="$acl_save_prefix"
7836
7837 if test "X$x" = "X-I$additional_includedir"; then
7838 haveit=yes
7839 break
7840 fi
7841 done
7842 if test -z "$haveit"; then
7843 if test -d "$additional_includedir"; then
7844 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7845 fi
7846 fi
7847 fi
7848 fi
7849 fi
7850 if test -n "$found_la"; then
7851 save_libdir="$libdir"
7852 case "$found_la" in
7853 */* | *\\*) . "$found_la" ;;
7854 *) . "./$found_la" ;;
7855 esac
7856 libdir="$save_libdir"
7857 for dep in $dependency_libs; do
7858 case "$dep" in
7859 -L*)
7860 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7861 if test "X$additional_libdir" != "X/usr/lib"; then
7862 haveit=
7863 if test "X$additional_libdir" = "X/usr/local/lib"; then
7864 if test -n "$GCC"; then
7865 case $host_os in
7866 linux*) haveit=yes;;
7867 esac
7868 fi
7869 fi
7870 if test -z "$haveit"; then
7871 haveit=
7872 for x in $LDFLAGS $LIBEXPAT; do
7873
7874 acl_save_prefix="$prefix"
7875 prefix="$acl_final_prefix"
7876 acl_save_exec_prefix="$exec_prefix"
7877 exec_prefix="$acl_final_exec_prefix"
7878 eval x=\"$x\"
7879 exec_prefix="$acl_save_exec_prefix"
7880 prefix="$acl_save_prefix"
7881
7882 if test "X$x" = "X-L$additional_libdir"; then
7883 haveit=yes
7884 break
7885 fi
7886 done
7887 if test -z "$haveit"; then
7888 if test -d "$additional_libdir"; then
7889 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7890 fi
7891 fi
7892 haveit=
7893 for x in $LDFLAGS $LTLIBEXPAT; do
7894
7895 acl_save_prefix="$prefix"
7896 prefix="$acl_final_prefix"
7897 acl_save_exec_prefix="$exec_prefix"
7898 exec_prefix="$acl_final_exec_prefix"
7899 eval x=\"$x\"
7900 exec_prefix="$acl_save_exec_prefix"
7901 prefix="$acl_save_prefix"
7902
7903 if test "X$x" = "X-L$additional_libdir"; then
7904 haveit=yes
7905 break
7906 fi
7907 done
7908 if test -z "$haveit"; then
7909 if test -d "$additional_libdir"; then
7910 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7911 fi
7912 fi
7913 fi
7914 fi
7915 ;;
7916 -R*)
7917 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7918 if test "$enable_rpath" != no; then
7919 haveit=
7920 for x in $rpathdirs; do
7921 if test "X$x" = "X$dir"; then
7922 haveit=yes
7923 break
7924 fi
7925 done
7926 if test -z "$haveit"; then
7927 rpathdirs="$rpathdirs $dir"
7928 fi
7929 haveit=
7930 for x in $ltrpathdirs; do
7931 if test "X$x" = "X$dir"; then
7932 haveit=yes
7933 break
7934 fi
7935 done
7936 if test -z "$haveit"; then
7937 ltrpathdirs="$ltrpathdirs $dir"
7938 fi
7939 fi
7940 ;;
7941 -l*)
7942 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7943 ;;
7944 *.la)
7945 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7946 ;;
7947 *)
7948 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7949 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7950 ;;
81ecdfbb
RW
7951 esac
7952 done
7953 fi
7954 else
7955 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7956 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7957 fi
7958 fi
7959 fi
7960 done
7961 done
7962 if test "X$rpathdirs" != "X"; then
7963 if test -n "$hardcode_libdir_separator"; then
7964 alldirs=
7965 for found_dir in $rpathdirs; do
7966 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7967 done
7968 acl_save_libdir="$libdir"
7969 libdir="$alldirs"
7970 eval flag=\"$hardcode_libdir_flag_spec\"
7971 libdir="$acl_save_libdir"
7972 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7973 else
7974 for found_dir in $rpathdirs; do
7975 acl_save_libdir="$libdir"
7976 libdir="$found_dir"
7977 eval flag=\"$hardcode_libdir_flag_spec\"
7978 libdir="$acl_save_libdir"
7979 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7980 done
7981 fi
7982 fi
7983 if test "X$ltrpathdirs" != "X"; then
7984 for found_dir in $ltrpathdirs; do
7985 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7986 done
7987 fi
a9322a30
TT
7988
7989
81ecdfbb 7990 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7991
81ecdfbb
RW
7992 for element in $INCEXPAT; do
7993 haveit=
7994 for x in $CPPFLAGS; do
a9322a30 7995
81ecdfbb
RW
7996 acl_save_prefix="$prefix"
7997 prefix="$acl_final_prefix"
7998 acl_save_exec_prefix="$exec_prefix"
7999 exec_prefix="$acl_final_exec_prefix"
8000 eval x=\"$x\"
8001 exec_prefix="$acl_save_exec_prefix"
8002 prefix="$acl_save_prefix"
a8111142 8003
81ecdfbb
RW
8004 if test "X$x" = "X$element"; then
8005 haveit=yes
8006 break
8007 fi
8008 done
8009 if test -z "$haveit"; then
8010 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8011 fi
8012 done
a9322a30
TT
8013
8014
81ecdfbb
RW
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8016$as_echo_n "checking for libexpat... " >&6; }
8017if test "${ac_cv_libexpat+set}" = set; then :
8018 $as_echo_n "(cached) " >&6
bec39cab 8019else
bec39cab 8020
81ecdfbb
RW
8021 ac_save_LIBS="$LIBS"
8022 LIBS="$LIBS $LIBEXPAT"
8023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8024/* end confdefs.h. */
81ecdfbb
RW
8025#include "expat.h"
8026int
8027main ()
8028{
8029XML_Parser p = XML_ParserCreate (0);
8030 ;
8031 return 0;
8032}
bec39cab 8033_ACEOF
81ecdfbb
RW
8034if ac_fn_c_try_link "$LINENO"; then :
8035 ac_cv_libexpat=yes
c906108c 8036else
81ecdfbb 8037 ac_cv_libexpat=no
bec39cab 8038fi
81ecdfbb
RW
8039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext
8041 LIBS="$ac_save_LIBS"
c906108c 8042
95ca63c4 8043fi
81ecdfbb
RW
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8045$as_echo "$ac_cv_libexpat" >&6; }
8046 if test "$ac_cv_libexpat" = yes; then
8047 HAVE_LIBEXPAT=yes
bec39cab 8048
81ecdfbb 8049$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8050
81ecdfbb
RW
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8052$as_echo_n "checking how to link with libexpat... " >&6; }
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8054$as_echo "$LIBEXPAT" >&6; }
8055 else
8056 HAVE_LIBEXPAT=no
8057 CPPFLAGS="$ac_save_CPPFLAGS"
8058 LIBEXPAT=
8059 LTLIBEXPAT=
8060 fi
95ca63c4
CF
8061
8062
8063
7cb9022a
MK
8064
8065
bec39cab 8066
81ecdfbb
RW
8067 if test "$HAVE_LIBEXPAT" != yes; then
8068 if test "$with_expat" = yes; then
8069 as_fn_error "expat is missing or unusable" "$LINENO" 5
8070 else
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8072$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8073 fi
8074 else
8075 save_LIBS=$LIBS
8076 LIBS="$LIBS $LIBEXPAT"
8077 for ac_func in XML_StopParser
8078do :
8079 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8080if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8081 cat >>confdefs.h <<_ACEOF
81ecdfbb 8082#define HAVE_XML_STOPPARSER 1
bec39cab 8083_ACEOF
95ca63c4 8084
bec39cab 8085fi
bec39cab 8086done
95ca63c4 8087
81ecdfbb
RW
8088 LIBS=$save_LIBS
8089 fi
a9322a30
TT
8090fi
8091
d344e670
DE
8092# --------------------- #
8093# Check for libpython. #
8094# --------------------- #
8095
a9322a30 8096
a9322a30
TT
8097
8098
ec685c5e 8099
0c4a4063 8100
81ecdfbb
RW
8101# Check whether --with-python was given.
8102if test "${with_python+set}" = set; then :
8103 withval=$with_python;
bec39cab 8104else
81ecdfbb 8105 with_python=auto
bec39cab 8106fi
bec39cab 8107
81ecdfbb
RW
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8109$as_echo_n "checking whether to use python... " >&6; }
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8111$as_echo "$with_python" >&6; }
9a156167 8112
81ecdfbb
RW
8113if test "${with_python}" = no; then
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8115$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8116 have_libpython=no
bec39cab 8117else
81ecdfbb 8118 case "${with_python}" in
8c85a4e2 8119 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8120 if test -d ${with_python}; then
8121 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8122 python_prog="${with_python}/bin/python"
0c4a4063 8123 python_prefix=
9c4ea6c5
JB
8124 # If python does not exit ${with_python}/bin, then try in
8125 # ${with_python}. On Windows/MinGW, this is where the Python
8126 # executable is.
8127 if test ! -x "${python_prog}"; then
8128 python_prog="${with_python}/python"
8129 python_prefix=
8130 fi
e7a30f46 8131 if test ! -x "${python_prog}"; then
ec685c5e
DE
8132 # Fall back to gdb 7.0/7.1 behaviour.
8133 python_prog=missing
0c4a4063 8134 python_prefix=${with_python}
ec685c5e 8135 fi
e7a30f46 8136 elif test -x "${with_python}"; then
ec685c5e
DE
8137 # While we can't run python compiled for $host (unless host == build),
8138 # the user could write a script that provides the needed information,
8139 # so we support that.
ec685c5e 8140 python_prog=${with_python}
0c4a4063 8141 python_prefix=
ec685c5e
DE
8142 else
8143 as_fn_error "invalid value for --with-python" "$LINENO" 5
8144 fi
81ecdfbb 8145 ;;
ec685c5e
DE
8146 */*)
8147 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8148 as_fn_error "invalid value for --with-python" "$LINENO" 5
8149 ;;
ec685c5e
DE
8150 *)
8151 # The user has either specified auto, yes, or the name of the python
8152 # program assumed to be in $PATH.
8153 python_prefix=
8154 case "${with_python}" in
8155 yes | auto)
8156 if test ${build} = ${host}; then
8157 # Extract the first word of "python", so it can be a program name with args.
8158set dummy python; ac_word=$2
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8160$as_echo_n "checking for $ac_word... " >&6; }
8161if test "${ac_cv_path_python_prog_path+set}" = set; then :
8162 $as_echo_n "(cached) " >&6
8163else
8164 case $python_prog_path in
8165 [\\/]* | ?:[\\/]*)
8166 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8167 ;;
8168 *)
8169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170for as_dir in $PATH
8171do
8172 IFS=$as_save_IFS
8173 test -z "$as_dir" && as_dir=.
8174 for ac_exec_ext in '' $ac_executable_extensions; do
8175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8176 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178 break 2
8179 fi
8180done
8181 done
8182IFS=$as_save_IFS
8183
8184 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8185 ;;
8186esac
8187fi
8188python_prog_path=$ac_cv_path_python_prog_path
8189if test -n "$python_prog_path"; then
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8191$as_echo "$python_prog_path" >&6; }
8192else
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
8195fi
8196
8197
8198 if test "${python_prog_path}" = missing; then
8199 python_prog=missing
8200 else
8201 python_prog=${python_prog_path}
8202 fi
8203 else
8204 # Not much we can do except assume the cross-compiler will find the
8205 # right files.
8206 python_prog=missing
8207 fi
8208 ;;
8209 *)
8210 # While we can't run python compiled for $host (unless host == build),
8211 # the user could write a script that provides the needed information,
8212 # so we support that.
8213 python_prog="${with_python}"
8214 # Extract the first word of "${python_prog}", so it can be a program name with args.
8215set dummy ${python_prog}; ac_word=$2
8216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8217$as_echo_n "checking for $ac_word... " >&6; }
8218if test "${ac_cv_path_python_prog_path+set}" = set; then :
8219 $as_echo_n "(cached) " >&6
8220else
8221 case $python_prog_path in
8222 [\\/]* | ?:[\\/]*)
8223 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8224 ;;
8225 *)
8226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8227for as_dir in $PATH
8228do
8229 IFS=$as_save_IFS
8230 test -z "$as_dir" && as_dir=.
8231 for ac_exec_ext in '' $ac_executable_extensions; do
8232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8233 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8235 break 2
8236 fi
8237done
8238 done
8239IFS=$as_save_IFS
8240
8241 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8242 ;;
8243esac
8244fi
8245python_prog_path=$ac_cv_path_python_prog_path
8246if test -n "$python_prog_path"; then
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8248$as_echo "$python_prog_path" >&6; }
8249else
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
8252fi
8253
8254
8255 if test "${python_prog_path}" = missing; then
8256 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8257 fi
8258 ;;
8259 esac
81ecdfbb
RW
8260 esac
8261
ec685c5e 8262 if test "${python_prog}" != missing; then
e7a30f46
DE
8263 # We have a python program to use, but it may be too old.
8264 # Don't flag an error for --with-python=auto (the default).
8265 have_python_config=yes
ec685c5e
DE
8266 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8267 if test $? != 0; then
e7a30f46
DE
8268 have_python_config=failed
8269 if test "${with_python}" != auto; then
8270 as_fn_error "failure running python-config --includes" "$LINENO" 5
8271 fi
ec685c5e
DE
8272 fi
8273 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8274 if test $? != 0; then
e7a30f46
DE
8275 have_python_config=failed
8276 if test "${with_python}" != auto; then
8277 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8278 fi
ec685c5e 8279 fi
0c4a4063
DE
8280 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8281 if test $? != 0; then
e7a30f46
DE
8282 have_python_config=failed
8283 if test "${with_python}" != auto; then
8284 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8285 fi
0c4a4063 8286 fi
ec685c5e 8287 else
ac534cba
JB
8288 # We do not have a python executable we can use to determine where
8289 # to find the Python headers and libs. We cannot guess the include
8290 # path from the python_prefix either, because that include path
8291 # depends on the Python version. So, there is nothing much we can
8292 # do except assume that the compiler will be able to find those files.
8293 python_includes=
8294 python_libs=
0c4a4063 8295 have_python_config=no
ec685c5e 8296 fi
bec39cab 8297
ec685c5e
DE
8298 # If we have python-config, only try the configuration it provides.
8299 # Otherwise fallback on the old way of trying different versions of
8300 # python in turn.
81ecdfbb 8301
ec685c5e
DE
8302 have_libpython=no
8303 if test "${have_python_config}" = yes; then
c1039e3c
JB
8304 # Determine the Python version by extracting "-lpython<version>"
8305 # part of the python_libs. <version> is usually X.Y with X and Y
8306 # being decimal numbers, but can also be XY (seen on Windows).
8307 #
8308 # The extraction is performed using sed with a regular expression.
8309 # Initially, the regexp used was using the '?' quantifier to make
8310 # the dot in the version number optional. Unfortunately, this
8311 # does not work with non-GNU versions of sed because, because of
8312 # what looks like a limitation (the '?' quantifier does not work
8313 # with back-references). We work around this limitation by using
8314 # the '*' quantifier instead. It means that, in theory, we might
8315 # match unexpected version strings such as "-lpython2..7", but
8316 # this seems unlikely in practice. And even if that happens,
8317 # an error will be triggered later on, when checking that version
8318 # number.
ec685c5e 8319 python_version=`echo " ${python_libs} " \
c1039e3c 8320 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8321 case "${python_version}" in
8322 python*)
ec685c5e
DE
8323
8324 version=${python_version}
8325
8326 new_CPPFLAGS=${python_includes}
8327 new_LIBS=${python_libs}
81ecdfbb
RW
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8329$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8330 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8331 save_LIBS=$LIBS
ec685c5e
DE
8332 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8333 LIBS="$LIBS $new_LIBS"
8334 found_usable_python=no
81ecdfbb 8335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8336/* end confdefs.h. */
ac534cba 8337#include "Python.h"
81ecdfbb
RW
8338int
8339main ()
8340{
8341Py_Initialize ();
8342 ;
8343 return 0;
8344}
bec39cab 8345_ACEOF
81ecdfbb 8346if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8347 have_libpython=${version}
8348 found_usable_python=yes
ac534cba
JB
8349 PYTHON_CPPFLAGS=$new_CPPFLAGS
8350 PYTHON_LIBS=$new_LIBS
9a156167 8351fi
81ecdfbb
RW
8352rm -f core conftest.err conftest.$ac_objext \
8353 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8354 CPPFLAGS=$save_CPPFLAGS
8355 LIBS=$save_LIBS
ec685c5e
DE
8356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8357$as_echo "${found_usable_python}" >&6; }
9a156167 8358
0c4a4063
DE
8359 ;;
8360 *)
ec685c5e 8361 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8362 ;;
8363 esac
e7a30f46 8364 elif test "${have_python_config}" != failed; then
ec685c5e 8365 if test "${have_libpython}" = no; then
9a156167 8366
420697bb
TT
8367 version=python2.7
8368
8369 new_CPPFLAGS=${python_includes}
8370 new_LIBS="${python_libs} -lpython2.7"
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8372$as_echo_n "checking for ${version}... " >&6; }
8373 save_CPPFLAGS=$CPPFLAGS
8374 save_LIBS=$LIBS
8375 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8376 LIBS="$LIBS $new_LIBS"
8377 found_usable_python=no
8378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379/* end confdefs.h. */
ac534cba 8380#include "Python.h"
420697bb
TT
8381int
8382main ()
8383{
8384Py_Initialize ();
8385 ;
8386 return 0;
8387}
8388_ACEOF
8389if ac_fn_c_try_link "$LINENO"; then :
8390 have_libpython=${version}
8391 found_usable_python=yes
ac534cba
JB
8392 PYTHON_CPPFLAGS=$new_CPPFLAGS
8393 PYTHON_LIBS=$new_LIBS
420697bb
TT
8394fi
8395rm -f core conftest.err conftest.$ac_objext \
8396 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8397 CPPFLAGS=$save_CPPFLAGS
8398 LIBS=$save_LIBS
420697bb
TT
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8400$as_echo "${found_usable_python}" >&6; }
8401
8402 fi
8403 if test "${have_libpython}" = no; then
8404
ec685c5e
DE
8405 version=python2.6
8406
8407 new_CPPFLAGS=${python_includes}
8408 new_LIBS="${python_libs} -lpython2.6"
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8410$as_echo_n "checking for ${version}... " >&6; }
8411 save_CPPFLAGS=$CPPFLAGS
8412 save_LIBS=$LIBS
8413 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8414 LIBS="$LIBS $new_LIBS"
8415 found_usable_python=no
8416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417/* end confdefs.h. */
ac534cba 8418#include "Python.h"
ec685c5e
DE
8419int
8420main ()
8421{
8422Py_Initialize ();
8423 ;
8424 return 0;
8425}
8426_ACEOF
8427if ac_fn_c_try_link "$LINENO"; then :
8428 have_libpython=${version}
8429 found_usable_python=yes
ac534cba
JB
8430 PYTHON_CPPFLAGS=$new_CPPFLAGS
8431 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8432fi
8433rm -f core conftest.err conftest.$ac_objext \
8434 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8435 CPPFLAGS=$save_CPPFLAGS
8436 LIBS=$save_LIBS
ec685c5e
DE
8437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8438$as_echo "${found_usable_python}" >&6; }
9a156167 8439
81ecdfbb 8440 fi
ec685c5e 8441 if test ${have_libpython} = no; then
9a156167 8442
81ecdfbb 8443 version=python2.5
9a156167 8444
ec685c5e
DE
8445 new_CPPFLAGS=${python_includes}
8446 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8448$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8449 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8450 save_LIBS=$LIBS
ec685c5e
DE
8451 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8452 LIBS="$LIBS $new_LIBS"
8453 found_usable_python=no
81ecdfbb 8454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8455/* end confdefs.h. */
ac534cba 8456#include "Python.h"
81ecdfbb
RW
8457int
8458main ()
8459{
8460Py_Initialize ();
8461 ;
8462 return 0;
8463}
436868fb 8464_ACEOF
81ecdfbb 8465if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8466 have_libpython=${version}
8467 found_usable_python=yes
ac534cba
JB
8468 PYTHON_CPPFLAGS=$new_CPPFLAGS
8469 PYTHON_LIBS=$new_LIBS
436868fb 8470fi
81ecdfbb
RW
8471rm -f core conftest.err conftest.$ac_objext \
8472 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8473 CPPFLAGS=$save_CPPFLAGS
8474 LIBS=$save_LIBS
ec685c5e
DE
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8476$as_echo "${found_usable_python}" >&6; }
a9322a30 8477
81ecdfbb 8478 fi
ec685c5e 8479 if test ${have_libpython} = no; then
a9322a30 8480
81ecdfbb 8481 version=python2.4
a9322a30 8482
ec685c5e
DE
8483 new_CPPFLAGS=${python_includes}
8484 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8486$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8487 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8488 save_LIBS=$LIBS
ec685c5e
DE
8489 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8490 LIBS="$LIBS $new_LIBS"
8491 found_usable_python=no
81ecdfbb 8492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8493/* end confdefs.h. */
ac534cba 8494#include "Python.h"
a9322a30
TT
8495int
8496main ()
8497{
81ecdfbb 8498Py_Initialize ();
a9322a30
TT
8499 ;
8500 return 0;
8501}
436868fb 8502_ACEOF
81ecdfbb 8503if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8504 have_libpython=${version}
8505 found_usable_python=yes
ac534cba
JB
8506 PYTHON_CPPFLAGS=$new_CPPFLAGS
8507 PYTHON_LIBS=$new_LIBS
436868fb 8508fi
81ecdfbb
RW
8509rm -f core conftest.err conftest.$ac_objext \
8510 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8511 CPPFLAGS=$save_CPPFLAGS
8512 LIBS=$save_LIBS
ec685c5e
DE
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8514$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8515
ec685c5e
DE
8516 fi
8517 fi
9c4ea6c5 8518 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8519
8520$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8521
9c4ea6c5 8522 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8523
8524$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8525
9c4ea6c5 8526 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8527
8528$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8529
9c4ea6c5 8530 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8531
8532$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8533
81ecdfbb 8534 fi
ec685c5e
DE
8535
8536 if test "${have_libpython}" = no; then
81ecdfbb
RW
8537 case "${with_python}" in
8538 yes)
8539 as_fn_error "python is missing or unusable" "$LINENO" 5
8540 ;;
8541 auto)
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8543$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8544 ;;
8545 *)
8546 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8547 ;;
8548 esac
0c4a4063
DE
8549 else
8550 if test -n "${python_prefix}"; then
8551
8552cat >>confdefs.h <<_ACEOF
8553#define WITH_PYTHON_PATH "${python_prefix}"
8554_ACEOF
8555
8556
8557 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8558 if test "x$prefix" = xNONE; then
8559 test_prefix=/usr/local
8560 else
8561 test_prefix=$prefix
8562 fi
8563 else
8564 test_prefix=$exec_prefix
8565 fi
8566 value=0
8567 case ${python_prefix} in
8568 "${test_prefix}"|"${test_prefix}/"*|\
8569 '${exec_prefix}'|'${exec_prefix}/'*)
8570 value=1
8571 ;;
8572 esac
8573
8574cat >>confdefs.h <<_ACEOF
8575#define PYTHON_PATH_RELOCATABLE $value
8576_ACEOF
8577
8578
8579 fi
81ecdfbb 8580 fi
436868fb 8581fi
436868fb 8582
ec685c5e 8583if test "${have_libpython}" != no; then
436868fb 8584
81ecdfbb 8585$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8586
81ecdfbb
RW
8587 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8588 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8589 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8590 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8591 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8592
81ecdfbb
RW
8593 # Flags needed to compile Python code (taken from python-config --cflags).
8594 # We cannot call python-config directly because it will output whatever was
8595 # used when compiling the Python interpreter itself, including flags which
8596 # would make the python-related objects be compiled differently from the
8597 # rest of GDB (e.g., -O2 and -fPIC).
8598 if test "${GCC}" = yes; then
8599 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8600 fi
436868fb 8601
81ecdfbb
RW
8602 if test "x${tentative_python_cflags}" != x; then
8603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8604$as_echo_n "checking compiler flags for python code... " >&6; }
8605 for flag in ${tentative_python_cflags}; do
8606 # Check that the compiler accepts it
8607 saved_CFLAGS="$CFLAGS"
8608 CFLAGS="$CFLAGS $flag"
8609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8610/* end confdefs.h. */
81ecdfbb 8611
a9322a30
TT
8612int
8613main ()
8614{
a9322a30
TT
8615
8616 ;
8617 return 0;
8618}
bec39cab 8619_ACEOF
81ecdfbb
RW
8620if ac_fn_c_try_compile "$LINENO"; then :
8621 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8622fi
81ecdfbb
RW
8623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8624 CFLAGS="$saved_CFLAGS"
8625 done
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8627$as_echo "${PYTHON_CFLAGS}" >&6; }
8628 fi
043b6510
JB
8629
8630 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8631 # #if _SGIAPI
8632 # #define siginfo __siginfo
8633 # #endif
8634 # The problem is that including Python causes some XOPEN macros to be
8635 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8636 # to false. So, we work around this issue by defining siginfo ourself
8637 # though the command-line.
c83393b9
JB
8638 #
8639 # On x64 Windows, Python's include headers, and pyconfig.h in
8640 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8641 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8642 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8643 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8644 # The issue was reported to the Python community, but still isn't
8645 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8646
043b6510
JB
8647 case "$gdb_host" in
8648 irix*) if test "${GCC}" = yes; then
8649 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8650 fi
8651 ;;
c83393b9
JB
8652 mingw64)
8653 if test "${GCC}" = yes; then
8654 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8655 fi
8656 ;;
043b6510 8657 esac
a8db4212
YPK
8658
8659 # Note that "python -m threading" cannot be used to check for
8660 # threading support due to a bug in Python 2.7.3
8661 # (http://bugs.python.org/issue15567).
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8663$as_echo_n "checking whether python supports threads... " >&6; }
8664 saved_CPPFLAGS="${CPPFLAGS}"
8665 CPPFLAGS="${PYTHON_CPPFLAGS}"
8666 # Note that the test is reversed so that python_has_threads=yes on
8667 # unexpected failures.
8668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h. */
8670
8671#include <Python.h>
8672#ifdef WITH_THREAD
8673# error
8674#endif
8675
8676_ACEOF
8677if ac_fn_c_try_cpp "$LINENO"; then :
8678 python_has_threads=no
8679else
8680 python_has_threads=yes
8681fi
8682rm -f conftest.err conftest.$ac_ext
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8684$as_echo "${python_has_threads}" >&6; }
8685 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 8686else
6dddc817
DE
8687 # Even if Python support is not compiled in, we need to have this file
8688 # included so that the "python" command, et.al., still exists.
8689 CONFIG_OBS="$CONFIG_OBS python.o"
8690 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 8691fi
9a156167 8692
ed3ef339
DE
8693
8694
4df42755
DE
8695 if test "${have_libpython}" != no; then
8696 HAVE_PYTHON_TRUE=
8697 HAVE_PYTHON_FALSE='#'
8698else
8699 HAVE_PYTHON_TRUE='#'
8700 HAVE_PYTHON_FALSE=
8701fi
8702
ed3ef339
DE
8703
8704# -------------------- #
8705# Check for libguile. #
8706# -------------------- #
8707
8708
e1402065
DE
8709
8710
8711
8712
8713# Check whether --with-guile was given.
8714if test "${with_guile+set}" = set; then :
8715 withval=$with_guile;
8716else
8717 with_guile=auto
8718fi
8719
8720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8721$as_echo_n "checking whether to use guile... " >&6; }
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8723$as_echo "$with_guile" >&6; }
8724
ed3ef339
DE
8725# Extract the first word of "pkg-config", so it can be a program name with args.
8726set dummy pkg-config; ac_word=$2
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728$as_echo_n "checking for $ac_word... " >&6; }
8729if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8730 $as_echo_n "(cached) " >&6
8731else
8732 case $pkg_config_prog_path in
8733 [\\/]* | ?:[\\/]*)
8734 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8735 ;;
8736 *)
8737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738for as_dir in $PATH
8739do
8740 IFS=$as_save_IFS
8741 test -z "$as_dir" && as_dir=.
8742 for ac_exec_ext in '' $ac_executable_extensions; do
8743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8744 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746 break 2
8747 fi
8748done
8749 done
8750IFS=$as_save_IFS
8751
8752 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8753 ;;
8754esac
8755fi
8756pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8757if test -n "$pkg_config_prog_path"; then
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8759$as_echo "$pkg_config_prog_path" >&6; }
8760else
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8762$as_echo "no" >&6; }
8763fi
8764
8765
8766
214ab2da 8767try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
8768have_libguile=no
8769case "${with_guile}" in
8770no)
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8772$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8773 ;;
8774auto)
e1402065
DE
8775 if test "${pkg_config_prog_path}" = "missing"; then
8776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8777$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8778 else
ed3ef339
DE
8779
8780 pkg_config=${pkg_config_prog_path}
8781 guile_version_list=${try_guile_versions}
8782 flag_errors=no
8783
ed3ef339
DE
8784 found_usable_guile=checking
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8786$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8787 for guile_version in ${guile_version_list}; do
8788 ${pkg_config} --exists ${guile_version} 2>/dev/null
8789 if test $? != 0; then
8790 continue
8791 fi
8792 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8793 if test $? != 0; then
8794 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8795 fi
8796 new_LIBS=`${pkg_config} --libs ${guile_version}`
8797 if test $? != 0; then
8798 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8799 fi
8800 found_usable_guile=${guile_version}
8801 break
8802 done
8803 if test "${found_usable_guile}" = "checking"; then
8804 if test "${flag_errors}" = "yes"; then
8805 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8806 else
8807 found_usable_guile=no
8808 fi
8809 fi
8810 if test "${found_usable_guile}" != no; then
8811 save_CPPFLAGS=$CPPFLAGS
8812 save_LIBS=$LIBS
8813 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8814 LIBS="$LIBS $new_LIBS"
8815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817#include "libguile.h"
8818int
8819main ()
8820{
8821scm_init_guile ();
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826if ac_fn_c_try_link "$LINENO"; then :
8827 have_libguile=yes
8828 GUILE_CPPFLAGS=$new_CPPFLAGS
8829 GUILE_LIBS=$new_LIBS
8830else
8831 found_usable_guile=no
8832fi
8833rm -f core conftest.err conftest.$ac_objext \
8834 conftest$ac_exeext conftest.$ac_ext
8835 CPPFLAGS=$save_CPPFLAGS
8836 LIBS=$save_LIBS
8837 if test "${found_usable_guile}" = no; then
8838 if test "${flag_errors}" = yes; then
8839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8841as_fn_error "linking guile version ${guile_version} test program failed
8842See \`config.log' for more details." "$LINENO" 5; }
8843 fi
8844 fi
8845 fi
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8847$as_echo "${found_usable_guile}" >&6; }
8848
e1402065 8849 fi
ed3ef339
DE
8850 ;;
8851yes)
e1402065
DE
8852 if test "${pkg_config_prog_path}" = "missing"; then
8853 as_fn_error "pkg-config not found" "$LINENO" 5
8854 fi
ed3ef339
DE
8855
8856 pkg_config=${pkg_config_prog_path}
8857 guile_version_list=${try_guile_versions}
8858 flag_errors=yes
8859
ed3ef339
DE
8860 found_usable_guile=checking
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8862$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8863 for guile_version in ${guile_version_list}; do
8864 ${pkg_config} --exists ${guile_version} 2>/dev/null
8865 if test $? != 0; then
8866 continue
8867 fi
8868 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8869 if test $? != 0; then
8870 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8871 fi
8872 new_LIBS=`${pkg_config} --libs ${guile_version}`
8873 if test $? != 0; then
8874 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8875 fi
8876 found_usable_guile=${guile_version}
8877 break
8878 done
8879 if test "${found_usable_guile}" = "checking"; then
8880 if test "${flag_errors}" = "yes"; then
8881 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8882 else
8883 found_usable_guile=no
8884 fi
8885 fi
8886 if test "${found_usable_guile}" != no; then
8887 save_CPPFLAGS=$CPPFLAGS
8888 save_LIBS=$LIBS
8889 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8890 LIBS="$LIBS $new_LIBS"
8891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8892/* end confdefs.h. */
8893#include "libguile.h"
8894int
8895main ()
8896{
8897scm_init_guile ();
8898 ;
8899 return 0;
8900}
8901_ACEOF
8902if ac_fn_c_try_link "$LINENO"; then :
8903 have_libguile=yes
8904 GUILE_CPPFLAGS=$new_CPPFLAGS
8905 GUILE_LIBS=$new_LIBS
8906else
8907 found_usable_guile=no
8908fi
8909rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
8911 CPPFLAGS=$save_CPPFLAGS
8912 LIBS=$save_LIBS
8913 if test "${found_usable_guile}" = no; then
8914 if test "${flag_errors}" = yes; then
8915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8917as_fn_error "linking guile version ${guile_version} test program failed
8918See \`config.log' for more details." "$LINENO" 5; }
8919 fi
8920 fi
8921 fi
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8923$as_echo "${found_usable_guile}" >&6; }
8924
8925 ;;
8926[\\/]* | ?:[\\/]*)
e1402065 8927 if test -x "${with_guile}"; then
ed3ef339
DE
8928
8929 pkg_config=${with_guile}
8930 guile_version_list=${try_guile_versions}
8931 flag_errors=yes
8932
ed3ef339
DE
8933 found_usable_guile=checking
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8935$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8936 for guile_version in ${guile_version_list}; do
8937 ${pkg_config} --exists ${guile_version} 2>/dev/null
8938 if test $? != 0; then
8939 continue
8940 fi
8941 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8942 if test $? != 0; then
8943 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8944 fi
8945 new_LIBS=`${pkg_config} --libs ${guile_version}`
8946 if test $? != 0; then
8947 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8948 fi
8949 found_usable_guile=${guile_version}
8950 break
8951 done
8952 if test "${found_usable_guile}" = "checking"; then
8953 if test "${flag_errors}" = "yes"; then
8954 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8955 else
8956 found_usable_guile=no
8957 fi
8958 fi
8959 if test "${found_usable_guile}" != no; then
8960 save_CPPFLAGS=$CPPFLAGS
8961 save_LIBS=$LIBS
8962 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8963 LIBS="$LIBS $new_LIBS"
8964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8965/* end confdefs.h. */
8966#include "libguile.h"
8967int
8968main ()
8969{
8970scm_init_guile ();
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975if ac_fn_c_try_link "$LINENO"; then :
8976 have_libguile=yes
8977 GUILE_CPPFLAGS=$new_CPPFLAGS
8978 GUILE_LIBS=$new_LIBS
8979else
8980 found_usable_guile=no
8981fi
8982rm -f core conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
8984 CPPFLAGS=$save_CPPFLAGS
8985 LIBS=$save_LIBS
8986 if test "${found_usable_guile}" = no; then
8987 if test "${flag_errors}" = yes; then
8988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8990as_fn_error "linking guile version ${guile_version} test program failed
8991See \`config.log' for more details." "$LINENO" 5; }
8992 fi
8993 fi
8994 fi
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8996$as_echo "${found_usable_guile}" >&6; }
8997
e1402065
DE
8998 else
8999 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9000 fi
ed3ef339
DE
9001 ;;
9002"" | */*)
9003 # Disallow --with=guile="" and --with-guile=foo/bar.
9004 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9005 ;;
9006*)
9007 # A space separate list of guile versions to try, in order.
e1402065
DE
9008 if test "${pkg_config_prog_path}" = "missing"; then
9009 as_fn_error "pkg-config not found" "$LINENO" 5
9010 fi
ed3ef339
DE
9011
9012 pkg_config=${pkg_config_prog_path}
9013 guile_version_list=${with_guile}
9014 flag_errors=yes
9015
ed3ef339
DE
9016 found_usable_guile=checking
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9018$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9019 for guile_version in ${guile_version_list}; do
9020 ${pkg_config} --exists ${guile_version} 2>/dev/null
9021 if test $? != 0; then
9022 continue
9023 fi
9024 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9025 if test $? != 0; then
9026 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9027 fi
9028 new_LIBS=`${pkg_config} --libs ${guile_version}`
9029 if test $? != 0; then
9030 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9031 fi
9032 found_usable_guile=${guile_version}
9033 break
9034 done
9035 if test "${found_usable_guile}" = "checking"; then
9036 if test "${flag_errors}" = "yes"; then
9037 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9038 else
9039 found_usable_guile=no
9040 fi
9041 fi
9042 if test "${found_usable_guile}" != no; then
9043 save_CPPFLAGS=$CPPFLAGS
9044 save_LIBS=$LIBS
9045 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9046 LIBS="$LIBS $new_LIBS"
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048/* end confdefs.h. */
9049#include "libguile.h"
9050int
9051main ()
9052{
9053scm_init_guile ();
9054 ;
9055 return 0;
9056}
9057_ACEOF
9058if ac_fn_c_try_link "$LINENO"; then :
9059 have_libguile=yes
9060 GUILE_CPPFLAGS=$new_CPPFLAGS
9061 GUILE_LIBS=$new_LIBS
9062else
9063 found_usable_guile=no
9064fi
9065rm -f core conftest.err conftest.$ac_objext \
9066 conftest$ac_exeext conftest.$ac_ext
9067 CPPFLAGS=$save_CPPFLAGS
9068 LIBS=$save_LIBS
9069 if test "${found_usable_guile}" = no; then
9070 if test "${flag_errors}" = yes; then
9071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9073as_fn_error "linking guile version ${guile_version} test program failed
9074See \`config.log' for more details." "$LINENO" 5; }
9075 fi
9076 fi
9077 fi
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9079$as_echo "${found_usable_guile}" >&6; }
9080
9081 ;;
9082esac
9083
e76c5d17
DE
9084if test "${have_libguile}" != no; then
9085
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9087$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9088if test "${ac_cv_guild_program_name+set}" = set; then :
9089 $as_echo_n "(cached) " >&6
9090else
9091 ac_cv_guild_program_name="`"${pkg_config_prog_path}" "${guile_version}" --variable guild`"
9092
9093 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9094 # the 'guild' and 'bindir' variables. In that case, try to guess
9095 # what the program name is, at the risk of getting it wrong if
9096 # Guile was configured with '--program-suffix' or similar.
9097 if test "x$ac_cv_guild_program_name" = "x"; then
9098 guile_exec_prefix="`"${pkg_config_prog_path}" "${guile_version}" --variable exec_prefix`"
9099 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9100 fi
9101
9102fi
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9104$as_echo "$ac_cv_guild_program_name" >&6; }
9105
9106 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9107 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9108 fi
9109
9110 GUILD="$ac_cv_guild_program_name"
9111
9112
9113
9114
9115 if test "$cross_compiling" = no; then
9116 GUILD_TARGET_FLAG=
9117 else
9118 GUILD_TARGET_FLAG="--target=$host"
9119 fi
9120
9121
9122
9123
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9125$as_echo_n "checking whether guild supports this host... " >&6; }
9126if test "${ac_cv_guild_ok+set}" = set; then :
9127 $as_echo_n "(cached) " >&6
9128else
9129 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9130 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9131 ac_cv_guild_ok=yes
9132 else
9133 ac_cv_guild_ok=no
9134 fi
9135fi
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9137$as_echo "$ac_cv_guild_ok" >&6; }
9138
9139 if test "$ac_cv_guild_ok" = no; then
9140 have_libguile=no
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9142$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9143 fi
9144fi
9145
ed3ef339
DE
9146if test "${have_libguile}" != no; then
9147
9148$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9149
9150 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9151 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9152 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9153 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9154 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9155
9156 save_LIBS="$LIBS"
9157 save_CPPFLAGS="$CPPFLAGS"
9158 LIBS="$GUILE_LIBS"
9159 CPPFLAGS="$GUILE_CPPFLAGS"
9160 for ac_func in scm_new_smob
9161do :
9162 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9163if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9164 cat >>confdefs.h <<_ACEOF
9165#define HAVE_SCM_NEW_SMOB 1
9166_ACEOF
9167
9168fi
9169done
9170
9171 LIBS="$save_LIBS"
9172 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9173else
9174 # Even if Guile support is not compiled in, we need to have these files
9175 # included.
9176 CONFIG_OBS="$CONFIG_OBS guile.o"
9177 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9178fi
9a156167 9179
ac534cba 9180
4df42755
DE
9181 if test "${have_libguile}" != no; then
9182 HAVE_GUILE_TRUE=
9183 HAVE_GUILE_FALSE='#'
9184else
9185 HAVE_GUILE_TRUE='#'
9186 HAVE_GUILE_FALSE=
9187fi
9188
ac534cba 9189
74edf516
DE
9190# PR 17185, see if we can get the libgc version to see if we need
9191# to apply the workaround.
9192for ac_header in gc/gc.h
9193do :
9194 ac_fn_c_check_header_mongrel "$LINENO" "gc/gc.h" "ac_cv_header_gc_gc_h" "$ac_includes_default"
9195if test "x$ac_cv_header_gc_gc_h" = x""yes; then :
9196 cat >>confdefs.h <<_ACEOF
9197#define HAVE_GC_GC_H 1
9198_ACEOF
9199
9200fi
9201
9202done
9203
9204for ac_func in setenv
9205do :
9206 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
9207if test "x$ac_cv_func_setenv" = x""yes; then :
9208 cat >>confdefs.h <<_ACEOF
9209#define HAVE_SETENV 1
9210_ACEOF
9211
9212fi
9213done
9214
9215
d344e670
DE
9216# --------------------- #
9217# Check for libmcheck. #
9218# --------------------- #
9219
a8db4212
YPK
9220# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9221# but turn it off if Python is enabled with threads, since -lmcheck is
9222# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9223# and for releases.
17ef446e
PA
9224if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9225 && $development; then
9226 libmcheck_default=yes
9227else
9228 libmcheck_default=no
a8db4212
YPK
9229fi
9230
17ef446e
PA
9231 # Check whether --enable-libmcheck was given.
9232if test "${enable_libmcheck+set}" = set; then :
9233 enableval=$enable_libmcheck; case "${enableval}" in
9234 yes | y) ENABLE_LIBMCHECK="yes" ;;
9235 no | n) ENABLE_LIBMCHECK="no" ;;
9236 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9237 esac
9238fi
9239
9240
9241 if test -z "${ENABLE_LIBMCHECK}"; then
9242 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9243 fi
17ef446e
PA
9244
9245 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9247$as_echo_n "checking for main in -lmcheck... " >&6; }
9248if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9249 $as_echo_n "(cached) " >&6
9250else
9251 ac_check_lib_save_LIBS=$LIBS
9252LIBS="-lmcheck $LIBS"
9253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9254/* end confdefs.h. */
9255
9256
9257int
9258main ()
9259{
9260return main ();
9261 ;
9262 return 0;
9263}
9264_ACEOF
9265if ac_fn_c_try_link "$LINENO"; then :
9266 ac_cv_lib_mcheck_main=yes
9267else
9268 ac_cv_lib_mcheck_main=no
9269fi
9270rm -f core conftest.err conftest.$ac_objext \
9271 conftest$ac_exeext conftest.$ac_ext
9272LIBS=$ac_check_lib_save_LIBS
9273fi
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9275$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9276if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9277 cat >>confdefs.h <<_ACEOF
9278#define HAVE_LIBMCHECK 1
9279_ACEOF
9280
9281 LIBS="-lmcheck $LIBS"
9282
9283fi
9284
17ef446e
PA
9285 fi
9286
9287
9288if test "$ENABLE_LIBMCHECK" = "yes" \
9289 -a "${have_libpython}" != "no" \
9290 -a "${python_has_threads}" = "yes" ; then
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9292$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9293fi
9294
81ecdfbb
RW
9295# ------------------------- #
9296# Checks for header files. #
9297# ------------------------- #
c890192f 9298
81ecdfbb
RW
9299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9300$as_echo_n "checking for ANSI C header files... " >&6; }
9301if test "${ac_cv_header_stdc+set}" = set; then :
9302 $as_echo_n "(cached) " >&6
bec39cab 9303else
81ecdfbb 9304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9305/* end confdefs.h. */
81ecdfbb
RW
9306#include <stdlib.h>
9307#include <stdarg.h>
9308#include <string.h>
9309#include <float.h>
9310
a9322a30
TT
9311int
9312main ()
9313{
a9322a30
TT
9314
9315 ;
9316 return 0;
9317}
bec39cab 9318_ACEOF
81ecdfbb
RW
9319if ac_fn_c_try_compile "$LINENO"; then :
9320 ac_cv_header_stdc=yes
bec39cab 9321else
81ecdfbb 9322 ac_cv_header_stdc=no
a9322a30 9323fi
81ecdfbb 9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9325
81ecdfbb
RW
9326if test $ac_cv_header_stdc = yes; then
9327 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9329/* end confdefs.h. */
9330#include <string.h>
bec39cab 9331
81ecdfbb
RW
9332_ACEOF
9333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9334 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9335
bec39cab 9336else
81ecdfbb
RW
9337 ac_cv_header_stdc=no
9338fi
9339rm -f conftest*
9340
9341fi
9342
9343if test $ac_cv_header_stdc = yes; then
9344 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9346/* end confdefs.h. */
9347#include <stdlib.h>
9348
bec39cab 9349_ACEOF
81ecdfbb
RW
9350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9351 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9352
81ecdfbb
RW
9353else
9354 ac_cv_header_stdc=no
9355fi
9356rm -f conftest*
bec39cab 9357
bec39cab 9358fi
81ecdfbb
RW
9359
9360if test $ac_cv_header_stdc = yes; then
9361 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9362 if test "$cross_compiling" = yes; then :
9363 :
bec39cab 9364else
81ecdfbb 9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9366/* end confdefs.h. */
81ecdfbb
RW
9367#include <ctype.h>
9368#include <stdlib.h>
9369#if ((' ' & 0x0FF) == 0x020)
9370# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9371# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9372#else
9373# define ISLOWER(c) \
9374 (('a' <= (c) && (c) <= 'i') \
9375 || ('j' <= (c) && (c) <= 'r') \
9376 || ('s' <= (c) && (c) <= 'z'))
9377# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9378#endif
9379
9380#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9381int
9382main ()
9383{
81ecdfbb
RW
9384 int i;
9385 for (i = 0; i < 256; i++)
9386 if (XOR (islower (i), ISLOWER (i))
9387 || toupper (i) != TOUPPER (i))
9388 return 2;
a9322a30
TT
9389 return 0;
9390}
bec39cab 9391_ACEOF
81ecdfbb
RW
9392if ac_fn_c_try_run "$LINENO"; then :
9393
bec39cab 9394else
81ecdfbb
RW
9395 ac_cv_header_stdc=no
9396fi
9397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9398 conftest.$ac_objext conftest.beam conftest.$ac_ext
9399fi
bec39cab 9400
bec39cab 9401fi
a9322a30 9402fi
81ecdfbb
RW
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9404$as_echo "$ac_cv_header_stdc" >&6; }
9405if test $ac_cv_header_stdc = yes; then
bec39cab 9406
81ecdfbb 9407$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9408
81ecdfbb 9409fi
bec39cab 9410
81ecdfbb 9411# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9412for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9413 thread_db.h \
0080a2f6 9414 sys/fault.h \
81ecdfbb
RW
9415 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9416 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9417 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9418 termios.h termio.h \
3447c057 9419 sgtty.h elf_hp.h \
9467110b 9420 dlfcn.h
81ecdfbb
RW
9421do :
9422 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9423ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9424eval as_val=\$$as_ac_Header
9425 if test "x$as_val" = x""yes; then :
bec39cab 9426 cat >>confdefs.h <<_ACEOF
81ecdfbb 9427#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9428_ACEOF
c906108c 9429
bec39cab 9430fi
81ecdfbb
RW
9431
9432done
9433
81ecdfbb
RW
9434for ac_header in sys/proc.h
9435do :
9436 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9437# include <sys/param.h>
9438#endif
c906108c 9439
81ecdfbb
RW
9440"
9441if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9442 cat >>confdefs.h <<_ACEOF
81ecdfbb 9443#define HAVE_SYS_PROC_H 1
bec39cab 9444_ACEOF
5ee754fc 9445
bec39cab 9446fi
81ecdfbb
RW
9447
9448done
9449
9450for ac_header in sys/user.h
9451do :
9452 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9453# include <sys/param.h>
a9322a30
TT
9454#endif
9455
81ecdfbb
RW
9456"
9457if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9458 cat >>confdefs.h <<_ACEOF
9459#define HAVE_SYS_USER_H 1
bec39cab 9460_ACEOF
bec39cab 9461
a9322a30 9462fi
bec39cab 9463
81ecdfbb 9464done
5ee754fc 9465
5ee754fc 9466
81ecdfbb
RW
9467# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9468# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9469# think that we don't have <curses.h> if we're using GCC.
9470case $host_os in
9471 solaris2.[789])
9472 if test "$GCC" = yes; then
9473
9474$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9475
9476 fi ;;
9477esac
9478for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9479do :
9480 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9481ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9482eval as_val=\$$as_ac_Header
9483 if test "x$as_val" = x""yes; then :
bec39cab 9484 cat >>confdefs.h <<_ACEOF
81ecdfbb 9485#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9486_ACEOF
5ee754fc
MK
9487
9488fi
9489
81ecdfbb 9490done
bec39cab 9491
81ecdfbb
RW
9492for ac_header in term.h
9493do :
9494 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9495# include <curses.h>
9496#endif
bec39cab 9497
81ecdfbb
RW
9498"
9499if test "x$ac_cv_header_term_h" = x""yes; then :
9500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_TERM_H 1
a8111142 9502_ACEOF
a8111142 9503
a8111142 9504fi
a8111142 9505
81ecdfbb 9506done
a8111142
TT
9507
9508
81ecdfbb
RW
9509# ------------------------- #
9510# Checks for declarations. #
9511# ------------------------- #
a9322a30 9512
81ecdfbb
RW
9513ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9514if test "x$ac_cv_have_decl_free" = x""yes; then :
9515 ac_have_decl=1
bec39cab 9516else
81ecdfbb
RW
9517 ac_have_decl=0
9518fi
9519
9520cat >>confdefs.h <<_ACEOF
9521#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9522_ACEOF
81ecdfbb
RW
9523ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9524if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9525 ac_have_decl=1
9526else
9527 ac_have_decl=0
9528fi
9529
9530cat >>confdefs.h <<_ACEOF
9531#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9532_ACEOF
81ecdfbb
RW
9533ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9534if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9535 ac_have_decl=1
bec39cab 9536else
81ecdfbb
RW
9537 ac_have_decl=0
9538fi
bec39cab 9539
81ecdfbb
RW
9540cat >>confdefs.h <<_ACEOF
9541#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9542_ACEOF
81ecdfbb
RW
9543ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9544if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9545 ac_have_decl=1
9546else
9547 ac_have_decl=0
5ee754fc 9548fi
81ecdfbb
RW
9549
9550cat >>confdefs.h <<_ACEOF
9551#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 9552_ACEOF
5ee754fc 9553
5ee754fc 9554
81ecdfbb
RW
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9556$as_echo_n "checking for LC_MESSAGES... " >&6; }
9557if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
bec39cab 9559else
81ecdfbb 9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9561/* end confdefs.h. */
81ecdfbb 9562#include <locale.h>
a9322a30
TT
9563int
9564main ()
9565{
81ecdfbb 9566return LC_MESSAGES
a9322a30
TT
9567 ;
9568 return 0;
9569}
bec39cab 9570_ACEOF
81ecdfbb
RW
9571if ac_fn_c_try_link "$LINENO"; then :
9572 am_cv_val_LC_MESSAGES=yes
bec39cab 9573else
81ecdfbb
RW
9574 am_cv_val_LC_MESSAGES=no
9575fi
9576rm -f core conftest.err conftest.$ac_objext \
9577 conftest$ac_exeext conftest.$ac_ext
9578fi
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9580$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9581 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9582
81ecdfbb
RW
9583$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9584
9585 fi
9586
9587
9588# ----------------------- #
9589# Checks for structures. #
9590# ----------------------- #
9591
9592ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9593if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9594
9595cat >>confdefs.h <<_ACEOF
9596#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9597_ACEOF
7eb368b3 9598
81ecdfbb 9599
7eb368b3 9600fi
81ecdfbb
RW
9601ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9602if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9603
a9322a30
TT
9604cat >>confdefs.h <<_ACEOF
9605#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9606_ACEOF
9607
a9322a30 9608
7eb368b3
NR
9609fi
9610
7eb368b3 9611
a9322a30
TT
9612# ------------------ #
9613# Checks for types. #
9614# ------------------ #
7eb368b3 9615
81ecdfbb
RW
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9617$as_echo_n "checking return type of signal handlers... " >&6; }
9618if test "${ac_cv_type_signal+set}" = set; then :
9619 $as_echo_n "(cached) " >&6
bec39cab 9620else
81ecdfbb 9621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9622/* end confdefs.h. */
a9322a30
TT
9623#include <sys/types.h>
9624#include <signal.h>
7cb9022a 9625
a9322a30
TT
9626int
9627main ()
9628{
81ecdfbb 9629return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9630 ;
9631 return 0;
9632}
bec39cab 9633_ACEOF
81ecdfbb
RW
9634if ac_fn_c_try_compile "$LINENO"; then :
9635 ac_cv_type_signal=int
bec39cab 9636else
81ecdfbb 9637 ac_cv_type_signal=void
bec39cab 9638fi
81ecdfbb 9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9640fi
81ecdfbb
RW
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9642$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9643
a9322a30
TT
9644cat >>confdefs.h <<_ACEOF
9645#define RETSIGTYPE $ac_cv_type_signal
9646_ACEOF
5ee754fc 9647
bec39cab 9648
81ecdfbb 9649ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9650#include <sys/socket.h>
9651
81ecdfbb
RW
9652"
9653if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9654
a9322a30
TT
9655cat >>confdefs.h <<_ACEOF
9656#define HAVE_SOCKLEN_T 1
9657_ACEOF
9658
9659
9660fi
9661
9662
9663# ------------------------------------- #
9664# Checks for compiler characteristics. #
9665# ------------------------------------- #
9666
81ecdfbb
RW
9667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9668$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9669if test "${ac_cv_c_const+set}" = set; then :
9670 $as_echo_n "(cached) " >&6
a9322a30 9671else
81ecdfbb 9672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9673/* end confdefs.h. */
a9322a30
TT
9674
9675int
9676main ()
9677{
9678/* FIXME: Include the comments suggested by Paul. */
9679#ifndef __cplusplus
9680 /* Ultrix mips cc rejects this. */
9681 typedef int charset[2];
81ecdfbb 9682 const charset cs;
a9322a30 9683 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9684 char const *const *pcpcc;
9685 char **ppc;
a9322a30
TT
9686 /* NEC SVR4.0.2 mips cc rejects this. */
9687 struct point {int x, y;};
9688 static struct point const zero = {0,0};
9689 /* AIX XL C 1.02.0.0 rejects this.
9690 It does not let you subtract one const X* pointer from another in
9691 an arm of an if-expression whose if-part is not a constant
9692 expression */
9693 const char *g = "string";
81ecdfbb 9694 pcpcc = &g + (g ? g-g : 0);
a9322a30 9695 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9696 ++pcpcc;
9697 ppc = (char**) pcpcc;
9698 pcpcc = (char const *const *) ppc;
a9322a30
TT
9699 { /* SCO 3.2v4 cc rejects this. */
9700 char *t;
9701 char const *s = 0 ? (char *) 0 : (char const *) 0;
9702
9703 *t++ = 0;
81ecdfbb 9704 if (s) return 0;
a9322a30
TT
9705 }
9706 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9707 int x[] = {25, 17};
9708 const int *foo = &x[0];
9709 ++foo;
9710 }
9711 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9712 typedef const int *iptr;
9713 iptr p = 0;
9714 ++p;
9715 }
9716 { /* AIX XL C 1.02.0.0 rejects this saying
9717 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9718 struct s { int j; const int *ap[3]; };
9719 struct s *b; b->j = 5;
9720 }
9721 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9722 const int foo = 10;
81ecdfbb 9723 if (!foo) return 0;
a9322a30 9724 }
81ecdfbb 9725 return !cs[0] && !zero.x;
a9322a30
TT
9726#endif
9727
9728 ;
9729 return 0;
9730}
bec39cab 9731_ACEOF
81ecdfbb 9732if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9733 ac_cv_c_const=yes
5ee754fc 9734else
81ecdfbb 9735 ac_cv_c_const=no
5ee754fc 9736fi
81ecdfbb 9737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9738fi
81ecdfbb
RW
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9740$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9741if test $ac_cv_c_const = no; then
bec39cab 9742
81ecdfbb 9743$as_echo "#define const /**/" >>confdefs.h
bec39cab 9744
5ee754fc 9745fi
bec39cab 9746
81ecdfbb
RW
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9748$as_echo_n "checking for inline... " >&6; }
9749if test "${ac_cv_c_inline+set}" = set; then :
9750 $as_echo_n "(cached) " >&6
bec39cab 9751else
a9322a30
TT
9752 ac_cv_c_inline=no
9753for ac_kw in inline __inline__ __inline; do
81ecdfbb 9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9755/* end confdefs.h. */
a9322a30
TT
9756#ifndef __cplusplus
9757typedef int foo_t;
9758static $ac_kw foo_t static_foo () {return 0; }
9759$ac_kw foo_t foo () {return 0; }
9760#endif
9761
bec39cab 9762_ACEOF
81ecdfbb
RW
9763if ac_fn_c_try_compile "$LINENO"; then :
9764 ac_cv_c_inline=$ac_kw
bec39cab 9765fi
81ecdfbb
RW
9766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9767 test "$ac_cv_c_inline" != no && break
a9322a30 9768done
bec39cab 9769
5ee754fc 9770fi
81ecdfbb
RW
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9772$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9773
a9322a30
TT
9774case $ac_cv_c_inline in
9775 inline | yes) ;;
9776 *)
9777 case $ac_cv_c_inline in
9778 no) ac_val=;;
9779 *) ac_val=$ac_cv_c_inline;;
9780 esac
9781 cat >>confdefs.h <<_ACEOF
9782#ifndef __cplusplus
9783#define inline $ac_val
9784#endif
9785_ACEOF
bec39cab
AC
9786 ;;
9787esac
bec39cab 9788
81ecdfbb
RW
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9790$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9791if test "${ac_cv_c_bigendian+set}" = set; then :
9792 $as_echo_n "(cached) " >&6
bec39cab 9793else
81ecdfbb
RW
9794 ac_cv_c_bigendian=unknown
9795 # See if we're dealing with a universal compiler.
9796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9797/* end confdefs.h. */
9798#ifndef __APPLE_CC__
9799 not a universal capable compiler
9800 #endif
9801 typedef int dummy;
9802
9803_ACEOF
9804if ac_fn_c_try_compile "$LINENO"; then :
9805
9806 # Check for potential -arch flags. It is not universal unless
9807 # there are at least two -arch flags with different values.
9808 ac_arch=
9809 ac_prev=
9810 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9811 if test -n "$ac_prev"; then
9812 case $ac_word in
9813 i?86 | x86_64 | ppc | ppc64)
9814 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9815 ac_arch=$ac_word
9816 else
9817 ac_cv_c_bigendian=universal
9818 break
9819 fi
9820 ;;
9821 esac
9822 ac_prev=
9823 elif test "x$ac_word" = "x-arch"; then
9824 ac_prev=arch
9825 fi
9826 done
9827fi
9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9829 if test $ac_cv_c_bigendian = unknown; then
9830 # See if sys/param.h defines the BYTE_ORDER macro.
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9832/* end confdefs.h. */
a9322a30 9833#include <sys/types.h>
81ecdfbb 9834 #include <sys/param.h>
a9322a30
TT
9835
9836int
9837main ()
9838{
81ecdfbb
RW
9839#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9840 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9841 && LITTLE_ENDIAN)
9842 bogus endian macros
9843 #endif
a9322a30
TT
9844
9845 ;
9846 return 0;
9847}
bec39cab 9848_ACEOF
81ecdfbb 9849if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9850 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9852/* end confdefs.h. */
a9322a30 9853#include <sys/types.h>
81ecdfbb 9854 #include <sys/param.h>
a9322a30
TT
9855
9856int
9857main ()
9858{
9859#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9860 not big endian
9861 #endif
a9322a30
TT
9862
9863 ;
9864 return 0;
9865}
bec39cab 9866_ACEOF
81ecdfbb 9867if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9868 ac_cv_c_bigendian=yes
5ee754fc 9869else
81ecdfbb 9870 ac_cv_c_bigendian=no
5ee754fc 9871fi
81ecdfbb
RW
9872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9873fi
9874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9875 fi
9876 if test $ac_cv_c_bigendian = unknown; then
9877 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9879/* end confdefs.h. */
9880#include <limits.h>
bec39cab 9881
81ecdfbb
RW
9882int
9883main ()
9884{
9885#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9886 bogus endian macros
9887 #endif
9888
9889 ;
9890 return 0;
9891}
7eb368b3 9892_ACEOF
81ecdfbb
RW
9893if ac_fn_c_try_compile "$LINENO"; then :
9894 # It does; now see whether it defined to _BIG_ENDIAN or not.
9895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9896/* end confdefs.h. */
81ecdfbb
RW
9897#include <limits.h>
9898
7eb368b3
NR
9899int
9900main ()
9901{
81ecdfbb
RW
9902#ifndef _BIG_ENDIAN
9903 not big endian
9904 #endif
9905
7eb368b3
NR
9906 ;
9907 return 0;
9908}
9909_ACEOF
81ecdfbb 9910if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9911 ac_cv_c_bigendian=yes
81ecdfbb
RW
9912else
9913 ac_cv_c_bigendian=no
a9322a30 9914fi
81ecdfbb 9915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9916fi
81ecdfbb
RW
9917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9918 fi
9919 if test $ac_cv_c_bigendian = unknown; then
9920 # Compile a test program.
9921 if test "$cross_compiling" = yes; then :
9922 # Try to guess by grepping values from an object file.
9923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924/* end confdefs.h. */
9925short int ascii_mm[] =
9926 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9927 short int ascii_ii[] =
9928 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9929 int use_ascii (int i) {
9930 return ascii_mm[i] + ascii_ii[i];
9931 }
9932 short int ebcdic_ii[] =
9933 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9934 short int ebcdic_mm[] =
9935 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9936 int use_ebcdic (int i) {
9937 return ebcdic_mm[i] + ebcdic_ii[i];
9938 }
9939 extern int foo;
7eb368b3 9940
81ecdfbb
RW
9941int
9942main ()
9943{
9944return use_ascii (foo) == use_ebcdic (foo);
9945 ;
9946 return 0;
9947}
9948_ACEOF
9949if ac_fn_c_try_compile "$LINENO"; then :
9950 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9951 ac_cv_c_bigendian=yes
9952 fi
9953 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9954 if test "$ac_cv_c_bigendian" = unknown; then
9955 ac_cv_c_bigendian=no
9956 else
9957 # finding both strings is unlikely to happen, but who knows?
9958 ac_cv_c_bigendian=unknown
9959 fi
9960 fi
7eb368b3 9961fi
81ecdfbb 9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9963else
81ecdfbb 9964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9965/* end confdefs.h. */
81ecdfbb 9966$ac_includes_default
d3ea6809
MM
9967int
9968main ()
9969{
81ecdfbb
RW
9970
9971 /* Are we little or big endian? From Harbison&Steele. */
9972 union
9973 {
9974 long int l;
9975 char c[sizeof (long int)];
9976 } u;
9977 u.l = 1;
9978 return u.c[sizeof (long int) - 1] == 1;
9979
9980 ;
9981 return 0;
d3ea6809
MM
9982}
9983_ACEOF
81ecdfbb 9984if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9985 ac_cv_c_bigendian=no
d3ea6809 9986else
81ecdfbb 9987 ac_cv_c_bigendian=yes
d3ea6809 9988fi
81ecdfbb
RW
9989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9990 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9991fi
a9322a30 9992
81ecdfbb
RW
9993 fi
9994fi
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9996$as_echo "$ac_cv_c_bigendian" >&6; }
9997 case $ac_cv_c_bigendian in #(
9998 yes)
9999 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10000;; #(
10001 no)
10002 ;; #(
10003 universal)
10004
10005$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10006
10007 ;; #(
10008 *)
10009 as_fn_error "unknown endianness
10010 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10011 esac
d3ea6809
MM
10012
10013
a9322a30
TT
10014# ------------------------------ #
10015# Checks for library functions. #
10016# ------------------------------ #
d3ea6809 10017
a9322a30
TT
10018# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10019# for constant arguments. Useless!
81ecdfbb
RW
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10021$as_echo_n "checking for working alloca.h... " >&6; }
10022if test "${ac_cv_working_alloca_h+set}" = set; then :
10023 $as_echo_n "(cached) " >&6
d3ea6809 10024else
81ecdfbb 10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 10026/* end confdefs.h. */
a9322a30 10027#include <alloca.h>
bec39cab
AC
10028int
10029main ()
10030{
a9322a30 10031char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 10032 if (p) return 0;
bec39cab
AC
10033 ;
10034 return 0;
10035}
10036_ACEOF
81ecdfbb 10037if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10038 ac_cv_working_alloca_h=yes
bec39cab 10039else
81ecdfbb 10040 ac_cv_working_alloca_h=no
bec39cab 10041fi
81ecdfbb
RW
10042rm -f core conftest.err conftest.$ac_objext \
10043 conftest$ac_exeext conftest.$ac_ext
bec39cab 10044fi
81ecdfbb
RW
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10046$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
10047if test $ac_cv_working_alloca_h = yes; then
10048
81ecdfbb 10049$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 10050
c906108c 10051fi
bec39cab 10052
81ecdfbb
RW
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10054$as_echo_n "checking for alloca... " >&6; }
10055if test "${ac_cv_func_alloca_works+set}" = set; then :
10056 $as_echo_n "(cached) " >&6
bec39cab 10057else
81ecdfbb 10058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10059/* end confdefs.h. */
a9322a30
TT
10060#ifdef __GNUC__
10061# define alloca __builtin_alloca
b4e70030 10062#else
a9322a30
TT
10063# ifdef _MSC_VER
10064# include <malloc.h>
10065# define alloca _alloca
10066# else
81ecdfbb 10067# ifdef HAVE_ALLOCA_H
a9322a30
TT
10068# include <alloca.h>
10069# else
10070# ifdef _AIX
10071 #pragma alloca
10072# else
10073# ifndef alloca /* predefined by HP cc +Olibcalls */
10074char *alloca ();
10075# endif
10076# endif
10077# endif
10078# endif
c906108c 10079#endif
97bf5e38 10080
bec39cab
AC
10081int
10082main ()
10083{
a9322a30 10084char *p = (char *) alloca (1);
81ecdfbb 10085 if (p) return 0;
bec39cab
AC
10086 ;
10087 return 0;
10088}
10089_ACEOF
81ecdfbb 10090if ac_fn_c_try_link "$LINENO"; then :
a9322a30 10091 ac_cv_func_alloca_works=yes
bec39cab 10092else
81ecdfbb 10093 ac_cv_func_alloca_works=no
bec39cab 10094fi
81ecdfbb
RW
10095rm -f core conftest.err conftest.$ac_objext \
10096 conftest$ac_exeext conftest.$ac_ext
bec39cab 10097fi
81ecdfbb
RW
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10099$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
10100
10101if test $ac_cv_func_alloca_works = yes; then
10102
81ecdfbb 10103$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 10104
a9322a30
TT
10105else
10106 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10107# that cause trouble. Some versions do not even contain alloca or
10108# contain a buggy version. If you still want to use their alloca,
10109# use ar to extract alloca.o from them instead of compiling alloca.c.
10110
81ecdfbb 10111ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 10112
81ecdfbb 10113$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 10114
bec39cab 10115
81ecdfbb
RW
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10117$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10118if test "${ac_cv_os_cray+set}" = set; then :
10119 $as_echo_n "(cached) " >&6
a9322a30 10120else
81ecdfbb 10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 10122/* end confdefs.h. */
81ecdfbb 10123#if defined CRAY && ! defined CRAY2
a9322a30
TT
10124webecray
10125#else
10126wenotbecray
10127#endif
10128
10129_ACEOF
10130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10131 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10132 ac_cv_os_cray=yes
10133else
81ecdfbb 10134 ac_cv_os_cray=no
bec39cab 10135fi
81ecdfbb
RW
10136rm -f conftest*
10137
bec39cab 10138fi
81ecdfbb
RW
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10140$as_echo "$ac_cv_os_cray" >&6; }
10141if test $ac_cv_os_cray = yes; then
10142 for ac_func in _getb67 GETB67 getb67; do
10143 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10144ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10145eval as_val=\$$as_ac_var
10146 if test "x$as_val" = x""yes; then :
a9322a30
TT
10147
10148cat >>confdefs.h <<_ACEOF
10149#define CRAY_STACKSEG_END $ac_func
bec39cab 10150_ACEOF
c906108c 10151
a9322a30 10152 break
c906108c
SS
10153fi
10154
a9322a30
TT
10155 done
10156fi
bec39cab 10157
81ecdfbb
RW
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10159$as_echo_n "checking stack direction for C alloca... " >&6; }
10160if test "${ac_cv_c_stack_direction+set}" = set; then :
10161 $as_echo_n "(cached) " >&6
a9322a30 10162else
81ecdfbb 10163 if test "$cross_compiling" = yes; then :
a9322a30 10164 ac_cv_c_stack_direction=0
bec39cab 10165else
81ecdfbb 10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10167/* end confdefs.h. */
81ecdfbb 10168$ac_includes_default
a9322a30
TT
10169int
10170find_stack_direction ()
b4e70030 10171{
a9322a30
TT
10172 static char *addr = 0;
10173 auto char dummy;
10174 if (addr == 0)
10175 {
10176 addr = &dummy;
10177 return find_stack_direction ();
10178 }
10179 else
10180 return (&dummy > addr) ? 1 : -1;
b4e70030 10181}
b757528f 10182
bec39cab
AC
10183int
10184main ()
10185{
81ecdfbb 10186 return find_stack_direction () < 0;
bec39cab
AC
10187}
10188_ACEOF
81ecdfbb 10189if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10190 ac_cv_c_stack_direction=1
10191else
81ecdfbb 10192 ac_cv_c_stack_direction=-1
a9322a30 10193fi
81ecdfbb
RW
10194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10195 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10196fi
a9322a30 10197
81ecdfbb
RW
10198fi
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10200$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10201cat >>confdefs.h <<_ACEOF
10202#define STACK_DIRECTION $ac_cv_c_stack_direction
10203_ACEOF
10204
10205
10206fi
10207
a9322a30 10208for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10209do :
10210 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10211ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10212eval as_val=\$$as_ac_Header
10213 if test "x$as_val" = x""yes; then :
bec39cab 10214 cat >>confdefs.h <<_ACEOF
81ecdfbb 10215#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10216_ACEOF
b757528f 10217
b757528f 10218fi
bec39cab 10219
a9322a30 10220done
a3828db0 10221
a9322a30 10222for ac_func in getpagesize
81ecdfbb
RW
10223do :
10224 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10225if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10226 cat >>confdefs.h <<_ACEOF
81ecdfbb 10227#define HAVE_GETPAGESIZE 1
bec39cab 10228_ACEOF
bcb3dc3d 10229
bcb3dc3d
MK
10230fi
10231done
10232
81ecdfbb
RW
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10234$as_echo_n "checking for working mmap... " >&6; }
10235if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10236 $as_echo_n "(cached) " >&6
a9322a30 10237else
81ecdfbb 10238 if test "$cross_compiling" = yes; then :
a9322a30 10239 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10240else
81ecdfbb 10241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10242/* end confdefs.h. */
a9322a30
TT
10243$ac_includes_default
10244/* malloc might have been renamed as rpl_malloc. */
10245#undef malloc
bec39cab 10246
a9322a30
TT
10247/* Thanks to Mike Haertel and Jim Avera for this test.
10248 Here is a matrix of mmap possibilities:
10249 mmap private not fixed
10250 mmap private fixed at somewhere currently unmapped
10251 mmap private fixed at somewhere already mapped
10252 mmap shared not fixed
10253 mmap shared fixed at somewhere currently unmapped
10254 mmap shared fixed at somewhere already mapped
10255 For private mappings, we should verify that changes cannot be read()
10256 back from the file, nor mmap's back from the file at a different
10257 address. (There have been systems where private was not correctly
10258 implemented like the infamous i386 svr4.0, and systems where the
10259 VM page cache was not coherent with the file system buffer cache
10260 like early versions of FreeBSD and possibly contemporary NetBSD.)
10261 For shared mappings, we should conversely verify that changes get
10262 propagated back to all the places they're supposed to be.
bec39cab 10263
a9322a30
TT
10264 Grep wants private fixed already mapped.
10265 The main things grep needs to know about mmap are:
10266 * does it exist and is it safe to write into the mmap'd area
10267 * how to use it (BSD variants) */
8b9cf735 10268
a9322a30
TT
10269#include <fcntl.h>
10270#include <sys/mman.h>
8b9cf735 10271
81ecdfbb 10272#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10273char *malloc ();
a3828db0
MK
10274#endif
10275
a9322a30 10276/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10277#ifndef HAVE_GETPAGESIZE
a9322a30 10278/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10279# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10280# define HAVE_SYS_PARAM_H 1
10281# endif
10282
10283# ifdef _SC_PAGESIZE
10284# define getpagesize() sysconf(_SC_PAGESIZE)
10285# else /* no _SC_PAGESIZE */
81ecdfbb 10286# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10287# include <sys/param.h>
10288# ifdef EXEC_PAGESIZE
10289# define getpagesize() EXEC_PAGESIZE
10290# else /* no EXEC_PAGESIZE */
10291# ifdef NBPG
10292# define getpagesize() NBPG * CLSIZE
10293# ifndef CLSIZE
10294# define CLSIZE 1
10295# endif /* no CLSIZE */
10296# else /* no NBPG */
10297# ifdef NBPC
10298# define getpagesize() NBPC
10299# else /* no NBPC */
10300# ifdef PAGESIZE
10301# define getpagesize() PAGESIZE
10302# endif /* PAGESIZE */
10303# endif /* no NBPC */
10304# endif /* no NBPG */
10305# endif /* no EXEC_PAGESIZE */
10306# else /* no HAVE_SYS_PARAM_H */
10307# define getpagesize() 8192 /* punt totally */
10308# endif /* no HAVE_SYS_PARAM_H */
10309# endif /* no _SC_PAGESIZE */
10310
10311#endif /* no HAVE_GETPAGESIZE */
10312
bec39cab
AC
10313int
10314main ()
10315{
a9322a30
TT
10316 char *data, *data2, *data3;
10317 int i, pagesize;
10318 int fd;
10319
10320 pagesize = getpagesize ();
10321
10322 /* First, make a file with some known garbage in it. */
10323 data = (char *) malloc (pagesize);
10324 if (!data)
81ecdfbb 10325 return 1;
a9322a30
TT
10326 for (i = 0; i < pagesize; ++i)
10327 *(data + i) = rand ();
10328 umask (0);
10329 fd = creat ("conftest.mmap", 0600);
10330 if (fd < 0)
81ecdfbb 10331 return 1;
a9322a30 10332 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10333 return 1;
a9322a30
TT
10334 close (fd);
10335
10336 /* Next, try to mmap the file at a fixed address which already has
10337 something else allocated at it. If we can, also make sure that
10338 we see the same garbage. */
10339 fd = open ("conftest.mmap", O_RDWR);
10340 if (fd < 0)
81ecdfbb 10341 return 1;
a9322a30
TT
10342 data2 = (char *) malloc (2 * pagesize);
10343 if (!data2)
81ecdfbb
RW
10344 return 1;
10345 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10346 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10347 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10348 return 1;
a9322a30
TT
10349 for (i = 0; i < pagesize; ++i)
10350 if (*(data + i) != *(data2 + i))
81ecdfbb 10351 return 1;
a9322a30
TT
10352
10353 /* Finally, make sure that changes to the mapped area do not
10354 percolate back to the file as seen by read(). (This is a bug on
10355 some variants of i386 svr4.0.) */
10356 for (i = 0; i < pagesize; ++i)
10357 *(data2 + i) = *(data2 + i) + 1;
10358 data3 = (char *) malloc (pagesize);
10359 if (!data3)
81ecdfbb 10360 return 1;
a9322a30 10361 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10362 return 1;
a9322a30
TT
10363 for (i = 0; i < pagesize; ++i)
10364 if (*(data + i) != *(data3 + i))
81ecdfbb 10365 return 1;
a9322a30 10366 close (fd);
81ecdfbb 10367 return 0;
bec39cab
AC
10368}
10369_ACEOF
81ecdfbb 10370if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10371 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10372else
81ecdfbb 10373 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10374fi
81ecdfbb
RW
10375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10376 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10377fi
81ecdfbb 10378
a9322a30 10379fi
81ecdfbb
RW
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10381$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10382if test $ac_cv_func_mmap_fixed_mapped = yes; then
10383
81ecdfbb 10384$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10385
086ec9eb 10386fi
a9322a30 10387rm -f conftest.mmap
a3828db0 10388
81ecdfbb
RW
10389ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10390if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10391
a9322a30
TT
10392else
10393
10394cat >>confdefs.h <<_ACEOF
10395#define pid_t int
bec39cab 10396_ACEOF
086ec9eb
MK
10397
10398fi
10399
81ecdfbb
RW
10400for ac_header in vfork.h
10401do :
10402 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10403if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10404 cat >>confdefs.h <<_ACEOF
81ecdfbb 10405#define HAVE_VFORK_H 1
bec39cab 10406_ACEOF
c906108c
SS
10407
10408fi
a9322a30 10409
a3828db0 10410done
c906108c 10411
a9322a30 10412for ac_func in fork vfork
81ecdfbb
RW
10413do :
10414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10415ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10416eval as_val=\$$as_ac_var
10417 if test "x$as_val" = x""yes; then :
a3828db0 10418 cat >>confdefs.h <<_ACEOF
81ecdfbb 10419#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10420_ACEOF
b83266a0 10421
97bf5e38 10422fi
a3828db0 10423done
b83266a0 10424
a9322a30 10425if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10427$as_echo_n "checking for working fork... " >&6; }
10428if test "${ac_cv_func_fork_works+set}" = set; then :
10429 $as_echo_n "(cached) " >&6
a9322a30 10430else
81ecdfbb 10431 if test "$cross_compiling" = yes; then :
a9322a30
TT
10432 ac_cv_func_fork_works=cross
10433else
81ecdfbb
RW
10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10435/* end confdefs.h. */
10436$ac_includes_default
10437int
10438main ()
10439{
10440
10441 /* By Ruediger Kuhlmann. */
10442 return fork () < 0;
10443
10444 ;
10445 return 0;
10446}
a9322a30 10447_ACEOF
81ecdfbb 10448if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10449 ac_cv_func_fork_works=yes
10450else
81ecdfbb 10451 ac_cv_func_fork_works=no
a9322a30 10452fi
81ecdfbb
RW
10453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10454 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10455fi
81ecdfbb 10456
a9322a30 10457fi
81ecdfbb
RW
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10459$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10460
10461else
10462 ac_cv_func_fork_works=$ac_cv_func_fork
10463fi
10464if test "x$ac_cv_func_fork_works" = xcross; then
10465 case $host in
10466 *-*-amigaos* | *-*-msdosdjgpp*)
10467 # Override, as these systems have only a dummy fork() stub
10468 ac_cv_func_fork_works=no
10469 ;;
10470 *)
10471 ac_cv_func_fork_works=yes
10472 ;;
10473 esac
81ecdfbb
RW
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10475$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10476fi
10477ac_cv_func_vfork_works=$ac_cv_func_vfork
10478if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10480$as_echo_n "checking for working vfork... " >&6; }
10481if test "${ac_cv_func_vfork_works+set}" = set; then :
10482 $as_echo_n "(cached) " >&6
a9322a30 10483else
81ecdfbb 10484 if test "$cross_compiling" = yes; then :
a9322a30
TT
10485 ac_cv_func_vfork_works=cross
10486else
81ecdfbb 10487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10488/* end confdefs.h. */
10489/* Thanks to Paul Eggert for this test. */
81ecdfbb 10490$ac_includes_default
a9322a30 10491#include <sys/wait.h>
81ecdfbb 10492#ifdef HAVE_VFORK_H
a9322a30
TT
10493# include <vfork.h>
10494#endif
10495/* On some sparc systems, changes by the child to local and incoming
10496 argument registers are propagated back to the parent. The compiler
10497 is told about this with #include <vfork.h>, but some compilers
10498 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10499 static variable whose address is put into a register that is
10500 clobbered by the vfork. */
10501static void
10502#ifdef __cplusplus
10503sparc_address_test (int arg)
10504# else
10505sparc_address_test (arg) int arg;
10506#endif
10507{
10508 static pid_t child;
10509 if (!child) {
10510 child = vfork ();
10511 if (child < 0) {
10512 perror ("vfork");
10513 _exit(2);
10514 }
10515 if (!child) {
10516 arg = getpid();
10517 write(-1, "", 0);
10518 _exit (arg);
10519 }
10520 }
10521}
10522
10523int
10524main ()
10525{
10526 pid_t parent = getpid ();
10527 pid_t child;
10528
10529 sparc_address_test (0);
10530
10531 child = vfork ();
10532
10533 if (child == 0) {
10534 /* Here is another test for sparc vfork register problems. This
10535 test uses lots of local variables, at least as many local
10536 variables as main has allocated so far including compiler
10537 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10538 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10539 reuse the register of parent for one of the local variables,
10540 since it will think that parent can't possibly be used any more
10541 in this routine. Assigning to the local variable will thus
10542 munge parent in the parent process. */
10543 pid_t
10544 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10545 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10546 /* Convince the compiler that p..p7 are live; otherwise, it might
10547 use the same hardware register for all 8 local variables. */
10548 if (p != p1 || p != p2 || p != p3 || p != p4
10549 || p != p5 || p != p6 || p != p7)
10550 _exit(1);
10551
10552 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10553 from child file descriptors. If the child closes a descriptor
10554 before it execs or exits, this munges the parent's descriptor
10555 as well. Test for this by closing stdout in the child. */
10556 _exit(close(fileno(stdout)) != 0);
10557 } else {
10558 int status;
10559 struct stat st;
10560
10561 while (wait(&status) != child)
10562 ;
81ecdfbb 10563 return (
a9322a30
TT
10564 /* Was there some problem with vforking? */
10565 child < 0
10566
10567 /* Did the child fail? (This shouldn't happen.) */
10568 || status
10569
10570 /* Did the vfork/compiler bug occur? */
10571 || parent != getpid()
10572
10573 /* Did the file descriptor bug occur? */
10574 || fstat(fileno(stdout), &st) != 0
10575 );
10576 }
10577}
10578_ACEOF
81ecdfbb 10579if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10580 ac_cv_func_vfork_works=yes
10581else
81ecdfbb 10582 ac_cv_func_vfork_works=no
a9322a30 10583fi
81ecdfbb
RW
10584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10585 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10586fi
81ecdfbb 10587
a9322a30 10588fi
81ecdfbb
RW
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10590$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10591
10592fi;
10593if test "x$ac_cv_func_fork_works" = xcross; then
10594 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10596$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10597fi
10598
10599if test "x$ac_cv_func_vfork_works" = xyes; then
10600
81ecdfbb 10601$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10602
10603else
10604
81ecdfbb 10605$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10606
10607fi
10608if test "x$ac_cv_func_fork_works" = xyes; then
10609
81ecdfbb 10610$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10611
10612fi
10613
7313baad 10614for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10615 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10616 sbrk setpgid setpgrp setsid \
9467110b 10617 sigaction sigprocmask sigsetmask socketpair \
110ed339 10618 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d 10619 setrlimit getrlimit posix_madvise waitpid lstat \
992c7d70 10620 ptrace64 sigaltstack
81ecdfbb
RW
10621do :
10622 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10623ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10624eval as_val=\$$as_ac_var
10625 if test "x$as_val" = x""yes; then :
6c7a06a3 10626 cat >>confdefs.h <<_ACEOF
81ecdfbb 10627#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10628_ACEOF
10629
10630fi
10631done
10632
10633
81ecdfbb
RW
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10635$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10636if test "${am_cv_langinfo_codeset+set}" = set; then :
10637 $as_echo_n "(cached) " >&6
6c7a06a3 10638else
81ecdfbb 10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10640/* end confdefs.h. */
10641#include <langinfo.h>
10642int
10643main ()
10644{
10645char* cs = nl_langinfo(CODESET);
bec39cab
AC
10646 ;
10647 return 0;
10648}
10649_ACEOF
81ecdfbb 10650if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10651 am_cv_langinfo_codeset=yes
a4db0f07 10652else
81ecdfbb 10653 am_cv_langinfo_codeset=no
a4db0f07 10654fi
81ecdfbb
RW
10655rm -f core conftest.err conftest.$ac_objext \
10656 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10657
a4db0f07 10658fi
81ecdfbb
RW
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10660$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10661 if test $am_cv_langinfo_codeset = yes; then
10662
81ecdfbb 10663$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10664
6c7a06a3 10665 fi
c906108c 10666
06825bd1 10667
3266f10b
TT
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10669$as_echo_n "checking for ANSI C header files... " >&6; }
10670if test "${ac_cv_header_stdc+set}" = set; then :
10671 $as_echo_n "(cached) " >&6
10672else
10673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10674/* end confdefs.h. */
10675#include <stdlib.h>
10676#include <stdarg.h>
10677#include <string.h>
10678#include <float.h>
10679
10680int
10681main ()
10682{
10683
10684 ;
10685 return 0;
10686}
10687_ACEOF
10688if ac_fn_c_try_compile "$LINENO"; then :
10689 ac_cv_header_stdc=yes
10690else
10691 ac_cv_header_stdc=no
10692fi
10693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10694
10695if test $ac_cv_header_stdc = yes; then
10696 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10698/* end confdefs.h. */
10699#include <string.h>
10700
10701_ACEOF
10702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10703 $EGREP "memchr" >/dev/null 2>&1; then :
10704
10705else
10706 ac_cv_header_stdc=no
10707fi
10708rm -f conftest*
10709
10710fi
10711
10712if test $ac_cv_header_stdc = yes; then
10713 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10715/* end confdefs.h. */
10716#include <stdlib.h>
10717
10718_ACEOF
10719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10720 $EGREP "free" >/dev/null 2>&1; then :
10721
10722else
10723 ac_cv_header_stdc=no
10724fi
10725rm -f conftest*
10726
10727fi
10728
10729if test $ac_cv_header_stdc = yes; then
10730 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10731 if test "$cross_compiling" = yes; then :
10732 :
10733else
10734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10735/* end confdefs.h. */
10736#include <ctype.h>
10737#include <stdlib.h>
10738#if ((' ' & 0x0FF) == 0x020)
10739# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10740# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10741#else
10742# define ISLOWER(c) \
10743 (('a' <= (c) && (c) <= 'i') \
10744 || ('j' <= (c) && (c) <= 'r') \
10745 || ('s' <= (c) && (c) <= 'z'))
10746# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10747#endif
10748
10749#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10750int
10751main ()
10752{
10753 int i;
10754 for (i = 0; i < 256; i++)
10755 if (XOR (islower (i), ISLOWER (i))
10756 || toupper (i) != TOUPPER (i))
10757 return 2;
10758 return 0;
10759}
10760_ACEOF
10761if ac_fn_c_try_run "$LINENO"; then :
10762
10763else
10764 ac_cv_header_stdc=no
10765fi
10766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10767 conftest.$ac_objext conftest.beam conftest.$ac_ext
10768fi
10769
10770fi
10771fi
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10773$as_echo "$ac_cv_header_stdc" >&6; }
10774if test $ac_cv_header_stdc = yes; then
10775
10776$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10777
3266f10b
TT
10778fi
10779
10780 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10781# for constant arguments. Useless!
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10783$as_echo_n "checking for working alloca.h... " >&6; }
10784if test "${ac_cv_working_alloca_h+set}" = set; then :
10785 $as_echo_n "(cached) " >&6
10786else
10787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10788/* end confdefs.h. */
10789#include <alloca.h>
10790int
10791main ()
10792{
10793char *p = (char *) alloca (2 * sizeof (int));
10794 if (p) return 0;
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799if ac_fn_c_try_link "$LINENO"; then :
10800 ac_cv_working_alloca_h=yes
10801else
10802 ac_cv_working_alloca_h=no
10803fi
10804rm -f core conftest.err conftest.$ac_objext \
10805 conftest$ac_exeext conftest.$ac_ext
10806fi
10807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10808$as_echo "$ac_cv_working_alloca_h" >&6; }
10809if test $ac_cv_working_alloca_h = yes; then
10810
10811$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10812
10813fi
10814
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10816$as_echo_n "checking for alloca... " >&6; }
10817if test "${ac_cv_func_alloca_works+set}" = set; then :
10818 $as_echo_n "(cached) " >&6
10819else
10820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10821/* end confdefs.h. */
10822#ifdef __GNUC__
10823# define alloca __builtin_alloca
10824#else
10825# ifdef _MSC_VER
10826# include <malloc.h>
10827# define alloca _alloca
10828# else
10829# ifdef HAVE_ALLOCA_H
10830# include <alloca.h>
10831# else
10832# ifdef _AIX
10833 #pragma alloca
10834# else
10835# ifndef alloca /* predefined by HP cc +Olibcalls */
10836char *alloca ();
10837# endif
10838# endif
10839# endif
10840# endif
10841#endif
10842
10843int
10844main ()
10845{
10846char *p = (char *) alloca (1);
10847 if (p) return 0;
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852if ac_fn_c_try_link "$LINENO"; then :
10853 ac_cv_func_alloca_works=yes
10854else
10855 ac_cv_func_alloca_works=no
10856fi
10857rm -f core conftest.err conftest.$ac_objext \
10858 conftest$ac_exeext conftest.$ac_ext
10859fi
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10861$as_echo "$ac_cv_func_alloca_works" >&6; }
10862
10863if test $ac_cv_func_alloca_works = yes; then
10864
10865$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10866
10867else
10868 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10869# that cause trouble. Some versions do not even contain alloca or
10870# contain a buggy version. If you still want to use their alloca,
10871# use ar to extract alloca.o from them instead of compiling alloca.c.
10872
10873ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10874
10875$as_echo "#define C_ALLOCA 1" >>confdefs.h
10876
10877
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10879$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10880if test "${ac_cv_os_cray+set}" = set; then :
10881 $as_echo_n "(cached) " >&6
10882else
10883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10884/* end confdefs.h. */
10885#if defined CRAY && ! defined CRAY2
10886webecray
10887#else
10888wenotbecray
10889#endif
10890
10891_ACEOF
10892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10893 $EGREP "webecray" >/dev/null 2>&1; then :
10894 ac_cv_os_cray=yes
10895else
10896 ac_cv_os_cray=no
10897fi
10898rm -f conftest*
10899
10900fi
10901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10902$as_echo "$ac_cv_os_cray" >&6; }
10903if test $ac_cv_os_cray = yes; then
10904 for ac_func in _getb67 GETB67 getb67; do
10905 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10906ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10907eval as_val=\$$as_ac_var
10908 if test "x$as_val" = x""yes; then :
10909
10910cat >>confdefs.h <<_ACEOF
10911#define CRAY_STACKSEG_END $ac_func
10912_ACEOF
10913
10914 break
10915fi
10916
10917 done
10918fi
10919
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10921$as_echo_n "checking stack direction for C alloca... " >&6; }
10922if test "${ac_cv_c_stack_direction+set}" = set; then :
10923 $as_echo_n "(cached) " >&6
10924else
10925 if test "$cross_compiling" = yes; then :
10926 ac_cv_c_stack_direction=0
10927else
10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10929/* end confdefs.h. */
10930$ac_includes_default
10931int
10932find_stack_direction ()
10933{
10934 static char *addr = 0;
10935 auto char dummy;
10936 if (addr == 0)
10937 {
10938 addr = &dummy;
10939 return find_stack_direction ();
10940 }
10941 else
10942 return (&dummy > addr) ? 1 : -1;
10943}
10944
10945int
10946main ()
10947{
10948 return find_stack_direction () < 0;
10949}
10950_ACEOF
10951if ac_fn_c_try_run "$LINENO"; then :
10952 ac_cv_c_stack_direction=1
10953else
10954 ac_cv_c_stack_direction=-1
10955fi
10956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10957 conftest.$ac_objext conftest.beam conftest.$ac_ext
10958fi
10959
10960fi
10961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10962$as_echo "$ac_cv_c_stack_direction" >&6; }
10963cat >>confdefs.h <<_ACEOF
10964#define STACK_DIRECTION $ac_cv_c_stack_direction
10965_ACEOF
10966
10967
10968fi
10969
10970
10971
10972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10973$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10974if test "${am_cv_langinfo_codeset+set}" = set; then :
10975 $as_echo_n "(cached) " >&6
10976else
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h. */
10979#include <langinfo.h>
10980int
10981main ()
10982{
10983char* cs = nl_langinfo(CODESET);
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988if ac_fn_c_try_link "$LINENO"; then :
10989 am_cv_langinfo_codeset=yes
10990else
10991 am_cv_langinfo_codeset=no
10992fi
10993rm -f core conftest.err conftest.$ac_objext \
10994 conftest$ac_exeext conftest.$ac_ext
10995
10996fi
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10998$as_echo "$am_cv_langinfo_codeset" >&6; }
10999 if test $am_cv_langinfo_codeset = yes; then
11000
11001$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11002
11003 fi
11004
11005
a3d08894 11006 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
11007do :
11008 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11009ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11010eval as_val=\$$as_ac_Header
11011 if test "x$as_val" = x""yes; then :
11012 cat >>confdefs.h <<_ACEOF
11013#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11014_ACEOF
11015
11016fi
11017
11018done
11019
11020
11021 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11022do :
11023 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11024ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11025eval as_val=\$$as_ac_var
11026 if test "x$as_val" = x""yes; then :
11027 cat >>confdefs.h <<_ACEOF
11028#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11029_ACEOF
11030
11031fi
11032done
11033
11034
11035 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11036if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11037 ac_have_decl=1
11038else
11039 ac_have_decl=0
11040fi
11041
11042cat >>confdefs.h <<_ACEOF
11043#define HAVE_DECL_STRERROR $ac_have_decl
11044_ACEOF
11045ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11046if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11047 ac_have_decl=1
11048else
11049 ac_have_decl=0
11050fi
11051
11052cat >>confdefs.h <<_ACEOF
11053#define HAVE_DECL_STRSTR $ac_have_decl
11054_ACEOF
11055
11056
11057
a3828db0
MK
11058# Check the return and argument types of ptrace. No canned test for
11059# this, so roll our own.
11060gdb_ptrace_headers='
4ff70b84 11061#include <sys/types.h>
a3828db0
MK
11062#if HAVE_SYS_PTRACE_H
11063# include <sys/ptrace.h>
11064#endif
11065#if HAVE_UNISTD_H
11066# include <unistd.h>
11067#endif
11068'
11069# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11070ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11071"
11072if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11073 ac_have_decl=1
06825bd1 11074else
81ecdfbb 11075 ac_have_decl=0
06825bd1 11076fi
06825bd1 11077
a3828db0 11078cat >>confdefs.h <<_ACEOF
81ecdfbb 11079#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11080_ACEOF
81ecdfbb 11081if test $ac_have_decl = 1; then :
bec39cab 11082
a3828db0 11083else
a3828db0
MK
11084
11085 : ${gdb_cv_func_ptrace_ret='int'}
11086 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11087
06825bd1
MK
11088fi
11089
064ef605
DJ
11090# Check return type. Varargs (used on GNU/Linux) conflict with the
11091# empty argument list, so check for that explicitly.
81ecdfbb
RW
11092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11093$as_echo_n "checking return type of ptrace... " >&6; }
11094if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11095 $as_echo_n "(cached) " >&6
bec39cab 11096else
81ecdfbb 11097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11098/* end confdefs.h. */
a3828db0 11099$gdb_ptrace_headers
bec39cab
AC
11100int
11101main ()
11102{
064ef605
DJ
11103extern long ptrace (enum __ptrace_request, ...);
11104 ;
11105 return 0;
11106}
11107_ACEOF
81ecdfbb 11108if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11109 gdb_cv_func_ptrace_ret='long'
11110else
81ecdfbb 11111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11112/* end confdefs.h. */
11113$gdb_ptrace_headers
11114int
11115main ()
11116{
a3828db0 11117extern int ptrace ();
bec39cab
AC
11118 ;
11119 return 0;
11120}
11121_ACEOF
81ecdfbb 11122if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11123 gdb_cv_func_ptrace_ret='int'
70f9f479 11124else
81ecdfbb 11125 gdb_cv_func_ptrace_ret='long'
70f9f479 11126fi
81ecdfbb 11127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11128fi
81ecdfbb 11129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11130fi
81ecdfbb
RW
11131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11132$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11133
a3828db0
MK
11134cat >>confdefs.h <<_ACEOF
11135#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11136_ACEOF
70f9f479 11137
a3828db0 11138# Check argument types.
81ecdfbb
RW
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11140$as_echo_n "checking types of arguments for ptrace... " >&6; }
11141if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11142 $as_echo_n "(cached) " >&6
bec39cab 11143else
a3828db0 11144
81ecdfbb 11145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11146/* end confdefs.h. */
11147$gdb_ptrace_headers
11148int
11149main ()
11150{
11151extern long ptrace (enum __ptrace_request, ...);
11152 ;
11153 return 0;
11154}
11155_ACEOF
81ecdfbb 11156if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11157 gdb_cv_func_ptrace_args='int,int,long,long'
11158else
064ef605 11159
a3828db0
MK
11160for gdb_arg1 in 'int' 'long'; do
11161 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11162 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11163 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11165/* end confdefs.h. */
a3828db0 11166$gdb_ptrace_headers
bec39cab
AC
11167int
11168main ()
11169{
a3828db0
MK
11170
11171extern $gdb_cv_func_ptrace_ret
11172 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11173
bec39cab
AC
11174 ;
11175 return 0;
11176}
11177_ACEOF
81ecdfbb 11178if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11179 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11180 break 4;
5c7f2947 11181fi
81ecdfbb 11182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11183 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11185/* end confdefs.h. */
a3828db0 11186$gdb_ptrace_headers
bec39cab
AC
11187int
11188main ()
11189{
a3828db0
MK
11190
11191extern $gdb_cv_func_ptrace_ret
11192 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11193
bec39cab
AC
11194 ;
11195 return 0;
11196}
11197_ACEOF
81ecdfbb 11198if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11199
11200gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11201 break 5;
78434e59 11202fi
81ecdfbb 11203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11204 done
11205 done
11206 done
11207 done
11208done
11209# Provide a safe default value.
11210: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11211
064ef605 11212fi
81ecdfbb 11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11214fi
81ecdfbb
RW
11215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11216$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11217ac_save_IFS=$IFS; IFS=','
11218set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11219IFS=$ac_save_IFS
11220shift
bec39cab 11221
a3828db0
MK
11222cat >>confdefs.h <<_ACEOF
11223#define PTRACE_TYPE_ARG3 $3
11224_ACEOF
11225
96d7229d
LM
11226
11227cat >>confdefs.h <<_ACEOF
11228#define PTRACE_TYPE_ARG4 $4
11229_ACEOF
11230
a3828db0
MK
11231if test -n "$5"; then
11232
11233cat >>confdefs.h <<_ACEOF
11234#define PTRACE_TYPE_ARG5 $5
bec39cab 11235_ACEOF
78434e59
MK
11236
11237fi
11238
a3828db0 11239if test "$cross_compiling" = no; then
81ecdfbb
RW
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11241$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11242if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11243 $as_echo_n "(cached) " >&6
a3828db0 11244else
81ecdfbb
RW
11245 if test "$cross_compiling" = yes; then :
11246 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11247else
81ecdfbb 11248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11249/* end confdefs.h. */
81ecdfbb 11250$ac_includes_default
bec39cab
AC
11251int
11252main ()
11253{
a3828db0
MK
11254/* If this system has a BSD-style setpgrp which takes arguments,
11255 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11256 exit successfully. */
81ecdfbb 11257 return setpgrp (1,1) != -1;
bec39cab
AC
11258 ;
11259 return 0;
11260}
11261_ACEOF
81ecdfbb 11262if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11263 ac_cv_func_setpgrp_void=no
c906108c 11264else
81ecdfbb 11265 ac_cv_func_setpgrp_void=yes
c906108c 11266fi
81ecdfbb
RW
11267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11268 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11269fi
81ecdfbb 11270
a3828db0 11271fi
81ecdfbb
RW
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11273$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11274if test $ac_cv_func_setpgrp_void = yes; then
11275
81ecdfbb 11276$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11277
11278fi
a3828db0
MK
11279
11280else
81ecdfbb
RW
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11282$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11283if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11284 $as_echo_n "(cached) " >&6
97bf5e38 11285else
81ecdfbb 11286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11287/* end confdefs.h. */
a3828db0
MK
11288
11289#include <unistd.h>
11290
bec39cab
AC
11291int
11292main ()
11293{
a3828db0
MK
11294
11295 if (setpgrp(1,1) == -1)
11296 exit (0);
11297 else
11298 exit (1);
11299
bec39cab
AC
11300 ;
11301 return 0;
11302}
11303_ACEOF
81ecdfbb 11304if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11305 ac_cv_func_setpgrp_void=no
c906108c 11306else
81ecdfbb 11307 ac_cv_func_setpgrp_void=yes
c906108c 11308fi
81ecdfbb 11309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11310fi
81ecdfbb
RW
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11312$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11313if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11314 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11315
a3828db0 11316fi
c906108c
SS
11317fi
11318
a3828db0
MK
11319# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
11320# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11322$as_echo_n "checking for sigsetjmp... " >&6; }
11323if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11324 $as_echo_n "(cached) " >&6
bec39cab 11325else
81ecdfbb 11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11327/* end confdefs.h. */
a3828db0
MK
11328
11329#include <setjmp.h>
11330
bec39cab
AC
11331int
11332main ()
11333{
a3828db0 11334sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
11335 ;
11336 return 0;
11337}
11338_ACEOF
81ecdfbb 11339if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11340 gdb_cv_func_sigsetjmp=yes
c906108c 11341else
81ecdfbb 11342 gdb_cv_func_sigsetjmp=no
c906108c 11343fi
81ecdfbb 11344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11345fi
81ecdfbb
RW
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11347$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 11348if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 11349
81ecdfbb 11350$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 11351
97bf5e38 11352fi
c906108c 11353
a3828db0
MK
11354# Assume we'll default to using the included libiberty regex.
11355gdb_use_included_regex=yes
11356
11357# However, if the system regex is GNU regex, then default to *not*
11358# using the included regex.
81ecdfbb
RW
11359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11360$as_echo_n "checking for GNU regex... " >&6; }
11361if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11362 $as_echo_n "(cached) " >&6
bec39cab 11363else
81ecdfbb 11364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11365/* end confdefs.h. */
a3828db0 11366#include <gnu-versions.h>
bec39cab
AC
11367int
11368main ()
11369{
81ecdfbb
RW
11370#define REGEX_INTERFACE_VERSION 1
11371#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11372# error "Version mismatch"
11373#endif
5c45e068
MK
11374 ;
11375 return 0;
11376}
11377_ACEOF
81ecdfbb
RW
11378if ac_fn_c_try_compile "$LINENO"; then :
11379 gdb_cv_have_gnu_regex=yes
5c45e068 11380else
81ecdfbb
RW
11381 gdb_cv_have_gnu_regex=no
11382fi
11383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11384fi
11385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11386$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11387if test $gdb_cv_have_gnu_regex = yes; then
11388 gdb_use_included_regex=no
5c45e068 11389fi
81ecdfbb
RW
11390
11391
11392# Check whether --with-included-regex was given.
11393if test "${with_included_regex+set}" = set; then :
11394 withval=$with_included_regex; gdb_with_regex=$withval
11395else
11396 gdb_with_regex=$gdb_use_included_regex
c906108c 11397fi
81ecdfbb
RW
11398
11399if test "$gdb_with_regex" = yes; then
11400
11401$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11402
c906108c 11403fi
81ecdfbb
RW
11404
11405# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11406ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11407#include <sys/proc.h>
11408
11409"
11410if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11411
5c45e068 11412cat >>confdefs.h <<_ACEOF
a3828db0 11413#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11414_ACEOF
c906108c 11415
5c45e068 11416
97bf5e38 11417fi
c906108c 11418
5c45e068 11419
a3828db0 11420# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11422$as_echo_n "checking for struct lwp... " >&6; }
11423if test "${gdb_cv_struct_lwp+set}" = set; then :
11424 $as_echo_n "(cached) " >&6
bec39cab 11425else
81ecdfbb 11426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11427/* end confdefs.h. */
a3828db0
MK
11428#include <sys/param.h>
11429#include <sys/lwp.h>
bec39cab
AC
11430int
11431main ()
11432{
a3828db0 11433struct lwp l;
bec39cab
AC
11434 ;
11435 return 0;
11436}
11437_ACEOF
81ecdfbb 11438if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11439 gdb_cv_struct_lwp=yes
c906108c 11440else
81ecdfbb 11441 gdb_cv_struct_lwp=no
c906108c 11442fi
81ecdfbb 11443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11444fi
81ecdfbb
RW
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11446$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11447if test $gdb_cv_struct_lwp = yes; then
c906108c 11448
81ecdfbb 11449$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11450
97bf5e38 11451fi
c906108c 11452
a3828db0 11453# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11455$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11456if test "${gdb_cv_struct_reg+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
MK
11461#include <sys/types.h>
11462#include <machine/reg.h>
bec39cab
AC
11463int
11464main ()
11465{
a3828db0 11466struct reg r;
bec39cab
AC
11467 ;
11468 return 0;
11469}
11470_ACEOF
81ecdfbb 11471if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11472 gdb_cv_struct_reg=yes
27ca5dad 11473else
81ecdfbb 11474 gdb_cv_struct_reg=no
27ca5dad 11475fi
81ecdfbb 11476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11477fi
81ecdfbb
RW
11478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11479$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11480if test $gdb_cv_struct_reg = yes; then
bec39cab 11481
81ecdfbb 11482$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11483
11484fi
97bf5e38 11485
a3828db0
MK
11486# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11487# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11488ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11489"
11490if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11491
11492cat >>confdefs.h <<_ACEOF
a3828db0 11493#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11494_ACEOF
3862412b 11495
5c45e068 11496
97bf5e38 11497fi
81ecdfbb
RW
11498ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11499"
11500if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11501
11502cat >>confdefs.h <<_ACEOF
a3828db0 11503#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11504_ACEOF
3862412b 11505
5c45e068 11506
97bf5e38 11507fi
3862412b 11508
5c45e068 11509
6fea9e18
L
11510# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11511# Older amd64 Linux's don't have the fs_base and gs_base members of
11512# `struct user_regs_struct'.
11513ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11514"
11515if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11516
11517cat >>confdefs.h <<_ACEOF
11518#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11519_ACEOF
11520
11521
11522fi
11523ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11524"
11525if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11526
11527cat >>confdefs.h <<_ACEOF
11528#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11529_ACEOF
11530
11531
11532fi
11533
11534
a3828db0 11535# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11537$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11538if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11539 $as_echo_n "(cached) " >&6
451928c5 11540else
81ecdfbb 11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11542/* end confdefs.h. */
a3828db0 11543#include <sys/ptrace.h>
bec39cab
AC
11544int
11545main ()
11546{
a3828db0 11547PTRACE_GETREGS;
bec39cab
AC
11548 ;
11549 return 0;
11550}
11551_ACEOF
81ecdfbb 11552if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11553 gdb_cv_have_ptrace_getregs=yes
451928c5 11554else
81ecdfbb 11555 gdb_cv_have_ptrace_getregs=no
451928c5 11556fi
81ecdfbb 11557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11558fi
11559
81ecdfbb
RW
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11561$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11562if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11563
81ecdfbb 11564$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11565
97bf5e38 11566fi
451928c5 11567
a3828db0 11568# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11570$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11571if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11572 $as_echo_n "(cached) " >&6
451928c5 11573else
81ecdfbb 11574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11575/* end confdefs.h. */
a3828db0 11576#include <sys/ptrace.h>
bec39cab
AC
11577int
11578main ()
11579{
a3828db0 11580PTRACE_GETFPXREGS;
bec39cab
AC
11581 ;
11582 return 0;
11583}
11584_ACEOF
81ecdfbb 11585if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11586 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11587else
81ecdfbb 11588 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11589fi
81ecdfbb 11590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11591fi
11592
81ecdfbb
RW
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11594$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11595if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11596
81ecdfbb 11597$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11598
97bf5e38 11599fi
451928c5 11600
a3828db0 11601# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11603$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11604if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11605 $as_echo_n "(cached) " >&6
3862412b 11606else
81ecdfbb 11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11608/* end confdefs.h. */
a3828db0
MK
11609#include <sys/types.h>
11610#include <sys/ptrace.h>
bec39cab
AC
11611int
11612main ()
11613{
a3828db0 11614PT_GETDBREGS;
bec39cab
AC
11615 ;
11616 return 0;
11617}
11618_ACEOF
81ecdfbb 11619if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11620 gdb_cv_have_pt_getdbregs=yes
3862412b 11621else
81ecdfbb 11622 gdb_cv_have_pt_getdbregs=no
3862412b 11623fi
81ecdfbb 11624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11625fi
11626
81ecdfbb
RW
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11628$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11629if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11630
81ecdfbb 11631$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11632
97bf5e38 11633fi
3862412b 11634
a3828db0 11635# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11637$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11638if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11639 $as_echo_n "(cached) " >&6
3862412b 11640else
81ecdfbb 11641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11642/* end confdefs.h. */
a3828db0
MK
11643#include <sys/types.h>
11644#include <sys/ptrace.h>
bec39cab
AC
11645int
11646main ()
11647{
a3828db0 11648PT_GETXMMREGS;
bec39cab
AC
11649 ;
11650 return 0;
11651}
11652_ACEOF
81ecdfbb 11653if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11654 gdb_cv_have_pt_getxmmregs=yes
3862412b 11655else
81ecdfbb 11656 gdb_cv_have_pt_getxmmregs=no
3862412b 11657fi
81ecdfbb 11658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11659fi
11660
81ecdfbb
RW
11661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11662$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11663if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11664
81ecdfbb 11665$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11666
97bf5e38 11667fi
3862412b 11668
05b4bd79 11669# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11670
11671if test "${target}" = "${host}"; then
11672 case "${host}" in
7b00db47 11673 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11674
81ecdfbb 11675$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11676
11677 ;;
c162e8c9 11678 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11679
81ecdfbb 11680$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11681
11682 ;;
11683 mips-sgi-irix5*)
11684 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11685
81ecdfbb 11686$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11687
11688 ;;
11689 esac
11690fi
11691
11692if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11694$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11695 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11696 $as_echo_n "(cached) " >&6
596c9d4b 11697else
81ecdfbb 11698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11699/* end confdefs.h. */
596c9d4b
KB
11700
11701#define _SYSCALL32
d30c5336
JK
11702/* Needed for new procfs interface on sparc-solaris. */
11703#define _STRUCTURED_PROC 1
596c9d4b 11704#include <sys/procfs.h>
bec39cab
AC
11705int
11706main ()
11707{
97bf5e38 11708gregset_t avar
bec39cab
AC
11709 ;
11710 return 0;
11711}
11712_ACEOF
81ecdfbb 11713if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11714 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11715else
81ecdfbb 11716 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11717
596c9d4b 11718fi
81ecdfbb 11719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11720fi
11721
97bf5e38 11722 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11723
81ecdfbb 11724$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11725
11726 fi
81ecdfbb
RW
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11728$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11729
81ecdfbb
RW
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11731$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11732 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11733 $as_echo_n "(cached) " >&6
d84dd0c5 11734else
81ecdfbb 11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11736/* end confdefs.h. */
97bf5e38
MK
11737
11738#define _SYSCALL32
d30c5336
JK
11739/* Needed for new procfs interface on sparc-solaris. */
11740#define _STRUCTURED_PROC 1
d84dd0c5 11741#include <sys/procfs.h>
bec39cab
AC
11742int
11743main ()
11744{
97bf5e38 11745fpregset_t avar
bec39cab
AC
11746 ;
11747 return 0;
11748}
11749_ACEOF
81ecdfbb 11750if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11751 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11752else
81ecdfbb 11753 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11754
d84dd0c5 11755fi
81ecdfbb 11756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11757fi
11758
97bf5e38 11759 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11760
81ecdfbb 11761$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11762
97bf5e38 11763 fi
81ecdfbb
RW
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11765$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11766
81ecdfbb
RW
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11768$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11769 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11770 $as_echo_n "(cached) " >&6
c906108c 11771else
81ecdfbb 11772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11773/* end confdefs.h. */
c906108c 11774
97bf5e38 11775#define _SYSCALL32
d30c5336
JK
11776/* Needed for new procfs interface on sparc-solaris. */
11777#define _STRUCTURED_PROC 1
97bf5e38 11778#include <sys/procfs.h>
bec39cab
AC
11779int
11780main ()
11781{
97bf5e38 11782prgregset_t avar
bec39cab
AC
11783 ;
11784 return 0;
11785}
11786_ACEOF
81ecdfbb 11787if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11788 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11789else
81ecdfbb 11790 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11791
c906108c 11792fi
81ecdfbb 11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11794fi
11795
97bf5e38 11796 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11797
81ecdfbb 11798$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11799
97bf5e38 11800 fi
81ecdfbb
RW
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11802$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11803
81ecdfbb
RW
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11805$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11806 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11807 $as_echo_n "(cached) " >&6
d45fe813 11808else
81ecdfbb 11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11810/* end confdefs.h. */
97bf5e38
MK
11811
11812#define _SYSCALL32
d30c5336
JK
11813/* Needed for new procfs interface on sparc-solaris. */
11814#define _STRUCTURED_PROC 1
97bf5e38 11815#include <sys/procfs.h>
bec39cab
AC
11816int
11817main ()
11818{
97bf5e38 11819prfpregset_t avar
bec39cab
AC
11820 ;
11821 return 0;
11822}
11823_ACEOF
81ecdfbb 11824if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11825 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11826else
81ecdfbb 11827 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11828
d45fe813 11829fi
81ecdfbb 11830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11831fi
11832
97bf5e38 11833 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11834
81ecdfbb 11835$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11836
97bf5e38 11837 fi
81ecdfbb
RW
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11839$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11840
81ecdfbb
RW
11841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11842$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11843 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11844 $as_echo_n "(cached) " >&6
d45fe813 11845else
81ecdfbb 11846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11847/* end confdefs.h. */
97bf5e38
MK
11848
11849#define _SYSCALL32
d30c5336
JK
11850/* Needed for new procfs interface on sparc-solaris. */
11851#define _STRUCTURED_PROC 1
97bf5e38 11852#include <sys/procfs.h>
bec39cab
AC
11853int
11854main ()
11855{
97bf5e38 11856prgregset32_t avar
bec39cab
AC
11857 ;
11858 return 0;
11859}
11860_ACEOF
81ecdfbb 11861if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11862 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11863else
81ecdfbb 11864 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11865
d45fe813 11866fi
81ecdfbb 11867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11868fi
11869
97bf5e38 11870 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11871
81ecdfbb 11872$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11873
97bf5e38 11874 fi
81ecdfbb
RW
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11876$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11877
81ecdfbb
RW
11878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11879$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11880 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11881 $as_echo_n "(cached) " >&6
d45fe813 11882else
81ecdfbb 11883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11884/* end confdefs.h. */
97bf5e38 11885
d45fe813 11886#define _SYSCALL32
d30c5336
JK
11887/* Needed for new procfs interface on sparc-solaris. */
11888#define _STRUCTURED_PROC 1
97bf5e38 11889#include <sys/procfs.h>
bec39cab
AC
11890int
11891main ()
11892{
97bf5e38 11893lwpid_t avar
bec39cab
AC
11894 ;
11895 return 0;
11896}
11897_ACEOF
81ecdfbb 11898if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11899 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11900else
81ecdfbb 11901 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11902
d45fe813 11903fi
81ecdfbb 11904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11905fi
11906
97bf5e38 11907 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11908
81ecdfbb 11909$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11910
97bf5e38 11911 fi
81ecdfbb
RW
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11913$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11914
81ecdfbb
RW
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11916$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11917 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11918 $as_echo_n "(cached) " >&6
c906108c 11919else
81ecdfbb 11920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11921/* end confdefs.h. */
c906108c 11922
97bf5e38 11923#define _SYSCALL32
d30c5336
JK
11924/* Needed for new procfs interface on sparc-solaris. */
11925#define _STRUCTURED_PROC 1
97bf5e38 11926#include <sys/procfs.h>
bec39cab
AC
11927int
11928main ()
11929{
97bf5e38 11930psaddr_t avar
bec39cab
AC
11931 ;
11932 return 0;
11933}
11934_ACEOF
81ecdfbb 11935if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11936 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11937else
81ecdfbb 11938 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11939
c906108c 11940fi
81ecdfbb 11941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11942fi
11943
97bf5e38 11944 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11945
81ecdfbb 11946$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11947
97bf5e38 11948 fi
81ecdfbb
RW
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11950$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11951
81ecdfbb
RW
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11953$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11954 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11955 $as_echo_n "(cached) " >&6
c906108c 11956else
81ecdfbb 11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11958/* end confdefs.h. */
c906108c 11959
97bf5e38 11960#define _SYSCALL32
d30c5336
JK
11961/* Needed for new procfs interface on sparc-solaris. */
11962#define _STRUCTURED_PROC 1
97bf5e38 11963#include <sys/procfs.h>
bec39cab
AC
11964int
11965main ()
11966{
97bf5e38 11967prsysent_t avar
bec39cab
AC
11968 ;
11969 return 0;
11970}
11971_ACEOF
81ecdfbb 11972if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11973 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11974else
81ecdfbb 11975 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11976
c906108c 11977fi
81ecdfbb 11978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11979fi
11980
97bf5e38 11981 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11982
81ecdfbb 11983$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11984
97bf5e38 11985 fi
81ecdfbb
RW
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11987$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11988
81ecdfbb
RW
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11990$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11991 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11992 $as_echo_n "(cached) " >&6
c906108c 11993else
81ecdfbb 11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11995/* end confdefs.h. */
c906108c 11996
97bf5e38 11997#define _SYSCALL32
d30c5336
JK
11998/* Needed for new procfs interface on sparc-solaris. */
11999#define _STRUCTURED_PROC 1
97bf5e38 12000#include <sys/procfs.h>
bec39cab
AC
12001int
12002main ()
12003{
97bf5e38 12004pr_sigset_t avar
bec39cab
AC
12005 ;
12006 return 0;
12007}
12008_ACEOF
81ecdfbb 12009if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12010 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12011else
81ecdfbb 12012 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12013
c906108c 12014fi
81ecdfbb 12015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12016fi
12017
97bf5e38 12018 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12019
81ecdfbb 12020$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12021
97bf5e38 12022 fi
81ecdfbb
RW
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12024$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12025
81ecdfbb
RW
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12027$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12028 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12029 $as_echo_n "(cached) " >&6
c906108c 12030else
81ecdfbb 12031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12032/* end confdefs.h. */
c906108c 12033
97bf5e38 12034#define _SYSCALL32
d30c5336
JK
12035/* Needed for new procfs interface on sparc-solaris. */
12036#define _STRUCTURED_PROC 1
97bf5e38 12037#include <sys/procfs.h>
bec39cab
AC
12038int
12039main ()
12040{
97bf5e38 12041pr_sigaction64_t avar
bec39cab
AC
12042 ;
12043 return 0;
12044}
12045_ACEOF
81ecdfbb 12046if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12047 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12048else
81ecdfbb 12049 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12050
c906108c 12051fi
81ecdfbb 12052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12053fi
12054
97bf5e38 12055 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12056
81ecdfbb 12057$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12058
97bf5e38 12059 fi
81ecdfbb
RW
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12061$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12062
81ecdfbb
RW
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12064$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12065 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12066 $as_echo_n "(cached) " >&6
97bf5e38 12067else
81ecdfbb 12068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12069/* end confdefs.h. */
97bf5e38
MK
12070
12071#define _SYSCALL32
d30c5336
JK
12072/* Needed for new procfs interface on sparc-solaris. */
12073#define _STRUCTURED_PROC 1
97bf5e38 12074#include <sys/procfs.h>
bec39cab
AC
12075int
12076main ()
12077{
97bf5e38 12078pr_siginfo64_t avar
bec39cab
AC
12079 ;
12080 return 0;
12081}
12082_ACEOF
81ecdfbb 12083if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12084 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12085else
81ecdfbb 12086 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12087
97bf5e38 12088fi
81ecdfbb 12089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12090fi
c906108c 12091
97bf5e38 12092 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12093
81ecdfbb 12094$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12095
97bf5e38 12096 fi
81ecdfbb
RW
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12098$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12099
12100
97bf5e38
MK
12101
12102
12103
97bf5e38 12104 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12106$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12107 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12108 $as_echo_n "(cached) " >&6
c906108c 12109else
81ecdfbb 12110 if test "$cross_compiling" = yes; then :
97bf5e38 12111 gdb_cv_prfpregset_t_broken=yes
c906108c 12112else
81ecdfbb 12113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12114/* end confdefs.h. */
97bf5e38
MK
12115#include <sys/procfs.h>
12116 int main ()
12117 {
12118 if (sizeof (prfpregset_t) == sizeof (void *))
12119 return 1;
12120 return 0;
12121 }
bec39cab 12122_ACEOF
81ecdfbb 12123if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12124 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12125else
12126 gdb_cv_prfpregset_t_broken=yes
c906108c 12127fi
81ecdfbb
RW
12128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12129 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12130fi
81ecdfbb 12131
c906108c
SS
12132fi
12133
81ecdfbb
RW
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12135$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12136 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12137
81ecdfbb 12138$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12139
97bf5e38
MK
12140 fi
12141 fi
c906108c 12142fi
c906108c 12143
bc8bcb4b 12144# Check if the compiler supports the `long long' type.
c906108c 12145
81ecdfbb
RW
12146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12147$as_echo_n "checking for long long support in compiler... " >&6; }
12148if test "${gdb_cv_c_long_long+set}" = set; then :
12149 $as_echo_n "(cached) " >&6
97bf5e38 12150else
81ecdfbb 12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12152/* end confdefs.h. */
bc8bcb4b 12153extern long long foo;
bec39cab
AC
12154int
12155main ()
12156{
bc8bcb4b 12157switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12158 ;
12159 return 0;
12160}
12161_ACEOF
81ecdfbb 12162if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12163 gdb_cv_c_long_long=yes
12164else
81ecdfbb 12165 gdb_cv_c_long_long=no
97bf5e38 12166fi
81ecdfbb 12167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12168fi
81ecdfbb
RW
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12170$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12171if test $gdb_cv_c_long_long != yes; then
12172 # libdecnumber requires long long.
12173 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12174fi
12175
bc8bcb4b 12176# Check if the compiler and runtime support printing long longs.
97bf5e38 12177
81ecdfbb
RW
12178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12179$as_echo_n "checking for long long support in printf... " >&6; }
12180if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12181 $as_echo_n "(cached) " >&6
97bf5e38 12182else
81ecdfbb 12183 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12184 gdb_cv_printf_has_long_long=no
12185else
81ecdfbb 12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12187/* end confdefs.h. */
bc8bcb4b
MK
12188$ac_includes_default
12189int
12190main ()
12191{
12192char buf[32];
97bf5e38
MK
12193 long long l = 0;
12194 l = (l << 16) + 0x0123;
12195 l = (l << 16) + 0x4567;
12196 l = (l << 16) + 0x89ab;
12197 l = (l << 16) + 0xcdef;
12198 sprintf (buf, "0x%016llx", l);
12199 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12200 ;
12201 return 0;
c906108c 12202}
bec39cab 12203_ACEOF
81ecdfbb 12204if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12205 gdb_cv_printf_has_long_long=yes
12206else
81ecdfbb 12207 gdb_cv_printf_has_long_long=no
97bf5e38 12208fi
81ecdfbb
RW
12209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12210 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12211fi
81ecdfbb 12212
97bf5e38 12213fi
81ecdfbb
RW
12214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12215$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12216if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12217
81ecdfbb 12218$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12219
12220fi
97bf5e38 12221
1a619819
LM
12222# Check if the compiler and runtime support printing decfloats.
12223
81ecdfbb
RW
12224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12225$as_echo_n "checking for decfloat support in printf... " >&6; }
12226if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12227 $as_echo_n "(cached) " >&6
1a619819 12228else
81ecdfbb 12229 if test "$cross_compiling" = yes; then :
1a619819
LM
12230 gdb_cv_printf_has_decfloat=no
12231else
81ecdfbb 12232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12233/* end confdefs.h. */
12234$ac_includes_default
12235int
12236main ()
12237{
12238char buf[64];
12239 _Decimal32 d32 = 1.2345df;
12240 _Decimal64 d64 = 1.2345dd;
12241 _Decimal128 d128 = 1.2345dl;
12242 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12243 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12244 ;
12245 return 0;
12246}
12247_ACEOF
81ecdfbb 12248if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12249 gdb_cv_printf_has_decfloat=yes
12250else
81ecdfbb 12251 gdb_cv_printf_has_decfloat=no
1a619819 12252fi
81ecdfbb
RW
12253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12254 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12255fi
81ecdfbb 12256
1a619819 12257fi
81ecdfbb
RW
12258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12259$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12260if test $gdb_cv_printf_has_decfloat = yes; then
12261
81ecdfbb 12262$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12263
12264fi
12265
bc8bcb4b
MK
12266# Check if the compiler supports the `long double' type. We can't use
12267# AC_C_LONG_DOUBLE because that one does additional checks on the
12268# constants defined in <float.h> that fail on some systems,
12269# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12270
81ecdfbb
RW
12271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12272$as_echo_n "checking for long double support in compiler... " >&6; }
12273if test "${gdb_cv_c_long_double+set}" = set; then :
12274 $as_echo_n "(cached) " >&6
97bf5e38 12275else
81ecdfbb 12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12277/* end confdefs.h. */
97bf5e38 12278long double foo;
bec39cab 12279_ACEOF
81ecdfbb 12280if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12281 gdb_cv_c_long_double=yes
97bf5e38 12282else
81ecdfbb 12283 gdb_cv_c_long_double=no
97bf5e38 12284fi
81ecdfbb 12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12286fi
81ecdfbb
RW
12287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12288$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12289if test $gdb_cv_c_long_double = yes; then
c906108c 12290
81ecdfbb 12291$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12292
12293fi
12294
bc8bcb4b 12295# Check if the compiler and runtime support printing long doubles.
97bf5e38 12296
81ecdfbb
RW
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12298$as_echo_n "checking for long double support in printf... " >&6; }
12299if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12300 $as_echo_n "(cached) " >&6
97bf5e38 12301else
81ecdfbb 12302 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12303 gdb_cv_printf_has_long_double=no
12304else
81ecdfbb 12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12306/* end confdefs.h. */
bc8bcb4b
MK
12307$ac_includes_default
12308int
12309main ()
12310{
12311char buf[16];
97bf5e38
MK
12312 long double f = 3.141592653;
12313 sprintf (buf, "%Lg", f);
12314 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12315 ;
12316 return 0;
97bf5e38 12317}
bec39cab 12318_ACEOF
81ecdfbb 12319if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12320 gdb_cv_printf_has_long_double=yes
c906108c 12321else
81ecdfbb 12322 gdb_cv_printf_has_long_double=no
c906108c 12323fi
81ecdfbb
RW
12324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12325 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12326fi
81ecdfbb 12327
c906108c 12328fi
81ecdfbb
RW
12329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12330$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12331if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12332
81ecdfbb 12333$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12334
12335fi
97bf5e38 12336
bc8bcb4b 12337# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12338
81ecdfbb
RW
12339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12340$as_echo_n "checking for long double support in scanf... " >&6; }
12341if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12342 $as_echo_n "(cached) " >&6
97bf5e38 12343else
81ecdfbb 12344 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12345 gdb_cv_scanf_has_long_double=no
12346else
81ecdfbb 12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12348/* end confdefs.h. */
bc8bcb4b
MK
12349#include <stdio.h>
12350int
12351main ()
12352{
12353char *buf = "3.141592653";
97bf5e38
MK
12354 long double f = 0;
12355 sscanf (buf, "%Lg", &f);
12356 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12357 ;
12358 return 0;
97bf5e38 12359}
bec39cab 12360_ACEOF
81ecdfbb 12361if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12362 gdb_cv_scanf_has_long_double=yes
12363else
81ecdfbb 12364 gdb_cv_scanf_has_long_double=no
97bf5e38 12365fi
81ecdfbb
RW
12366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12367 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12368fi
81ecdfbb 12369
c906108c 12370fi
81ecdfbb
RW
12371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12372$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12373if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12374
81ecdfbb 12375$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12376
12377fi
c906108c 12378
438013df
AO
12379case ${host_os} in
12380aix*)
81ecdfbb
RW
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12382$as_echo_n "checking for -bbigtoc option... " >&6; }
12383if test "${gdb_cv_bigtoc+set}" = set; then :
12384 $as_echo_n "(cached) " >&6
438013df 12385else
bec39cab 12386
438013df
AO
12387 SAVE_LDFLAGS=$LDFLAGS
12388
12389 case $GCC in
12390 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12391 *) gdb_cv_bigtoc=-bbigtoc ;;
12392 esac
12393
12394 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12396/* end confdefs.h. */
438013df 12397
bec39cab
AC
12398int
12399main ()
12400{
438013df 12401int i;
bec39cab
AC
12402 ;
12403 return 0;
12404}
12405_ACEOF
81ecdfbb 12406if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12407
81ecdfbb
RW
12408else
12409 gdb_cv_bigtoc=
438013df 12410fi
81ecdfbb
RW
12411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12413 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12414
bec39cab 12415fi
81ecdfbb
RW
12416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12417$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12418 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12419 ;;
12420esac
12421
38f6b338 12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12423$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12424dynamic_list=false
12425if test "${gdb_native}" = yes; then
12426 # The dynamically loaded libthread_db needs access to symbols in the gdb
12427 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12428 # may not be supported there.
12429 old_LDFLAGS="$LDFLAGS"
12430 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12431 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12432 LDFLAGS="$LDFLAGS $RDYNAMIC"
12433 if test "${have_libpython}" = no; then
12434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12435/* end confdefs.h. */
12436
12437int
12438main ()
12439{
12440
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12446 dynamic_list=true
12447fi
12448rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12450 else
12451 # Workaround http://bugs.python.org/issue4434 where static
12452 # libpythonX.Y.a would get its symbols required for
12453 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12454 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12455 old_CFLAGS="$CFLAGS"
12456 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12457 old_LIBS="$LIBS"
12458 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12459 if test "$cross_compiling" = yes; then :
3bebe2f2 12460 true
f6528abd 12461else
3bebe2f2
JK
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463/* end confdefs.h. */
12464#include "${have_libpython}/Python.h"
12465int
12466main ()
12467{
12468int err;
38f6b338
JK
12469 Py_Initialize ();
12470 err = PyRun_SimpleString ("import itertools\n");
12471 Py_Finalize ();
12472 return err == 0 ? 0 : 1;
3bebe2f2
JK
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477if ac_fn_c_try_run "$LINENO"; then :
12478 dynamic_list=true
12479fi
12480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12481 conftest.$ac_objext conftest.beam conftest.$ac_ext
12482fi
12483
8c1fb155 12484 LIBS="$old_LIBS"
38f6b338
JK
12485 CFLAGS="$old_CFLAGS"
12486 fi
12487 LDFLAGS="$old_LDFLAGS"
12488fi
12489if $dynamic_list; then
12490 found="-Wl,--dynamic-list"
12491 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12492else
38f6b338
JK
12493 found="-rdynamic"
12494 RDYNAMIC="-rdynamic"
f6528abd 12495fi
f6528abd 12496
38f6b338 12497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12498$as_echo "$found" >&6; }
0407b3f1 12499
f6528abd 12500
0407b3f1 12501if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12502 case ${host_os} in
c906108c 12503 solaris*)
d92419e5
JB
12504 # See if thread_db library is around for Solaris thread debugging.
12505 # Note that we must explicitly test for version 1 of the library
12506 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12507 # the same API.
81ecdfbb
RW
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12509$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12510 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12512$as_echo "yes" >&6; }
60ca704f 12513
81ecdfbb 12514$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12515
3483b318 12516 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12517 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12519$as_echo_n "checking for dlopen in -ldl... " >&6; }
12520if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12521 $as_echo_n "(cached) " >&6
c906108c 12522else
bec39cab 12523 ac_check_lib_save_LIBS=$LIBS
c906108c 12524LIBS="-ldl $LIBS"
81ecdfbb 12525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12526/* end confdefs.h. */
12527
81ecdfbb
RW
12528/* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
bec39cab
AC
12531#ifdef __cplusplus
12532extern "C"
12533#endif
bec39cab
AC
12534char dlopen ();
12535int
12536main ()
12537{
81ecdfbb 12538return dlopen ();
bec39cab
AC
12539 ;
12540 return 0;
12541}
12542_ACEOF
81ecdfbb 12543if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12544 ac_cv_lib_dl_dlopen=yes
12545else
81ecdfbb 12546 ac_cv_lib_dl_dlopen=no
bec39cab 12547fi
81ecdfbb
RW
12548rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12550LIBS=$ac_check_lib_save_LIBS
12551fi
81ecdfbb
RW
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12553$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12554if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12555 cat >>confdefs.h <<_ACEOF
12556#define HAVE_LIBDL 1
12557_ACEOF
c906108c
SS
12558
12559 LIBS="-ldl $LIBS"
12560
c906108c
SS
12561fi
12562
f6528abd 12563 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12564 # Sun randomly tweaked the prototypes in <proc_service.h>
12565 # at one point.
81ecdfbb
RW
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12567$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12568 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12569 $as_echo_n "(cached) " >&6
c906108c 12570else
bec39cab 12571
81ecdfbb 12572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12573/* end confdefs.h. */
c906108c
SS
12574
12575 #include <proc_service.h>
12576 ps_err_e ps_pdwrite
12577 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12578
bec39cab
AC
12579int
12580main ()
12581{
12582
12583 ;
12584 return 0;
12585}
12586_ACEOF
81ecdfbb 12587if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12588 gdb_cv_proc_service_is_old=no
12589else
81ecdfbb 12590 gdb_cv_proc_service_is_old=yes
c906108c 12591fi
81ecdfbb 12592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12593
c906108c
SS
12594fi
12595
81ecdfbb
RW
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12597$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12598 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12599
81ecdfbb 12600$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12601
12602 fi
12603 else
81ecdfbb
RW
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12605$as_echo "no" >&6; }
c906108c
SS
12606 fi
12607 ;;
d92419e5 12608 aix*)
81ecdfbb
RW
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12610$as_echo_n "checking for AiX thread debugging library... " >&6; }
12611 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12612 $as_echo_n "(cached) " >&6
bec39cab 12613else
81ecdfbb 12614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12615/* end confdefs.h. */
d92419e5 12616#include <sys/pthdebug.h>
bec39cab
AC
12617int
12618main ()
12619{
d92419e5
JB
12620#ifndef PTHDB_VERSION_3
12621 #error
12622 #endif
bec39cab
AC
12623 ;
12624 return 0;
12625}
12626_ACEOF
81ecdfbb 12627if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12628 gdb_cv_have_aix_thread_debug=yes
12629else
81ecdfbb 12630 gdb_cv_have_aix_thread_debug=no
d92419e5 12631fi
81ecdfbb 12632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12633fi
12634
81ecdfbb
RW
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12636$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12637 if test $gdb_cv_have_aix_thread_debug = yes; then
12638 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12639 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12640 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12641
12642 # Older versions of AIX do not provide the declaration for
12643 # the getthrds function (it appears that it was introduced
12644 # with AIX 6.x).
12645 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12646"
12647if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12648 ac_have_decl=1
12649else
12650 ac_have_decl=0
12651fi
12652
12653cat >>confdefs.h <<_ACEOF
12654#define HAVE_DECL_GETTHRDS $ac_have_decl
12655_ACEOF
12656
d92419e5
JB
12657 fi
12658 ;;
c906108c 12659 esac
bec39cab 12660
c906108c
SS
12661fi
12662
3f47be5c 12663if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12665$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12666if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12667 $as_echo_n "(cached) " >&6
bec39cab 12668else
81ecdfbb 12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12670/* end confdefs.h. */
3f47be5c 12671#include <thread_db.h>
bec39cab
AC
12672int
12673main ()
12674{
3f47be5c 12675int i = TD_NOTALLOC;
bec39cab
AC
12676 ;
12677 return 0;
12678}
12679_ACEOF
81ecdfbb 12680if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12681 gdb_cv_thread_db_h_has_td_notalloc=yes
12682else
81ecdfbb 12683 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12684
3f47be5c 12685fi
81ecdfbb 12686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12687
bec39cab 12688fi
81ecdfbb
RW
12689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12690$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12692$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12693if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12694 $as_echo_n "(cached) " >&6
59f80f10 12695else
81ecdfbb 12696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12697/* end confdefs.h. */
12698#include <thread_db.h>
12699int
12700main ()
12701{
12702int i = TD_VERSION;
12703 ;
12704 return 0;
12705}
12706_ACEOF
81ecdfbb 12707if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12708 gdb_cv_thread_db_h_has_td_version=yes
12709else
81ecdfbb 12710 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12711
12712fi
81ecdfbb 12713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12714
12715fi
81ecdfbb
RW
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12717$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12719$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12720if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12721 $as_echo_n "(cached) " >&6
59f80f10 12722else
81ecdfbb 12723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12724/* end confdefs.h. */
12725#include <thread_db.h>
12726int
12727main ()
12728{
12729int i = TD_NOTLS;
12730 ;
12731 return 0;
12732}
12733_ACEOF
81ecdfbb 12734if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12735 gdb_cv_thread_db_h_has_td_notls=yes
12736else
81ecdfbb 12737 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12738
12739fi
81ecdfbb 12740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12741
12742fi
81ecdfbb
RW
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12744$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12745fi
12746if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12747
81ecdfbb 12748$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12749
59f80f10
DJ
12750fi
12751if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12752
81ecdfbb 12753$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12754
12755fi
12756if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12757
81ecdfbb 12758$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12759
3f47be5c
EZ
12760fi
12761
b757528f 12762if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12764$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12765if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12766 $as_echo_n "(cached) " >&6
bec39cab 12767else
81ecdfbb 12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12769/* end confdefs.h. */
b757528f 12770#include <sys/syscall.h>
bec39cab
AC
12771int
12772main ()
12773{
b757528f 12774int i = __NR_tkill;
bec39cab
AC
12775 ;
12776 return 0;
12777}
12778_ACEOF
81ecdfbb 12779if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12780 gdb_cv_sys_syscall_h_has_tkill=yes
12781else
81ecdfbb 12782 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12783
b757528f 12784fi
81ecdfbb 12785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12786
bec39cab 12787fi
81ecdfbb
RW
12788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12789$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12790fi
99c1d451
TT
12791if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12792 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12793if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12794
81ecdfbb 12795$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12796
99c1d451
TT
12797
12798fi
12799
b757528f
JJ
12800fi
12801
81ecdfbb
RW
12802ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12803"
12804if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12805 ac_have_decl=1
10568435 12806else
81ecdfbb 12807 ac_have_decl=0
10568435 12808fi
10568435
JK
12809
12810cat >>confdefs.h <<_ACEOF
81ecdfbb 12811#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12812_ACEOF
12813
12814
81ecdfbb
RW
12815if test "$cross_compiling" = yes; then :
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12817/* end confdefs.h. */
12818#include <sys/personality.h>
12819int
12820main ()
12821{
12822
12823# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12824# define ADDR_NO_RANDOMIZE 0x0040000
12825# endif
12826 /* Test the flag could be set and stays set. */
12827 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12828 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12829 return 1
12830 ;
12831 return 0;
12832}
12833_ACEOF
81ecdfbb 12834if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12835 have_personality=true
12836else
81ecdfbb 12837 have_personality=false
10568435 12838fi
81ecdfbb
RW
12839rm -f core conftest.err conftest.$ac_objext \
12840 conftest$ac_exeext conftest.$ac_ext
10568435 12841else
81ecdfbb 12842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12843/* end confdefs.h. */
12844#include <sys/personality.h>
12845int
12846main ()
12847{
12848
12849# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12850# define ADDR_NO_RANDOMIZE 0x0040000
12851# endif
12852 /* Test the flag could be set and stays set. */
12853 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12854 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12855 return 1
12856 ;
12857 return 0;
12858}
12859_ACEOF
81ecdfbb 12860if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12861 have_personality=true
12862else
81ecdfbb 12863 have_personality=false
10568435 12864fi
81ecdfbb
RW
12865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12866 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12867fi
81ecdfbb 12868
10568435
JK
12869if $have_personality
12870then
12871
81ecdfbb 12872$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12873
12874fi
12875
e655c1a2
PA
12876case $host_os in
12877 go32* | *djgpp*)
12878 gdbinit=gdb.ini
12879 ;;
12880 *)
12881 gdbinit=.gdbinit
12882 ;;
12883esac
12884
12885cat >>confdefs.h <<_ACEOF
12886#define GDBINIT "$gdbinit"
12887_ACEOF
12888
12889
fb40c209 12890
f83d8a90
DE
12891# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12892# except that the argument to --with-sysroot is optional.
12893# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12894if test "x$with_sysroot" = xyes; then
12895 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12896fi
bec39cab 12897
81ecdfbb
RW
12898# Check whether --with-sysroot was given.
12899if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12900 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12901else
12902 TARGET_SYSTEM_ROOT=
12903fi
030292b7 12904
030292b7 12905
f83d8a90
DE
12906 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12907 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12908 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12909 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12910
f83d8a90
DE
12911cat >>confdefs.h <<_ACEOF
12912#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12913_ACEOF
bec39cab 12914
030292b7 12915
b14b1491 12916
f83d8a90
DE
12917
12918 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12919 if test "x$prefix" = xNONE; then
12920 test_prefix=/usr/local
12921 else
12922 test_prefix=$prefix
12923 fi
12924 else
12925 test_prefix=$exec_prefix
12926 fi
12927 value=0
12928 case ${ac_define_dir} in
12929 "${test_prefix}"|"${test_prefix}/"*|\
12930 '${exec_prefix}'|'${exec_prefix}/'*)
12931 value=1
12932 ;;
12933 esac
12934
12935cat >>confdefs.h <<_ACEOF
12936#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12937_ACEOF
030292b7
DJ
12938
12939
12940
16e7150e 12941
16e7150e 12942
81ecdfbb
RW
12943# Check whether --with-system-gdbinit was given.
12944if test "${with_system_gdbinit+set}" = set; then :
12945 withval=$with_system_gdbinit;
b14b1491
TT
12946 SYSTEM_GDBINIT=$withval
12947else
12948 SYSTEM_GDBINIT=
81ecdfbb
RW
12949fi
12950
16e7150e
JG
12951
12952 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12953 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12954 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12955 ac_define_dir=`eval echo $ac_define_dir`
12956
12957cat >>confdefs.h <<_ACEOF
12958#define SYSTEM_GDBINIT "$ac_define_dir"
12959_ACEOF
12960
12961
12962
0c4a4063 12963
b14b1491
TT
12964 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12965 if test "x$prefix" = xNONE; then
12966 test_prefix=/usr/local
12967 else
12968 test_prefix=$prefix
12969 fi
12970 else
12971 test_prefix=$exec_prefix
12972 fi
12973 value=0
12974 case ${ac_define_dir} in
12975 "${test_prefix}"|"${test_prefix}/"*|\
12976 '${exec_prefix}'|'${exec_prefix}/'*)
12977 value=1
12978 ;;
12979 esac
16e7150e 12980
b14b1491
TT
12981cat >>confdefs.h <<_ACEOF
12982#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12983_ACEOF
12984
b14b1491 12985
16e7150e 12986
0c4a4063 12987
81ecdfbb
RW
12988# Check whether --enable-werror was given.
12989if test "${enable_werror+set}" = set; then :
12990 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12991 yes | y) ERROR_ON_WARNING="yes" ;;
12992 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12993 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12994 esac
81ecdfbb
RW
12995fi
12996
094a342e 12997
a68ffae9
JK
12998# Enable -Werror by default when using gcc. Turn it off for releases.
12999if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
13000 ERROR_ON_WARNING=yes
13001fi
13002
13003WERROR_CFLAGS=""
13004if test "${ERROR_ON_WARNING}" = yes ; then
13005 WERROR_CFLAGS="-Werror"
13006fi
13007
aa79a185 13008build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 13009-Wpointer-sign \
1cb5e2a4 13010-Wno-unused -Wunused-value -Wunused-function \
352b3eda 13011-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 13012-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 13013-Wold-style-declaration -Wold-style-definition"
a3b362c4 13014
3526781e
DJ
13015# Enable -Wno-format by default when using gcc on mingw since many
13016# GCC versions complain about %I64.
13017case "${host}" in
13018 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 13019 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
13020esac
13021
81ecdfbb
RW
13022# Check whether --enable-build-warnings was given.
13023if test "${enable_build_warnings+set}" = set; then :
13024 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13025 yes) ;;
13026 no) build_warnings="-w";;
13027 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13028 build_warnings="${build_warnings} ${t}";;
13029 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13030 build_warnings="${t} ${build_warnings}";;
13031 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13032esac
d4f3574e 13033if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13034 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13035fi
81ecdfbb
RW
13036fi
13037# Check whether --enable-gdb-build-warnings was given.
13038if test "${enable_gdb_build_warnings+set}" = set; then :
13039 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13040 yes) ;;
13041 no) build_warnings="-w";;
13042 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13043 build_warnings="${build_warnings} ${t}";;
13044 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13045 build_warnings="${t} ${build_warnings}";;
13046 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13047esac
13048if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13049 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13050fi
81ecdfbb
RW
13051fi
13052WARN_CFLAGS=""
c906108c
SS
13053if test "x${build_warnings}" != x -a "x$GCC" = xyes
13054then
81ecdfbb
RW
13055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13056$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13057 # Separate out the -Werror flag as some files just cannot be
13058 # compiled with it enabled.
13059 for w in ${build_warnings}; do
13060 case $w in
13061 -Werr*) WERROR_CFLAGS=-Werror ;;
13062 *) # Check that GCC accepts it
4536bbc6
AC
13063 saved_CFLAGS="$CFLAGS"
13064 CFLAGS="$CFLAGS $w"
81ecdfbb 13065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13066/* end confdefs.h. */
4536bbc6 13067
bec39cab
AC
13068int
13069main ()
13070{
4536bbc6 13071
bec39cab
AC
13072 ;
13073 return 0;
13074}
13075_ACEOF
81ecdfbb 13076if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13077 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13078fi
81ecdfbb 13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13080 CFLAGS="$saved_CFLAGS"
746a987d
AC
13081 esac
13082 done
81ecdfbb
RW
13083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13084$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13085fi
13086
13087
104c1213 13088
7a292a7a 13089# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13091$as_echo_n "checking for cygwin... " >&6; }
13092if test "${gdb_cv_os_cygwin+set}" = set; then :
13093 $as_echo_n "(cached) " >&6
bec39cab 13094else
81ecdfbb 13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13096/* end confdefs.h. */
7a292a7a
SS
13097
13098#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13099lose
13100#endif
bec39cab 13101_ACEOF
7a292a7a 13102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 13103 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
13104 gdb_cv_os_cygwin=yes
13105else
7a292a7a
SS
13106 gdb_cv_os_cygwin=no
13107fi
13108rm -f conftest*
13109
13110fi
81ecdfbb
RW
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13112$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13113
aff38e61 13114
3eb25fda 13115SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13116case ${host} in
95cbc983
AC
13117 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13118 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13119 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13120esac
13121
13122
cd0fc7c3
SS
13123# libreadline needs libuser32.a in a cygwin environment
13124WIN32LIBS=
13125if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13126 WIN32LIBS="-luser32"
13127 case "${target}" in
13128 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13129 ;;
13130 esac
cd0fc7c3 13131fi
c906108c 13132
b4505029
MM
13133# The ser-tcp.c module requires sockets.
13134case ${host} in
13135 *mingw32*)
13136
81ecdfbb 13137$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13138
13139 WIN32LIBS="$WIN32LIBS -lws2_32"
13140 ;;
13141esac
13142
7a292a7a 13143
31d99776 13144# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13145
13146 OLD_CFLAGS=$CFLAGS
13147 OLD_LDFLAGS=$LDFLAGS
13148 OLD_LIBS=$LIBS
13149 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13150 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13151 # always want our bfd.
13152 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13153 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13154 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13155 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13156 if test "$plugins" = "yes"; then
a48b32c0
L
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13158$as_echo_n "checking for library containing dlopen... " >&6; }
13159if test "${ac_cv_search_dlopen+set}" = set; then :
13160 $as_echo_n "(cached) " >&6
13161else
13162 ac_func_search_save_LIBS=$LIBS
13163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13164/* end confdefs.h. */
13165
13166/* Override any GCC internal prototype to avoid an error.
13167 Use char because int might match the return type of a GCC
13168 builtin and then its argument prototype would still apply. */
13169#ifdef __cplusplus
13170extern "C"
13171#endif
13172char dlopen ();
13173int
13174main ()
13175{
13176return dlopen ();
13177 ;
13178 return 0;
13179}
13180_ACEOF
13181for ac_lib in '' dl; do
13182 if test -z "$ac_lib"; then
13183 ac_res="none required"
13184 else
13185 ac_res=-l$ac_lib
13186 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13187 fi
13188 if ac_fn_c_try_link "$LINENO"; then :
13189 ac_cv_search_dlopen=$ac_res
13190fi
13191rm -f core conftest.err conftest.$ac_objext \
13192 conftest$ac_exeext
13193 if test "${ac_cv_search_dlopen+set}" = set; then :
13194 break
13195fi
13196done
13197if test "${ac_cv_search_dlopen+set}" = set; then :
13198
13199else
13200 ac_cv_search_dlopen=no
13201fi
13202rm conftest.$ac_ext
13203LIBS=$ac_func_search_save_LIBS
13204fi
13205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13206$as_echo "$ac_cv_search_dlopen" >&6; }
13207ac_res=$ac_cv_search_dlopen
13208if test "$ac_res" != no; then :
13209 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13210
13211fi
13212
def63ff0
TT
13213 fi
13214 LIBS="-lbfd -liberty $intl $LIBS"
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13216$as_echo_n "checking for ELF support in BFD... " >&6; }
13217if test "${gdb_cv_var_elf+set}" = set; then :
13218 $as_echo_n "(cached) " >&6
31d99776 13219else
81ecdfbb 13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13221/* end confdefs.h. */
13222#include <stdlib.h>
def63ff0
TT
13223 #include "bfd.h"
13224 #include "elf-bfd.h"
31d99776
DJ
13225
13226int
13227main ()
13228{
def63ff0 13229return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13230 ;
13231 return 0;
13232}
13233_ACEOF
81ecdfbb 13234if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13235 gdb_cv_var_elf=yes
13236else
81ecdfbb 13237 gdb_cv_var_elf=no
31d99776 13238fi
81ecdfbb
RW
13239rm -f core conftest.err conftest.$ac_objext \
13240 conftest$ac_exeext conftest.$ac_ext
31d99776 13241fi
81ecdfbb
RW
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13243$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13244 CFLAGS=$OLD_CFLAGS
13245 LDFLAGS=$OLD_LDFLAGS
13246 LIBS=$OLD_LIBS
31d99776 13247if test $gdb_cv_var_elf = yes; then
55aa24fb 13248 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 13249
81ecdfbb 13250$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13251
075ff26d
JK
13252 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13253 if test "$plugins" = "yes"; then
a48b32c0
L
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13255$as_echo_n "checking for library containing dlopen... " >&6; }
13256if test "${ac_cv_search_dlopen+set}" = set; then :
13257 $as_echo_n "(cached) " >&6
13258else
13259 ac_func_search_save_LIBS=$LIBS
13260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h. */
13262
13263/* Override any GCC internal prototype to avoid an error.
13264 Use char because int might match the return type of a GCC
13265 builtin and then its argument prototype would still apply. */
13266#ifdef __cplusplus
13267extern "C"
13268#endif
13269char dlopen ();
13270int
13271main ()
13272{
13273return dlopen ();
13274 ;
13275 return 0;
13276}
13277_ACEOF
13278for ac_lib in '' dl; do
13279 if test -z "$ac_lib"; then
13280 ac_res="none required"
13281 else
13282 ac_res=-l$ac_lib
13283 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13284 fi
13285 if ac_fn_c_try_link "$LINENO"; then :
13286 ac_cv_search_dlopen=$ac_res
13287fi
13288rm -f core conftest.err conftest.$ac_objext \
13289 conftest$ac_exeext
13290 if test "${ac_cv_search_dlopen+set}" = set; then :
13291 break
13292fi
13293done
13294if test "${ac_cv_search_dlopen+set}" = set; then :
13295
13296else
13297 ac_cv_search_dlopen=no
13298fi
13299rm conftest.$ac_ext
13300LIBS=$ac_func_search_save_LIBS
13301fi
13302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13303$as_echo "$ac_cv_search_dlopen" >&6; }
13304ac_res=$ac_cv_search_dlopen
13305if test "$ac_res" != no; then :
13306 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13307
13308fi
13309
075ff26d 13310 fi
31d99776 13311fi
31d99776 13312
4f05add4
TT
13313# Add macho support to GDB, but only if BFD includes it.
13314
13315 OLD_CFLAGS=$CFLAGS
13316 OLD_LDFLAGS=$LDFLAGS
13317 OLD_LIBS=$LIBS
13318 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13319 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13320 # always want our bfd.
13321 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13322 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13323 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13324 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13325 if test "$plugins" = "yes"; then
a48b32c0
L
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13327$as_echo_n "checking for library containing dlopen... " >&6; }
13328if test "${ac_cv_search_dlopen+set}" = set; then :
13329 $as_echo_n "(cached) " >&6
13330else
13331 ac_func_search_save_LIBS=$LIBS
13332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333/* end confdefs.h. */
13334
13335/* Override any GCC internal prototype to avoid an error.
13336 Use char because int might match the return type of a GCC
13337 builtin and then its argument prototype would still apply. */
13338#ifdef __cplusplus
13339extern "C"
13340#endif
13341char dlopen ();
13342int
13343main ()
13344{
13345return dlopen ();
13346 ;
13347 return 0;
13348}
13349_ACEOF
13350for ac_lib in '' dl; do
13351 if test -z "$ac_lib"; then
13352 ac_res="none required"
13353 else
13354 ac_res=-l$ac_lib
13355 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13356 fi
13357 if ac_fn_c_try_link "$LINENO"; then :
13358 ac_cv_search_dlopen=$ac_res
13359fi
13360rm -f core conftest.err conftest.$ac_objext \
13361 conftest$ac_exeext
13362 if test "${ac_cv_search_dlopen+set}" = set; then :
13363 break
13364fi
13365done
13366if test "${ac_cv_search_dlopen+set}" = set; then :
13367
13368else
13369 ac_cv_search_dlopen=no
13370fi
13371rm conftest.$ac_ext
13372LIBS=$ac_func_search_save_LIBS
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13375$as_echo "$ac_cv_search_dlopen" >&6; }
13376ac_res=$ac_cv_search_dlopen
13377if test "$ac_res" != no; then :
13378 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13379
13380fi
13381
4f05add4
TT
13382 fi
13383 LIBS="-lbfd -liberty $intl $LIBS"
13384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13385$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13386if test "${gdb_cv_var_macho+set}" = set; then :
13387 $as_echo_n "(cached) " >&6
13388else
13389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390/* end confdefs.h. */
13391#include <stdlib.h>
13392 #include "bfd.h"
13393 #include "mach-o.h"
13394
13395int
13396main ()
13397{
13398return bfd_mach_o_lookup_command (NULL, 0, NULL);
13399 ;
13400 return 0;
13401}
13402_ACEOF
13403if ac_fn_c_try_link "$LINENO"; then :
13404 gdb_cv_var_macho=yes
13405else
13406 gdb_cv_var_macho=no
13407fi
13408rm -f core conftest.err conftest.$ac_objext \
13409 conftest$ac_exeext conftest.$ac_ext
13410fi
13411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13412$as_echo "$gdb_cv_var_macho" >&6; }
13413 CFLAGS=$OLD_CFLAGS
13414 LDFLAGS=$OLD_LDFLAGS
13415 LIBS=$OLD_LIBS
13416if test $gdb_cv_var_macho = yes; then
13417 CONFIG_OBS="$CONFIG_OBS machoread.o"
13418fi
13419
b2259038
TT
13420# Add SOM support to GDB, but only if BFD includes it.
13421
13422 OLD_CFLAGS=$CFLAGS
13423 OLD_LDFLAGS=$LDFLAGS
13424 OLD_LIBS=$LIBS
13425 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13426 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13427 # always want our bfd.
13428 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13429 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13430 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13431 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13432 if test "$plugins" = "yes"; then
a48b32c0
L
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13434$as_echo_n "checking for library containing dlopen... " >&6; }
13435if test "${ac_cv_search_dlopen+set}" = set; then :
13436 $as_echo_n "(cached) " >&6
13437else
13438 ac_func_search_save_LIBS=$LIBS
13439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440/* end confdefs.h. */
13441
13442/* Override any GCC internal prototype to avoid an error.
13443 Use char because int might match the return type of a GCC
13444 builtin and then its argument prototype would still apply. */
13445#ifdef __cplusplus
13446extern "C"
13447#endif
13448char dlopen ();
13449int
13450main ()
13451{
13452return dlopen ();
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457for ac_lib in '' dl; do
13458 if test -z "$ac_lib"; then
13459 ac_res="none required"
13460 else
13461 ac_res=-l$ac_lib
13462 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13463 fi
13464 if ac_fn_c_try_link "$LINENO"; then :
13465 ac_cv_search_dlopen=$ac_res
13466fi
13467rm -f core conftest.err conftest.$ac_objext \
13468 conftest$ac_exeext
13469 if test "${ac_cv_search_dlopen+set}" = set; then :
13470 break
13471fi
13472done
13473if test "${ac_cv_search_dlopen+set}" = set; then :
13474
13475else
13476 ac_cv_search_dlopen=no
13477fi
13478rm conftest.$ac_ext
13479LIBS=$ac_func_search_save_LIBS
13480fi
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13482$as_echo "$ac_cv_search_dlopen" >&6; }
13483ac_res=$ac_cv_search_dlopen
13484if test "$ac_res" != no; then :
13485 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13486
13487fi
13488
b2259038
TT
13489 fi
13490 LIBS="-lbfd -liberty $intl $LIBS"
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13492$as_echo_n "checking for SOM support in BFD... " >&6; }
13493if test "${gdb_cv_var_som+set}" = set; then :
13494 $as_echo_n "(cached) " >&6
13495else
13496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497/* end confdefs.h. */
13498#include <stdlib.h>
13499 #include "bfd.h"
13500 #include "som.h"
13501
13502int
13503main ()
13504{
13505return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13506 ;
13507 return 0;
13508}
13509_ACEOF
13510if ac_fn_c_try_link "$LINENO"; then :
13511 gdb_cv_var_som=yes
13512else
13513 gdb_cv_var_som=no
13514fi
13515rm -f core conftest.err conftest.$ac_objext \
13516 conftest$ac_exeext conftest.$ac_ext
13517fi
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13519$as_echo "$gdb_cv_var_som" >&6; }
13520 CFLAGS=$OLD_CFLAGS
13521 LDFLAGS=$OLD_LDFLAGS
13522 LIBS=$OLD_LIBS
13523if test $gdb_cv_var_som = yes; then
13524 CONFIG_OBS="$CONFIG_OBS somread.o"
13525fi
13526
121ce6e5
DJ
13527# Add any host-specific objects to GDB.
13528CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13529
608e2dbb
TT
13530# If building on ELF, look for lzma support for embedded compressed debug info.
13531if test $gdb_cv_var_elf = yes; then
13532
13533# Check whether --with-lzma was given.
13534if test "${with_lzma+set}" = set; then :
13535 withval=$with_lzma;
13536else
13537 with_lzma=auto
13538fi
13539
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13541$as_echo_n "checking whether to use lzma... " >&6; }
13542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13543$as_echo "$with_lzma" >&6; }
13544
13545 if test "${with_lzma}" != no; then
13546
13547
13548
13549
13550
13551
13552
13553
13554 use_additional=yes
13555
13556 acl_save_prefix="$prefix"
13557 prefix="$acl_final_prefix"
13558 acl_save_exec_prefix="$exec_prefix"
13559 exec_prefix="$acl_final_exec_prefix"
13560
13561 eval additional_includedir=\"$includedir\"
13562 eval additional_libdir=\"$libdir\"
13563
13564 exec_prefix="$acl_save_exec_prefix"
13565 prefix="$acl_save_prefix"
13566
13567
13568# Check whether --with-liblzma-prefix was given.
13569if test "${with_liblzma_prefix+set}" = set; then :
13570 withval=$with_liblzma_prefix;
13571 if test "X$withval" = "Xno"; then
13572 use_additional=no
13573 else
13574 if test "X$withval" = "X"; then
13575
13576 acl_save_prefix="$prefix"
13577 prefix="$acl_final_prefix"
13578 acl_save_exec_prefix="$exec_prefix"
13579 exec_prefix="$acl_final_exec_prefix"
13580
13581 eval additional_includedir=\"$includedir\"
13582 eval additional_libdir=\"$libdir\"
13583
13584 exec_prefix="$acl_save_exec_prefix"
13585 prefix="$acl_save_prefix"
13586
13587 else
13588 additional_includedir="$withval/include"
13589 additional_libdir="$withval/lib"
13590 fi
13591 fi
13592
13593fi
13594
13595 LIBLZMA=
13596 LTLIBLZMA=
13597 INCLZMA=
13598 rpathdirs=
13599 ltrpathdirs=
13600 names_already_handled=
13601 names_next_round='lzma '
13602 while test -n "$names_next_round"; do
13603 names_this_round="$names_next_round"
13604 names_next_round=
13605 for name in $names_this_round; do
13606 already_handled=
13607 for n in $names_already_handled; do
13608 if test "$n" = "$name"; then
13609 already_handled=yes
13610 break
13611 fi
13612 done
13613 if test -z "$already_handled"; then
13614 names_already_handled="$names_already_handled $name"
13615 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13616 eval value=\"\$HAVE_LIB$uppername\"
13617 if test -n "$value"; then
13618 if test "$value" = yes; then
13619 eval value=\"\$LIB$uppername\"
13620 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13621 eval value=\"\$LTLIB$uppername\"
13622 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13623 else
13624 :
13625 fi
13626 else
13627 found_dir=
13628 found_la=
13629 found_so=
13630 found_a=
13631 if test $use_additional = yes; then
13632 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13633 found_dir="$additional_libdir"
13634 found_so="$additional_libdir/lib$name.$shlibext"
13635 if test -f "$additional_libdir/lib$name.la"; then
13636 found_la="$additional_libdir/lib$name.la"
13637 fi
13638 else
13639 if test -f "$additional_libdir/lib$name.$libext"; then
13640 found_dir="$additional_libdir"
13641 found_a="$additional_libdir/lib$name.$libext"
13642 if test -f "$additional_libdir/lib$name.la"; then
13643 found_la="$additional_libdir/lib$name.la"
13644 fi
13645 fi
13646 fi
13647 fi
13648 if test "X$found_dir" = "X"; then
13649 for x in $LDFLAGS $LTLIBLZMA; do
13650
13651 acl_save_prefix="$prefix"
13652 prefix="$acl_final_prefix"
13653 acl_save_exec_prefix="$exec_prefix"
13654 exec_prefix="$acl_final_exec_prefix"
13655 eval x=\"$x\"
13656 exec_prefix="$acl_save_exec_prefix"
13657 prefix="$acl_save_prefix"
13658
13659 case "$x" in
13660 -L*)
13661 dir=`echo "X$x" | sed -e 's/^X-L//'`
13662 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13663 found_dir="$dir"
13664 found_so="$dir/lib$name.$shlibext"
13665 if test -f "$dir/lib$name.la"; then
13666 found_la="$dir/lib$name.la"
13667 fi
13668 else
13669 if test -f "$dir/lib$name.$libext"; then
13670 found_dir="$dir"
13671 found_a="$dir/lib$name.$libext"
13672 if test -f "$dir/lib$name.la"; then
13673 found_la="$dir/lib$name.la"
13674 fi
13675 fi
13676 fi
13677 ;;
13678 esac
13679 if test "X$found_dir" != "X"; then
13680 break
13681 fi
13682 done
13683 fi
13684 if test "X$found_dir" != "X"; then
13685 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13686 if test "X$found_so" != "X"; then
13687 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13688 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13689 else
13690 haveit=
13691 for x in $ltrpathdirs; do
13692 if test "X$x" = "X$found_dir"; then
13693 haveit=yes
13694 break
13695 fi
13696 done
13697 if test -z "$haveit"; then
13698 ltrpathdirs="$ltrpathdirs $found_dir"
13699 fi
13700 if test "$hardcode_direct" = yes; then
13701 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13702 else
13703 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13704 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13705 haveit=
13706 for x in $rpathdirs; do
13707 if test "X$x" = "X$found_dir"; then
13708 haveit=yes
13709 break
13710 fi
13711 done
13712 if test -z "$haveit"; then
13713 rpathdirs="$rpathdirs $found_dir"
13714 fi
13715 else
13716 haveit=
13717 for x in $LDFLAGS $LIBLZMA; do
13718
13719 acl_save_prefix="$prefix"
13720 prefix="$acl_final_prefix"
13721 acl_save_exec_prefix="$exec_prefix"
13722 exec_prefix="$acl_final_exec_prefix"
13723 eval x=\"$x\"
13724 exec_prefix="$acl_save_exec_prefix"
13725 prefix="$acl_save_prefix"
13726
13727 if test "X$x" = "X-L$found_dir"; then
13728 haveit=yes
13729 break
13730 fi
13731 done
13732 if test -z "$haveit"; then
13733 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13734 fi
13735 if test "$hardcode_minus_L" != no; then
13736 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13737 else
13738 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13739 fi
13740 fi
13741 fi
13742 fi
13743 else
13744 if test "X$found_a" != "X"; then
13745 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13746 else
13747 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13748 fi
13749 fi
13750 additional_includedir=
13751 case "$found_dir" in
13752 */lib | */lib/)
13753 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13754 additional_includedir="$basedir/include"
13755 ;;
13756 esac
13757 if test "X$additional_includedir" != "X"; then
13758 if test "X$additional_includedir" != "X/usr/include"; then
13759 haveit=
13760 if test "X$additional_includedir" = "X/usr/local/include"; then
13761 if test -n "$GCC"; then
13762 case $host_os in
13763 linux*) haveit=yes;;
13764 esac
13765 fi
13766 fi
13767 if test -z "$haveit"; then
13768 for x in $CPPFLAGS $INCLZMA; do
13769
13770 acl_save_prefix="$prefix"
13771 prefix="$acl_final_prefix"
13772 acl_save_exec_prefix="$exec_prefix"
13773 exec_prefix="$acl_final_exec_prefix"
13774 eval x=\"$x\"
13775 exec_prefix="$acl_save_exec_prefix"
13776 prefix="$acl_save_prefix"
13777
13778 if test "X$x" = "X-I$additional_includedir"; then
13779 haveit=yes
13780 break
13781 fi
13782 done
13783 if test -z "$haveit"; then
13784 if test -d "$additional_includedir"; then
13785 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13786 fi
13787 fi
13788 fi
13789 fi
13790 fi
13791 if test -n "$found_la"; then
13792 save_libdir="$libdir"
13793 case "$found_la" in
13794 */* | *\\*) . "$found_la" ;;
13795 *) . "./$found_la" ;;
13796 esac
13797 libdir="$save_libdir"
13798 for dep in $dependency_libs; do
13799 case "$dep" in
13800 -L*)
13801 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13802 if test "X$additional_libdir" != "X/usr/lib"; then
13803 haveit=
13804 if test "X$additional_libdir" = "X/usr/local/lib"; then
13805 if test -n "$GCC"; then
13806 case $host_os in
13807 linux*) haveit=yes;;
13808 esac
13809 fi
13810 fi
13811 if test -z "$haveit"; then
13812 haveit=
13813 for x in $LDFLAGS $LIBLZMA; do
13814
13815 acl_save_prefix="$prefix"
13816 prefix="$acl_final_prefix"
13817 acl_save_exec_prefix="$exec_prefix"
13818 exec_prefix="$acl_final_exec_prefix"
13819 eval x=\"$x\"
13820 exec_prefix="$acl_save_exec_prefix"
13821 prefix="$acl_save_prefix"
13822
13823 if test "X$x" = "X-L$additional_libdir"; then
13824 haveit=yes
13825 break
13826 fi
13827 done
13828 if test -z "$haveit"; then
13829 if test -d "$additional_libdir"; then
13830 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13831 fi
13832 fi
13833 haveit=
13834 for x in $LDFLAGS $LTLIBLZMA; do
13835
13836 acl_save_prefix="$prefix"
13837 prefix="$acl_final_prefix"
13838 acl_save_exec_prefix="$exec_prefix"
13839 exec_prefix="$acl_final_exec_prefix"
13840 eval x=\"$x\"
13841 exec_prefix="$acl_save_exec_prefix"
13842 prefix="$acl_save_prefix"
13843
13844 if test "X$x" = "X-L$additional_libdir"; then
13845 haveit=yes
13846 break
13847 fi
13848 done
13849 if test -z "$haveit"; then
13850 if test -d "$additional_libdir"; then
13851 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13852 fi
13853 fi
13854 fi
13855 fi
13856 ;;
13857 -R*)
13858 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13859 if test "$enable_rpath" != no; then
13860 haveit=
13861 for x in $rpathdirs; do
13862 if test "X$x" = "X$dir"; then
13863 haveit=yes
13864 break
13865 fi
13866 done
13867 if test -z "$haveit"; then
13868 rpathdirs="$rpathdirs $dir"
13869 fi
13870 haveit=
13871 for x in $ltrpathdirs; do
13872 if test "X$x" = "X$dir"; then
13873 haveit=yes
13874 break
13875 fi
13876 done
13877 if test -z "$haveit"; then
13878 ltrpathdirs="$ltrpathdirs $dir"
13879 fi
13880 fi
13881 ;;
13882 -l*)
13883 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13884 ;;
13885 *.la)
13886 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13887 ;;
13888 *)
13889 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13890 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13891 ;;
13892 esac
13893 done
13894 fi
13895 else
13896 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13897 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13898 fi
13899 fi
13900 fi
13901 done
13902 done
13903 if test "X$rpathdirs" != "X"; then
13904 if test -n "$hardcode_libdir_separator"; then
13905 alldirs=
13906 for found_dir in $rpathdirs; do
13907 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13908 done
13909 acl_save_libdir="$libdir"
13910 libdir="$alldirs"
13911 eval flag=\"$hardcode_libdir_flag_spec\"
13912 libdir="$acl_save_libdir"
13913 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13914 else
13915 for found_dir in $rpathdirs; do
13916 acl_save_libdir="$libdir"
13917 libdir="$found_dir"
13918 eval flag=\"$hardcode_libdir_flag_spec\"
13919 libdir="$acl_save_libdir"
13920 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13921 done
13922 fi
13923 fi
13924 if test "X$ltrpathdirs" != "X"; then
13925 for found_dir in $ltrpathdirs; do
13926 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13927 done
13928 fi
13929
13930
13931 ac_save_CPPFLAGS="$CPPFLAGS"
13932
13933 for element in $INCLZMA; do
13934 haveit=
13935 for x in $CPPFLAGS; do
13936
13937 acl_save_prefix="$prefix"
13938 prefix="$acl_final_prefix"
13939 acl_save_exec_prefix="$exec_prefix"
13940 exec_prefix="$acl_final_exec_prefix"
13941 eval x=\"$x\"
13942 exec_prefix="$acl_save_exec_prefix"
13943 prefix="$acl_save_prefix"
13944
13945 if test "X$x" = "X$element"; then
13946 haveit=yes
13947 break
13948 fi
13949 done
13950 if test -z "$haveit"; then
13951 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13952 fi
13953 done
13954
13955
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13957$as_echo_n "checking for liblzma... " >&6; }
13958if test "${ac_cv_liblzma+set}" = set; then :
13959 $as_echo_n "(cached) " >&6
13960else
13961
13962 ac_save_LIBS="$LIBS"
13963 LIBS="$LIBS $LIBLZMA"
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965/* end confdefs.h. */
13966#include "lzma.h"
13967int
13968main ()
13969{
13970lzma_index_iter iter;
13971 lzma_index_iter_init (&iter, 0);
13972 lzma_mf_is_supported (LZMA_MF_HC3);
13973 ;
13974 return 0;
13975}
13976_ACEOF
13977if ac_fn_c_try_link "$LINENO"; then :
13978 ac_cv_liblzma=yes
13979else
13980 ac_cv_liblzma=no
13981fi
13982rm -f core conftest.err conftest.$ac_objext \
13983 conftest$ac_exeext conftest.$ac_ext
13984 LIBS="$ac_save_LIBS"
13985
13986fi
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13988$as_echo "$ac_cv_liblzma" >&6; }
13989 if test "$ac_cv_liblzma" = yes; then
13990 HAVE_LIBLZMA=yes
13991
13992$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13993
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13995$as_echo_n "checking how to link with liblzma... " >&6; }
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13997$as_echo "$LIBLZMA" >&6; }
13998 else
13999 HAVE_LIBLZMA=no
14000 CPPFLAGS="$ac_save_CPPFLAGS"
14001 LIBLZMA=
14002 LTLIBLZMA=
14003 fi
14004
14005
14006
14007
14008
14009
14010 if test "$HAVE_LIBLZMA" != yes; then
14011 if test "$with_lzma" = yes; then
14012 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
14013 fi
14014 fi
14015 fi
14016fi
14017
3fc11d3e
JM
14018LIBGUI="../libgui/src/libgui.a"
14019GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14020
14021
7a292a7a 14022
3fc11d3e
JM
14023WIN32LDAPP=
14024
14025
14026
d91670b9 14027case "${host}" in
686a5eed 14028*-*-cygwin* | *-*-mingw* )
d91670b9
CV
14029 configdir="win"
14030 ;;
14031*)
14032 configdir="unix"
14033 ;;
14034esac
3fc11d3e
JM
14035
14036GDBTKLIBS=
14037if test "${enable_gdbtk}" = "yes"; then
14038
d1c3b63a
KS
14039 # Gdbtk must have an absolute path to srcdir in order to run
14040 # properly when not installed.
14041 here=`pwd`
14042 cd ${srcdir}
14043 GDBTK_SRC_DIR=`pwd`
14044 cd $here
14045
bec39cab 14046
5062cc19
KS
14047 #
14048 # Ok, lets find the tcl configuration
14049 # First, look for one uninstalled.
14050 # the alternative search directory is invoked by --with-tcl
14051 #
3fc11d3e 14052
5062cc19
KS
14053 if test x"${no_tcl}" = x ; then
14054 # we reset no_tcl in case something fails here
14055 no_tcl=true
bec39cab 14056
81ecdfbb
RW
14057# Check whether --with-tcl was given.
14058if test "${with_tcl+set}" = set; then :
14059 withval=$with_tcl; with_tclconfig=${withval}
14060fi
14061
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14063$as_echo_n "checking for Tcl configuration... " >&6; }
14064 if test "${ac_cv_c_tclconfig+set}" = set; then :
14065 $as_echo_n "(cached) " >&6
3fc11d3e 14066else
bec39cab 14067
3fc11d3e 14068
5062cc19
KS
14069 # First check to see if --with-tcl was specified.
14070 case "${host}" in
14071 *-*-cygwin*) platDir="win" ;;
14072 *) platDir="unix" ;;
14073 esac
14074 if test x"${with_tclconfig}" != x ; then
14075 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14076 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14077 else
81ecdfbb 14078 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
14079 fi
14080 fi
14081
14082 # then check for a private Tcl installation
14083 if test x"${ac_cv_c_tclconfig}" = x ; then
14084 for i in \
14085 ../tcl \
14086 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14087 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14088 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14089 ../../tcl \
14090 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14091 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14092 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14093 ../../../tcl \
14094 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14095 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14096 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14097 if test -f "$i/$platDir/tclConfig.sh" ; then
14098 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14099 break
14100 fi
14101 done
14102 fi
14103
14104 # on Darwin, check in Framework installation locations
14105 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14106 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14107 `ls -d /Library/Frameworks 2>/dev/null` \
14108 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14109 `ls -d /System/Library/Frameworks 2>/dev/null` \
14110 ; do
14111 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14112 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14113 break
14114 fi
14115 done
14116 fi
14117
14118 # check in a few common install locations
14119 if test x"${ac_cv_c_tclconfig}" = x ; then
14120 for i in `ls -d ${libdir} 2>/dev/null` \
14121 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14122 `ls -d ${prefix}/lib 2>/dev/null` \
14123 `ls -d /usr/local/lib 2>/dev/null` \
14124 `ls -d /usr/contrib/lib 2>/dev/null` \
14125 `ls -d /usr/lib 2>/dev/null` \
14126 ; do
14127 if test -f "$i/tclConfig.sh" ; then
14128 ac_cv_c_tclconfig=`(cd $i; pwd)`
14129 break
14130 fi
14131 done
14132 fi
3fc11d3e 14133
5062cc19
KS
14134 # check in a few other private locations
14135 if test x"${ac_cv_c_tclconfig}" = x ; then
14136 for i in \
14137 ${srcdir}/../tcl \
14138 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14139 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14140 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14141 if test -f "$i/$platDir/tclConfig.sh" ; then
14142 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14143 break
14144 fi
14145 done
14146 fi
bec39cab 14147
3fc11d3e
JM
14148fi
14149
5062cc19
KS
14150
14151 if test x"${ac_cv_c_tclconfig}" = x ; then
14152 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14154$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14155 else
14156 no_tcl=
14157 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14159$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14160 fi
14161 fi
3fc11d3e 14162
bec39cab 14163
85541719
DE
14164 # If $no_tk is nonempty, then we can't do Tk, and there is no
14165 # point to doing Tcl.
bec39cab 14166
5062cc19
KS
14167 #
14168 # Ok, lets find the tk configuration
14169 # First, look for one uninstalled.
14170 # the alternative search directory is invoked by --with-tk
14171 #
3fc11d3e 14172
5062cc19
KS
14173 if test x"${no_tk}" = x ; then
14174 # we reset no_tk in case something fails here
14175 no_tk=true
bec39cab 14176
81ecdfbb
RW
14177# Check whether --with-tk was given.
14178if test "${with_tk+set}" = set; then :
14179 withval=$with_tk; with_tkconfig=${withval}
14180fi
14181
14182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14183$as_echo_n "checking for Tk configuration... " >&6; }
14184 if test "${ac_cv_c_tkconfig+set}" = set; then :
14185 $as_echo_n "(cached) " >&6
bec39cab 14186else
3fc11d3e
JM
14187
14188
5062cc19
KS
14189 # First check to see if --with-tkconfig was specified.
14190 if test x"${with_tkconfig}" != x ; then
14191 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14192 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14193 else
81ecdfbb 14194 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14195 fi
14196 fi
3fc11d3e 14197
5062cc19
KS
14198 # then check for a private Tk library
14199 case "${host}" in
14200 *-*-cygwin*) platDir="win" ;;
14201 *) platDir="unix" ;;
14202 esac
14203 if test x"${ac_cv_c_tkconfig}" = x ; then
14204 for i in \
14205 ../tk \
14206 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14207 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14208 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14209 ../../tk \
14210 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14211 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14212 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14213 ../../../tk \
14214 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14215 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14216 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14217 if test -f "$i/$platDir/tkConfig.sh" ; then
14218 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14219 break
14220 fi
14221 done
14222 fi
14223
14224 # on Darwin, check in Framework installation locations
14225 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14226 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14227 `ls -d /Library/Frameworks 2>/dev/null` \
14228 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14229 `ls -d /System/Library/Frameworks 2>/dev/null` \
14230 ; do
14231 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14232 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14233 break
14234 fi
14235 done
14236 fi
14237
14238 # check in a few common install locations
14239 if test x"${ac_cv_c_tkconfig}" = x ; then
14240 for i in `ls -d ${libdir} 2>/dev/null` \
14241 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14242 `ls -d ${prefix}/lib 2>/dev/null` \
14243 `ls -d /usr/local/lib 2>/dev/null` \
14244 `ls -d /usr/contrib/lib 2>/dev/null` \
14245 `ls -d /usr/lib 2>/dev/null` \
14246 ; do
14247 if test -f "$i/tkConfig.sh" ; then
14248 ac_cv_c_tkconfig=`(cd $i; pwd)`
14249 break
14250 fi
14251 done
14252 fi
14253 # check in a few other private locations
14254 if test x"${ac_cv_c_tkconfig}" = x ; then
14255 for i in \
14256 ${srcdir}/../tk \
14257 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14258 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14259 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14260 if test -f "$i/$platDir/tkConfig.sh" ; then
14261 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14262 break
14263 fi
14264 done
14265 fi
3fc11d3e 14266
3fc11d3e
JM
14267fi
14268
14269
5062cc19
KS
14270 if test x"${ac_cv_c_tkconfig}" = x ; then
14271 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14273$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14274 else
14275 no_tk=
14276 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14278$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14279 fi
3fc11d3e 14280 fi
dd2504ab 14281
dd2504ab 14282
85541719
DE
14283 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14284
81ecdfbb
RW
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14286$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14287
14288 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14290$as_echo "loading" >&6; }
85541719
DE
14291 . ${TCL_BIN_DIR}/tclConfig.sh
14292 else
81ecdfbb
RW
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14294$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14295 fi
14296
14297 # eval is required to do the TCL_DBGX substitution
14298 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14299 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14300
14301 # If the TCL_BIN_DIR is the build directory (not the install directory),
14302 # then set the common variable name to the value of the build variables.
14303 # For example, the variable TCL_LIB_SPEC will be set to the value
14304 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14305 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14306 # installed and uninstalled version of Tcl.
14307 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14308 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14309 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14310 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14311 elif test "`uname -s`" = "Darwin"; then
14312 # If Tcl was built as a framework, attempt to use the libraries
14313 # from the framework at the given location so that linking works
a68ffae9 14314 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14315 case ${TCL_DEFS} in
14316 *TCL_FRAMEWORK*)
14317 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14318 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14319 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14320 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14321 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14322 break
14323 fi
14324 done
14325 fi
14326 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14327 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14328 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14329 fi
14330 ;;
14331 esac
14332 fi
14333
14334 # eval is required to do the TCL_DBGX substitution
14335 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14336 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14337 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14338 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354 # Check for in-tree tcl
14355 here=`pwd`
14356 cd ${srcdir}/..
14357 topdir=`pwd`
14358 cd ${here}
14359
14360 intree="no"
14361 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14362 intree="yes"
14363 fi
14364
14365 # Find Tcl private headers
14366 if test x"${intree}" = xno; then
14367
81ecdfbb
RW
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14369$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14370 private_dir=""
14371 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14372 if test -f ${dir}/tclInt.h ; then
14373 private_dir=${dir}
14374 fi
14375
14376 if test x"${private_dir}" = x; then
81ecdfbb 14377 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14378 else
14379 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14381$as_echo "${private_dir}" >&6; }
85541719
DE
14382 fi
14383
14384 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14385 TCL_LIBRARY="${TCL_LIB_SPEC}"
14386 TCL_DEPS=""
14387 else
14388 # If building tcl in the same src tree, private headers
14389 # are not needed, but we need to be sure to use the right
14390 # headers library
14391 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14392 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14393 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14394 fi
14395
14396
14397
14398
14399
81ecdfbb
RW
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14401$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14402
5062cc19 14403 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14405$as_echo "loading" >&6; }
5062cc19 14406 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14407 else
81ecdfbb
RW
14408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14409$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14410 fi
bec39cab 14411
5062cc19
KS
14412 # eval is required to do the TK_DBGX substitution
14413 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14414 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14415
14416 # If the TK_BIN_DIR is the build directory (not the install directory),
14417 # then set the common variable name to the value of the build variables.
14418 # For example, the variable TK_LIB_SPEC will be set to the value
14419 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14420 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14421 # installed and uninstalled version of Tcl.
85541719 14422 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14423 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14424 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14425 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14426 elif test "`uname -s`" = "Darwin"; then
14427 # If Tk was built as a framework, attempt to use the libraries
14428 # from the framework at the given location so that linking works
a68ffae9 14429 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14430 case ${TK_DEFS} in
14431 *TK_FRAMEWORK*)
85541719 14432 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14433 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14434 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14435 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14436 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14437 break
14438 fi
14439 done
14440 fi
85541719 14441 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14442 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14443 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14444 fi
14445 ;;
14446 esac
3fc11d3e
JM
14447 fi
14448
5062cc19
KS
14449 # eval is required to do the TK_DBGX substitution
14450 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14451 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14452 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14453 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14454
3fc11d3e
JM
14455
14456
bec39cab
AC
14457
14458
14459
14460
14461
14462
14463
3fc11d3e 14464
3fc11d3e 14465
bec39cab 14466
bec39cab 14467
85541719
DE
14468 # Check for in-tree Tk
14469 intree="no"
14470 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14471 intree="yes"
14472 fi
3fc11d3e 14473
85541719
DE
14474 # Find Tk private headers
14475 if test x"${intree}" = xno; then
3fc11d3e 14476
81ecdfbb
RW
14477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14478$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14479 private_dir=""
14480 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14481 if test -f ${dir}/tkInt.h; then
14482 private_dir=${dir}
3fc11d3e 14483 fi
bec39cab 14484
5062cc19 14485 if test x"${private_dir}" = x; then
81ecdfbb 14486 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14487 else
5062cc19 14488 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14490$as_echo "${private_dir}" >&6; }
3fc11d3e 14491 fi
3fc11d3e 14492
85541719
DE
14493 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14494 TK_LIBRARY=${TK_LIB_SPEC}
14495 TK_DEPS=""
14496 else
14497 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14498 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14499 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14500 fi
3fc11d3e
JM
14501
14502
3fc11d3e
JM
14503
14504
3fc11d3e 14505
85541719 14506 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14507
85541719
DE
14508 # Include some libraries that Tcl and Tk want.
14509 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14510 # Yes, the ordering seems wrong here. But it isn't.
14511 # TK_LIBS is the list of libraries that need to be linked
14512 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14513 # were in LIBS then any link tests after this point would
14514 # try to include things like `$(LIBGUI)', which wouldn't work.
14515 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14516
85541719
DE
14517 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14518 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14519 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14520 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14521 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14522 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14523 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14524
85541719
DE
14525 if test x$gdb_cv_os_cygwin = xyes; then
14526 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14527 WIN32LDAPP="-Wl,--subsystem,console"
14528 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14529 fi
ffc6a242 14530
81ecdfbb 14531 subdirs="$subdirs gdbtk"
3ace7edb 14532
85541719 14533 fi
3fc11d3e
JM
14534fi
14535
14536
14537
14538
14539
14540
14541
14542
81ecdfbb
RW
14543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14544$as_echo_n "checking for X... " >&6; }
bec39cab 14545
c906108c 14546
81ecdfbb
RW
14547# Check whether --with-x was given.
14548if test "${with_x+set}" = set; then :
14549 withval=$with_x;
14550fi
c906108c
SS
14551
14552# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14553if test "x$with_x" = xno; then
14554 # The user explicitly disabled X.
14555 have_x=disabled
14556else
81ecdfbb
RW
14557 case $x_includes,$x_libraries in #(
14558 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14559 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14560 $as_echo_n "(cached) " >&6
c906108c
SS
14561else
14562 # One or both of the vars are not set, and there is no cached value.
bec39cab 14563ac_x_includes=no ac_x_libraries=no
81ecdfbb 14564rm -f -r conftest.dir
bec39cab
AC
14565if mkdir conftest.dir; then
14566 cd conftest.dir
bec39cab 14567 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14568incroot:
14569 @echo incroot='${INCROOT}'
14570usrlibdir:
14571 @echo usrlibdir='${USRLIBDIR}'
14572libdir:
14573 @echo libdir='${LIBDIR}'
14574_ACEOF
14575 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14576 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14577 for ac_var in incroot usrlibdir libdir; do
14578 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14579 done
c906108c 14580 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14581 for ac_extension in a so sl dylib la dll; do
14582 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14583 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14584 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14585 fi
14586 done
14587 # Screen out bogus values from the imake configuration. They are
14588 # bogus both because they are the default anyway, and because
14589 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14590 case $ac_im_incroot in
81ecdfbb 14591 /usr/include) ac_x_includes= ;;
bec39cab 14592 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14593 esac
bec39cab 14594 case $ac_im_usrlibdir in
81ecdfbb 14595 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14596 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14597 esac
14598 fi
14599 cd ..
81ecdfbb 14600 rm -f -r conftest.dir
c906108c
SS
14601fi
14602
bec39cab
AC
14603# Standard set of common directories for X headers.
14604# Check X11 before X11Rn because it is often a symlink to the current release.
14605ac_x_header_dirs='
14606/usr/X11/include
81ecdfbb 14607/usr/X11R7/include
bec39cab
AC
14608/usr/X11R6/include
14609/usr/X11R5/include
14610/usr/X11R4/include
14611
14612/usr/include/X11
81ecdfbb 14613/usr/include/X11R7
bec39cab
AC
14614/usr/include/X11R6
14615/usr/include/X11R5
14616/usr/include/X11R4
14617
14618/usr/local/X11/include
81ecdfbb 14619/usr/local/X11R7/include
bec39cab
AC
14620/usr/local/X11R6/include
14621/usr/local/X11R5/include
14622/usr/local/X11R4/include
14623
14624/usr/local/include/X11
81ecdfbb 14625/usr/local/include/X11R7
bec39cab
AC
14626/usr/local/include/X11R6
14627/usr/local/include/X11R5
14628/usr/local/include/X11R4
14629
14630/usr/X386/include
14631/usr/x386/include
14632/usr/XFree86/include/X11
14633
14634/usr/include
14635/usr/local/include
14636/usr/unsupported/include
14637/usr/athena/include
14638/usr/local/x11r5/include
14639/usr/lpp/Xamples/include
14640
14641/usr/openwin/include
14642/usr/openwin/share/include'
14643
14644if test "$ac_x_includes" = no; then
81ecdfbb 14645 # Guess where to find include files, by looking for Xlib.h.
c906108c 14646 # First, try using that file with no special directory specified.
81ecdfbb 14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14648/* end confdefs.h. */
81ecdfbb 14649#include <X11/Xlib.h>
bec39cab 14650_ACEOF
81ecdfbb 14651if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14652 # We can compile using X headers with no special include directory.
14653ac_x_includes=
14654else
bec39cab 14655 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14656 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14657 ac_x_includes=$ac_dir
14658 break
14659 fi
14660done
c906108c 14661fi
bec39cab
AC
14662rm -f conftest.err conftest.$ac_ext
14663fi # $ac_x_includes = no
c906108c 14664
bec39cab 14665if test "$ac_x_libraries" = no; then
c906108c 14666 # Check for the libraries.
c906108c
SS
14667 # See if we find them without any special options.
14668 # Don't add to $LIBS permanently.
bec39cab 14669 ac_save_LIBS=$LIBS
81ecdfbb
RW
14670 LIBS="-lX11 $LIBS"
14671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14672/* end confdefs.h. */
81ecdfbb 14673#include <X11/Xlib.h>
bec39cab
AC
14674int
14675main ()
14676{
81ecdfbb 14677XrmInitialize ()
bec39cab
AC
14678 ;
14679 return 0;
14680}
14681_ACEOF
81ecdfbb 14682if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14683 LIBS=$ac_save_LIBS
c906108c
SS
14684# We can link X programs with no special library path.
14685ac_x_libraries=
14686else
81ecdfbb
RW
14687 LIBS=$ac_save_LIBS
14688for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14689do
bec39cab 14690 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14691 for ac_extension in a so sl dylib la dll; do
14692 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14693 ac_x_libraries=$ac_dir
14694 break 2
14695 fi
14696 done
14697done
14698fi
81ecdfbb
RW
14699rm -f core conftest.err conftest.$ac_objext \
14700 conftest$ac_exeext conftest.$ac_ext
bec39cab 14701fi # $ac_x_libraries = no
c906108c 14702
81ecdfbb
RW
14703case $ac_x_includes,$ac_x_libraries in #(
14704 no,* | *,no | *\'*)
14705 # Didn't find X, or a directory has "'" in its name.
14706 ac_cv_have_x="have_x=no";; #(
14707 *)
14708 # Record where we found X for the cache.
14709 ac_cv_have_x="have_x=yes\
14710 ac_x_includes='$ac_x_includes'\
14711 ac_x_libraries='$ac_x_libraries'"
14712esac
c906108c 14713fi
81ecdfbb
RW
14714;; #(
14715 *) have_x=yes;;
14716 esac
c906108c
SS
14717 eval "$ac_cv_have_x"
14718fi # $with_x != no
14719
14720if test "$have_x" != yes; then
81ecdfbb
RW
14721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14722$as_echo "$have_x" >&6; }
c906108c
SS
14723 no_x=yes
14724else
14725 # If each of the values was on the command line, it overrides each guess.
14726 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14727 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14728 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14729 ac_cv_have_x="have_x=yes\
14730 ac_x_includes='$x_includes'\
14731 ac_x_libraries='$x_libraries'"
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14733$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14734fi
14735
14736
bec39cab 14737# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14738# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14739# This code just checks for a few cases where we'd like to ignore those
14740# definitions, even when they're present in the '.mt' file. These cases
14741# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14742# not part of the source tree.
7a292a7a 14743#
81ecdfbb
RW
14744# Check whether --enable-sim was given.
14745if test "${enable_sim+set}" = set; then :
14746 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14747 echo "enableval = ${enableval}";
14748 case "${enableval}" in
14749 yes) ignore_sim=false ;;
14750 no) ignore_sim=true ;;
14751 *) ignore_sim=false ;;
14752 esac
14753else
14754 ignore_sim=false
81ecdfbb
RW
14755fi
14756
7a292a7a
SS
14757
14758if test ! -d "${srcdir}/../sim"; then
14759 ignore_sim=true
14760fi
14761
9b624dbe
UW
14762SIM=
14763SIM_OBS=
14764if test "${ignore_sim}" = "false"; then
14765 if test x"${gdb_sim}" != x ; then
14766 SIM="${gdb_sim}"
14767 SIM_OBS="remote-sim.o"
60ca704f 14768
81ecdfbb 14769$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14770
9b624dbe 14771 fi
7a292a7a
SS
14772fi
14773
14774
14775
c906108c
SS
14776
14777
14778
14779
14780
14781
dfcd3bfb 14782
e56ac5c3
AC
14783
14784
b3a90332
AC
14785
14786
c35f4ffc 14787# List of host floatformats.
bec39cab
AC
14788
14789cat >>confdefs.h <<_ACEOF
c35f4ffc 14790#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14791_ACEOF
c35f4ffc 14792
bec39cab
AC
14793
14794cat >>confdefs.h <<_ACEOF
c35f4ffc 14795#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14796_ACEOF
14797
c35f4ffc 14798
bec39cab 14799cat >>confdefs.h <<_ACEOF
c35f4ffc 14800#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14801_ACEOF
c35f4ffc
AC
14802
14803
c906108c
SS
14804# target_subdir is used by the testsuite to find the target libraries.
14805target_subdir=
14806if test "${host}" != "${target}"; then
14807 target_subdir="${target_alias}/"
14808fi
14809
14810
14811frags=
771b4502 14812if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14813 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14814 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14815 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14816 fi
14817 frags="$frags $host_makefile_frag"
14818else
14819 host_makefile_frag=/dev/null
c906108c 14820fi
c906108c 14821
c906108c
SS
14822
14823
14824
771b4502 14825if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14826# We pick this up from the host configuration file (.mh) because we
14827# do not have a native configuration Makefile fragment.
c906108c
SS
14828nativefile=`sed -n '
14829s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14830' ${host_makefile_frag}`
c906108c
SS
14831fi
14832
14833
b00a8037 14834if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14835
14836cat >>confdefs.h <<_ACEOF
b00a8037 14837#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14838_ACEOF
b00a8037
DJ
14839
14840fi
14841
8dcde887 14842# Enable multi-ice-gdb-server.
81ecdfbb
RW
14843# Check whether --enable-multi-ice was given.
14844if test "${enable_multi_ice+set}" = set; then :
14845 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14846 yes | no)
14847 ;;
81ecdfbb 14848 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14849 esac
81ecdfbb 14850fi
b4e70030 14851
81ecdfbb
RW
14852if test "x$enable_multi_ice" = xyes; then
14853 subdirs="$subdirs multi-ice"
3ace7edb 14854
a85f51e7
DJ
14855fi
14856
496c0e1b
JB
14857# Check whether --enable-gdbserver was given.
14858if test "${enable_gdbserver+set}" = set; then :
14859 enableval=$enable_gdbserver; case "${enableval}" in
14860 yes| no|auto) ;;
14861 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14862esac
14863else
14864 enable_gdbserver=auto
14865fi
14866
14867
14868# We only build gdbserver automatically in a native configuration, and
14869# only if the user did not explicitly disable its build.
14870if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14872$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14873 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14875$as_echo "yes" >&6; }
14876 subdirs="$subdirs gdbserver"
3ace7edb 14877
496c0e1b 14878 gdbserver_build_enabled=yes
8dcde887 14879 else
81ecdfbb
RW
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14881$as_echo "no" >&6; }
8dcde887
MK
14882 fi
14883fi
14884
496c0e1b
JB
14885# If the user explicitly request the gdbserver to be built, verify that
14886# we were in fact able to enable it.
14887if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14888 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14889fi
14890
393fd4c3
YQ
14891# Check for babeltrace and babeltrace-ctf
14892
14893# Check whether --with-babeltrace was given.
14894if test "${with_babeltrace+set}" = set; then :
14895 withval=$with_babeltrace;
14896else
14897 with_babeltrace=auto
14898fi
14899
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14901$as_echo_n "checking whether to use babeltrace... " >&6; }
14902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14903$as_echo "$with_babeltrace" >&6; }
14904
14905if test "x$with_babeltrace" = "xno"; then
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14907$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14908else
14909 # Append -Werror to CFLAGS so that configure can catch the warning
14910 # "assignment from incompatible pointer type", which is related to
14911 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14912 # in GDB, while babeltrace 1.0.3 is broken.
14913 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14914 # safe to save and restore CFLAGS here.
14915 saved_CFLAGS=$CFLAGS
14916 CFLAGS="$CFLAGS -Werror"
14917
14918
14919
14920
14921
14922
14923
14924
14925 use_additional=yes
14926
14927 acl_save_prefix="$prefix"
14928 prefix="$acl_final_prefix"
14929 acl_save_exec_prefix="$exec_prefix"
14930 exec_prefix="$acl_final_exec_prefix"
14931
14932 eval additional_includedir=\"$includedir\"
14933 eval additional_libdir=\"$libdir\"
14934
14935 exec_prefix="$acl_save_exec_prefix"
14936 prefix="$acl_save_prefix"
14937
14938
14939# Check whether --with-libbabeltrace-prefix was given.
14940if test "${with_libbabeltrace_prefix+set}" = set; then :
14941 withval=$with_libbabeltrace_prefix;
14942 if test "X$withval" = "Xno"; then
14943 use_additional=no
14944 else
14945 if test "X$withval" = "X"; then
14946
14947 acl_save_prefix="$prefix"
14948 prefix="$acl_final_prefix"
14949 acl_save_exec_prefix="$exec_prefix"
14950 exec_prefix="$acl_final_exec_prefix"
14951
14952 eval additional_includedir=\"$includedir\"
14953 eval additional_libdir=\"$libdir\"
14954
14955 exec_prefix="$acl_save_exec_prefix"
14956 prefix="$acl_save_prefix"
14957
14958 else
14959 additional_includedir="$withval/include"
14960 additional_libdir="$withval/lib"
14961 fi
14962 fi
14963
14964fi
14965
14966 LIBBABELTRACE=
14967 LTLIBBABELTRACE=
14968 INCBABELTRACE=
14969 rpathdirs=
14970 ltrpathdirs=
14971 names_already_handled=
14972 names_next_round='babeltrace babeltrace-ctf'
14973 while test -n "$names_next_round"; do
14974 names_this_round="$names_next_round"
14975 names_next_round=
14976 for name in $names_this_round; do
14977 already_handled=
14978 for n in $names_already_handled; do
14979 if test "$n" = "$name"; then
14980 already_handled=yes
14981 break
14982 fi
14983 done
14984 if test -z "$already_handled"; then
14985 names_already_handled="$names_already_handled $name"
14986 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14987 eval value=\"\$HAVE_LIB$uppername\"
14988 if test -n "$value"; then
14989 if test "$value" = yes; then
14990 eval value=\"\$LIB$uppername\"
14991 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14992 eval value=\"\$LTLIB$uppername\"
14993 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14994 else
14995 :
14996 fi
14997 else
14998 found_dir=
14999 found_la=
15000 found_so=
15001 found_a=
15002 if test $use_additional = yes; then
15003 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15004 found_dir="$additional_libdir"
15005 found_so="$additional_libdir/lib$name.$shlibext"
15006 if test -f "$additional_libdir/lib$name.la"; then
15007 found_la="$additional_libdir/lib$name.la"
15008 fi
15009 else
15010 if test -f "$additional_libdir/lib$name.$libext"; then
15011 found_dir="$additional_libdir"
15012 found_a="$additional_libdir/lib$name.$libext"
15013 if test -f "$additional_libdir/lib$name.la"; then
15014 found_la="$additional_libdir/lib$name.la"
15015 fi
15016 fi
15017 fi
15018 fi
15019 if test "X$found_dir" = "X"; then
15020 for x in $LDFLAGS $LTLIBBABELTRACE; do
15021
15022 acl_save_prefix="$prefix"
15023 prefix="$acl_final_prefix"
15024 acl_save_exec_prefix="$exec_prefix"
15025 exec_prefix="$acl_final_exec_prefix"
15026 eval x=\"$x\"
15027 exec_prefix="$acl_save_exec_prefix"
15028 prefix="$acl_save_prefix"
15029
15030 case "$x" in
15031 -L*)
15032 dir=`echo "X$x" | sed -e 's/^X-L//'`
15033 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15034 found_dir="$dir"
15035 found_so="$dir/lib$name.$shlibext"
15036 if test -f "$dir/lib$name.la"; then
15037 found_la="$dir/lib$name.la"
15038 fi
15039 else
15040 if test -f "$dir/lib$name.$libext"; then
15041 found_dir="$dir"
15042 found_a="$dir/lib$name.$libext"
15043 if test -f "$dir/lib$name.la"; then
15044 found_la="$dir/lib$name.la"
15045 fi
15046 fi
15047 fi
15048 ;;
15049 esac
15050 if test "X$found_dir" != "X"; then
15051 break
15052 fi
15053 done
15054 fi
15055 if test "X$found_dir" != "X"; then
15056 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
15057 if test "X$found_so" != "X"; then
15058 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15059 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15060 else
15061 haveit=
15062 for x in $ltrpathdirs; do
15063 if test "X$x" = "X$found_dir"; then
15064 haveit=yes
15065 break
15066 fi
15067 done
15068 if test -z "$haveit"; then
15069 ltrpathdirs="$ltrpathdirs $found_dir"
15070 fi
15071 if test "$hardcode_direct" = yes; then
15072 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15073 else
15074 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15075 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15076 haveit=
15077 for x in $rpathdirs; do
15078 if test "X$x" = "X$found_dir"; then
15079 haveit=yes
15080 break
15081 fi
15082 done
15083 if test -z "$haveit"; then
15084 rpathdirs="$rpathdirs $found_dir"
15085 fi
15086 else
15087 haveit=
15088 for x in $LDFLAGS $LIBBABELTRACE; do
15089
15090 acl_save_prefix="$prefix"
15091 prefix="$acl_final_prefix"
15092 acl_save_exec_prefix="$exec_prefix"
15093 exec_prefix="$acl_final_exec_prefix"
15094 eval x=\"$x\"
15095 exec_prefix="$acl_save_exec_prefix"
15096 prefix="$acl_save_prefix"
15097
15098 if test "X$x" = "X-L$found_dir"; then
15099 haveit=yes
15100 break
15101 fi
15102 done
15103 if test -z "$haveit"; then
15104 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15105 fi
15106 if test "$hardcode_minus_L" != no; then
15107 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15108 else
15109 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15110 fi
15111 fi
15112 fi
15113 fi
15114 else
15115 if test "X$found_a" != "X"; then
15116 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15117 else
15118 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15119 fi
15120 fi
15121 additional_includedir=
15122 case "$found_dir" in
15123 */lib | */lib/)
15124 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15125 additional_includedir="$basedir/include"
15126 ;;
15127 esac
15128 if test "X$additional_includedir" != "X"; then
15129 if test "X$additional_includedir" != "X/usr/include"; then
15130 haveit=
15131 if test "X$additional_includedir" = "X/usr/local/include"; then
15132 if test -n "$GCC"; then
15133 case $host_os in
15134 linux*) haveit=yes;;
15135 esac
15136 fi
15137 fi
15138 if test -z "$haveit"; then
15139 for x in $CPPFLAGS $INCBABELTRACE; do
15140
15141 acl_save_prefix="$prefix"
15142 prefix="$acl_final_prefix"
15143 acl_save_exec_prefix="$exec_prefix"
15144 exec_prefix="$acl_final_exec_prefix"
15145 eval x=\"$x\"
15146 exec_prefix="$acl_save_exec_prefix"
15147 prefix="$acl_save_prefix"
15148
15149 if test "X$x" = "X-I$additional_includedir"; then
15150 haveit=yes
15151 break
15152 fi
15153 done
15154 if test -z "$haveit"; then
15155 if test -d "$additional_includedir"; then
15156 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15157 fi
15158 fi
15159 fi
15160 fi
15161 fi
15162 if test -n "$found_la"; then
15163 save_libdir="$libdir"
15164 case "$found_la" in
15165 */* | *\\*) . "$found_la" ;;
15166 *) . "./$found_la" ;;
15167 esac
15168 libdir="$save_libdir"
15169 for dep in $dependency_libs; do
15170 case "$dep" in
15171 -L*)
15172 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15173 if test "X$additional_libdir" != "X/usr/lib"; then
15174 haveit=
15175 if test "X$additional_libdir" = "X/usr/local/lib"; then
15176 if test -n "$GCC"; then
15177 case $host_os in
15178 linux*) haveit=yes;;
15179 esac
15180 fi
15181 fi
15182 if test -z "$haveit"; then
15183 haveit=
15184 for x in $LDFLAGS $LIBBABELTRACE; do
15185
15186 acl_save_prefix="$prefix"
15187 prefix="$acl_final_prefix"
15188 acl_save_exec_prefix="$exec_prefix"
15189 exec_prefix="$acl_final_exec_prefix"
15190 eval x=\"$x\"
15191 exec_prefix="$acl_save_exec_prefix"
15192 prefix="$acl_save_prefix"
15193
15194 if test "X$x" = "X-L$additional_libdir"; then
15195 haveit=yes
15196 break
15197 fi
15198 done
15199 if test -z "$haveit"; then
15200 if test -d "$additional_libdir"; then
15201 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15202 fi
15203 fi
15204 haveit=
15205 for x in $LDFLAGS $LTLIBBABELTRACE; do
15206
15207 acl_save_prefix="$prefix"
15208 prefix="$acl_final_prefix"
15209 acl_save_exec_prefix="$exec_prefix"
15210 exec_prefix="$acl_final_exec_prefix"
15211 eval x=\"$x\"
15212 exec_prefix="$acl_save_exec_prefix"
15213 prefix="$acl_save_prefix"
15214
15215 if test "X$x" = "X-L$additional_libdir"; then
15216 haveit=yes
15217 break
15218 fi
15219 done
15220 if test -z "$haveit"; then
15221 if test -d "$additional_libdir"; then
15222 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15223 fi
15224 fi
15225 fi
15226 fi
15227 ;;
15228 -R*)
15229 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15230 if test "$enable_rpath" != no; then
15231 haveit=
15232 for x in $rpathdirs; do
15233 if test "X$x" = "X$dir"; then
15234 haveit=yes
15235 break
15236 fi
15237 done
15238 if test -z "$haveit"; then
15239 rpathdirs="$rpathdirs $dir"
15240 fi
15241 haveit=
15242 for x in $ltrpathdirs; do
15243 if test "X$x" = "X$dir"; then
15244 haveit=yes
15245 break
15246 fi
15247 done
15248 if test -z "$haveit"; then
15249 ltrpathdirs="$ltrpathdirs $dir"
15250 fi
15251 fi
15252 ;;
15253 -l*)
15254 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15255 ;;
15256 *.la)
15257 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15258 ;;
15259 *)
15260 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15261 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15262 ;;
15263 esac
15264 done
15265 fi
15266 else
15267 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15268 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15269 fi
15270 fi
15271 fi
15272 done
15273 done
15274 if test "X$rpathdirs" != "X"; then
15275 if test -n "$hardcode_libdir_separator"; then
15276 alldirs=
15277 for found_dir in $rpathdirs; do
15278 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15279 done
15280 acl_save_libdir="$libdir"
15281 libdir="$alldirs"
15282 eval flag=\"$hardcode_libdir_flag_spec\"
15283 libdir="$acl_save_libdir"
15284 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15285 else
15286 for found_dir in $rpathdirs; do
15287 acl_save_libdir="$libdir"
15288 libdir="$found_dir"
15289 eval flag=\"$hardcode_libdir_flag_spec\"
15290 libdir="$acl_save_libdir"
15291 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15292 done
15293 fi
15294 fi
15295 if test "X$ltrpathdirs" != "X"; then
15296 for found_dir in $ltrpathdirs; do
15297 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15298 done
15299 fi
15300
15301
15302 ac_save_CPPFLAGS="$CPPFLAGS"
15303
15304 for element in $INCBABELTRACE; do
15305 haveit=
15306 for x in $CPPFLAGS; do
15307
15308 acl_save_prefix="$prefix"
15309 prefix="$acl_final_prefix"
15310 acl_save_exec_prefix="$exec_prefix"
15311 exec_prefix="$acl_final_exec_prefix"
15312 eval x=\"$x\"
15313 exec_prefix="$acl_save_exec_prefix"
15314 prefix="$acl_save_prefix"
15315
15316 if test "X$x" = "X$element"; then
15317 haveit=yes
15318 break
15319 fi
15320 done
15321 if test -z "$haveit"; then
15322 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15323 fi
15324 done
15325
15326
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15328$as_echo_n "checking for libbabeltrace... " >&6; }
15329if test "${ac_cv_libbabeltrace+set}" = set; then :
15330 $as_echo_n "(cached) " >&6
15331else
15332
15333 ac_save_LIBS="$LIBS"
15334 LIBS="$LIBS $LIBBABELTRACE"
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336/* end confdefs.h. */
15337#include <babeltrace/babeltrace.h>
15338 #include <babeltrace/ctf/events.h>
15339 #include <babeltrace/ctf/iterator.h>
15340int
15341main ()
15342{
15343struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15344 struct bt_ctf_event *event = NULL;
15345 const struct bt_definition *scope;
15346
15347 scope = bt_ctf_get_top_level_scope (event,
15348 BT_STREAM_EVENT_HEADER);
15349 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15350
15351 ;
15352 return 0;
15353}
15354_ACEOF
15355if ac_fn_c_try_link "$LINENO"; then :
15356 ac_cv_libbabeltrace=yes
15357else
15358 ac_cv_libbabeltrace=no
15359fi
15360rm -f core conftest.err conftest.$ac_objext \
15361 conftest$ac_exeext conftest.$ac_ext
15362 LIBS="$ac_save_LIBS"
15363
15364fi
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15366$as_echo "$ac_cv_libbabeltrace" >&6; }
15367 if test "$ac_cv_libbabeltrace" = yes; then
15368 HAVE_LIBBABELTRACE=yes
15369
15370$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15371
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15373$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15375$as_echo "$LIBBABELTRACE" >&6; }
15376 else
15377 HAVE_LIBBABELTRACE=no
15378 CPPFLAGS="$ac_save_CPPFLAGS"
15379 LIBBABELTRACE=
15380 LTLIBBABELTRACE=
15381 fi
15382
15383
15384
15385
15386
15387
15388 CFLAGS=$saved_CFLAGS
15389
15390 if test "$HAVE_LIBBABELTRACE" != yes; then
15391 if test "$with_babeltrace" = yes; then
15392 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15393 else
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15395$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15396 fi
15397 fi
15398fi
15399
db985757 15400# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15401# to an empty version.
c906108c
SS
15402
15403files=
15404links=
5a2402b8 15405
c906108c
SS
15406rm -f nm.h
15407if test "${nativefile}" != ""; then
0f475e27
AC
15408 case "${nativefile}" in
15409 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15410 * ) GDB_NM_FILE="${nativefile}"
15411 esac
5a2402b8
AC
15412 files="${files} ${GDB_NM_FILE}"
15413 links="${links} nm.h"
60ca704f
SE
15414
15415cat >>confdefs.h <<_ACEOF
b78960be 15416#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15417_ACEOF
5a2402b8 15418
c906108c 15419fi
5a2402b8
AC
15420
15421
bec39cab
AC
15422ac_sources="$files"
15423ac_dests="$links"
15424while test -n "$ac_sources"; do
15425 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15426 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15427 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15428done
81ecdfbb 15429ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15430
15431
c906108c
SS
15432
15433
c906108c 15434
81ecdfbb 15435$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15436
bec39cab 15437
b292c783
JK
15438# Undo the $ec_script escaping suitable for Makefile.
15439transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15440GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15441if test "x$GDB_TRANSFORM_NAME" = x; then
15442 GDB_TRANSFORM_NAME=gdb
15443fi
15444
15445GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15446if test "x$GCORE_TRANSFORM_NAME" = x; then
15447 GCORE_TRANSFORM_NAME=gcore
15448fi
15449
15450ac_config_files="$ac_config_files gcore"
15451
15452
c971b7fa 15453ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15454
15455ac_config_commands="$ac_config_commands default"
89a34d1b 15456
bec39cab
AC
15457cat >confcache <<\_ACEOF
15458# This file is a shell script that caches the results of configure
15459# tests run on this system so they can be shared between configure
15460# scripts and configure runs, see configure's option --config-cache.
15461# It is not useful on other systems. If it contains results you don't
15462# want to keep, you may remove or edit it.
15463#
15464# config.status only pays attention to the cache file if you give it
15465# the --recheck option to rerun configure.
15466#
15467# `ac_cv_env_foo' variables (set or unset) will be overridden when
15468# loading this file, other *unset* `ac_cv_foo' will be assigned the
15469# following values.
15470
15471_ACEOF
15472
15473# The following way of writing the cache mishandles newlines in values,
15474# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15475# So, we kill variables containing newlines.
bec39cab
AC
15476# Ultrix sh set writes to stderr and can't be redirected directly,
15477# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15478(
15479 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15480 eval ac_val=\$$ac_var
15481 case $ac_val in #(
15482 *${as_nl}*)
15483 case $ac_var in #(
15484 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15485$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15486 esac
15487 case $ac_var in #(
15488 _ | IFS | as_nl) ;; #(
15489 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15490 *) { eval $ac_var=; unset $ac_var;} ;;
15491 esac ;;
15492 esac
15493 done
15494
bec39cab 15495 (set) 2>&1 |
81ecdfbb
RW
15496 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15497 *${as_nl}ac_space=\ *)
15498 # `set' does not quote correctly, so add quotes: double-quote
15499 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15500 sed -n \
15501 "s/'/'\\\\''/g;
15502 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15503 ;; #(
bec39cab
AC
15504 *)
15505 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15506 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15507 ;;
81ecdfbb
RW
15508 esac |
15509 sort
15510) |
bec39cab 15511 sed '
81ecdfbb 15512 /^ac_cv_env_/b end
bec39cab 15513 t clear
81ecdfbb 15514 :clear
bec39cab
AC
15515 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15516 t end
81ecdfbb
RW
15517 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15518 :end' >>confcache
15519if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15520 if test -w "$cache_file"; then
15521 test "x$cache_file" != "x/dev/null" &&
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15523$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15524 cat confcache >$cache_file
15525 else
81ecdfbb
RW
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15527$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15528 fi
15529fi
15530rm -f confcache
15531
15532test "x$prefix" = xNONE && prefix=$ac_default_prefix
15533# Let make expand exec_prefix.
15534test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15535
bec39cab
AC
15536DEFS=-DHAVE_CONFIG_H
15537
15538ac_libobjs=
15539ac_ltlibobjs=
15540for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15541 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15542 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15543 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15544 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15545 # will be set to the directory where LIBOBJS objects are built.
15546 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15547 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15548done
15549LIBOBJS=$ac_libobjs
15550
15551LTLIBOBJS=$ac_ltlibobjs
15552
15553
85981d60 15554if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15555 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15556Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15557fi
a417dc56 15558if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15559 as_fn_error "conditional \"GMAKE\" was never defined.
15560Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15561fi
4df42755
DE
15562if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15563 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15564Usually this means the macro was only invoked conditionally." "$LINENO" 5
15565fi
15566if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15567 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15568Usually this means the macro was only invoked conditionally." "$LINENO" 5
15569fi
81ecdfbb
RW
15570
15571
bec39cab 15572: ${CONFIG_STATUS=./config.status}
81ecdfbb 15573ac_write_fail=0
bec39cab
AC
15574ac_clean_files_save=$ac_clean_files
15575ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15577$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15578as_write_fail=0
15579cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15580#! $SHELL
15581# Generated by $as_me.
15582# Run this file to recreate the current configuration.
15583# Compiler output produced by configure, useful for debugging
15584# configure, is in config.log if it exists.
15585
15586debug=false
15587ac_cs_recheck=false
15588ac_cs_silent=false
bec39cab 15589
81ecdfbb
RW
15590SHELL=\${CONFIG_SHELL-$SHELL}
15591export SHELL
15592_ASEOF
15593cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15594## -------------------- ##
15595## M4sh Initialization. ##
15596## -------------------- ##
15597
15598# Be more Bourne compatible
15599DUALCASE=1; export DUALCASE # for MKS sh
15600if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15601 emulate sh
15602 NULLCMD=:
81ecdfbb 15603 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15604 # is contrary to our usage. Disable this feature.
15605 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15606 setopt NO_GLOB_SUBST
15607else
15608 case `(set -o) 2>/dev/null` in #(
15609 *posix*) :
15610 set -o posix ;; #(
15611 *) :
15612 ;;
15613esac
bec39cab 15614fi
bec39cab 15615
81ecdfbb
RW
15616
15617as_nl='
15618'
15619export as_nl
15620# Printing a long string crashes Solaris 7 /usr/bin/printf.
15621as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15622as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15623as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15624# Prefer a ksh shell builtin over an external printf program on Solaris,
15625# but without wasting forks for bash or zsh.
15626if test -z "$BASH_VERSION$ZSH_VERSION" \
15627 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15628 as_echo='print -r --'
15629 as_echo_n='print -rn --'
15630elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15631 as_echo='printf %s\n'
15632 as_echo_n='printf %s'
15633else
15634 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15635 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15636 as_echo_n='/usr/ucb/echo -n'
15637 else
15638 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15639 as_echo_n_body='eval
15640 arg=$1;
15641 case $arg in #(
15642 *"$as_nl"*)
15643 expr "X$arg" : "X\\(.*\\)$as_nl";
15644 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15645 esac;
15646 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15647 '
15648 export as_echo_n_body
15649 as_echo_n='sh -c $as_echo_n_body as_echo'
15650 fi
15651 export as_echo_body
15652 as_echo='sh -c $as_echo_body as_echo'
15653fi
15654
15655# The user is always right.
15656if test "${PATH_SEPARATOR+set}" != set; then
15657 PATH_SEPARATOR=:
15658 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15659 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15660 PATH_SEPARATOR=';'
15661 }
bec39cab
AC
15662fi
15663
15664
81ecdfbb
RW
15665# IFS
15666# We need space, tab and new line, in precisely that order. Quoting is
15667# there to prevent editors from complaining about space-tab.
15668# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15669# splitting by setting IFS to empty value.)
15670IFS=" "" $as_nl"
15671
15672# Find who we are. Look in the path if we contain no directory separator.
15673case $0 in #((
15674 *[\\/]* ) as_myself=$0 ;;
15675 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15676for as_dir in $PATH
15677do
15678 IFS=$as_save_IFS
15679 test -z "$as_dir" && as_dir=.
15680 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15681 done
15682IFS=$as_save_IFS
15683
15684 ;;
15685esac
15686# We did not find ourselves, most probably we were run as `sh COMMAND'
15687# in which case we are not to be found in the path.
15688if test "x$as_myself" = x; then
15689 as_myself=$0
15690fi
15691if test ! -f "$as_myself"; then
15692 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15693 exit 1
15694fi
15695
15696# Unset variables that we do not need and which cause bugs (e.g. in
15697# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15698# suppresses any "Segmentation fault" message there. '((' could
15699# trigger a bug in pdksh 5.2.14.
15700for as_var in BASH_ENV ENV MAIL MAILPATH
15701do eval test x\${$as_var+set} = xset \
15702 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15703done
bec39cab
AC
15704PS1='$ '
15705PS2='> '
15706PS4='+ '
15707
15708# NLS nuisances.
81ecdfbb
RW
15709LC_ALL=C
15710export LC_ALL
15711LANGUAGE=C
15712export LANGUAGE
15713
15714# CDPATH.
15715(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15716
15717
15718# as_fn_error ERROR [LINENO LOG_FD]
15719# ---------------------------------
15720# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15721# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15722# script with status $?, using 1 if that was 0.
15723as_fn_error ()
15724{
15725 as_status=$?; test $as_status -eq 0 && as_status=1
15726 if test "$3"; then
15727 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15728 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15729 fi
15730 $as_echo "$as_me: error: $1" >&2
15731 as_fn_exit $as_status
15732} # as_fn_error
15733
15734
15735# as_fn_set_status STATUS
15736# -----------------------
15737# Set $? to STATUS, without forking.
15738as_fn_set_status ()
15739{
15740 return $1
15741} # as_fn_set_status
15742
15743# as_fn_exit STATUS
15744# -----------------
15745# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15746as_fn_exit ()
15747{
15748 set +e
15749 as_fn_set_status $1
15750 exit $1
15751} # as_fn_exit
15752
15753# as_fn_unset VAR
15754# ---------------
15755# Portably unset VAR.
15756as_fn_unset ()
15757{
15758 { eval $1=; unset $1;}
15759}
15760as_unset=as_fn_unset
15761# as_fn_append VAR VALUE
15762# ----------------------
15763# Append the text in VALUE to the end of the definition contained in VAR. Take
15764# advantage of any shell optimizations that allow amortized linear growth over
15765# repeated appends, instead of the typical quadratic growth present in naive
15766# implementations.
15767if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15768 eval 'as_fn_append ()
15769 {
15770 eval $1+=\$2
15771 }'
15772else
15773 as_fn_append ()
15774 {
15775 eval $1=\$$1\$2
15776 }
15777fi # as_fn_append
15778
15779# as_fn_arith ARG...
15780# ------------------
15781# Perform arithmetic evaluation on the ARGs, and store the result in the
15782# global $as_val. Take advantage of shells that can avoid forks. The arguments
15783# must be portable across $(()) and expr.
15784if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15785 eval 'as_fn_arith ()
15786 {
15787 as_val=$(( $* ))
15788 }'
15789else
15790 as_fn_arith ()
15791 {
15792 as_val=`expr "$@" || test $? -eq 1`
15793 }
15794fi # as_fn_arith
bec39cab 15795
81ecdfbb
RW
15796
15797if expr a : '\(a\)' >/dev/null 2>&1 &&
15798 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15799 as_expr=expr
15800else
15801 as_expr=false
15802fi
15803
81ecdfbb 15804if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15805 as_basename=basename
15806else
15807 as_basename=false
15808fi
15809
81ecdfbb
RW
15810if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15811 as_dirname=dirname
15812else
15813 as_dirname=false
15814fi
bec39cab 15815
81ecdfbb 15816as_me=`$as_basename -- "$0" ||
bec39cab
AC
15817$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15818 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15819 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15820$as_echo X/"$0" |
15821 sed '/^.*\/\([^/][^/]*\)\/*$/{
15822 s//\1/
15823 q
15824 }
15825 /^X\/\(\/\/\)$/{
15826 s//\1/
15827 q
15828 }
15829 /^X\/\(\/\).*/{
15830 s//\1/
15831 q
15832 }
15833 s/.*/./; q'`
b4e70030 15834
b4e70030
JB
15835# Avoid depending upon Character Ranges.
15836as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15837as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15838as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15839as_cr_digits='0123456789'
15840as_cr_alnum=$as_cr_Letters$as_cr_digits
15841
81ecdfbb
RW
15842ECHO_C= ECHO_N= ECHO_T=
15843case `echo -n x` in #(((((
15844-n*)
15845 case `echo 'xy\c'` in
15846 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15847 xy) ECHO_C='\c';;
15848 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15849 ECHO_T=' ';;
15850 esac;;
15851*)
15852 ECHO_N='-n';;
bec39cab
AC
15853esac
15854
81ecdfbb
RW
15855rm -f conf$$ conf$$.exe conf$$.file
15856if test -d conf$$.dir; then
15857 rm -f conf$$.dir/conf$$.file
bec39cab 15858else
81ecdfbb
RW
15859 rm -f conf$$.dir
15860 mkdir conf$$.dir 2>/dev/null
bec39cab 15861fi
81ecdfbb
RW
15862if (echo >conf$$.file) 2>/dev/null; then
15863 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15864 as_ln_s='ln -s'
81ecdfbb
RW
15865 # ... but there are two gotchas:
15866 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15867 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15868 # In both cases, we have to default to `cp -p'.
15869 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15870 as_ln_s='cp -p'
15871 elif ln conf$$.file conf$$ 2>/dev/null; then
15872 as_ln_s=ln
15873 else
15874 as_ln_s='cp -p'
b4e70030 15875 fi
bec39cab
AC
15876else
15877 as_ln_s='cp -p'
15878fi
81ecdfbb
RW
15879rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15880rmdir conf$$.dir 2>/dev/null
15881
15882
15883# as_fn_mkdir_p
15884# -------------
15885# Create "$as_dir" as a directory, including parents if necessary.
15886as_fn_mkdir_p ()
15887{
15888
15889 case $as_dir in #(
15890 -*) as_dir=./$as_dir;;
15891 esac
15892 test -d "$as_dir" || eval $as_mkdir_p || {
15893 as_dirs=
15894 while :; do
15895 case $as_dir in #(
15896 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15897 *) as_qdir=$as_dir;;
15898 esac
15899 as_dirs="'$as_qdir' $as_dirs"
15900 as_dir=`$as_dirname -- "$as_dir" ||
15901$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15902 X"$as_dir" : 'X\(//\)[^/]' \| \
15903 X"$as_dir" : 'X\(//\)$' \| \
15904 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15905$as_echo X"$as_dir" |
15906 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15907 s//\1/
15908 q
15909 }
15910 /^X\(\/\/\)[^/].*/{
15911 s//\1/
15912 q
15913 }
15914 /^X\(\/\/\)$/{
15915 s//\1/
15916 q
15917 }
15918 /^X\(\/\).*/{
15919 s//\1/
15920 q
15921 }
15922 s/.*/./; q'`
15923 test -d "$as_dir" && break
15924 done
15925 test -z "$as_dirs" || eval "mkdir $as_dirs"
15926 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15927
bec39cab 15928
81ecdfbb 15929} # as_fn_mkdir_p
bec39cab 15930if mkdir -p . 2>/dev/null; then
81ecdfbb 15931 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15932else
15933 test -d ./-p && rmdir ./-p
15934 as_mkdir_p=false
15935fi
15936
81ecdfbb
RW
15937if test -x / >/dev/null 2>&1; then
15938 as_test_x='test -x'
15939else
15940 if ls -dL / >/dev/null 2>&1; then
15941 as_ls_L_option=L
15942 else
15943 as_ls_L_option=
15944 fi
15945 as_test_x='
15946 eval sh -c '\''
15947 if test -d "$1"; then
15948 test -d "$1/.";
15949 else
15950 case $1 in #(
15951 -*)set "./$1";;
15952 esac;
15953 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15954 ???[sx]*):;;*)false;;esac;fi
15955 '\'' sh
15956 '
15957fi
15958as_executable_p=$as_test_x
bec39cab
AC
15959
15960# Sed expression to map a string onto a valid CPP name.
15961as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15962
15963# Sed expression to map a string onto a valid variable name.
15964as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15965
15966
bec39cab 15967exec 6>&1
81ecdfbb
RW
15968## ----------------------------------- ##
15969## Main body of $CONFIG_STATUS script. ##
15970## ----------------------------------- ##
15971_ASEOF
15972test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15973
15974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15975# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15976# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15977# values after options handling.
15978ac_log="
bec39cab 15979This file was extended by $as_me, which was
81ecdfbb 15980generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15981
15982 CONFIG_FILES = $CONFIG_FILES
15983 CONFIG_HEADERS = $CONFIG_HEADERS
15984 CONFIG_LINKS = $CONFIG_LINKS
15985 CONFIG_COMMANDS = $CONFIG_COMMANDS
15986 $ $0 $@
15987
81ecdfbb
RW
15988on `(hostname || uname -n) 2>/dev/null | sed 1q`
15989"
15990
bec39cab
AC
15991_ACEOF
15992
81ecdfbb
RW
15993case $ac_config_files in *"
15994"*) set x $ac_config_files; shift; ac_config_files=$*;;
15995esac
234b45d4 15996
81ecdfbb
RW
15997case $ac_config_headers in *"
15998"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15999esac
b4e70030 16000
b4e70030 16001
81ecdfbb
RW
16002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16003# Files that config.status was made for.
16004config_files="$ac_config_files"
16005config_headers="$ac_config_headers"
16006config_links="$ac_config_links"
16007config_commands="$ac_config_commands"
234b45d4 16008
81ecdfbb 16009_ACEOF
b4e70030 16010
81ecdfbb 16011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16012ac_cs_usage="\
81ecdfbb
RW
16013\`$as_me' instantiates files and other configuration actions
16014from templates according to the current configuration. Unless the files
16015and actions are specified as TAGs, all are instantiated by default.
234b45d4 16016
81ecdfbb 16017Usage: $0 [OPTION]... [TAG]...
234b45d4 16018
bec39cab 16019 -h, --help print this help, then exit
81ecdfbb
RW
16020 -V, --version print version number and configuration settings, then exit
16021 -q, --quiet, --silent
16022 do not print progress messages
bec39cab
AC
16023 -d, --debug don't remove temporary files
16024 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16025 --file=FILE[:TEMPLATE]
16026 instantiate the configuration file FILE
16027 --header=FILE[:TEMPLATE]
16028 instantiate the configuration header FILE
234b45d4 16029
bec39cab
AC
16030Configuration files:
16031$config_files
234b45d4 16032
bec39cab
AC
16033Configuration headers:
16034$config_headers
234b45d4 16035
bec39cab
AC
16036Configuration links:
16037$config_links
234b45d4 16038
bec39cab
AC
16039Configuration commands:
16040$config_commands
16041
81ecdfbb 16042Report bugs to the package provider."
b4e70030 16043
81ecdfbb
RW
16044_ACEOF
16045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16046ac_cs_version="\\
16047config.status
81ecdfbb
RW
16048configured by $0, generated by GNU Autoconf 2.64,
16049 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16050
81ecdfbb 16051Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16052This config.status script is free software; the Free Software Foundation
16053gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16054
16055ac_pwd='$ac_pwd'
16056srcdir='$srcdir'
16057INSTALL='$INSTALL'
81ecdfbb
RW
16058AWK='$AWK'
16059test -n "\$AWK" || AWK=awk
bec39cab
AC
16060_ACEOF
16061
81ecdfbb
RW
16062cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16063# The default lists apply if the user does not specify any file.
bec39cab
AC
16064ac_need_defaults=:
16065while test $# != 0
16066do
16067 case $1 in
16068 --*=*)
81ecdfbb
RW
16069 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16070 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16071 ac_shift=:
c906108c 16072 ;;
81ecdfbb 16073 *)
bec39cab
AC
16074 ac_option=$1
16075 ac_optarg=$2
16076 ac_shift=shift
c906108c 16077 ;;
bec39cab 16078 esac
c906108c 16079
bec39cab
AC
16080 case $ac_option in
16081 # Handling of the options.
bec39cab
AC
16082 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16083 ac_cs_recheck=: ;;
81ecdfbb
RW
16084 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16085 $as_echo "$ac_cs_version"; exit ;;
16086 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16087 debug=: ;;
16088 --file | --fil | --fi | --f )
16089 $ac_shift
81ecdfbb
RW
16090 case $ac_optarg in
16091 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16092 esac
16093 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16094 ac_need_defaults=false;;
16095 --header | --heade | --head | --hea )
16096 $ac_shift
81ecdfbb
RW
16097 case $ac_optarg in
16098 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16099 esac
16100 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16101 ac_need_defaults=false;;
81ecdfbb
RW
16102 --he | --h)
16103 # Conflict between --help and --header
16104 as_fn_error "ambiguous option: \`$1'
16105Try \`$0 --help' for more information.";;
16106 --help | --hel | -h )
16107 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16108 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16109 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16110 ac_cs_silent=: ;;
c906108c 16111
bec39cab 16112 # This is an error.
81ecdfbb
RW
16113 -*) as_fn_error "unrecognized option: \`$1'
16114Try \`$0 --help' for more information." ;;
c906108c 16115
81ecdfbb
RW
16116 *) as_fn_append ac_config_targets " $1"
16117 ac_need_defaults=false ;;
c906108c 16118
bec39cab
AC
16119 esac
16120 shift
16121done
c906108c 16122
bec39cab 16123ac_configure_extra_args=
c906108c 16124
bec39cab
AC
16125if $ac_cs_silent; then
16126 exec 6>/dev/null
16127 ac_configure_extra_args="$ac_configure_extra_args --silent"
16128fi
c906108c 16129
bec39cab 16130_ACEOF
81ecdfbb 16131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16132if \$ac_cs_recheck; then
81ecdfbb
RW
16133 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16134 shift
16135 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16136 CONFIG_SHELL='$SHELL'
16137 export CONFIG_SHELL
16138 exec "\$@"
bec39cab
AC
16139fi
16140
16141_ACEOF
81ecdfbb
RW
16142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16143exec 5>>config.log
16144{
16145 echo
16146 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16147## Running $as_me. ##
16148_ASBOX
16149 $as_echo "$ac_log"
16150} >&5
bec39cab 16151
81ecdfbb
RW
16152_ACEOF
16153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16154#
81ecdfbb 16155# INIT-COMMANDS
c906108c 16156#
a417dc56 16157ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16158
bec39cab
AC
16159_ACEOF
16160
81ecdfbb 16161cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16162
81ecdfbb 16163# Handling of arguments.
bec39cab 16164for ac_config_target in $ac_config_targets
c906108c 16165do
81ecdfbb
RW
16166 case $ac_config_target in
16167 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16168 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16169 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16170 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16171 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16172 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16173 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16174 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16175 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16176 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16177
16178 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16179 esac
16180done
16181
81ecdfbb 16182
bec39cab
AC
16183# If the user did not use the arguments to specify the items to instantiate,
16184# then the envvar interface is used. Set only those that are not.
16185# We use the long form for the default assignment because of an extremely
16186# bizarre bug on SunOS 4.1.3.
16187if $ac_need_defaults; then
16188 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16189 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16190 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16191 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16192fi
16193
b4e70030 16194# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16195# simply because there is no reason against having it here, and in addition,
b4e70030 16196# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16197# Hook for its removal unless debugging.
16198# Note that there is a small window in which the directory will not be cleaned:
16199# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16200$debug ||
16201{
81ecdfbb
RW
16202 tmp=
16203 trap 'exit_status=$?
16204 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16205' 0
16206 trap 'as_fn_exit 1' 1 2 13 15
16207}
16208# Create a (secure) tmp directory for tmp files.
16209
16210{
16211 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16212 test -n "$tmp" && test -d "$tmp"
16213} ||
16214{
16215 tmp=./conf$$-$RANDOM
16216 (umask 077 && mkdir "$tmp")
16217} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16218
16219# Set up the scripts for CONFIG_FILES section.
16220# No need to generate them if there are no CONFIG_FILES.
16221# This happens for instance with `./config.status config.h'.
16222if test -n "$CONFIG_FILES"; then
16223
16224if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16225 ac_cs_awk_getline=:
16226 ac_cs_awk_pipe_init=
16227 ac_cs_awk_read_file='
16228 while ((getline aline < (F[key])) > 0)
16229 print(aline)
16230 close(F[key])'
16231 ac_cs_awk_pipe_fini=
16232else
16233 ac_cs_awk_getline=false
16234 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16235 ac_cs_awk_read_file='
16236 print "|#_!!_#|"
16237 print "cat " F[key] " &&"
16238 '$ac_cs_awk_pipe_init
16239 # The final `:' finishes the AND list.
16240 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16241fi
16242ac_cr=`echo X | tr X '\015'`
16243# On cygwin, bash can eat \r inside `` if the user requested igncr.
16244# But we know of no other shell where ac_cr would be empty at this
16245# point, so we can use a bashism as a fallback.
16246if test "x$ac_cr" = x; then
16247 eval ac_cr=\$\'\\r\'
16248fi
16249ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16250if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16251 ac_cs_awk_cr='\r'
16252else
16253 ac_cs_awk_cr=$ac_cr
16254fi
16255
16256echo 'BEGIN {' >"$tmp/subs1.awk" &&
16257_ACEOF
16258
16259# Create commands to substitute file output variables.
16260{
16261 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16262 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16263 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16264 echo "_ACAWK" &&
16265 echo "_ACEOF"
16266} >conf$$files.sh &&
16267. ./conf$$files.sh ||
16268 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16269rm -f conf$$files.sh
16270
16271{
16272 echo "cat >conf$$subs.awk <<_ACEOF" &&
16273 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16274 echo "_ACEOF"
16275} >conf$$subs.sh ||
16276 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16277ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16278ac_delim='%!_!# '
16279for ac_last_try in false false false false false :; do
16280 . ./conf$$subs.sh ||
16281 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16282
16283 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16284 if test $ac_delim_n = $ac_delim_num; then
16285 break
16286 elif $ac_last_try; then
16287 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16288 else
16289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16290 fi
16291done
16292rm -f conf$$subs.sh
16293
16294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16295cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16296_ACEOF
16297sed -n '
16298h
16299s/^/S["/; s/!.*/"]=/
16300p
16301g
16302s/^[^!]*!//
16303:repl
16304t repl
16305s/'"$ac_delim"'$//
16306t delim
16307:nl
16308h
16309s/\(.\{148\}\).*/\1/
16310t more1
16311s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16312p
16313n
16314b repl
16315:more1
16316s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16317p
16318g
16319s/.\{148\}//
16320t nl
16321:delim
16322h
16323s/\(.\{148\}\).*/\1/
16324t more2
16325s/["\\]/\\&/g; s/^/"/; s/$/"/
16326p
16327b
16328:more2
16329s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16330p
16331g
16332s/.\{148\}//
16333t delim
16334' <conf$$subs.awk | sed '
16335/^[^""]/{
16336 N
16337 s/\n//
16338}
16339' >>$CONFIG_STATUS || ac_write_fail=1
16340rm -f conf$$subs.awk
16341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16342_ACAWK
16343cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16344 for (key in S) S_is_set[key] = 1
16345 FS = "\a"
16346 \$ac_cs_awk_pipe_init
16347}
16348{
16349 line = $ 0
16350 nfields = split(line, field, "@")
16351 substed = 0
16352 len = length(field[1])
16353 for (i = 2; i < nfields; i++) {
16354 key = field[i]
16355 keylen = length(key)
16356 if (S_is_set[key]) {
16357 value = S[key]
16358 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16359 len += length(value) + length(field[++i])
16360 substed = 1
16361 } else
16362 len += 1 + keylen
16363 }
16364 if (nfields == 3 && !substed) {
16365 key = field[2]
16366 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16367 \$ac_cs_awk_read_file
16368 next
16369 }
16370 }
16371 print line
b4e70030 16372}
81ecdfbb
RW
16373\$ac_cs_awk_pipe_fini
16374_ACAWK
16375_ACEOF
16376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16377if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16378 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16379else
16380 cat
16381fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16382 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16383_ACEOF
16384
16385# VPATH may cause trouble with some makes, so we remove $(srcdir),
16386# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16387# trailing colons and then remove the whole line if VPATH becomes empty
16388# (actually we leave an empty line to preserve line numbers).
16389if test "x$srcdir" = x.; then
16390 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16391s/:*\$(srcdir):*/:/
16392s/:*\${srcdir}:*/:/
16393s/:*@srcdir@:*/:/
16394s/^\([^=]*=[ ]*\):*/\1/
16395s/:*$//
16396s/^[^=]*=[ ]*$//
16397}'
16398fi
16399
16400cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16401fi # test -n "$CONFIG_FILES"
16402
16403# Set up the scripts for CONFIG_HEADERS section.
16404# No need to generate them if there are no CONFIG_HEADERS.
16405# This happens for instance with `./config.status Makefile'.
16406if test -n "$CONFIG_HEADERS"; then
16407cat >"$tmp/defines.awk" <<\_ACAWK ||
16408BEGIN {
16409_ACEOF
16410
16411# Transform confdefs.h into an awk script `defines.awk', embedded as
16412# here-document in config.status, that substitutes the proper values into
16413# config.h.in to produce config.h.
4e8d927d 16414
81ecdfbb
RW
16415# Create a delimiter string that does not exist in confdefs.h, to ease
16416# handling of long lines.
16417ac_delim='%!_!# '
16418for ac_last_try in false false :; do
16419 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16420 if test -z "$ac_t"; then
16421 break
16422 elif $ac_last_try; then
16423 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16424 else
16425 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16426 fi
16427done
4e8d927d 16428
81ecdfbb
RW
16429# For the awk script, D is an array of macro values keyed by name,
16430# likewise P contains macro parameters if any. Preserve backslash
16431# newline sequences.
16432
16433ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16434sed -n '
16435s/.\{148\}/&'"$ac_delim"'/g
16436t rset
16437:rset
16438s/^[ ]*#[ ]*define[ ][ ]*/ /
16439t def
16440d
16441:def
16442s/\\$//
16443t bsnl
16444s/["\\]/\\&/g
16445s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16446D["\1"]=" \3"/p
16447s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16448d
16449:bsnl
16450s/["\\]/\\&/g
16451s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16452D["\1"]=" \3\\\\\\n"\\/p
16453t cont
16454s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16455t cont
16456d
16457:cont
16458n
16459s/.\{148\}/&'"$ac_delim"'/g
16460t clear
16461:clear
16462s/\\$//
16463t bsnlc
16464s/["\\]/\\&/g; s/^/"/; s/$/"/p
16465d
16466:bsnlc
16467s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16468b cont
16469' <confdefs.h | sed '
16470s/'"$ac_delim"'/"\\\
16471"/g' >>$CONFIG_STATUS || ac_write_fail=1
16472
16473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16474 for (key in D) D_is_set[key] = 1
16475 FS = "\a"
16476}
16477/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16478 line = \$ 0
16479 split(line, arg, " ")
16480 if (arg[1] == "#") {
16481 defundef = arg[2]
16482 mac1 = arg[3]
16483 } else {
16484 defundef = substr(arg[1], 2)
16485 mac1 = arg[2]
16486 }
16487 split(mac1, mac2, "(") #)
16488 macro = mac2[1]
16489 prefix = substr(line, 1, index(line, defundef) - 1)
16490 if (D_is_set[macro]) {
16491 # Preserve the white space surrounding the "#".
16492 print prefix "define", macro P[macro] D[macro]
16493 next
16494 } else {
16495 # Replace #undef with comments. This is necessary, for example,
16496 # in the case of _POSIX_SOURCE, which is predefined and required
16497 # on some systems where configure will not decide to define it.
16498 if (defundef == "undef") {
16499 print "/*", prefix defundef, macro, "*/"
16500 next
16501 }
16502 }
b4e70030 16503}
81ecdfbb
RW
16504{ print }
16505_ACAWK
b4e70030 16506_ACEOF
81ecdfbb
RW
16507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16508 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16509fi # test -n "$CONFIG_HEADERS"
4e8d927d 16510
4e8d927d 16511
81ecdfbb
RW
16512eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16513shift
16514for ac_tag
16515do
16516 case $ac_tag in
16517 :[FHLC]) ac_mode=$ac_tag; continue;;
16518 esac
16519 case $ac_mode$ac_tag in
16520 :[FHL]*:*);;
16521 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16522 :[FH]-) ac_tag=-:-;;
16523 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16524 esac
16525 ac_save_IFS=$IFS
16526 IFS=:
16527 set x $ac_tag
16528 IFS=$ac_save_IFS
16529 shift
16530 ac_file=$1
16531 shift
4e8d927d 16532
81ecdfbb
RW
16533 case $ac_mode in
16534 :L) ac_source=$1;;
16535 :[FH])
16536 ac_file_inputs=
16537 for ac_f
16538 do
16539 case $ac_f in
16540 -) ac_f="$tmp/stdin";;
16541 *) # Look for the file first in the build tree, then in the source tree
16542 # (if the path is not absolute). The absolute path cannot be DOS-style,
16543 # because $ac_f cannot contain `:'.
16544 test -f "$ac_f" ||
16545 case $ac_f in
16546 [\\/$]*) false;;
16547 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16548 esac ||
16549 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16550 esac
16551 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16552 as_fn_append ac_file_inputs " '$ac_f'"
16553 done
16554
16555 # Let's still pretend it is `configure' which instantiates (i.e., don't
16556 # use $as_me), people would be surprised to read:
16557 # /* config.h. Generated by config.status. */
16558 configure_input='Generated from '`
16559 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16560 `' by configure.'
16561 if test x"$ac_file" != x-; then
16562 configure_input="$ac_file. $configure_input"
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16564$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16565 fi
81ecdfbb
RW
16566 # Neutralize special characters interpreted by sed in replacement strings.
16567 case $configure_input in #(
16568 *\&* | *\|* | *\\* )
16569 ac_sed_conf_input=`$as_echo "$configure_input" |
16570 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16571 *) ac_sed_conf_input=$configure_input;;
16572 esac
4e8d927d 16573
81ecdfbb
RW
16574 case $ac_tag in
16575 *:-:* | *:-) cat >"$tmp/stdin" \
16576 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16577 esac
16578 ;;
c906108c
SS
16579 esac
16580
81ecdfbb 16581 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16582$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16583 X"$ac_file" : 'X\(//\)[^/]' \| \
16584 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16585 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16586$as_echo X"$ac_file" |
16587 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16588 s//\1/
16589 q
16590 }
16591 /^X\(\/\/\)[^/].*/{
16592 s//\1/
16593 q
16594 }
16595 /^X\(\/\/\)$/{
16596 s//\1/
16597 q
16598 }
16599 /^X\(\/\).*/{
16600 s//\1/
16601 q
16602 }
16603 s/.*/./; q'`
16604 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16605 ac_builddir=.
16606
81ecdfbb
RW
16607case "$ac_dir" in
16608.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16609*)
16610 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16611 # A ".." for each directory in $ac_dir_suffix.
16612 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16613 case $ac_top_builddir_sub in
16614 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16615 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16616 esac ;;
16617esac
16618ac_abs_top_builddir=$ac_pwd
16619ac_abs_builddir=$ac_pwd$ac_dir_suffix
16620# for backward compatibility:
16621ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16622
16623case $srcdir in
81ecdfbb 16624 .) # We are building in place.
bec39cab 16625 ac_srcdir=.
81ecdfbb
RW
16626 ac_top_srcdir=$ac_top_builddir_sub
16627 ac_abs_top_srcdir=$ac_pwd ;;
16628 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16629 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16630 ac_top_srcdir=$srcdir
16631 ac_abs_top_srcdir=$srcdir ;;
16632 *) # Relative name.
16633 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16634 ac_top_srcdir=$ac_top_build_prefix$srcdir
16635 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16636esac
81ecdfbb 16637ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16638
c906108c 16639
81ecdfbb
RW
16640 case $ac_mode in
16641 :F)
16642 #
16643 # CONFIG_FILE
16644 #
c906108c 16645
bec39cab
AC
16646 case $INSTALL in
16647 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16648 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16649 esac
81ecdfbb 16650_ACEOF
121ce6e5 16651
81ecdfbb
RW
16652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16653# If the template does not know about datarootdir, expand it.
16654# FIXME: This hack should be removed a few years after 2.60.
16655ac_datarootdir_hack=; ac_datarootdir_seen=
16656ac_sed_dataroot='
16657/datarootdir/ {
16658 p
16659 q
16660}
16661/@datadir@/p
16662/@docdir@/p
16663/@infodir@/p
16664/@localedir@/p
16665/@mandir@/p'
16666case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16667*datarootdir*) ac_datarootdir_seen=yes;;
16668*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16670$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16671_ACEOF
16672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16673 ac_datarootdir_hack='
16674 s&@datadir@&$datadir&g
16675 s&@docdir@&$docdir&g
16676 s&@infodir@&$infodir&g
16677 s&@localedir@&$localedir&g
16678 s&@mandir@&$mandir&g
16679 s&\\\${datarootdir}&$datarootdir&g' ;;
16680esac
4e8d927d 16681_ACEOF
81ecdfbb
RW
16682
16683# Neutralize VPATH when `$srcdir' = `.'.
16684# Shell code in configure.ac might set extrasub.
16685# FIXME: do we really want to maintain this feature?
16686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16687ac_sed_extra="$ac_vpsub
bec39cab
AC
16688$extrasub
16689_ACEOF
81ecdfbb 16690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16691:t
16692/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16693s|@configure_input@|$ac_sed_conf_input|;t t
16694s&@top_builddir@&$ac_top_builddir_sub&;t t
16695s&@top_build_prefix@&$ac_top_build_prefix&;t t
16696s&@srcdir@&$ac_srcdir&;t t
16697s&@abs_srcdir@&$ac_abs_srcdir&;t t
16698s&@top_srcdir@&$ac_top_srcdir&;t t
16699s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16700s&@builddir@&$ac_builddir&;t t
16701s&@abs_builddir@&$ac_abs_builddir&;t t
16702s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16703s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16704$ac_datarootdir_hack
16705"
16706eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16707if $ac_cs_awk_getline; then
16708 $AWK -f "$tmp/subs.awk"
16709else
16710 $AWK -f "$tmp/subs.awk" | $SHELL
16711fi >$tmp/out \
16712 || as_fn_error "could not create $ac_file" "$LINENO" 5
16713
16714test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16715 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16716 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16718which seems to be undefined. Please make sure it is defined." >&5
16719$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16720which seems to be undefined. Please make sure it is defined." >&2;}
16721
16722 rm -f "$tmp/stdin"
bec39cab 16723 case $ac_file in
81ecdfbb
RW
16724 -) cat "$tmp/out" && rm -f "$tmp/out";;
16725 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16726 esac \
16727 || as_fn_error "could not create $ac_file" "$LINENO" 5
16728 ;;
16729 :H)
16730 #
16731 # CONFIG_HEADER
16732 #
bec39cab 16733 if test x"$ac_file" != x-; then
81ecdfbb
RW
16734 {
16735 $as_echo "/* $configure_input */" \
16736 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16737 } >"$tmp/config.h" \
16738 || as_fn_error "could not create $ac_file" "$LINENO" 5
16739 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16741$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16742 else
81ecdfbb
RW
16743 rm -f "$ac_file"
16744 mv "$tmp/config.h" "$ac_file" \
16745 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16746 fi
16747 else
81ecdfbb
RW
16748 $as_echo "/* $configure_input */" \
16749 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16750 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16751 fi
81ecdfbb
RW
16752 ;;
16753 :L)
16754 #
16755 # CONFIG_LINK
16756 #
c906108c 16757
81ecdfbb
RW
16758 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16759 :
b4e70030 16760 else
81ecdfbb
RW
16761 # Prefer the file from the source tree if names are identical.
16762 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16763 ac_source=$srcdir/$ac_source
16764 fi
b4e70030 16765
81ecdfbb
RW
16766 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16767$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16768
81ecdfbb
RW
16769 if test ! -r "$ac_source"; then
16770 as_fn_error "$ac_source: file not found" "$LINENO" 5
16771 fi
16772 rm -f "$ac_file"
bec39cab 16773
81ecdfbb
RW
16774 # Try a relative symlink, then a hard link, then a copy.
16775 case $srcdir in
16776 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16777 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16778 esac
16779 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16780 ln "$ac_source" "$ac_file" 2>/dev/null ||
16781 cp -p "$ac_source" "$ac_file" ||
16782 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16783 fi
16784 ;;
16785 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16786$as_echo "$as_me: executing $ac_file commands" >&6;}
16787 ;;
c906108c 16788 esac
b4e70030 16789
bec39cab 16790
81ecdfbb
RW
16791 case $ac_file$ac_mode in
16792 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16793 "gcore":F) chmod +x gcore ;;
81ecdfbb 16794 "default":C)
c906108c
SS
16795case x$CONFIG_HEADERS in
16796xconfig.h:config.in)
16797echo > stamp-h ;;
16798esac
bec39cab 16799 ;;
81ecdfbb 16800
bec39cab 16801 esac
81ecdfbb 16802done # for ac_tag
c906108c 16803
bec39cab 16804
81ecdfbb 16805as_fn_exit 0
bec39cab 16806_ACEOF
bec39cab
AC
16807ac_clean_files=$ac_clean_files_save
16808
81ecdfbb
RW
16809test $ac_write_fail = 0 ||
16810 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16811
bec39cab
AC
16812
16813# configure is writing to config.log, and then calls config.status.
16814# config.status does its own redirection, appending to config.log.
16815# Unfortunately, on DOS this fails, as config.log is still kept open
16816# by configure, so config.status won't be able to write to it; its
16817# output is simply discarded. So we exec the FD to /dev/null,
16818# effectively closing config.log, so it can be properly (re)opened and
16819# appended to by config.status. When coming back to configure, we
16820# need to make the FD available again.
16821if test "$no_create" != yes; then
16822 ac_cs_success=:
16823 ac_config_status_args=
16824 test "$silent" = yes &&
16825 ac_config_status_args="$ac_config_status_args --quiet"
16826 exec 5>/dev/null
16827 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16828 exec 5>>config.log
16829 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16830 # would make configure fail if this is the last instruction.
81ecdfbb 16831 $ac_cs_success || as_fn_exit $?
bec39cab 16832fi
c906108c 16833
bec39cab 16834#
81ecdfbb 16835# CONFIG_SUBDIRS section.
bec39cab 16836#
c906108c
SS
16837if test "$no_recursion" != yes; then
16838
81ecdfbb
RW
16839 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16840 # so they do not pile up.
c906108c
SS
16841 ac_sub_configure_args=
16842 ac_prev=
fdc59709
PB
16843 eval "set x $ac_configure_args"
16844 shift
16845 for ac_arg
16846 do
c906108c
SS
16847 if test -n "$ac_prev"; then
16848 ac_prev=
16849 continue
16850 fi
bec39cab 16851 case $ac_arg in
c906108c
SS
16852 -cache-file | --cache-file | --cache-fil | --cache-fi \
16853 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16854 ac_prev=cache_file ;;
16855 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16856 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16857 | --c=*)
16858 ;;
16859 --config-cache | -C)
c906108c
SS
16860 ;;
16861 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16862 ac_prev=srcdir ;;
16863 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16864 ;;
bec39cab
AC
16865 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16866 ac_prev=prefix ;;
16867 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16868 ;;
81ecdfbb
RW
16869 --disable-option-checking)
16870 ;;
fdc59709
PB
16871 *)
16872 case $ac_arg in
81ecdfbb 16873 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16874 esac
81ecdfbb 16875 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16876 esac
16877 done
16878
bec39cab
AC
16879 # Always prepend --prefix to ensure using the same prefix
16880 # in subdir configurations.
fdc59709
PB
16881 ac_arg="--prefix=$prefix"
16882 case $ac_arg in
81ecdfbb 16883 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16884 esac
81ecdfbb
RW
16885 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16886
16887 # Pass --silent
16888 if test "$silent" = yes; then
16889 ac_sub_configure_args="--silent $ac_sub_configure_args"
16890 fi
16891
16892 # Always prepend --disable-option-checking to silence warnings, since
16893 # different subdirs can have different --enable and --with options.
16894 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16895
b4e70030 16896 ac_popdir=`pwd`
bec39cab 16897 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16898
16899 # Do not complain, so a configure script can configure whichever
16900 # parts of a large source tree are present.
fdc59709 16901 test -d "$srcdir/$ac_dir" || continue
c906108c 16902
81ecdfbb
RW
16903 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16904 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16905 $as_echo "$ac_msg" >&6
16906 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16907 ac_builddir=.
16908
81ecdfbb
RW
16909case "$ac_dir" in
16910.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16911*)
16912 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16913 # A ".." for each directory in $ac_dir_suffix.
16914 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16915 case $ac_top_builddir_sub in
16916 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16917 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16918 esac ;;
16919esac
16920ac_abs_top_builddir=$ac_pwd
16921ac_abs_builddir=$ac_pwd$ac_dir_suffix
16922# for backward compatibility:
16923ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16924
16925case $srcdir in
81ecdfbb 16926 .) # We are building in place.
bec39cab 16927 ac_srcdir=.
81ecdfbb
RW
16928 ac_top_srcdir=$ac_top_builddir_sub
16929 ac_abs_top_srcdir=$ac_pwd ;;
16930 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16931 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16932 ac_top_srcdir=$srcdir
16933 ac_abs_top_srcdir=$srcdir ;;
16934 *) # Relative name.
16935 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16936 ac_top_srcdir=$ac_top_build_prefix$srcdir
16937 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16938esac
81ecdfbb 16939ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16940
c906108c 16941
fdc59709 16942 cd "$ac_dir"
c906108c
SS
16943
16944 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16945 if test -f "$ac_srcdir/configure.gnu"; then
16946 ac_sub_configure=$ac_srcdir/configure.gnu
16947 elif test -f "$ac_srcdir/configure"; then
16948 ac_sub_configure=$ac_srcdir/configure
16949 elif test -f "$ac_srcdir/configure.in"; then
16950 # This should be Cygnus configure.
16951 ac_sub_configure=$ac_aux_dir/configure
c906108c 16952 else
81ecdfbb
RW
16953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16954$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16955 ac_sub_configure=
16956 fi
16957
16958 # The recursion is here.
16959 if test -n "$ac_sub_configure"; then
c906108c 16960 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16961 case $cache_file in
16962 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16963 *) # Relative name.
16964 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16965 esac
c906108c 16966
81ecdfbb
RW
16967 { $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
16968$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16969 # The eval makes quoting arguments work.
fdc59709
PB
16970 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16971 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16972 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16973 fi
16974
fdc59709 16975 cd "$ac_popdir"
c906108c
SS
16976 done
16977fi
81ecdfbb
RW
16978if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16980$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16981fi
c906108c
SS
16982
16983
16984exit 0
This page took 2.815453 seconds and 4 git commands to generate.