Add configure support for building with guile 2.2.
[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
ed3ef339
DE
661GUILE_LIBS
662GUILE_CPPFLAGS
663pkg_config_prog_path
ac534cba
JB
664PYTHON_LIBS
665PYTHON_CPPFLAGS
81ecdfbb 666PYTHON_CFLAGS
ec685c5e 667python_prog_path
81ecdfbb
RW
668LTLIBEXPAT
669LIBEXPAT
670HAVE_LIBEXPAT
b8e0a31c 671JIT_READER_DIR
f997c383 672TARGET_PTR
39037522 673READLINE_TEXI_INCFLAG
81ecdfbb
RW
674READLINE_CFLAGS
675READLINE_DEPS
676READLINE
677MIG
678WINDRES
679DLLTOOL
c971b7fa 680AR
81ecdfbb
RW
681YFLAGS
682YACC
c971b7fa 683RANLIB
81ecdfbb 684LN_S
c971b7fa
PA
685INSTALL_DATA
686INSTALL_SCRIPT
687INSTALL_PROGRAM
688AWK
81ecdfbb
RW
689REPORT_BUGS_TEXI
690REPORT_BUGS_TO
691PKGVERSION
b292c783 692HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
693TARGET_OBS
694subdirs
695GDB_DATADIR
696DEBUGDIR
5048e516
JK
697MAKEINFO_EXTRA_FLAGS
698MAKEINFOFLAGS
699MAKEINFO
81ecdfbb
RW
700PACKAGE
701GNULIB_STDINT_H
81ecdfbb
RW
702CATOBJEXT
703GENCAT
704INSTOBJEXT
705DATADIRNAME
706CATALOGS
707POSUB
708GMSGFMT
709XGETTEXT
710INCINTL
711LIBINTL_DEP
712LIBINTL
713USE_NLS
714SET_MAKE
715GMAKE_FALSE
716GMAKE_TRUE
717MAKE
718CCDEPMODE
719DEPDIR
720am__leading_dot
4869db5e
RM
721INSTALL_STRIP_PROGRAM
722STRIP
723install_sh
81ecdfbb
RW
724target_os
725target_vendor
726target_cpu
727target
728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
c971b7fa
PA
736EGREP
737GREP
738CPP
81ecdfbb
RW
739OBJEXT
740EXEEXT
741ac_ct_CC
742CPPFLAGS
743LDFLAGS
744CFLAGS
745CC
746MAINT
747MAINTAINER_MODE_FALSE
748MAINTAINER_MODE_TRUE
749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
a4ce5b0d 787ac_subst_files='host_makefile_frag'
81ecdfbb
RW
788ac_user_opts='
789enable_option_checking
790enable_maintainer_mode
da2f07f1
JK
791enable_plugins
792enable_largefile
81ecdfbb
RW
793with_separate_debug_dir
794with_gdb_datadir
795with_relocated_sources
7349ff92 796with_auto_load_dir
bccbefd2 797with_auto_load_safe_path
81ecdfbb
RW
798enable_targets
799enable_64_bit_bfd
800enable_gdbcli
801enable_gdbmi
802enable_tui
803enable_gdbtk
05e7c244 804with_libunwind_ia64
81ecdfbb
RW
805with_curses
806enable_profiling
807with_pkgversion
808with_bugurl
b040ad30 809with_zlib
81ecdfbb 810with_libiconv_prefix
478aac75 811with_iconv_bin
81ecdfbb 812with_system_readline
b8e0a31c 813with_jit_reader_dir
81ecdfbb
RW
814with_expat
815with_gnu_ld
816enable_rpath
817with_libexpat_prefix
818with_python
ed3ef339 819with_guile
a8db4212 820enable_libmcheck
81ecdfbb
RW
821with_included_regex
822with_sysroot
823with_system_gdbinit
824enable_werror
825enable_build_warnings
826enable_gdb_build_warnings
608e2dbb
TT
827with_lzma
828with_liblzma_prefix
81ecdfbb
RW
829with_tcl
830with_tk
831with_x
832enable_sim
833enable_multi_ice
496c0e1b 834enable_gdbserver
393fd4c3
YQ
835with_babeltrace
836with_libbabeltrace_prefix
81ecdfbb
RW
837'
838 ac_precious_vars='build_alias
839host_alias
840target_alias
841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
846CPP
f06e05e0
JK
847MAKEINFO
848MAKEINFOFLAGS
81ecdfbb
RW
849YACC
850YFLAGS
851XMKMF'
5ae98d25 852ac_subdirs_all='testsuite
81ecdfbb
RW
853gdbtk
854multi-ice
855gdbserver'
c906108c
SS
856
857# Initialize some variables set by options.
bec39cab
AC
858ac_init_help=
859ac_init_version=false
81ecdfbb
RW
860ac_unrecognized_opts=
861ac_unrecognized_sep=
c906108c
SS
862# The variables have the same names as the options, with
863# dashes changed to underlines.
bec39cab 864cache_file=/dev/null
c906108c 865exec_prefix=NONE
c906108c 866no_create=
c906108c
SS
867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
872silent=
873site=
874srcdir=
c906108c
SS
875verbose=
876x_includes=NONE
877x_libraries=NONE
bec39cab
AC
878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 884# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
c906108c
SS
890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
c906108c
SS
893includedir='${prefix}/include'
894oldincludedir='/usr/include'
81ecdfbb
RW
895docdir='${datarootdir}/doc/${PACKAGE}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
c906108c 904
c906108c 905ac_prev=
81ecdfbb 906ac_dashdash=
c906108c
SS
907for ac_option
908do
c906108c
SS
909 # If the previous option needs an argument, assign it.
910 if test -n "$ac_prev"; then
81ecdfbb 911 eval $ac_prev=\$ac_option
c906108c
SS
912 ac_prev=
913 continue
914 fi
915
81ecdfbb
RW
916 case $ac_option in
917 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918 *) ac_optarg=yes ;;
919 esac
c906108c
SS
920
921 # Accept the important Cygnus configure options, so we can diagnose typos.
922
81ecdfbb
RW
923 case $ac_dashdash$ac_option in
924 --)
925 ac_dashdash=yes ;;
c906108c
SS
926
927 -bindir | --bindir | --bindi | --bind | --bin | --bi)
928 ac_prev=bindir ;;
929 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 930 bindir=$ac_optarg ;;
c906108c
SS
931
932 -build | --build | --buil | --bui | --bu)
bec39cab 933 ac_prev=build_alias ;;
c906108c 934 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 935 build_alias=$ac_optarg ;;
c906108c
SS
936
937 -cache-file | --cache-file | --cache-fil | --cache-fi \
938 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939 ac_prev=cache_file ;;
940 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
942 cache_file=$ac_optarg ;;
943
944 --config-cache | -C)
945 cache_file=config.cache ;;
c906108c 946
81ecdfbb 947 -datadir | --datadir | --datadi | --datad)
c906108c 948 ac_prev=datadir ;;
81ecdfbb 949 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 950 datadir=$ac_optarg ;;
c906108c 951
81ecdfbb
RW
952 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953 | --dataroo | --dataro | --datar)
954 ac_prev=datarootdir ;;
955 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957 datarootdir=$ac_optarg ;;
958
c906108c 959 -disable-* | --disable-*)
81ecdfbb 960 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 961 # Reject names that are not valid shell variable names.
81ecdfbb
RW
962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
963 as_fn_error "invalid feature name: $ac_useropt"
964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=no ;;
974
975 -docdir | --docdir | --docdi | --doc | --do)
976 ac_prev=docdir ;;
977 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978 docdir=$ac_optarg ;;
979
980 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981 ac_prev=dvidir ;;
982 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983 dvidir=$ac_optarg ;;
c906108c
SS
984
985 -enable-* | --enable-*)
81ecdfbb 986 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 987 # Reject names that are not valid shell variable names.
81ecdfbb
RW
988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
989 as_fn_error "invalid feature name: $ac_useropt"
990 ac_useropt_orig=$ac_useropt
991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
b4e70030 998 esac
81ecdfbb 999 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1000
1001 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003 | --exec | --exe | --ex)
1004 ac_prev=exec_prefix ;;
1005 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007 | --exec=* | --exe=* | --ex=*)
bec39cab 1008 exec_prefix=$ac_optarg ;;
c906108c
SS
1009
1010 -gas | --gas | --ga | --g)
1011 # Obsolete; use --with-gas.
1012 with_gas=yes ;;
1013
bec39cab
AC
1014 -help | --help | --hel | --he | -h)
1015 ac_init_help=long ;;
1016 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017 ac_init_help=recursive ;;
1018 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019 ac_init_help=short ;;
c906108c
SS
1020
1021 -host | --host | --hos | --ho)
bec39cab 1022 ac_prev=host_alias ;;
c906108c 1023 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1024 host_alias=$ac_optarg ;;
c906108c 1025
81ecdfbb
RW
1026 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027 ac_prev=htmldir ;;
1028 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029 | --ht=*)
1030 htmldir=$ac_optarg ;;
1031
c906108c
SS
1032 -includedir | --includedir | --includedi | --included | --include \
1033 | --includ | --inclu | --incl | --inc)
1034 ac_prev=includedir ;;
1035 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1037 includedir=$ac_optarg ;;
c906108c
SS
1038
1039 -infodir | --infodir | --infodi | --infod | --info | --inf)
1040 ac_prev=infodir ;;
1041 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1042 infodir=$ac_optarg ;;
c906108c
SS
1043
1044 -libdir | --libdir | --libdi | --libd)
1045 ac_prev=libdir ;;
1046 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1047 libdir=$ac_optarg ;;
c906108c
SS
1048
1049 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050 | --libexe | --libex | --libe)
1051 ac_prev=libexecdir ;;
1052 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053 | --libexe=* | --libex=* | --libe=*)
bec39cab 1054 libexecdir=$ac_optarg ;;
c906108c 1055
81ecdfbb
RW
1056 -localedir | --localedir | --localedi | --localed | --locale)
1057 ac_prev=localedir ;;
1058 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059 localedir=$ac_optarg ;;
1060
c906108c 1061 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1062 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1063 ac_prev=localstatedir ;;
1064 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1065 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1066 localstatedir=$ac_optarg ;;
c906108c
SS
1067
1068 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069 ac_prev=mandir ;;
1070 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1071 mandir=$ac_optarg ;;
c906108c
SS
1072
1073 -nfp | --nfp | --nf)
1074 # Obsolete; use --without-fp.
1075 with_fp=no ;;
1076
1077 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1078 | --no-cr | --no-c | -n)
c906108c
SS
1079 no_create=yes ;;
1080
1081 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083 no_recursion=yes ;;
1084
1085 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087 | --oldin | --oldi | --old | --ol | --o)
1088 ac_prev=oldincludedir ;;
1089 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1092 oldincludedir=$ac_optarg ;;
c906108c
SS
1093
1094 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 ac_prev=prefix ;;
1096 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1097 prefix=$ac_optarg ;;
c906108c
SS
1098
1099 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100 | --program-pre | --program-pr | --program-p)
1101 ac_prev=program_prefix ;;
1102 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1104 program_prefix=$ac_optarg ;;
c906108c
SS
1105
1106 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107 | --program-suf | --program-su | --program-s)
1108 ac_prev=program_suffix ;;
1109 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1111 program_suffix=$ac_optarg ;;
c906108c
SS
1112
1113 -program-transform-name | --program-transform-name \
1114 | --program-transform-nam | --program-transform-na \
1115 | --program-transform-n | --program-transform- \
1116 | --program-transform | --program-transfor \
1117 | --program-transfo | --program-transf \
1118 | --program-trans | --program-tran \
1119 | --progr-tra | --program-tr | --program-t)
1120 ac_prev=program_transform_name ;;
1121 -program-transform-name=* | --program-transform-name=* \
1122 | --program-transform-nam=* | --program-transform-na=* \
1123 | --program-transform-n=* | --program-transform-=* \
1124 | --program-transform=* | --program-transfor=* \
1125 | --program-transfo=* | --program-transf=* \
1126 | --program-trans=* | --program-tran=* \
1127 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1128 program_transform_name=$ac_optarg ;;
c906108c 1129
81ecdfbb
RW
1130 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131 ac_prev=pdfdir ;;
1132 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133 pdfdir=$ac_optarg ;;
1134
1135 -psdir | --psdir | --psdi | --psd | --ps)
1136 ac_prev=psdir ;;
1137 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138 psdir=$ac_optarg ;;
1139
c906108c
SS
1140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141 | -silent | --silent | --silen | --sile | --sil)
1142 silent=yes ;;
1143
1144 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1145 ac_prev=sbindir ;;
1146 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1147 | --sbi=* | --sb=*)
bec39cab 1148 sbindir=$ac_optarg ;;
c906108c
SS
1149
1150 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1151 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1152 | --sharedst | --shareds | --shared | --share | --shar \
1153 | --sha | --sh)
1154 ac_prev=sharedstatedir ;;
1155 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1156 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1157 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1158 | --sha=* | --sh=*)
bec39cab 1159 sharedstatedir=$ac_optarg ;;
c906108c
SS
1160
1161 -site | --site | --sit)
1162 ac_prev=site ;;
1163 -site=* | --site=* | --sit=*)
bec39cab 1164 site=$ac_optarg ;;
3ace7edb 1165
c906108c
SS
1166 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1167 ac_prev=srcdir ;;
1168 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1169 srcdir=$ac_optarg ;;
c906108c
SS
1170
1171 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1172 | --syscon | --sysco | --sysc | --sys | --sy)
1173 ac_prev=sysconfdir ;;
1174 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1175 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1176 sysconfdir=$ac_optarg ;;
c906108c
SS
1177
1178 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1179 ac_prev=target_alias ;;
c906108c 1180 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1181 target_alias=$ac_optarg ;;
c906108c
SS
1182
1183 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1184 verbose=yes ;;
1185
bec39cab
AC
1186 -version | --version | --versio | --versi | --vers | -V)
1187 ac_init_version=: ;;
c906108c
SS
1188
1189 -with-* | --with-*)
81ecdfbb 1190 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1191 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1192 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193 as_fn_error "invalid package name: $ac_useropt"
1194 ac_useropt_orig=$ac_useropt
1195 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196 case $ac_user_opts in
1197 *"
1198"with_$ac_useropt"
1199"*) ;;
1200 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1201 ac_unrecognized_sep=', ';;
b4e70030 1202 esac
81ecdfbb 1203 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1204
1205 -without-* | --without-*)
81ecdfbb 1206 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1207 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1209 as_fn_error "invalid package name: $ac_useropt"
1210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=no ;;
c906108c
SS
1220
1221 --x)
1222 # Obsolete; use --with-x.
1223 with_x=yes ;;
1224
1225 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1226 | --x-incl | --x-inc | --x-in | --x-i)
1227 ac_prev=x_includes ;;
1228 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1229 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1230 x_includes=$ac_optarg ;;
c906108c
SS
1231
1232 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1233 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1234 ac_prev=x_libraries ;;
1235 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1236 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1237 x_libraries=$ac_optarg ;;
c906108c 1238
81ecdfbb
RW
1239 -*) as_fn_error "unrecognized option: \`$ac_option'
1240Try \`$0 --help' for more information."
c906108c
SS
1241 ;;
1242
bec39cab
AC
1243 *=*)
1244 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1245 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1246 case $ac_envvar in #(
1247 '' | [0-9]* | *[!_$as_cr_alnum]* )
1248 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1249 esac
1250 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1251 export $ac_envvar ;;
1252
c906108c 1253 *)
bec39cab 1254 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1255 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1256 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1257 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1258 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1259 ;;
1260
1261 esac
1262done
1263
1264if test -n "$ac_prev"; then
bec39cab 1265 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1266 as_fn_error "missing argument to $ac_option"
c906108c 1267fi
c906108c 1268
81ecdfbb
RW
1269if test -n "$ac_unrecognized_opts"; then
1270 case $enable_option_checking in
1271 no) ;;
1272 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1273 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1274 esac
81ecdfbb 1275fi
b4e70030 1276
81ecdfbb
RW
1277# Check all directory arguments for consistency.
1278for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1279 datadir sysconfdir sharedstatedir localstatedir includedir \
1280 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1281 libdir localedir mandir
b4e70030 1282do
81ecdfbb
RW
1283 eval ac_val=\$$ac_var
1284 # Remove trailing slashes.
1285 case $ac_val in
1286 */ )
1287 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1288 eval $ac_var=\$ac_val;;
1289 esac
1290 # Be sure to have absolute directory names.
b4e70030 1291 case $ac_val in
81ecdfbb
RW
1292 [\\/$]* | ?:[\\/]* ) continue;;
1293 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1294 esac
81ecdfbb 1295 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1296done
1297
bec39cab
AC
1298# There might be people who depend on the old broken behavior: `$host'
1299# used to hold the argument of --host etc.
1300# FIXME: To remove some day.
1301build=$build_alias
1302host=$host_alias
1303target=$target_alias
1304
1305# FIXME: To remove some day.
1306if test "x$host_alias" != x; then
1307 if test "x$build_alias" = x; then
1308 cross_compiling=maybe
81ecdfbb 1309 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1310 If a cross compiler is detected then cross compile mode will be used." >&2
1311 elif test "x$build_alias" != "x$host_alias"; then
1312 cross_compiling=yes
1313 fi
1314fi
c906108c 1315
bec39cab
AC
1316ac_tool_prefix=
1317test -n "$host_alias" && ac_tool_prefix=$host_alias-
1318
1319test "$silent" = yes && exec 6>/dev/null
c906108c 1320
c906108c 1321
81ecdfbb
RW
1322ac_pwd=`pwd` && test -n "$ac_pwd" &&
1323ac_ls_di=`ls -di .` &&
1324ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1325 as_fn_error "working directory cannot be determined"
1326test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1327 as_fn_error "pwd does not report name of working directory"
1328
1329
c906108c
SS
1330# Find the source files, if location was not specified.
1331if test -z "$srcdir"; then
1332 ac_srcdir_defaulted=yes
81ecdfbb
RW
1333 # Try the directory containing this script, then the parent directory.
1334 ac_confdir=`$as_dirname -- "$as_myself" ||
1335$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336 X"$as_myself" : 'X\(//\)[^/]' \| \
1337 X"$as_myself" : 'X\(//\)$' \| \
1338 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339$as_echo X"$as_myself" |
1340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)[^/].*/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\).*/{
1353 s//\1/
1354 q
1355 }
1356 s/.*/./; q'`
c906108c 1357 srcdir=$ac_confdir
81ecdfbb 1358 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1359 srcdir=..
1360 fi
1361else
1362 ac_srcdir_defaulted=no
1363fi
81ecdfbb
RW
1364if test ! -r "$srcdir/$ac_unique_file"; then
1365 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1366 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1367fi
1368ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369ac_abs_confdir=`(
1370 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1371 pwd)`
1372# When building in place, set srcdir=.
1373if test "$ac_abs_confdir" = "$ac_pwd"; then
1374 srcdir=.
1375fi
1376# Remove unnecessary trailing slashes from srcdir.
1377# Double slashes in file names in object file debugging info
1378# mess up M-x gdb in Emacs.
1379case $srcdir in
1380*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381esac
1382for ac_var in $ac_precious_vars; do
1383 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_env_${ac_var}_value=\$${ac_var}
1385 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387done
c906108c 1388
bec39cab
AC
1389#
1390# Report the --help message.
1391#
1392if test "$ac_init_help" = "long"; then
1393 # Omit some internal or obsolete options to make the list less imposing.
1394 # This message is too long to be a string in the A/UX 3.1 sh.
1395 cat <<_ACEOF
1396\`configure' configures this package to adapt to many kinds of systems.
1397
1398Usage: $0 [OPTION]... [VAR=VALUE]...
1399
1400To assign environment variables (e.g., CC, CFLAGS...), specify them as
1401VAR=VALUE. See below for descriptions of some of the useful variables.
1402
1403Defaults for the options are specified in brackets.
1404
1405Configuration:
1406 -h, --help display this help and exit
1407 --help=short display options specific to this package
1408 --help=recursive display the short help of all the included packages
1409 -V, --version display version information and exit
1410 -q, --quiet, --silent do not print \`checking...' messages
1411 --cache-file=FILE cache test results in FILE [disabled]
1412 -C, --config-cache alias for \`--cache-file=config.cache'
1413 -n, --no-create do not create output files
1414 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1415
bec39cab
AC
1416Installation directories:
1417 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1418 [$ac_default_prefix]
bec39cab 1419 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1420 [PREFIX]
bec39cab
AC
1421
1422By default, \`make install' will install all the files in
1423\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1424an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425for instance \`--prefix=\$HOME'.
1426
1427For better control, use the options below.
1428
1429Fine tuning of the installation directories:
81ecdfbb
RW
1430 --bindir=DIR user executables [EPREFIX/bin]
1431 --sbindir=DIR system admin executables [EPREFIX/sbin]
1432 --libexecdir=DIR program executables [EPREFIX/libexec]
1433 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1434 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1435 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1436 --libdir=DIR object code libraries [EPREFIX/lib]
1437 --includedir=DIR C header files [PREFIX/include]
1438 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1439 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1440 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1441 --infodir=DIR info documentation [DATAROOTDIR/info]
1442 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1443 --mandir=DIR man documentation [DATAROOTDIR/man]
1444 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1445 --htmldir=DIR html documentation [DOCDIR]
1446 --dvidir=DIR dvi documentation [DOCDIR]
1447 --pdfdir=DIR pdf documentation [DOCDIR]
1448 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1449_ACEOF
1450
1451 cat <<\_ACEOF
1452
9009e1ae
MR
1453Program names:
1454 --program-prefix=PREFIX prepend PREFIX to installed program names
1455 --program-suffix=SUFFIX append SUFFIX to installed program names
1456 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1457
bec39cab
AC
1458X features:
1459 --x-includes=DIR X include files are in DIR
1460 --x-libraries=DIR X library files are in DIR
1461
1462System types:
1463 --build=BUILD configure for building on BUILD [guessed]
1464 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1465 --target=TARGET configure for building compilers for TARGET [HOST]
1466_ACEOF
1467fi
1468
1469if test -n "$ac_init_help"; then
1470
1471 cat <<\_ACEOF
1472
1473Optional Features:
81ecdfbb 1474 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1477 --enable-maintainer-mode enable make rules and dependencies not useful
1478 (and sometimes confusing) to the casual installer
da2f07f1
JK
1479 --enable-plugins Enable support for plugins (defaults no)
1480 --disable-largefile omit support for large files
a1220294
TT
1481 --enable-targets=TARGETS
1482 alternative target configurations
c0993dbe 1483 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1484 --disable-gdbcli disable command-line interface (CLI)
1485 --disable-gdbmi disable machine-interface (MI)
1486 --enable-tui enable full-screen terminal user interface (TUI)
1487 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1488 --enable-profiling enable profiling of GDB
3841debe 1489 --disable-rpath do not hardcode runtime library paths
17ef446e 1490 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1491 --enable-werror treat compile warnings as errors
32c1c914 1492 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1493 --enable-gdb-build-warnings
32c1c914 1494 enable GDB specific build-time compiler warnings if
a1220294 1495 gcc is used
32c1c914 1496 --enable-sim link gdb with simulator
bec39cab 1497 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1498 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1499 is auto)
bec39cab
AC
1500
1501Optional Packages:
1502 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1503 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1504 --with-separate-debug-dir=PATH
32c1c914 1505 look for global separate debug info in this path
62e4f60c 1506 [LIBDIR/debug]
b14b1491
TT
1507 --with-gdb-datadir=PATH look for global separate data files in this path
1508 [DATADIR/gdb]
29b0e8a2 1509 --with-relocated-sources=PATH
32c1c914 1510 automatically relocate this path for source files
7349ff92 1511 --with-auto-load-dir=PATH
aff139ff 1512 directories from which to load auto-loaded scripts
1564a261 1513 [$debugdir:$datadir/auto-load]
bccbefd2 1514 --with-auto-load-safe-path=PATH
aff139ff 1515 directories safe to hold auto-loaded files
7349ff92 1516 [--with-auto-load-dir]
bccbefd2
JK
1517 --without-auto-load-safe-path
1518 do not restrict auto-loaded files locations
05e7c244 1519 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1520 --with-curses use the curses library instead of the termcap
1521 library
c16158bc
JM
1522 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1523 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1524 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1525 --with-libiconv-prefix=DIR
1526 search for libiconv in DIR/include and DIR/lib
478aac75 1527 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1528 --with-system-readline use installed readline library
b8e0a31c
SD
1529 --with-jit-reader-dir=PATH
1530 directory to load the JIT readers from
5c39566f 1531 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1532 --with-gnu-ld assume the C compiler uses GNU ld default=no
1533 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1534 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1535 --with-python[=PYTHON] include python support
1536 (auto/yes/no/<python-program>)
ed3ef339
DE
1537 --with-guile[=GUILE] include guile support
1538 (auto/yes/no/<guile-version>/<pkg-config-program>)
a1220294
TT
1539 --without-included-regex
1540 don't use included regex; this is the default on
1541 systems with version 2 of the GNU C library (use
1542 with caution on other system)
81ecdfbb 1543 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1544 --with-system-gdbinit=PATH
32c1c914 1545 automatically load a system-wide gdbinit file
608e2dbb
TT
1546 --with-lzma support lzma compression (auto/yes/no)
1547 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1548 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1549 --with-tcl directory containing tcl configuration (tclConfig.sh)
1550 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1551 --with-x use the X Window System
393fd4c3
YQ
1552 --with-babeltrace include babeltrace support (auto/yes/no)
1553 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1554 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1555
1556Some influential environment variables:
1557 CC C compiler command
1558 CFLAGS C compiler flags
1559 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1560 nonstandard directory <lib dir>
81ecdfbb
RW
1561 LIBS libraries to pass to the linker, e.g. -l<library>
1562 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1563 you have headers in a nonstandard directory <include dir>
bec39cab 1564 CPP C preprocessor
f06e05e0
JK
1565 MAKEINFO Parent configure detects if it is of sufficient version.
1566 MAKEINFOFLAGS
1567 Parameters for MAKEINFO.
81ecdfbb
RW
1568 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1569 the first program found out of: `bison -y', `byacc', `yacc'.
1570 YFLAGS The list of arguments that will be passed by default to $YACC.
1571 This script will default YFLAGS to the empty string to avoid a
1572 default value of `-d' given by some make applications.
1573 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1574
1575Use these variables to override the choices made by `configure' or to help
1576it to find libraries and programs with nonstandard names/locations.
1577
81ecdfbb 1578Report bugs to the package provider.
bec39cab 1579_ACEOF
81ecdfbb 1580ac_status=$?
bec39cab
AC
1581fi
1582
1583if test "$ac_init_help" = "recursive"; then
1584 # If there are subdirs, report their specific --help.
bec39cab 1585 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1586 test -d "$ac_dir" ||
1587 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1588 continue
bec39cab
AC
1589 ac_builddir=.
1590
81ecdfbb
RW
1591case "$ac_dir" in
1592.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593*)
1594 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1595 # A ".." for each directory in $ac_dir_suffix.
1596 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1597 case $ac_top_builddir_sub in
1598 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1600 esac ;;
1601esac
1602ac_abs_top_builddir=$ac_pwd
1603ac_abs_builddir=$ac_pwd$ac_dir_suffix
1604# for backward compatibility:
1605ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1606
1607case $srcdir in
81ecdfbb 1608 .) # We are building in place.
bec39cab 1609 ac_srcdir=.
81ecdfbb
RW
1610 ac_top_srcdir=$ac_top_builddir_sub
1611 ac_abs_top_srcdir=$ac_pwd ;;
1612 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1613 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1614 ac_top_srcdir=$srcdir
1615 ac_abs_top_srcdir=$srcdir ;;
1616 *) # Relative name.
1617 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1618 ac_top_srcdir=$ac_top_build_prefix$srcdir
1619 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1620esac
81ecdfbb 1621ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1622
81ecdfbb
RW
1623 cd "$ac_dir" || { ac_status=$?; continue; }
1624 # Check for guested configure.
1625 if test -f "$ac_srcdir/configure.gnu"; then
1626 echo &&
1627 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1628 elif test -f "$ac_srcdir/configure"; then
1629 echo &&
1630 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1631 else
81ecdfbb
RW
1632 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1633 fi || ac_status=$?
1634 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1635 done
1636fi
1637
81ecdfbb 1638test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1639if $ac_init_version; then
1640 cat <<\_ACEOF
81ecdfbb
RW
1641configure
1642generated by GNU Autoconf 2.64
bec39cab 1643
81ecdfbb 1644Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1645This configure script is free software; the Free Software Foundation
1646gives unlimited permission to copy, distribute and modify it.
1647_ACEOF
81ecdfbb 1648 exit
bec39cab 1649fi
bec39cab 1650
81ecdfbb
RW
1651## ------------------------ ##
1652## Autoconf initialization. ##
1653## ------------------------ ##
bec39cab 1654
81ecdfbb
RW
1655# ac_fn_c_try_compile LINENO
1656# --------------------------
1657# Try to compile conftest.$ac_ext, and return whether this succeeded.
1658ac_fn_c_try_compile ()
1659{
1660 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1661 rm -f conftest.$ac_objext
1662 if { { ac_try="$ac_compile"
1663case "(($ac_try" in
1664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1665 *) ac_try_echo=$ac_try;;
1666esac
1667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1668$as_echo "$ac_try_echo"; } >&5
1669 (eval "$ac_compile") 2>conftest.err
1670 ac_status=$?
1671 if test -s conftest.err; then
1672 grep -v '^ *+' conftest.err >conftest.er1
1673 cat conftest.er1 >&5
1674 mv -f conftest.er1 conftest.err
1675 fi
1676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1677 test $ac_status = 0; } && {
1678 test -z "$ac_c_werror_flag" ||
1679 test ! -s conftest.err
1680 } && test -s conftest.$ac_objext; then :
1681 ac_retval=0
1682else
1683 $as_echo "$as_me: failed program was:" >&5
1684sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1685
81ecdfbb
RW
1686 ac_retval=1
1687fi
1688 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1689 return $ac_retval
1690
1691} # ac_fn_c_try_compile
1692
1693# ac_fn_c_try_cpp LINENO
1694# ----------------------
1695# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1696ac_fn_c_try_cpp ()
bec39cab 1697{
81ecdfbb
RW
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_cpp conftest.$ac_ext"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1707 ac_status=$?
1708 if test -s conftest.err; then
1709 grep -v '^ *+' conftest.err >conftest.er1
1710 cat conftest.er1 >&5
1711 mv -f conftest.er1 conftest.err
1712 fi
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; } >/dev/null && {
1715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1716 test ! -s conftest.err
1717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1722
81ecdfbb
RW
1723 ac_retval=1
1724fi
1725 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1726 return $ac_retval
bec39cab 1727
81ecdfbb 1728} # ac_fn_c_try_cpp
bec39cab 1729
81ecdfbb
RW
1730# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1731# -------------------------------------------------------
1732# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1733# the include files in INCLUDES and setting the cache variable VAR
1734# accordingly.
1735ac_fn_c_check_header_mongrel ()
1736{
1737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740$as_echo_n "checking for $2... " >&6; }
1741if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1742 $as_echo_n "(cached) " >&6
1743fi
1744eval ac_res=\$$3
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746$as_echo "$ac_res" >&6; }
1747else
1748 # Is the header compilable?
1749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1750$as_echo_n "checking $2 usability... " >&6; }
1751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752/* end confdefs.h. */
1753$4
1754#include <$2>
1755_ACEOF
1756if ac_fn_c_try_compile "$LINENO"; then :
1757 ac_header_compiler=yes
1758else
1759 ac_header_compiler=no
1760fi
1761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1763$as_echo "$ac_header_compiler" >&6; }
bec39cab 1764
81ecdfbb
RW
1765# Is the header present?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1767$as_echo_n "checking $2 presence... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770#include <$2>
1771_ACEOF
1772if ac_fn_c_try_cpp "$LINENO"; then :
1773 ac_header_preproc=yes
1774else
1775 ac_header_preproc=no
1776fi
1777rm -f conftest.err conftest.$ac_ext
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1779$as_echo "$ac_header_preproc" >&6; }
bec39cab 1780
81ecdfbb
RW
1781# So? What about this header?
1782case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1783 yes:no: )
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1785$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1787$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1788 ;;
1789 no:yes:* )
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1791$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1793$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1795$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1797$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1799$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1800 ;;
1801esac
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1803$as_echo_n "checking for $2... " >&6; }
1804if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1805 $as_echo_n "(cached) " >&6
1806else
1807 eval "$3=\$ac_header_compiler"
1808fi
1809eval ac_res=\$$3
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811$as_echo "$ac_res" >&6; }
1812fi
1813 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1814
81ecdfbb 1815} # ac_fn_c_check_header_mongrel
bec39cab 1816
81ecdfbb
RW
1817# ac_fn_c_try_run LINENO
1818# ----------------------
1819# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1820# that executables *can* be run.
1821ac_fn_c_try_run ()
1822{
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 if { { ac_try="$ac_link"
1825case "(($ac_try" in
1826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1827 *) ac_try_echo=$ac_try;;
1828esac
1829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1830$as_echo "$ac_try_echo"; } >&5
1831 (eval "$ac_link") 2>&5
1832 ac_status=$?
1833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1834 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1835 { { case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838esac
1839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840$as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_try") 2>&5
1842 ac_status=$?
1843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1844 test $ac_status = 0; }; }; then :
1845 ac_retval=0
1846else
1847 $as_echo "$as_me: program exited with status $ac_status" >&5
1848 $as_echo "$as_me: failed program was:" >&5
1849sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1850
81ecdfbb
RW
1851 ac_retval=$ac_status
1852fi
1853 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855 return $ac_retval
bec39cab 1856
81ecdfbb 1857} # ac_fn_c_try_run
bec39cab 1858
81ecdfbb
RW
1859# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1860# -------------------------------------------------------
1861# Tests whether HEADER exists and can be compiled using the include files in
1862# INCLUDES, setting the cache variable VAR accordingly.
1863ac_fn_c_check_header_compile ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867$as_echo_n "checking for $2... " >&6; }
1868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1869 $as_echo_n "(cached) " >&6
1870else
1871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872/* end confdefs.h. */
1873$4
1874#include <$2>
bec39cab 1875_ACEOF
81ecdfbb
RW
1876if ac_fn_c_try_compile "$LINENO"; then :
1877 eval "$3=yes"
1878else
1879 eval "$3=no"
1880fi
1881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1882fi
1883eval ac_res=\$$3
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1885$as_echo "$ac_res" >&6; }
1886 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1887
81ecdfbb 1888} # ac_fn_c_check_header_compile
bec39cab 1889
81ecdfbb
RW
1890# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1891# --------------------------------------------
1892# Tries to find the compile-time value of EXPR in a program that includes
1893# INCLUDES, setting VAR accordingly. Returns whether the value could be
1894# computed
1895ac_fn_c_compute_int ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 if test "$cross_compiling" = yes; then
1899 # Depending upon the size, compute the lo and hi bounds.
1900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906static int test_array [1 - 2 * !(($2) >= 0)];
1907test_array [0] = 0
bec39cab 1908
81ecdfbb
RW
1909 ;
1910 return 0;
1911}
1912_ACEOF
1913if ac_fn_c_try_compile "$LINENO"; then :
1914 ac_lo=0 ac_mid=0
1915 while :; do
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917/* end confdefs.h. */
1918$4
1919int
1920main ()
1921{
1922static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1923test_array [0] = 0
bec39cab 1924
81ecdfbb
RW
1925 ;
1926 return 0;
1927}
1928_ACEOF
1929if ac_fn_c_try_compile "$LINENO"; then :
1930 ac_hi=$ac_mid; break
1931else
1932 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1933 if test $ac_lo -le $ac_mid; then
1934 ac_lo= ac_hi=
1935 break
1936 fi
1937 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1938fi
81ecdfbb
RW
1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1940 done
c906108c 1941else
81ecdfbb
RW
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948static int test_array [1 - 2 * !(($2) < 0)];
1949test_array [0] = 0
bec39cab 1950
81ecdfbb
RW
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 ac_hi=-1 ac_mid=-1
1957 while :; do
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1965test_array [0] = 0
bec39cab 1966
81ecdfbb
RW
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 ac_lo=$ac_mid; break
1973else
1974 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1975 if test $ac_mid -le $ac_hi; then
1976 ac_lo= ac_hi=
1977 break
1978 fi
1979 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1980fi
1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982 done
1983else
1984 ac_lo= ac_hi=
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1989# Binary search between lo and hi bounds.
1990while test "x$ac_lo" != "x$ac_hi"; do
1991 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1999test_array [0] = 0
bec39cab 2000
81ecdfbb
RW
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 ac_hi=$ac_mid
2007else
2008 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2009fi
2010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2011done
2012case $ac_lo in #((
2013?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2014'') ac_retval=1 ;;
2015esac
2016 else
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020static long int longval () { return $2; }
2021static unsigned long int ulongval () { return $2; }
2022#include <stdio.h>
2023#include <stdlib.h>
2024int
2025main ()
2026{
bec39cab 2027
81ecdfbb
RW
2028 FILE *f = fopen ("conftest.val", "w");
2029 if (! f)
2030 return 1;
2031 if (($2) < 0)
2032 {
2033 long int i = longval ();
2034 if (i != ($2))
2035 return 1;
2036 fprintf (f, "%ld", i);
2037 }
2038 else
2039 {
2040 unsigned long int i = ulongval ();
2041 if (i != ($2))
2042 return 1;
2043 fprintf (f, "%lu", i);
2044 }
2045 /* Do not output a trailing newline, as this causes \r\n confusion
2046 on some platforms. */
2047 return ferror (f) || fclose (f) != 0;
bec39cab 2048
81ecdfbb
RW
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_run "$LINENO"; then :
2054 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2055else
2056 ac_retval=1
2057fi
2058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2059 conftest.$ac_objext conftest.beam conftest.$ac_ext
2060rm -f conftest.val
bec39cab 2061
81ecdfbb
RW
2062 fi
2063 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2064 return $ac_retval
bec39cab 2065
81ecdfbb 2066} # ac_fn_c_compute_int
bec39cab 2067
c971b7fa
PA
2068# ac_fn_c_try_link LINENO
2069# -----------------------
2070# Try to link conftest.$ac_ext, and return whether this succeeded.
2071ac_fn_c_try_link ()
2072{
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 rm -f conftest.$ac_objext conftest$ac_exeext
2075 if { { ac_try="$ac_link"
2076case "(($ac_try" in
2077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2078 *) ac_try_echo=$ac_try;;
2079esac
2080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2081$as_echo "$ac_try_echo"; } >&5
2082 (eval "$ac_link") 2>conftest.err
2083 ac_status=$?
2084 if test -s conftest.err; then
2085 grep -v '^ *+' conftest.err >conftest.er1
2086 cat conftest.er1 >&5
2087 mv -f conftest.er1 conftest.err
2088 fi
2089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2090 test $ac_status = 0; } && {
2091 test -z "$ac_c_werror_flag" ||
2092 test ! -s conftest.err
2093 } && test -s conftest$ac_exeext && {
2094 test "$cross_compiling" = yes ||
2095 $as_test_x conftest$ac_exeext
2096 }; then :
2097 ac_retval=0
2098else
2099 $as_echo "$as_me: failed program was:" >&5
2100sed 's/^/| /' conftest.$ac_ext >&5
2101
2102 ac_retval=1
2103fi
2104 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2105 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2106 # interfere with the next link command; also delete a directory that is
2107 # left behind by Apple's compiler. We do this before executing the actions.
2108 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2109 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2110 return $ac_retval
2111
2112} # ac_fn_c_try_link
2113
55a8c076
YQ
2114# ac_fn_c_check_func LINENO FUNC VAR
2115# ----------------------------------
2116# Tests whether FUNC exists, setting the cache variable VAR accordingly
2117ac_fn_c_check_func ()
81ecdfbb
RW
2118{
2119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2121$as_echo_n "checking for $2... " >&6; }
2122if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2123 $as_echo_n "(cached) " >&6
2124else
81ecdfbb
RW
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
55a8c076
YQ
2127/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2128 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2129#define $2 innocuous_$2
2130
2131/* System header to define __stub macros and hopefully few prototypes,
2132 which can conflict with char $2 (); below.
2133 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2134 <limits.h> exists even on freestanding compilers. */
2135
2136#ifdef __STDC__
2137# include <limits.h>
2138#else
2139# include <assert.h>
2140#endif
2141
2142#undef $2
2143
2144/* Override any GCC internal prototype to avoid an error.
2145 Use char because int might match the return type of a GCC
2146 builtin and then its argument prototype would still apply. */
2147#ifdef __cplusplus
2148extern "C"
2149#endif
2150char $2 ();
2151/* The GNU C library defines this for functions which it implements
2152 to always fail with ENOSYS. Some functions are actually named
2153 something starting with __ and the normal name is an alias. */
2154#if defined __stub_$2 || defined __stub___$2
2155choke me
2156#endif
2157
2158int
2159main ()
2160{
2161return $2 ();
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_link "$LINENO"; then :
2167 eval "$3=yes"
2168else
2169 eval "$3=no"
2170fi
2171rm -f core conftest.err conftest.$ac_objext \
2172 conftest$ac_exeext conftest.$ac_ext
2173fi
2174eval ac_res=\$$3
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2176$as_echo "$ac_res" >&6; }
2177 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2178
2179} # ac_fn_c_check_func
2180
770d76d7
PA
2181# ac_fn_c_check_decl LINENO SYMBOL VAR
2182# ------------------------------------
2183# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2184ac_fn_c_check_decl ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 as_decl_name=`echo $2|sed 's/ *(.*//'`
2188 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2190$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2191if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2192 $as_echo_n "(cached) " >&6
2193else
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195/* end confdefs.h. */
2196$4
2197int
2198main ()
2199{
2200#ifndef $as_decl_name
2201#ifdef __cplusplus
2202 (void) $as_decl_use;
2203#else
2204 (void) $as_decl_name;
2205#endif
2206#endif
2207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_compile "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
2222 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223
2224} # ac_fn_c_check_decl
2225
55a8c076
YQ
2226# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2227# ----------------------------------------------------
2228# Tries to find if the field MEMBER exists in type AGGR, after including
2229# INCLUDES, setting cache variable VAR accordingly.
2230ac_fn_c_check_member ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2234$as_echo_n "checking for $2.$3... " >&6; }
2235if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$5
2241int
2242main ()
2243{
2244static $2 ac_aggr;
2245if (ac_aggr.$3)
2246return 0;
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_compile "$LINENO"; then :
2252 eval "$4=yes"
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$5
2257int
2258main ()
2259{
2260static $2 ac_aggr;
2261if (sizeof ac_aggr.$3)
2262return 0;
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$4=yes"
2269else
2270 eval "$4=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$4
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2280
2281} # ac_fn_c_check_member
2282
2283# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2284# -------------------------------------------
2285# Tests whether TYPE exists after having included INCLUDES, setting cache
2286# variable VAR accordingly.
2287ac_fn_c_check_type ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2291$as_echo_n "checking for $2... " >&6; }
2292if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2293 $as_echo_n "(cached) " >&6
2294else
2295 eval "$3=no"
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$4
2299int
2300main ()
2301{
2302if (sizeof ($2))
2303 return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
2315if (sizeof (($2)))
2316 return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2322
81ecdfbb
RW
2323else
2324 eval "$3=yes"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$3
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
2333 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2334
81ecdfbb
RW
2335} # ac_fn_c_check_type
2336cat >config.log <<_ACEOF
2337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
d5af19ba 2339
81ecdfbb
RW
2340It was created by $as_me, which was
2341generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2342
81ecdfbb 2343 $ $0 $@
413ccac7 2344
81ecdfbb
RW
2345_ACEOF
2346exec 5>>config.log
2347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
413ccac7 2352
81ecdfbb
RW
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2358
81ecdfbb
RW
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2361
81ecdfbb
RW
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2369
81ecdfbb 2370_ASUNAME
bec39cab 2371
bec39cab
AC
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2377 $as_echo "PATH: $as_dir"
2378 done
2379IFS=$as_save_IFS
bec39cab 2380
81ecdfbb 2381} >&5
bec39cab 2382
81ecdfbb 2383cat >&5 <<_ACEOF
bec39cab 2384
bec39cab 2385
81ecdfbb
RW
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
2395# Strip out --silent because we don't want to record it for future runs.
2396# Also quote any args containing shell meta-characters.
2397# Make two passes to allow for proper duplicate-argument suppression.
2398ac_configure_args=
2399ac_configure_args0=
2400ac_configure_args1=
2401ac_must_keep_next=false
2402for ac_pass in 1 2
2403do
2404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
2411 *\'*)
2412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2413 esac
2414 case $ac_pass in
2415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2416 2)
2417 as_fn_append ac_configure_args1 " '$ac_arg'"
2418 if test $ac_must_keep_next = true; then
2419 ac_must_keep_next=false # Got value, back to normal.
2420 else
2421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
2432 fi
2433 as_fn_append ac_configure_args " '$ac_arg'"
2434 ;;
2435 esac
2436 done
2437done
2438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
2440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
2444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
2450
2451 cat <<\_ASBOX
2452## ---------------- ##
2453## Cache variables. ##
2454## ---------------- ##
2455_ASBOX
2456 echo
2457 # The following way of writing the cache mishandles newlines in values,
2458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
2464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
2469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
2471 esac ;;
2472 esac
2473 done
2474 (set) 2>&1 |
2475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
2477 sed -n \
2478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
2481 *)
2482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2483 ;;
2484 esac |
2485 sort
2486)
2487 echo
2488
2489 cat <<\_ASBOX
2490## ----------------- ##
2491## Output variables. ##
2492## ----------------- ##
2493_ASBOX
2494 echo
2495 for ac_var in $ac_subst_vars
2496 do
2497 eval ac_val=\$$ac_var
2498 case $ac_val in
2499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2500 esac
2501 $as_echo "$ac_var='\''$ac_val'\''"
2502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
2506 cat <<\_ASBOX
2507## ------------------- ##
2508## File substitutions. ##
2509## ------------------- ##
2510_ASBOX
2511 echo
2512 for ac_var in $ac_subst_files
2513 do
2514 eval ac_val=\$$ac_var
2515 case $ac_val in
2516 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2517 esac
2518 $as_echo "$ac_var='\''$ac_val'\''"
2519 done | sort
2520 echo
2521 fi
2522
2523 if test -s confdefs.h; then
2524 cat <<\_ASBOX
2525## ----------- ##
2526## confdefs.h. ##
2527## ----------- ##
2528_ASBOX
2529 echo
2530 cat confdefs.h
2531 echo
2532 fi
2533 test "$ac_signal" != 0 &&
2534 $as_echo "$as_me: caught signal $ac_signal"
2535 $as_echo "$as_me: exit $exit_status"
2536 } >&5
2537 rm -f core *.core core.conftest.* &&
2538 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2539 exit $exit_status
2540' 0
2541for ac_signal in 1 2 13 15; do
2542 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2543done
2544ac_signal=0
2545
2546# confdefs.h avoids OS command line length limits that DEFS can exceed.
2547rm -f -r conftest* confdefs.h
2548
2549$as_echo "/* confdefs.h */" > confdefs.h
2550
2551# Predefined preprocessor variables.
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_NAME "$PACKAGE_NAME"
2555_ACEOF
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2559_ACEOF
2560
2561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_VERSION "$PACKAGE_VERSION"
2563_ACEOF
2564
2565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_STRING "$PACKAGE_STRING"
2567_ACEOF
2568
2569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2571_ACEOF
2572
2573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_URL "$PACKAGE_URL"
2575_ACEOF
2576
2577
2578# Let the site file select an alternate cache file if it wants to.
2579# Prefer an explicitly selected file to automatically selected ones.
2580ac_site_file1=NONE
2581ac_site_file2=NONE
2582if test -n "$CONFIG_SITE"; then
2583 ac_site_file1=$CONFIG_SITE
2584elif test "x$prefix" != xNONE; then
2585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
2587else
2588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
2590fi
2591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2592do
2593 test "x$ac_site_file" = xNONE && continue
2594 if test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2597 sed 's/^/| /' "$ac_site_file" >&5
2598 . "$ac_site_file"
2599 fi
2600done
2601
2602if test -r "$cache_file"; then
2603 # Some versions of bash will fail to source /dev/null (special
2604 # files actually), so we avoid doing that.
2605 if test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
2608 case $cache_file in
2609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
2611 esac
2612 fi
2613else
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
2616 >$cache_file
bec39cab
AC
2617fi
2618
81ecdfbb
RW
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
2622for ac_var in $ac_precious_vars; do
2623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
2625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
2627 case $ac_old_set,$ac_new_set in
2628 set,)
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2631 ac_cache_corrupted=: ;;
2632 ,set)
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
2639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
2660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2674 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2675fi
2676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
2679
2680ac_ext=c
2681ac_cpp='$CPP $CPPFLAGS'
2682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
2685
2686
2687
2688
2689
2690ac_config_headers="$ac_config_headers config.h:config.in"
2691
2692
2693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2694$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2695 # Check whether --enable-maintainer-mode was given.
2696if test "${enable_maintainer_mode+set}" = set; then :
2697 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2698else
2699 USE_MAINTAINER_MODE=no
2700fi
2701
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2703$as_echo "$USE_MAINTAINER_MODE" >&6; }
2704 if test $USE_MAINTAINER_MODE = yes; then
2705 MAINTAINER_MODE_TRUE=
2706 MAINTAINER_MODE_FALSE='#'
2707else
2708 MAINTAINER_MODE_TRUE='#'
2709 MAINTAINER_MODE_FALSE=
2710fi
2711
2712 MAINT=$MAINTAINER_MODE_TRUE
2713
2714
2715
17ef446e
PA
2716# Set the 'development' global.
2717. $srcdir/development.sh
f5f1cdb6 2718
81ecdfbb
RW
2719ac_ext=c
2720ac_cpp='$CPP $CPPFLAGS'
2721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2723ac_compiler_gnu=$ac_cv_c_compiler_gnu
2724if test -n "$ac_tool_prefix"; then
2725 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2726set dummy ${ac_tool_prefix}gcc; ac_word=$2
2727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2728$as_echo_n "checking for $ac_word... " >&6; }
2729if test "${ac_cv_prog_CC+set}" = set; then :
2730 $as_echo_n "(cached) " >&6
c906108c
SS
2731else
2732 if test -n "$CC"; then
2733 ac_cv_prog_CC="$CC" # Let the user override the test.
2734else
bec39cab
AC
2735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2736for as_dir in $PATH
2737do
2738 IFS=$as_save_IFS
2739 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2740 for ac_exec_ext in '' $ac_executable_extensions; do
2741 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2742 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2744 break 2
2745 fi
2746done
81ecdfbb
RW
2747 done
2748IFS=$as_save_IFS
bec39cab 2749
c906108c
SS
2750fi
2751fi
bec39cab 2752CC=$ac_cv_prog_CC
c906108c 2753if test -n "$CC"; then
81ecdfbb
RW
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2755$as_echo "$CC" >&6; }
c906108c 2756else
81ecdfbb
RW
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
c906108c
SS
2759fi
2760
81ecdfbb 2761
b4e70030
JB
2762fi
2763if test -z "$ac_cv_prog_CC"; then
2764 ac_ct_CC=$CC
81ecdfbb
RW
2765 # Extract the first word of "gcc", so it can be a program name with args.
2766set dummy gcc; ac_word=$2
2767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2768$as_echo_n "checking for $ac_word... " >&6; }
2769if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2770 $as_echo_n "(cached) " >&6
b4e70030
JB
2771else
2772 if test -n "$ac_ct_CC"; then
2773 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2774else
2775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2776for as_dir in $PATH
2777do
2778 IFS=$as_save_IFS
2779 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2780 for ac_exec_ext in '' $ac_executable_extensions; do
2781 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2782 ac_cv_prog_ac_ct_CC="gcc"
2783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2784 break 2
4e8d927d 2785 fi
b4e70030 2786done
81ecdfbb
RW
2787 done
2788IFS=$as_save_IFS
b4e70030
JB
2789
2790fi
2791fi
2792ac_ct_CC=$ac_cv_prog_ac_ct_CC
2793if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2795$as_echo "$ac_ct_CC" >&6; }
b4e70030 2796else
81ecdfbb
RW
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2798$as_echo "no" >&6; }
b4e70030
JB
2799fi
2800
81ecdfbb
RW
2801 if test "x$ac_ct_CC" = x; then
2802 CC=""
2803 else
2804 case $cross_compiling:$ac_tool_warned in
2805yes:)
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2808ac_tool_warned=yes ;;
2809esac
2810 CC=$ac_ct_CC
2811 fi
b4e70030
JB
2812else
2813 CC="$ac_cv_prog_CC"
2814fi
2815
c906108c 2816if test -z "$CC"; then
81ecdfbb
RW
2817 if test -n "$ac_tool_prefix"; then
2818 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2819set dummy ${ac_tool_prefix}cc; ac_word=$2
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2821$as_echo_n "checking for $ac_word... " >&6; }
2822if test "${ac_cv_prog_CC+set}" = set; then :
2823 $as_echo_n "(cached) " >&6
c906108c
SS
2824else
2825 if test -n "$CC"; then
2826 ac_cv_prog_CC="$CC" # Let the user override the test.
2827else
bec39cab
AC
2828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2829for as_dir in $PATH
2830do
2831 IFS=$as_save_IFS
2832 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2833 for ac_exec_ext in '' $ac_executable_extensions; do
2834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2835 ac_cv_prog_CC="${ac_tool_prefix}cc"
2836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2837 break 2
2838 fi
2839done
81ecdfbb
RW
2840 done
2841IFS=$as_save_IFS
2842
2843fi
2844fi
2845CC=$ac_cv_prog_CC
2846if test -n "$CC"; then
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2848$as_echo "$CC" >&6; }
2849else
2850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2851$as_echo "no" >&6; }
2852fi
2853
2854
2855 fi
2856fi
2857if test -z "$CC"; then
2858 # Extract the first word of "cc", so it can be a program name with args.
2859set dummy cc; ac_word=$2
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2861$as_echo_n "checking for $ac_word... " >&6; }
2862if test "${ac_cv_prog_CC+set}" = set; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 if test -n "$CC"; then
2866 ac_cv_prog_CC="$CC" # Let the user override the test.
2867else
2868 ac_prog_rejected=no
2869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2870for as_dir in $PATH
2871do
2872 IFS=$as_save_IFS
2873 test -z "$as_dir" && as_dir=.
2874 for ac_exec_ext in '' $ac_executable_extensions; do
2875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2876 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2877 ac_prog_rejected=yes
2878 continue
2879 fi
2880 ac_cv_prog_CC="cc"
2881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2882 break 2
2883 fi
2884done
2885 done
2886IFS=$as_save_IFS
bec39cab 2887
c906108c
SS
2888if test $ac_prog_rejected = yes; then
2889 # We found a bogon in the path, so make sure we never use it.
2890 set dummy $ac_cv_prog_CC
2891 shift
bec39cab 2892 if test $# != 0; then
c906108c
SS
2893 # We chose a different compiler from the bogus one.
2894 # However, it has the same basename, so the bogon will be chosen
2895 # first if we set CC to just the basename; use the full file name.
2896 shift
bec39cab 2897 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2898 fi
2899fi
2900fi
2901fi
bec39cab 2902CC=$ac_cv_prog_CC
c906108c 2903if test -n "$CC"; then
81ecdfbb
RW
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2905$as_echo "$CC" >&6; }
c906108c 2906else
81ecdfbb
RW
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
c906108c
SS
2909fi
2910
81ecdfbb 2911
bec39cab
AC
2912fi
2913if test -z "$CC"; then
2914 if test -n "$ac_tool_prefix"; then
81ecdfbb 2915 for ac_prog in cl.exe
bec39cab
AC
2916 do
2917 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2918set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2920$as_echo_n "checking for $ac_word... " >&6; }
2921if test "${ac_cv_prog_CC+set}" = set; then :
2922 $as_echo_n "(cached) " >&6
c906108c
SS
2923else
2924 if test -n "$CC"; then
2925 ac_cv_prog_CC="$CC" # Let the user override the test.
2926else
bec39cab
AC
2927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928for as_dir in $PATH
2929do
2930 IFS=$as_save_IFS
2931 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2932 for ac_exec_ext in '' $ac_executable_extensions; do
2933 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2934 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2936 break 2
2937 fi
2938done
81ecdfbb
RW
2939 done
2940IFS=$as_save_IFS
bec39cab 2941
c906108c
SS
2942fi
2943fi
bec39cab 2944CC=$ac_cv_prog_CC
c906108c 2945if test -n "$CC"; then
81ecdfbb
RW
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2947$as_echo "$CC" >&6; }
c906108c 2948else
81ecdfbb
RW
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2950$as_echo "no" >&6; }
c906108c 2951fi
bec39cab 2952
81ecdfbb 2953
bec39cab
AC
2954 test -n "$CC" && break
2955 done
2956fi
2957if test -z "$CC"; then
2958 ac_ct_CC=$CC
81ecdfbb 2959 for ac_prog in cl.exe
bec39cab
AC
2960do
2961 # Extract the first word of "$ac_prog", so it can be a program name with args.
2962set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2964$as_echo_n "checking for $ac_word... " >&6; }
2965if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2966 $as_echo_n "(cached) " >&6
bec39cab
AC
2967else
2968 if test -n "$ac_ct_CC"; then
2969 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2970else
2971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2972for as_dir in $PATH
2973do
2974 IFS=$as_save_IFS
2975 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2976 for ac_exec_ext in '' $ac_executable_extensions; do
2977 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2978 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2980 break 2
c906108c 2981 fi
bec39cab 2982done
81ecdfbb
RW
2983 done
2984IFS=$as_save_IFS
bec39cab
AC
2985
2986fi
2987fi
2988ac_ct_CC=$ac_cv_prog_ac_ct_CC
2989if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2991$as_echo "$ac_ct_CC" >&6; }
bec39cab 2992else
81ecdfbb
RW
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2994$as_echo "no" >&6; }
c906108c
SS
2995fi
2996
81ecdfbb 2997
bec39cab
AC
2998 test -n "$ac_ct_CC" && break
2999done
c906108c 3000
81ecdfbb
RW
3001 if test "x$ac_ct_CC" = x; then
3002 CC=""
3003 else
3004 case $cross_compiling:$ac_tool_warned in
3005yes:)
3006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3008ac_tool_warned=yes ;;
3009esac
3010 CC=$ac_ct_CC
3011 fi
bec39cab
AC
3012fi
3013
3014fi
3015
3016
81ecdfbb
RW
3017test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3019as_fn_error "no acceptable C compiler found in \$PATH
3020See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3021
3022# Provide some information about the compiler.
81ecdfbb
RW
3023$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3024set X $ac_compile
3025ac_compiler=$2
3026for ac_option in --version -v -V -qversion; do
3027 { { ac_try="$ac_compiler $ac_option >&5"
3028case "(($ac_try" in
3029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030 *) ac_try_echo=$ac_try;;
3031esac
3032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3033$as_echo "$ac_try_echo"; } >&5
3034 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3035 ac_status=$?
81ecdfbb
RW
3036 if test -s conftest.err; then
3037 sed '10a\
3038... rest of stderr output deleted ...
3039 10q' conftest.err >conftest.er1
3040 cat conftest.er1 >&5
3041 rm -f conftest.er1 conftest.err
3042 fi
3043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3044 test $ac_status = 0; }
3045done
bec39cab 3046
81ecdfbb 3047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3048/* end confdefs.h. */
3049
3050int
3051main ()
3052{
3053
3054 ;
3055 return 0;
3056}
3057_ACEOF
3058ac_clean_files_save=$ac_clean_files
81ecdfbb 3059ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3060# Try to create an executable without -o first, disregard a.out.
3061# It will help us diagnose broken compilers, and finding out an intuition
3062# of exeext.
81ecdfbb
RW
3063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3064$as_echo_n "checking for C compiler default output file name... " >&6; }
3065ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3066
3067# The possible output files:
3068ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3069
3070ac_rmfiles=
3071for ac_file in $ac_files
3072do
3073 case $ac_file in
3074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3075 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3076 esac
3077done
3078rm -f $ac_rmfiles
3079
3080if { { ac_try="$ac_link_default"
3081case "(($ac_try" in
3082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3083 *) ac_try_echo=$ac_try;;
3084esac
3085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3086$as_echo "$ac_try_echo"; } >&5
3087 (eval "$ac_link_default") 2>&5
3088 ac_status=$?
3089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3090 test $ac_status = 0; }; then :
3091 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3092# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3093# in a Makefile. We should not override ac_cv_exeext if it was cached,
3094# so that the user can short-circuit this test for compilers unknown to
3095# Autoconf.
3096for ac_file in $ac_files ''
bec39cab
AC
3097do
3098 test -f "$ac_file" || continue
3099 case $ac_file in
81ecdfbb 3100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3101 ;;
3102 [ab].out )
3103 # We found the default executable, but exeext='' is most
3104 # certainly right.
3105 break;;
3106 *.* )
81ecdfbb
RW
3107 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3108 then :; else
3109 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3110 fi
3111 # We set ac_cv_exeext here because the later test for it is not
3112 # safe: cross compilers may not add the suffix if given an `-o'
3113 # argument, so we may need to know it at that point already.
3114 # Even if this section looks crufty: it has the advantage of
3115 # actually working.
b4e70030
JB
3116 break;;
3117 * )
3118 break;;
bec39cab
AC
3119 esac
3120done
81ecdfbb
RW
3121test "$ac_cv_exeext" = no && ac_cv_exeext=
3122
bec39cab 3123else
81ecdfbb
RW
3124 ac_file=''
3125fi
3126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3127$as_echo "$ac_file" >&6; }
3128if test -z "$ac_file"; then :
3129 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3130sed 's/^/| /' conftest.$ac_ext >&5
3131
81ecdfbb
RW
3132{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3134{ as_fn_set_status 77
3135as_fn_error "C compiler cannot create executables
3136See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3137fi
b4e70030 3138ac_exeext=$ac_cv_exeext
b4e70030 3139
81ecdfbb 3140# Check that the compiler produces executables we can run. If not, either
bec39cab 3141# the compiler is broken, or we cross compile.
81ecdfbb
RW
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3143$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3144# If not cross compiling, check that we can run a simple program.
3145if test "$cross_compiling" != yes; then
3146 if { ac_try='./$ac_file'
81ecdfbb
RW
3147 { { case "(($ac_try" in
3148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3149 *) ac_try_echo=$ac_try;;
3150esac
3151eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3152$as_echo "$ac_try_echo"; } >&5
3153 (eval "$ac_try") 2>&5
bec39cab 3154 ac_status=$?
81ecdfbb
RW
3155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3156 test $ac_status = 0; }; }; then
bec39cab 3157 cross_compiling=no
c906108c 3158 else
bec39cab
AC
3159 if test "$cross_compiling" = maybe; then
3160 cross_compiling=yes
3161 else
81ecdfbb
RW
3162 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3164as_fn_error "cannot run C compiled programs.
bec39cab 3165If you meant to cross compile, use \`--host'.
81ecdfbb 3166See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3167 fi
c906108c 3168 fi
bec39cab 3169fi
81ecdfbb
RW
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3171$as_echo "yes" >&6; }
bec39cab 3172
81ecdfbb 3173rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3174ac_clean_files=$ac_clean_files_save
81ecdfbb 3175# Check that the compiler produces executables we can run. If not, either
b4e70030 3176# the compiler is broken, or we cross compile.
81ecdfbb
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3178$as_echo_n "checking whether we are cross compiling... " >&6; }
3179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3180$as_echo "$cross_compiling" >&6; }
3181
3182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3183$as_echo_n "checking for suffix of executables... " >&6; }
3184if { { ac_try="$ac_link"
3185case "(($ac_try" in
3186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187 *) ac_try_echo=$ac_try;;
3188esac
3189eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3190$as_echo "$ac_try_echo"; } >&5
3191 (eval "$ac_link") 2>&5
bec39cab 3192 ac_status=$?
81ecdfbb
RW
3193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3194 test $ac_status = 0; }; then :
b4e70030
JB
3195 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3196# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3197# work properly (i.e., refer to `conftest.exe'), while it won't with
3198# `rm'.
3199for ac_file in conftest.exe conftest conftest.*; do
3200 test -f "$ac_file" || continue
3201 case $ac_file in
81ecdfbb 3202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3203 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3204 break;;
3205 * ) break;;
3206 esac
3207done
c906108c 3208else
81ecdfbb
RW
3209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3211as_fn_error "cannot compute suffix of executables: cannot compile and link
3212See \`config.log' for more details." "$LINENO" 5; }
c906108c 3213fi
b4e70030 3214rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3216$as_echo "$ac_cv_exeext" >&6; }
c906108c 3217
b4e70030 3218rm -f conftest.$ac_ext
bec39cab
AC
3219EXEEXT=$ac_cv_exeext
3220ac_exeext=$EXEEXT
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3222$as_echo_n "checking for suffix of object files... " >&6; }
3223if test "${ac_cv_objext+set}" = set; then :
3224 $as_echo_n "(cached) " >&6
bec39cab 3225else
81ecdfbb 3226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3227/* end confdefs.h. */
3228
3229int
3230main ()
3231{
3232
3233 ;
3234 return 0;
3235}
3236_ACEOF
3237rm -f conftest.o conftest.obj
81ecdfbb
RW
3238if { { ac_try="$ac_compile"
3239case "(($ac_try" in
3240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3241 *) ac_try_echo=$ac_try;;
3242esac
3243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3244$as_echo "$ac_try_echo"; } >&5
3245 (eval "$ac_compile") 2>&5
3246 ac_status=$?
3247 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3248 test $ac_status = 0; }; then :
3249 for ac_file in conftest.o conftest.obj conftest.*; do
3250 test -f "$ac_file" || continue;
bec39cab 3251 case $ac_file in
81ecdfbb 3252 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3253 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3254 break;;
3255 esac
3256done
c906108c 3257else
81ecdfbb 3258 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3259sed 's/^/| /' conftest.$ac_ext >&5
3260
81ecdfbb
RW
3261{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3263as_fn_error "cannot compute suffix of object files: cannot compile
3264See \`config.log' for more details." "$LINENO" 5; }
c906108c 3265fi
b4e70030 3266rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3267fi
81ecdfbb
RW
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3269$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3270OBJEXT=$ac_cv_objext
3271ac_objext=$OBJEXT
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3273$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3274if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3275 $as_echo_n "(cached) " >&6
c906108c 3276else
81ecdfbb 3277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3278/* end confdefs.h. */
3279
3280int
3281main ()
3282{
3283#ifndef __GNUC__
3284 choke me
3285#endif
3286
3287 ;
3288 return 0;
3289}
3290_ACEOF
81ecdfbb 3291if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3292 ac_compiler_gnu=yes
3293else
81ecdfbb 3294 ac_compiler_gnu=no
bec39cab 3295fi
81ecdfbb 3296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3297ac_cv_c_compiler_gnu=$ac_compiler_gnu
3298
3299fi
81ecdfbb
RW
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3301$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3302if test $ac_compiler_gnu = yes; then
3303 GCC=yes
3304else
3305 GCC=
3306fi
bec39cab
AC
3307ac_test_CFLAGS=${CFLAGS+set}
3308ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3310$as_echo_n "checking whether $CC accepts -g... " >&6; }
3311if test "${ac_cv_prog_cc_g+set}" = set; then :
3312 $as_echo_n "(cached) " >&6
bec39cab 3313else
81ecdfbb
RW
3314 ac_save_c_werror_flag=$ac_c_werror_flag
3315 ac_c_werror_flag=yes
3316 ac_cv_prog_cc_g=no
3317 CFLAGS="-g"
3318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3319/* end confdefs.h. */
3320
3321int
3322main ()
3323{
3324
3325 ;
3326 return 0;
3327}
3328_ACEOF
81ecdfbb 3329if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3330 ac_cv_prog_cc_g=yes
3331else
81ecdfbb
RW
3332 CFLAGS=""
3333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3334/* end confdefs.h. */
3335
3336int
3337main ()
3338{
3339
3340 ;
3341 return 0;
3342}
3343_ACEOF
3344if ac_fn_c_try_compile "$LINENO"; then :
3345
3346else
3347 ac_c_werror_flag=$ac_save_c_werror_flag
3348 CFLAGS="-g"
3349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3350/* end confdefs.h. */
3351
3352int
3353main ()
3354{
c906108c 3355
81ecdfbb
RW
3356 ;
3357 return 0;
3358}
3359_ACEOF
3360if ac_fn_c_try_compile "$LINENO"; then :
3361 ac_cv_prog_cc_g=yes
3362fi
3363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3364fi
3365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3366fi
81ecdfbb
RW
3367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3368 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3369fi
81ecdfbb
RW
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3371$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3372if test "$ac_test_CFLAGS" = set; then
bec39cab 3373 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3374elif test $ac_cv_prog_cc_g = yes; then
3375 if test "$GCC" = yes; then
3376 CFLAGS="-g -O2"
3377 else
3378 CFLAGS="-g"
3379 fi
3380else
3381 if test "$GCC" = yes; then
3382 CFLAGS="-O2"
3383 else
3384 CFLAGS=
3385 fi
3386fi
81ecdfbb
RW
3387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3388$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3389if test "${ac_cv_prog_cc_c89+set}" = set; then :
3390 $as_echo_n "(cached) " >&6
bec39cab 3391else
81ecdfbb 3392 ac_cv_prog_cc_c89=no
bec39cab 3393ac_save_CC=$CC
81ecdfbb 3394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3395/* end confdefs.h. */
c906108c
SS
3396#include <stdarg.h>
3397#include <stdio.h>
3398#include <sys/types.h>
3399#include <sys/stat.h>
3400/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3401struct buf { int x; };
3402FILE * (*rcsopen) (struct buf *, struct stat *, int);
3403static char *e (p, i)
3404 char **p;
3405 int i;
3406{
3407 return p[i];
3408}
3409static char *f (char * (*g) (char **, int), char **p, ...)
3410{
3411 char *s;
3412 va_list v;
3413 va_start (v,p);
3414 s = g (p, va_arg (v,int));
3415 va_end (v);
3416 return s;
3417}
bec39cab
AC
3418
3419/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3420 function prototypes and stuff, but not '\xHH' hex character constants.
3421 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3422 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3423 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3424 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3425 that's true only with -std. */
bec39cab
AC
3426int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3427
81ecdfbb
RW
3428/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3429 inside strings and character constants. */
3430#define FOO(x) 'x'
3431int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3432
c906108c
SS
3433int test (int i, double x);
3434struct s1 {int (*f) (int a);};
3435struct s2 {int (*f) (double a);};
3436int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3437int argc;
3438char **argv;
bec39cab
AC
3439int
3440main ()
3441{
c906108c 3442return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3443 ;
3444 return 0;
3445}
3446_ACEOF
81ecdfbb
RW
3447for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3448 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3449do
3450 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3451 if ac_fn_c_try_compile "$LINENO"; then :
3452 ac_cv_prog_cc_c89=$ac_arg
c906108c 3453fi
81ecdfbb
RW
3454rm -f core conftest.err conftest.$ac_objext
3455 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3456done
81ecdfbb 3457rm -f conftest.$ac_ext
bec39cab 3458CC=$ac_save_CC
c906108c
SS
3459
3460fi
81ecdfbb
RW
3461# AC_CACHE_VAL
3462case "x$ac_cv_prog_cc_c89" in
3463 x)
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3465$as_echo "none needed" >&6; } ;;
3466 xno)
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3468$as_echo "unsupported" >&6; } ;;
bec39cab 3469 *)
81ecdfbb
RW
3470 CC="$CC $ac_cv_prog_cc_c89"
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3472$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3473esac
81ecdfbb 3474if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3475
b4e70030
JB
3476fi
3477
bec39cab
AC
3478ac_ext=c
3479ac_cpp='$CPP $CPPFLAGS'
3480ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3481ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3482ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3483
60ca704f 3484
bec39cab
AC
3485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3491$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3492# On Suns, sometimes $CPP names a directory.
3493if test -n "$CPP" && test -d "$CPP"; then
3494 CPP=
8bb2c122 3495fi
bec39cab 3496if test -z "$CPP"; then
81ecdfbb
RW
3497 if test "${ac_cv_prog_CPP+set}" = set; then :
3498 $as_echo_n "(cached) " >&6
bec39cab
AC
3499else
3500 # Double quotes because CPP needs to be expanded
3501 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3502 do
3503 ac_preproc_ok=false
3504for ac_c_preproc_warn_flag in '' yes
3505do
3506 # Use a header file that comes with gcc, so configuring glibc
3507 # with a fresh cross-compiler works.
3508 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3509 # <limits.h> exists even on freestanding compilers.
3510 # On the NeXT, cc -E runs the code through the compiler's parser,
3511 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3513/* end confdefs.h. */
3514#ifdef __STDC__
3515# include <limits.h>
3516#else
3517# include <assert.h>
3518#endif
3519 Syntax error
3520_ACEOF
81ecdfbb 3521if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3522
81ecdfbb 3523else
bec39cab
AC
3524 # Broken: fails on valid input.
3525continue
3526fi
3527rm -f conftest.err conftest.$ac_ext
3528
81ecdfbb 3529 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3530 # can be detected and how.
81ecdfbb 3531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3532/* end confdefs.h. */
3533#include <ac_nonexistent.h>
3534_ACEOF
81ecdfbb 3535if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3536 # Broken: success on invalid input.
3537continue
8bb2c122 3538else
bec39cab
AC
3539 # Passes both tests.
3540ac_preproc_ok=:
3541break
8bb2c122 3542fi
bec39cab 3543rm -f conftest.err conftest.$ac_ext
8bb2c122 3544
bec39cab
AC
3545done
3546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3547rm -f conftest.err conftest.$ac_ext
81ecdfbb 3548if $ac_preproc_ok; then :
bec39cab
AC
3549 break
3550fi
8bb2c122 3551
bec39cab
AC
3552 done
3553 ac_cv_prog_CPP=$CPP
ddc9cd0f 3554
c906108c 3555fi
bec39cab
AC
3556 CPP=$ac_cv_prog_CPP
3557else
3558 ac_cv_prog_CPP=$CPP
c906108c 3559fi
81ecdfbb
RW
3560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3561$as_echo "$CPP" >&6; }
bec39cab
AC
3562ac_preproc_ok=false
3563for ac_c_preproc_warn_flag in '' yes
3564do
3565 # Use a header file that comes with gcc, so configuring glibc
3566 # with a fresh cross-compiler works.
3567 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3568 # <limits.h> exists even on freestanding compilers.
3569 # On the NeXT, cc -E runs the code through the compiler's parser,
3570 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3572/* end confdefs.h. */
3573#ifdef __STDC__
3574# include <limits.h>
3575#else
3576# include <assert.h>
3577#endif
3578 Syntax error
3579_ACEOF
81ecdfbb 3580if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3581
81ecdfbb 3582else
bec39cab
AC
3583 # Broken: fails on valid input.
3584continue
3585fi
3586rm -f conftest.err conftest.$ac_ext
3587
81ecdfbb 3588 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3589 # can be detected and how.
81ecdfbb 3590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3591/* end confdefs.h. */
3592#include <ac_nonexistent.h>
3593_ACEOF
81ecdfbb 3594if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3595 # Broken: success on invalid input.
3596continue
c906108c 3597else
bec39cab
AC
3598 # Passes both tests.
3599ac_preproc_ok=:
3600break
c906108c 3601fi
bec39cab 3602rm -f conftest.err conftest.$ac_ext
c906108c 3603
bec39cab
AC
3604done
3605# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3606rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3607if $ac_preproc_ok; then :
3608
c906108c 3609else
81ecdfbb
RW
3610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3612as_fn_error "C preprocessor \"$CPP\" fails sanity check
3613See \`config.log' for more details." "$LINENO" 5; }
c906108c 3614fi
c906108c 3615
bec39cab
AC
3616ac_ext=c
3617ac_cpp='$CPP $CPPFLAGS'
3618ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3619ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3620ac_compiler_gnu=$ac_cv_c_compiler_gnu
3621
3622
81ecdfbb
RW
3623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3624$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3625if test "${ac_cv_path_GREP+set}" = set; then :
3626 $as_echo_n "(cached) " >&6
4e8d927d 3627else
81ecdfbb
RW
3628 if test -z "$GREP"; then
3629 ac_path_GREP_found=false
3630 # Loop through the user's path and test for each of PROGNAME-LIST
3631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
3636 for ac_prog in grep ggrep; do
3637 for ac_exec_ext in '' $ac_executable_extensions; do
3638 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3639 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3640# Check for GNU ac_path_GREP and select it if it is found.
3641 # Check for GNU $ac_path_GREP
3642case `"$ac_path_GREP" --version 2>&1` in
3643*GNU*)
3644 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3645*)
3646 ac_count=0
3647 $as_echo_n 0123456789 >"conftest.in"
3648 while :
3649 do
3650 cat "conftest.in" "conftest.in" >"conftest.tmp"
3651 mv "conftest.tmp" "conftest.in"
3652 cp "conftest.in" "conftest.nl"
3653 $as_echo 'GREP' >> "conftest.nl"
3654 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3655 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3656 as_fn_arith $ac_count + 1 && ac_count=$as_val
3657 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3658 # Best one so far, save it but keep looking for a better one
3659 ac_cv_path_GREP="$ac_path_GREP"
3660 ac_path_GREP_max=$ac_count
bec39cab 3661 fi
81ecdfbb
RW
3662 # 10*(2^10) chars as input seems more than enough
3663 test $ac_count -gt 10 && break
3664 done
3665 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3666esac
bec39cab 3667
81ecdfbb
RW
3668 $ac_path_GREP_found && break 3
3669 done
3670 done
3671 done
3672IFS=$as_save_IFS
3673 if test -z "$ac_cv_path_GREP"; then
3674 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3675 fi
c906108c 3676else
81ecdfbb 3677 ac_cv_path_GREP=$GREP
c906108c 3678fi
c906108c 3679
81ecdfbb
RW
3680fi
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3682$as_echo "$ac_cv_path_GREP" >&6; }
3683 GREP="$ac_cv_path_GREP"
c906108c 3684
c906108c 3685
81ecdfbb
RW
3686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3687$as_echo_n "checking for egrep... " >&6; }
3688if test "${ac_cv_path_EGREP+set}" = set; then :
3689 $as_echo_n "(cached) " >&6
783e057b 3690else
81ecdfbb
RW
3691 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3692 then ac_cv_path_EGREP="$GREP -E"
3693 else
3694 if test -z "$EGREP"; then
3695 ac_path_EGREP_found=false
3696 # Loop through the user's path and test for each of PROGNAME-LIST
3697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3698for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3699do
3700 IFS=$as_save_IFS
3701 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3702 for ac_prog in egrep; do
3703 for ac_exec_ext in '' $ac_executable_extensions; do
3704 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3705 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3706# Check for GNU ac_path_EGREP and select it if it is found.
3707 # Check for GNU $ac_path_EGREP
3708case `"$ac_path_EGREP" --version 2>&1` in
3709*GNU*)
3710 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3711*)
3712 ac_count=0
3713 $as_echo_n 0123456789 >"conftest.in"
3714 while :
3715 do
3716 cat "conftest.in" "conftest.in" >"conftest.tmp"
3717 mv "conftest.tmp" "conftest.in"
3718 cp "conftest.in" "conftest.nl"
3719 $as_echo 'EGREP' >> "conftest.nl"
3720 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3721 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3722 as_fn_arith $ac_count + 1 && ac_count=$as_val
3723 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3724 # Best one so far, save it but keep looking for a better one
3725 ac_cv_path_EGREP="$ac_path_EGREP"
3726 ac_path_EGREP_max=$ac_count
3727 fi
3728 # 10*(2^10) chars as input seems more than enough
3729 test $ac_count -gt 10 && break
3730 done
3731 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3732esac
bec39cab 3733
81ecdfbb
RW
3734 $ac_path_EGREP_found && break 3
3735 done
3736 done
3737 done
3738IFS=$as_save_IFS
3739 if test -z "$ac_cv_path_EGREP"; then
3740 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3741 fi
783e057b 3742else
81ecdfbb 3743 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3744fi
3745
81ecdfbb 3746 fi
783e057b 3747fi
81ecdfbb
RW
3748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3749$as_echo "$ac_cv_path_EGREP" >&6; }
3750 EGREP="$ac_cv_path_EGREP"
3751
783e057b 3752
81ecdfbb
RW
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3754$as_echo_n "checking for ANSI C header files... " >&6; }
3755if test "${ac_cv_header_stdc+set}" = set; then :
3756 $as_echo_n "(cached) " >&6
783e057b 3757else
81ecdfbb 3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3759/* end confdefs.h. */
783e057b 3760#include <stdlib.h>
bec39cab 3761#include <stdarg.h>
783e057b
DJ
3762#include <string.h>
3763#include <float.h>
c906108c 3764
bec39cab
AC
3765int
3766main ()
3767{
c906108c 3768
bec39cab
AC
3769 ;
3770 return 0;
3771}
3772_ACEOF
81ecdfbb 3773if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3774 ac_cv_header_stdc=yes
c906108c 3775else
81ecdfbb 3776 ac_cv_header_stdc=no
c906108c 3777fi
81ecdfbb 3778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3779
783e057b
DJ
3780if test $ac_cv_header_stdc = yes; then
3781 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3783/* end confdefs.h. */
3784#include <string.h>
c906108c 3785
783e057b
DJ
3786_ACEOF
3787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3788 $EGREP "memchr" >/dev/null 2>&1; then :
3789
c906108c 3790else
783e057b 3791 ac_cv_header_stdc=no
c906108c 3792fi
783e057b 3793rm -f conftest*
c906108c
SS
3794
3795fi
3796
783e057b
DJ
3797if test $ac_cv_header_stdc = yes; then
3798 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3800/* end confdefs.h. */
3801#include <stdlib.h>
bec39cab 3802
783e057b
DJ
3803_ACEOF
3804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3805 $EGREP "free" >/dev/null 2>&1; then :
3806
bec39cab 3807else
783e057b 3808 ac_cv_header_stdc=no
bec39cab 3809fi
783e057b 3810rm -f conftest*
bec39cab
AC
3811
3812fi
bec39cab 3813
783e057b
DJ
3814if test $ac_cv_header_stdc = yes; then
3815 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3816 if test "$cross_compiling" = yes; then :
783e057b 3817 :
bec39cab 3818else
81ecdfbb 3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3820/* end confdefs.h. */
3821#include <ctype.h>
81ecdfbb 3822#include <stdlib.h>
783e057b
DJ
3823#if ((' ' & 0x0FF) == 0x020)
3824# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3825# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3826#else
3827# define ISLOWER(c) \
3828 (('a' <= (c) && (c) <= 'i') \
3829 || ('j' <= (c) && (c) <= 'r') \
3830 || ('s' <= (c) && (c) <= 'z'))
3831# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3832#endif
3833
3834#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3835int
3836main ()
3837{
3838 int i;
3839 for (i = 0; i < 256; i++)
3840 if (XOR (islower (i), ISLOWER (i))
3841 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3842 return 2;
3843 return 0;
783e057b
DJ
3844}
3845_ACEOF
81ecdfbb 3846if ac_fn_c_try_run "$LINENO"; then :
783e057b 3847
81ecdfbb
RW
3848else
3849 ac_cv_header_stdc=no
783e057b 3850fi
81ecdfbb
RW
3851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3852 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3853fi
81ecdfbb 3854
783e057b
DJ
3855fi
3856fi
81ecdfbb
RW
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3858$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3859if test $ac_cv_header_stdc = yes; then
3860
81ecdfbb 3861$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3862
3863fi
3864
3865# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3866for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3867 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3868do :
3869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3870ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3871"
3872eval as_val=\$$as_ac_Header
3873 if test "x$as_val" = x""yes; then :
783e057b 3874 cat >>confdefs.h <<_ACEOF
81ecdfbb 3875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3876_ACEOF
3877
3878fi
3879
3880done
3881
3882
3883
81ecdfbb
RW
3884 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3885if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3886 MINIX=yes
3887else
3888 MINIX=
3889fi
3890
3891
3892 if test "$MINIX" = yes; then
3893
81ecdfbb 3894$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3895
3896
81ecdfbb 3897$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3898
3899
81ecdfbb 3900$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3901
3902 fi
3903
3904
81ecdfbb
RW
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3906$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3907if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3908 $as_echo_n "(cached) " >&6
783e057b 3909else
81ecdfbb 3910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3911/* end confdefs.h. */
3912
c971b7fa
PA
3913# define __EXTENSIONS__ 1
3914 $ac_includes_default
783e057b
DJ
3915int
3916main ()
3917{
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
81ecdfbb 3923if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3924 ac_cv_safe_to_define___extensions__=yes
3925else
81ecdfbb 3926 ac_cv_safe_to_define___extensions__=no
783e057b 3927fi
81ecdfbb 3928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3929fi
81ecdfbb
RW
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3931$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3932 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3933 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3934
81ecdfbb 3935 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3936
81ecdfbb 3937 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3938
81ecdfbb 3939 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3940
81ecdfbb 3941 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3942
3943
c971b7fa
PA
3944ac_aux_dir=
3945for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3946 for ac_t in install-sh install.sh shtool; do
3947 if test -f "$ac_dir/$ac_t"; then
3948 ac_aux_dir=$ac_dir
3949 ac_install_sh="$ac_aux_dir/$ac_t -c"
3950 break 2
3951 fi
3952 done
3953done
3954if test -z "$ac_aux_dir"; then
3955 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3956fi
770d76d7 3957
c971b7fa
PA
3958# These three variables are undocumented and unsupported,
3959# and are intended to be withdrawn in a future Autoconf release.
3960# They can cause serious problems if a builder's source tree is in a directory
3961# whose full name contains unusual characters.
3962ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3963ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3964ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3965
770d76d7 3966
c971b7fa
PA
3967# Make sure we can run config.sub.
3968$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3969 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3970
c971b7fa
PA
3971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3972$as_echo_n "checking build system type... " >&6; }
3973if test "${ac_cv_build+set}" = set; then :
3974 $as_echo_n "(cached) " >&6
770d76d7 3975else
c971b7fa
PA
3976 ac_build_alias=$build_alias
3977test "x$ac_build_alias" = x &&
3978 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3979test "x$ac_build_alias" = x &&
3980 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3981ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3982 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3983
770d76d7 3984fi
c971b7fa
PA
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3986$as_echo "$ac_cv_build" >&6; }
3987case $ac_cv_build in
3988*-*-*) ;;
3989*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3990esac
c971b7fa
PA
3991build=$ac_cv_build
3992ac_save_IFS=$IFS; IFS='-'
3993set x $ac_cv_build
3994shift
3995build_cpu=$1
3996build_vendor=$2
3997shift; shift
3998# Remember, the first character of IFS is used to create $*,
3999# except with old shells:
4000build_os=$*
4001IFS=$ac_save_IFS
4002case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4003
4004
c971b7fa
PA
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4006$as_echo_n "checking host system type... " >&6; }
4007if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4008 $as_echo_n "(cached) " >&6
4009else
c971b7fa
PA
4010 if test "x$host_alias" = x; then
4011 ac_cv_host=$ac_cv_build
81ecdfbb 4012else
c971b7fa
PA
4013 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4014 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4015fi
81ecdfbb
RW
4016
4017fi
c971b7fa
PA
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4019$as_echo "$ac_cv_host" >&6; }
4020case $ac_cv_host in
4021*-*-*) ;;
4022*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4023esac
c971b7fa
PA
4024host=$ac_cv_host
4025ac_save_IFS=$IFS; IFS='-'
4026set x $ac_cv_host
4027shift
4028host_cpu=$1
4029host_vendor=$2
4030shift; shift
4031# Remember, the first character of IFS is used to create $*,
4032# except with old shells:
4033host_os=$*
4034IFS=$ac_save_IFS
4035case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4036
4037
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4039$as_echo_n "checking target system type... " >&6; }
4040if test "${ac_cv_target+set}" = set; then :
4041 $as_echo_n "(cached) " >&6
4042else
4043 if test "x$target_alias" = x; then
4044 ac_cv_target=$ac_cv_host
4045else
4046 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4047 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4048fi
4049
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4052$as_echo "$ac_cv_target" >&6; }
4053case $ac_cv_target in
4054*-*-*) ;;
4055*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4056esac
4057target=$ac_cv_target
4058ac_save_IFS=$IFS; IFS='-'
4059set x $ac_cv_target
4060shift
4061target_cpu=$1
4062target_vendor=$2
4063shift; shift
4064# Remember, the first character of IFS is used to create $*,
4065# except with old shells:
4066target_os=$*
4067IFS=$ac_save_IFS
4068case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4069
4070
4071# The aliases save the names the user supplied, while $host etc.
4072# will get canonicalized.
4073test -n "$target_alias" &&
4074 test "$program_prefix$program_suffix$program_transform_name" = \
4075 NONENONEs,x,x, &&
4076 program_prefix=${target_alias}-
4077
4078# The tests for host and target for $enable_largefile require
4079# canonical names.
4080
4081
81ecdfbb 4082
da2f07f1
JK
4083# As the $enable_largefile decision depends on --enable-plugins we must set it
4084# even in directories otherwise not depending on the $plugins option.
4085
4086
4087# Check whether --enable-plugins was given.
4088if test "${enable_plugins+set}" = set; then :
4089 enableval=$enable_plugins; case "${enableval}" in
4090 yes | "") plugins=yes ;;
4091 no) plugins=no ;;
4092 *) plugins=yes ;;
4093 esac
4094else
4095 plugins=no
4096fi
4097
4098
4099
4100case "${host}" in
4101 sparc-*-solaris*|i[3-7]86-*-solaris*)
4102 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4103 # are mutually exclusive; and without procfs support, the bfd/ elf module
4104 # cannot provide certain routines such as elfcore_write_prpsinfo
4105 # or elfcore_write_prstatus. So unless the user explicitly requested
4106 # large-file support through the --enable-largefile switch, disable
4107 # large-file support in favor of procfs support.
4108 test "${target}" = "${host}" -a "x$plugins" = xno \
4109 && : ${enable_largefile="no"}
4110 ;;
4111esac
4112
4113# Check whether --enable-largefile was given.
4114if test "${enable_largefile+set}" = set; then :
4115 enableval=$enable_largefile;
4116fi
4117
4118if test "$enable_largefile" != no; then
4119
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4121$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4122if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4123 $as_echo_n "(cached) " >&6
4124else
4125 ac_cv_sys_largefile_CC=no
4126 if test "$GCC" != yes; then
4127 ac_save_CC=$CC
4128 while :; do
4129 # IRIX 6.2 and later do not support large files by default,
4130 # so use the C compiler's -n32 option if that helps.
4131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4132/* end confdefs.h. */
4133#include <sys/types.h>
4134 /* Check that off_t can represent 2**63 - 1 correctly.
4135 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4136 since some C++ compilers masquerading as C compilers
4137 incorrectly reject 9223372036854775807. */
4138#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4139 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4140 && LARGE_OFF_T % 2147483647 == 1)
4141 ? 1 : -1];
4142int
4143main ()
4144{
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150 if ac_fn_c_try_compile "$LINENO"; then :
4151 break
4152fi
4153rm -f core conftest.err conftest.$ac_objext
4154 CC="$CC -n32"
4155 if ac_fn_c_try_compile "$LINENO"; then :
4156 ac_cv_sys_largefile_CC=' -n32'; break
4157fi
4158rm -f core conftest.err conftest.$ac_objext
4159 break
4160 done
4161 CC=$ac_save_CC
4162 rm -f conftest.$ac_ext
4163 fi
4164fi
4165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4166$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4167 if test "$ac_cv_sys_largefile_CC" != no; then
4168 CC=$CC$ac_cv_sys_largefile_CC
4169 fi
4170
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4172$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4173if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4174 $as_echo_n "(cached) " >&6
4175else
4176 while :; do
4177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178/* end confdefs.h. */
4179#include <sys/types.h>
4180 /* Check that off_t can represent 2**63 - 1 correctly.
4181 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4182 since some C++ compilers masquerading as C compilers
4183 incorrectly reject 9223372036854775807. */
4184#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4185 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4186 && LARGE_OFF_T % 2147483647 == 1)
4187 ? 1 : -1];
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
4196if ac_fn_c_try_compile "$LINENO"; then :
4197 ac_cv_sys_file_offset_bits=no; break
4198fi
4199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4201/* end confdefs.h. */
4202#define _FILE_OFFSET_BITS 64
4203#include <sys/types.h>
4204 /* Check that off_t can represent 2**63 - 1 correctly.
4205 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4206 since some C++ compilers masquerading as C compilers
4207 incorrectly reject 9223372036854775807. */
4208#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4209 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4210 && LARGE_OFF_T % 2147483647 == 1)
4211 ? 1 : -1];
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220if ac_fn_c_try_compile "$LINENO"; then :
4221 ac_cv_sys_file_offset_bits=64; break
4222fi
4223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4224 ac_cv_sys_file_offset_bits=unknown
4225 break
4226done
4227fi
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4229$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4230case $ac_cv_sys_file_offset_bits in #(
4231 no | unknown) ;;
4232 *)
4233cat >>confdefs.h <<_ACEOF
4234#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4235_ACEOF
4236;;
4237esac
4238rm -rf conftest*
4239 if test $ac_cv_sys_file_offset_bits = unknown; then
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4241$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4242if test "${ac_cv_sys_large_files+set}" = set; then :
4243 $as_echo_n "(cached) " >&6
4244else
4245 while :; do
4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4247/* end confdefs.h. */
4248#include <sys/types.h>
4249 /* Check that off_t can represent 2**63 - 1 correctly.
4250 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4251 since some C++ compilers masquerading as C compilers
4252 incorrectly reject 9223372036854775807. */
4253#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4254 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4255 && LARGE_OFF_T % 2147483647 == 1)
4256 ? 1 : -1];
4257int
4258main ()
4259{
4260
4261 ;
4262 return 0;
4263}
4264_ACEOF
4265if ac_fn_c_try_compile "$LINENO"; then :
4266 ac_cv_sys_large_files=no; break
4267fi
4268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4270/* end confdefs.h. */
4271#define _LARGE_FILES 1
4272#include <sys/types.h>
4273 /* Check that off_t can represent 2**63 - 1 correctly.
4274 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4275 since some C++ compilers masquerading as C compilers
4276 incorrectly reject 9223372036854775807. */
4277#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4278 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4279 && LARGE_OFF_T % 2147483647 == 1)
4280 ? 1 : -1];
4281int
4282main ()
4283{
4284
4285 ;
4286 return 0;
4287}
4288_ACEOF
4289if ac_fn_c_try_compile "$LINENO"; then :
4290 ac_cv_sys_large_files=1; break
4291fi
4292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293 ac_cv_sys_large_files=unknown
4294 break
4295done
4296fi
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4298$as_echo "$ac_cv_sys_large_files" >&6; }
4299case $ac_cv_sys_large_files in #(
4300 no | unknown) ;;
4301 *)
4302cat >>confdefs.h <<_ACEOF
4303#define _LARGE_FILES $ac_cv_sys_large_files
4304_ACEOF
4305;;
4306esac
4307rm -rf conftest*
4308 fi
4309fi
4310
4311
4312
81ecdfbb
RW
4313
4314
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4316$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4317if test "${am_cv_prog_cc_stdc+set}" = set; then :
4318 $as_echo_n "(cached) " >&6
4319else
4320 am_cv_prog_cc_stdc=no
4321ac_save_CC="$CC"
4322# Don't try gcc -ansi; that turns off useful extensions and
4323# breaks some systems' header files.
4324# AIX -qlanglvl=ansi
4325# Ultrix and OSF/1 -std1
4326# HP-UX 10.20 and later -Ae
4327# HP-UX older versions -Aa -D_HPUX_SOURCE
4328# SVR4 -Xc -D__EXTENSIONS__
4329for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4330do
783e057b 4331 CC="$ac_save_CC $ac_arg"
81ecdfbb 4332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4333/* end confdefs.h. */
4334#include <stdarg.h>
4335#include <stdio.h>
4336#include <sys/types.h>
4337#include <sys/stat.h>
4338/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4339struct buf { int x; };
4340FILE * (*rcsopen) (struct buf *, struct stat *, int);
4341static char *e (p, i)
4342 char **p;
4343 int i;
4344{
4345 return p[i];
4346}
4347static char *f (char * (*g) (char **, int), char **p, ...)
4348{
4349 char *s;
4350 va_list v;
4351 va_start (v,p);
4352 s = g (p, va_arg (v,int));
4353 va_end (v);
4354 return s;
4355}
4356int test (int i, double x);
4357struct s1 {int (*f) (int a);};
4358struct s2 {int (*f) (double a);};
4359int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4360int argc;
4361char **argv;
4362
4363int
4364main ()
4365{
4366
4367return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4368
4369 ;
4370 return 0;
4371}
4372_ACEOF
81ecdfbb 4373if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4374 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4375fi
81ecdfbb 4376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4377done
4378CC="$ac_save_CC"
4379
4380fi
4381
4382if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4384$as_echo "none needed" >&6; }
783e057b 4385else
81ecdfbb
RW
4386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4387$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4388fi
4389case "x$am_cv_prog_cc_stdc" in
4390 x|xno) ;;
4391 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4392esac
4393
4869db5e
RM
4394# expand $ac_aux_dir to an absolute path
4395am_aux_dir=`cd $ac_aux_dir && pwd`
4396
4397if test x"${install_sh}" != xset; then
4398 case $am_aux_dir in
4399 *\ * | *\ *)
4400 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4401 *)
4402 install_sh="\${SHELL} $am_aux_dir/install-sh"
4403 esac
4404fi
4405
4406# Installed binaries are usually stripped using `strip' when the user
4407# run `make install-strip'. However `strip' might not be the right
4408# tool to use in cross-compilation environments, therefore Automake
4409# will honor the `STRIP' environment variable to overrule this program.
4410if test "$cross_compiling" != no; then
4411 if test -n "$ac_tool_prefix"; then
4412 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4413set dummy ${ac_tool_prefix}strip; ac_word=$2
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415$as_echo_n "checking for $ac_word... " >&6; }
4416if test "${ac_cv_prog_STRIP+set}" = set; then :
4417 $as_echo_n "(cached) " >&6
4418else
4419 if test -n "$STRIP"; then
4420 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4421else
4422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425 IFS=$as_save_IFS
4426 test -z "$as_dir" && as_dir=.
4427 for ac_exec_ext in '' $ac_executable_extensions; do
4428 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431 break 2
4432 fi
4433done
4434 done
4435IFS=$as_save_IFS
4436
4437fi
4438fi
4439STRIP=$ac_cv_prog_STRIP
4440if test -n "$STRIP"; then
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4442$as_echo "$STRIP" >&6; }
4443else
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449fi
4450if test -z "$ac_cv_prog_STRIP"; then
4451 ac_ct_STRIP=$STRIP
4452 # Extract the first word of "strip", so it can be a program name with args.
4453set dummy strip; ac_word=$2
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455$as_echo_n "checking for $ac_word... " >&6; }
4456if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4457 $as_echo_n "(cached) " >&6
4458else
4459 if test -n "$ac_ct_STRIP"; then
4460 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4461else
4462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463for as_dir in $PATH
4464do
4465 IFS=$as_save_IFS
4466 test -z "$as_dir" && as_dir=.
4467 for ac_exec_ext in '' $ac_executable_extensions; do
4468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4469 ac_cv_prog_ac_ct_STRIP="strip"
4470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4471 break 2
4472 fi
4473done
4474 done
4475IFS=$as_save_IFS
4476
4477fi
4478fi
4479ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4480if test -n "$ac_ct_STRIP"; then
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4482$as_echo "$ac_ct_STRIP" >&6; }
4483else
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4485$as_echo "no" >&6; }
4486fi
4487
4488 if test "x$ac_ct_STRIP" = x; then
4489 STRIP=":"
4490 else
4491 case $cross_compiling:$ac_tool_warned in
4492yes:)
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4495ac_tool_warned=yes ;;
4496esac
4497 STRIP=$ac_ct_STRIP
4498 fi
4499else
4500 STRIP="$ac_cv_prog_STRIP"
4501fi
4502
4503fi
4504INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4505
783e057b
DJ
4506
4507ac_aux_dir=
81ecdfbb
RW
4508for ac_dir in .. "$srcdir"/..; do
4509 for ac_t in install-sh install.sh shtool; do
4510 if test -f "$ac_dir/$ac_t"; then
4511 ac_aux_dir=$ac_dir
4512 ac_install_sh="$ac_aux_dir/$ac_t -c"
4513 break 2
4514 fi
4515 done
783e057b
DJ
4516done
4517if test -z "$ac_aux_dir"; then
81ecdfbb 4518 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4519fi
81ecdfbb
RW
4520
4521# These three variables are undocumented and unsupported,
4522# and are intended to be withdrawn in a future Autoconf release.
4523# They can cause serious problems if a builder's source tree is in a directory
4524# whose full name contains unusual characters.
4525ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4526ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4527ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4528
783e057b 4529
783e057b 4530
9009e1ae
MR
4531test "$program_prefix" != NONE &&
4532 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4533# Use a double $ so make ignores it.
4534test "$program_suffix" != NONE &&
4535 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4536# Double any \ or $.
4537# By default was `s,x,x', remove it if useless.
4538ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4539program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4540
81ecdfbb 4541
a417dc56
RW
4542# Dependency checking.
4543rm -rf .tst 2>/dev/null
4544mkdir .tst 2>/dev/null
4545if test -d .tst; then
4546 am__leading_dot=.
4547else
4548 am__leading_dot=_
4549fi
4550rmdir .tst 2>/dev/null
4551
4552DEPDIR="${am__leading_dot}deps"
4553
81ecdfbb 4554ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4555
4556
4557depcc="$CC" am_compiler_list=
4558
4559am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4561$as_echo_n "checking dependency style of $depcc... " >&6; }
4562if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4563 $as_echo_n "(cached) " >&6
a417dc56
RW
4564else
4565 if test -f "$am_depcomp"; then
4566 # We make a subdir and do the tests there. Otherwise we can end up
4567 # making bogus files that we don't know about and never remove. For
4568 # instance it was reported that on HP-UX the gcc test will end up
4569 # making a dummy file named `D' -- because `-MD' means `put the output
4570 # in D'.
4571 mkdir conftest.dir
4572 # Copy depcomp to subdir because otherwise we won't find it if we're
4573 # using a relative directory.
4574 cp "$am_depcomp" conftest.dir
4575 cd conftest.dir
4576 # We will build objects and dependencies in a subdirectory because
4577 # it helps to detect inapplicable dependency modes. For instance
4578 # both Tru64's cc and ICC support -MD to output dependencies as a
4579 # side effect of compilation, but ICC will put the dependencies in
4580 # the current directory while Tru64 will put them in the object
4581 # directory.
4582 mkdir sub
4583
4584 am_cv_CC_dependencies_compiler_type=none
4585 if test "$am_compiler_list" = ""; then
4586 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4587 fi
4588 for depmode in $am_compiler_list; do
4589 if test $depmode = none; then break; fi
4590
81ecdfbb 4591 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4592 # Setup a source with many dependencies, because some compilers
4593 # like to wrap large dependency lists on column 80 (with \), and
4594 # we should not choose a depcomp mode which is confused by this.
4595 #
4596 # We need to recreate these files for each test, as the compiler may
4597 # overwrite some of them when testing with obscure command lines.
4598 # This happens at least with the AIX C compiler.
4599 : > sub/conftest.c
4600 for i in 1 2 3 4 5 6; do
4601 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4602 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4603 # Solaris 8's {/usr,}/bin/sh.
4604 touch sub/conftst$i.h
4605 done
4606 echo "include sub/conftest.Po" > confmf
4607
4608 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4609 # mode. It turns out that the SunPro C++ compiler does not properly
4610 # handle `-M -o', and we need to detect this.
4611 depcmd="depmode=$depmode \
4612 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4613 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4614 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4615 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4616 if env $depcmd > conftest.err 2>&1 &&
4617 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4618 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4619 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4620 # icc doesn't choke on unknown options, it will just issue warnings
4621 # or remarks (even with -Werror). So we grep stderr for any message
4622 # that says an option was ignored or not supported.
4623 # When given -MP, icc 7.0 and 7.1 complain thusly:
4624 # icc: Command line warning: ignoring option '-M'; no argument required
4625 # The diagnosis changed in icc 8.0:
4626 # icc: Command line remark: option '-MP' not supported
4627 if (grep 'ignoring option' conftest.err ||
4628 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4629 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4630 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4631 break
4632 fi
4633 fi
81ecdfbb 4634 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4635 sed -e 's/^/| /' < conftest.err >&5
4636 done
4637
4638 cd ..
4639 rm -rf conftest.dir
4640else
4641 am_cv_CC_dependencies_compiler_type=none
4642fi
4643
4644fi
81ecdfbb
RW
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4646$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4647if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4648then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4649else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4650
4651fi
4652
4653
4654# Check for the 'make' the user wants to use.
4655for ac_prog in make
4656do
4657 # Extract the first word of "$ac_prog", so it can be a program name with args.
4658set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if test "${ac_cv_prog_MAKE+set}" = set; then :
4662 $as_echo_n "(cached) " >&6
a417dc56
RW
4663else
4664 if test -n "$MAKE"; then
4665 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4666else
4667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670 IFS=$as_save_IFS
4671 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4672 for ac_exec_ext in '' $ac_executable_extensions; do
4673 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4674 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4675 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4676 break 2
4677 fi
4678done
81ecdfbb
RW
4679 done
4680IFS=$as_save_IFS
a417dc56
RW
4681
4682fi
4683fi
4684MAKE=$ac_cv_prog_MAKE
4685if test -n "$MAKE"; then
81ecdfbb
RW
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4687$as_echo "$MAKE" >&6; }
a417dc56 4688else
81ecdfbb
RW
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690$as_echo "no" >&6; }
a417dc56
RW
4691fi
4692
81ecdfbb 4693
a417dc56
RW
4694 test -n "$MAKE" && break
4695done
4696
4697MAKE_IS_GNU=
4698case "`$MAKE --version 2>&1 | sed 1q`" in
4699 *GNU*)
4700 MAKE_IS_GNU=yes
4701 ;;
4702esac
81ecdfbb 4703 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4704 GMAKE_TRUE=
4705 GMAKE_FALSE='#'
4706else
4707 GMAKE_TRUE='#'
4708 GMAKE_FALSE=
4709fi
4710
81ecdfbb
RW
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4712$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4713set x ${MAKE-make}
4714ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4715if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4716 $as_echo_n "(cached) " >&6
a417dc56
RW
4717else
4718 cat >conftest.make <<\_ACEOF
81ecdfbb 4719SHELL = /bin/sh
a417dc56 4720all:
81ecdfbb 4721 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4722_ACEOF
4723# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4724case `${MAKE-make} -f conftest.make 2>/dev/null` in
4725 *@@@%%%=?*=@@@%%%*)
4726 eval ac_cv_prog_make_${ac_make}_set=yes;;
4727 *)
4728 eval ac_cv_prog_make_${ac_make}_set=no;;
4729esac
a417dc56
RW
4730rm -f conftest.make
4731fi
81ecdfbb
RW
4732if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4734$as_echo "yes" >&6; }
a417dc56
RW
4735 SET_MAKE=
4736else
81ecdfbb
RW
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
a417dc56
RW
4739 SET_MAKE="MAKE=${MAKE-make}"
4740fi
4741
4742
c971b7fa
PA
4743# Configure gnulib. We need to build gnulib under some other
4744# directory not "gnulib", to avoid the problem of both GDB and
4745# GDBserver wanting to build it in the same directory, when building
4746# in the source dir.
783e057b 4747
c971b7fa
PA
4748 in_src="gnulib"
4749 in_build="build-gnulib"
4750
4751 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4752 # so they do not pile up.
4753 ac_sub_configure_args=
4754 ac_prev=
4755 eval "set x $ac_configure_args"
4756 shift
4757 for ac_arg
4758 do
4759 if test -n "$ac_prev"; then
4760 ac_prev=
4761 continue
4762 fi
4763 case $ac_arg in
4764 -cache-file | --cache-file | --cache-fil | --cache-fi \
4765 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4766 ac_prev=cache_file ;;
4767 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4768 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4769 | --c=*)
4770 ;;
4771 --config-cache | -C)
4772 ;;
4773 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4774 ac_prev=srcdir ;;
4775 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4776 ;;
4777 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4778 ac_prev=prefix ;;
4779 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4780 ;;
4781 --disable-option-checking)
4782 ;;
4783 *)
4784 case $ac_arg in
4785 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4786 esac
4787 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4788 esac
4789 done
4790
4791 # Always prepend --prefix to ensure using the same prefix
4792 # in subdir configurations.
4793 ac_arg="--prefix=$prefix"
4794 case $ac_arg in
4795 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4796 esac
4797 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4798
4799 # Pass --silent
4800 if test "$silent" = yes; then
4801 ac_sub_configure_args="--silent $ac_sub_configure_args"
4802 fi
4803
4804 # Always prepend --disable-option-checking to silence warnings, since
4805 # different subdirs can have different --enable and --with options.
4806 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4807
4808 ac_popdir=`pwd`
4809 ac_dir=$in_build
4810
4811 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4812 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4813 $as_echo "$ac_msg" >&6
4814 as_dir="$ac_dir"; as_fn_mkdir_p
4815
38ea300a
PA
4816 case $srcdir in
4817 [\\/]* | ?:[\\/]* )
4818 ac_srcdir=$srcdir/$in_src ;;
4819 *) # Relative name.
4820 ac_srcdir=../$srcdir/$in_src ;;
4821 esac
c971b7fa
PA
4822
4823 cd "$ac_dir"
4824
4825 ac_sub_configure=$ac_srcdir/configure
4826
4827 # Make the cache file name correct relative to the subdirectory.
4828 case $cache_file in
4829 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4830 *) # Relative name.
4831 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4832 esac
4833
4834 { $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
4835$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4836 # The eval makes quoting arguments work.
4837 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4838 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4839 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4840
4841 cd "$ac_popdir"
783e057b 4842
c971b7fa
PA
4843
4844
4845CONFIG_OBS=
4846CONFIG_DEPS=
4847CONFIG_SRCS=
4848ENABLE_CFLAGS=
4849
4850CONFIG_ALL=
4851CONFIG_CLEAN=
4852CONFIG_INSTALL=
4853CONFIG_UNINSTALL=
4854
4855# If we haven't got the data from the intl directory,
4856# assume NLS is disabled.
4857USE_NLS=no
4858LIBINTL=
4859LIBINTL_DEP=
4860INCINTL=
4861XGETTEXT=
4862GMSGFMT=
4863POSUB=
783e057b
DJ
4864
4865if test -f ../intl/config.intl; then
4866 . ../intl/config.intl
4867fi
81ecdfbb
RW
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4869$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4870if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
783e057b 4873else
81ecdfbb
RW
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4875$as_echo "yes" >&6; }
783e057b 4876
81ecdfbb 4877$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4878
4879
81ecdfbb
RW
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4881$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4882 # Look for .po and .gmo files in the source directory.
4883 CATALOGS=
4884 XLINGUAS=
4885 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4886 # If there aren't any .gmo files the shell will give us the
4887 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4888 # weeded out.
4889 case "$cat" in *\**)
4890 continue;;
4891 esac
4892 # The quadruple backslash is collapsed to a double backslash
4893 # by the backticks, then collapsed again by the double quotes,
4894 # leaving us with one backslash in the sed expression (right
4895 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4896 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4897 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4898 # The user is allowed to set LINGUAS to a list of languages to
4899 # install catalogs for. If it's empty that means "all of them."
4900 if test "x$LINGUAS" = x; then
4901 CATALOGS="$CATALOGS $cat"
4902 XLINGUAS="$XLINGUAS $lang"
4903 else
4904 case "$LINGUAS" in *$lang*)
4905 CATALOGS="$CATALOGS $cat"
4906 XLINGUAS="$XLINGUAS $lang"
4907 ;;
4908 esac
e28b3332
DJ
4909 fi
4910 done
c971b7fa
PA
4911 LINGUAS="$XLINGUAS"
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4913$as_echo "$LINGUAS" >&6; }
4914
4915
4916 DATADIRNAME=share
4917
4918 INSTOBJEXT=.mo
4919
4920 GENCAT=gencat
4921
4922 CATOBJEXT=.gmo
e28b3332 4923
e28b3332
DJ
4924fi
4925
c971b7fa
PA
4926localedir='${datadir}/locale'
4927
4928
4929if test x"$USE_NLS" = xyes; then
4930 CONFIG_ALL="$CONFIG_ALL all-po"
4931 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4932 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4933 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4934fi
e28b3332 4935
c971b7fa
PA
4936GNULIB=build-gnulib/import
4937
4938# For Makefile dependencies.
4939GNULIB_STDINT_H=
4940if test x"$STDINT_H" != x; then
4941 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4942fi
4943
4944
c971b7fa
PA
4945PACKAGE=gdb
4946
4947cat >>confdefs.h <<_ACEOF
4948#define PACKAGE "$PACKAGE"
4949_ACEOF
4950
4951
4952
4953# We never need to detect it in this sub-configure.
4954# But preserve it for config.status --recheck.
4955
4956
4957
4958MAKEINFO_EXTRA_FLAGS=""
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4960$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4961if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4962 $as_echo_n "(cached) " >&6
4963else
4964 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4965 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4966 gdb_cv_have_makeinfo_click=yes
4967 else
4968 gdb_cv_have_makeinfo_click=no
4969 fi
4970fi
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4972$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4973if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4974 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4975fi
e28b3332
DJ
4976
4977
bec39cab
AC
4978
4979
81ecdfbb
RW
4980# Check whether --with-separate-debug-dir was given.
4981if test "${with_separate_debug_dir+set}" = set; then :
4982 withval=$with_separate_debug_dir;
b14b1491
TT
4983 DEBUGDIR=$withval
4984else
4985 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4986fi
4987
20e95c23 4988
783e057b
DJ
4989 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4990 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4991 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4992 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4993
783e057b
DJ
4994cat >>confdefs.h <<_ACEOF
4995#define DEBUGDIR "$ac_define_dir"
20e95c23 4996_ACEOF
20e95c23 4997
20e95c23 4998
20e95c23 4999
0c4a4063 5000
b14b1491
TT
5001 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5002 if test "x$prefix" = xNONE; then
5003 test_prefix=/usr/local
5004 else
5005 test_prefix=$prefix
5006 fi
783e057b 5007 else
b14b1491 5008 test_prefix=$exec_prefix
783e057b 5009 fi
b14b1491
TT
5010 value=0
5011 case ${ac_define_dir} in
5012 "${test_prefix}"|"${test_prefix}/"*|\
5013 '${exec_prefix}'|'${exec_prefix}/'*)
5014 value=1
5015 ;;
5016 esac
5017
5018cat >>confdefs.h <<_ACEOF
5019#define DEBUGDIR_RELOCATABLE $value
5020_ACEOF
5021
5022
5023
0c4a4063 5024
f83d8a90
DE
5025# We can't pass paths as command line arguments.
5026# Mingw32 tries to be clever and will convert the paths for us.
5027# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5028# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5029# This breaks GDB's relocatable path conversions since paths passed in
5030# config.h would not get so translated, the path prefixes no longer match.
5031
5032 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5033 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5034 ac_define_dir=`eval echo $bindir`
5035 ac_define_dir=`eval echo $ac_define_dir`
5036
5037cat >>confdefs.h <<_ACEOF
5038#define BINDIR "$ac_define_dir"
5039_ACEOF
5040
5041
5042
b14b1491
TT
5043# GDB's datadir relocation
5044
5045
5046
81ecdfbb
RW
5047# Check whether --with-gdb-datadir was given.
5048if test "${with_gdb_datadir+set}" = set; then :
5049 withval=$with_gdb_datadir;
b14b1491 5050 GDB_DATADIR=$withval
20e95c23 5051else
b14b1491 5052 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5053fi
5054
20e95c23 5055
b14b1491
TT
5056 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5057 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5058 ac_define_dir=`eval echo $GDB_DATADIR`
5059 ac_define_dir=`eval echo $ac_define_dir`
5060
5061cat >>confdefs.h <<_ACEOF
5062#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5063_ACEOF
5064
b14b1491
TT
5065
5066
0c4a4063 5067
b14b1491
TT
5068 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5069 if test "x$prefix" = xNONE; then
5070 test_prefix=/usr/local
5071 else
5072 test_prefix=$prefix
5073 fi
5074 else
5075 test_prefix=$exec_prefix
5076 fi
5077 value=0
5078 case ${ac_define_dir} in
5079 "${test_prefix}"|"${test_prefix}/"*|\
5080 '${exec_prefix}'|'${exec_prefix}/'*)
5081 value=1
5082 ;;
5083 esac
5084
5085cat >>confdefs.h <<_ACEOF
5086#define GDB_DATADIR_RELOCATABLE $value
5087_ACEOF
5088
5089
783e057b 5090
20e95c23 5091
0c4a4063 5092
81ecdfbb
RW
5093# Check whether --with-relocated-sources was given.
5094if test "${with_relocated_sources+set}" = set; then :
5095 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5096
5097 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5098 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5099 ac_define_dir=`eval echo $reloc_srcdir`
5100 ac_define_dir=`eval echo $ac_define_dir`
5101
5102cat >>confdefs.h <<_ACEOF
5103#define RELOC_SRCDIR "$ac_define_dir"
5104_ACEOF
5105
5106
5107
81ecdfbb
RW
5108fi
5109
29b0e8a2 5110
7349ff92
JK
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5112$as_echo_n "checking for default auto-load directory... " >&6; }
5113
5114# Check whether --with-auto-load-dir was given.
5115if test "${with_auto_load_dir+set}" = set; then :
5116 withval=$with_auto_load_dir;
5117else
1564a261 5118 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5119fi
5120
1564a261 5121escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5122
5123 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5124 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5125 ac_define_dir=`eval echo $escape_dir`
5126 ac_define_dir=`eval echo $ac_define_dir`
5127
5128cat >>confdefs.h <<_ACEOF
5129#define AUTO_LOAD_DIR "$ac_define_dir"
5130_ACEOF
5131
5132
5133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5134$as_echo "$with_auto_load_dir" >&6; }
5135
bccbefd2
JK
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5137$as_echo_n "checking for default auto-load safe-path... " >&6; }
5138
5139# Check whether --with-auto-load-safe-path was given.
5140if test "${with_auto_load_safe_path+set}" = set; then :
5141 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5142 with_auto_load_safe_path="/"
5143 fi
bccbefd2 5144else
7349ff92 5145 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5146fi
5147
1564a261 5148escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5149
5150 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5151 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5152 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5153 ac_define_dir=`eval echo $ac_define_dir`
5154
5155cat >>confdefs.h <<_ACEOF
6dea1fbd 5156#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5157_ACEOF
5158
5159
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5161$as_echo "$with_auto_load_safe_path" >&6; }
5162
29b0e8a2 5163
20e95c23 5164
5ae98d25 5165subdirs="$subdirs testsuite"
20e95c23
DJ
5166
5167
783e057b 5168# Check whether to support alternative target configurations
81ecdfbb
RW
5169# Check whether --enable-targets was given.
5170if test "${enable_targets+set}" = set; then :
5171 enableval=$enable_targets; case "${enableval}" in
5172 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5173 ;;
5174 no) enable_targets= ;;
5175 *) enable_targets=$enableval ;;
5176esac
81ecdfbb
RW
5177fi
5178
20e95c23 5179
783e057b 5180# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5181# Check whether --enable-64-bit-bfd was given.
5182if test "${enable_64_bit_bfd+set}" = set; then :
5183 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5184 yes) want64=true ;;
5185 no) want64=false ;;
81ecdfbb 5186 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5187esac
5188else
5189 want64=false
81ecdfbb
RW
5190fi
5191
783e057b
DJ
5192# Provide defaults for some variables set by the per-host and per-target
5193# configuration.
5194gdb_host_obs=posix-hdep.o
20e95c23 5195
783e057b
DJ
5196if test "${target}" = "${host}"; then
5197 gdb_native=yes
5198else
5199 gdb_native=no
5200fi
20e95c23 5201
783e057b 5202. $srcdir/configure.host
20e95c23 5203
783e057b 5204# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5205
783e057b
DJ
5206TARGET_OBS=
5207all_targets=
b292c783 5208HAVE_NATIVE_GCORE_TARGET=
20e95c23 5209
783e057b 5210for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5211do
783e057b
DJ
5212 if test "$targ_alias" = "all"; then
5213 all_targets=true
5214 else
5215 # Canonicalize the secondary target names.
5216 result=`$ac_config_sub $targ_alias 2>/dev/null`
5217 if test -n "$result"; then
5218 targ=$result
5219 else
5220 targ=$targ_alias
5221 fi
20e95c23 5222
783e057b 5223 . ${srcdir}/configure.tgt
20e95c23 5224
bf307134
JB
5225 if test -z "${gdb_target_obs}"; then :
5226 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5227fi
5228
783e057b
DJ
5229 # Target-specific object files
5230 for i in ${gdb_target_obs}; do
5231 case " $TARGET_OBS " in
5232 *" ${i} "*) ;;
5233 *)
5234 TARGET_OBS="$TARGET_OBS ${i}"
5235 ;;
5236 esac
5237 done
20e95c23 5238
783e057b
DJ
5239 # Check whether this target needs 64-bit CORE_ADDR
5240 if test x${want64} = xfalse; then
5241 . ${srcdir}/../bfd/config.bfd
5242 fi
b292c783
JK
5243
5244 # Check whether this target is native and supports gcore.
5245 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5246 && $gdb_have_gcore; then
5247 HAVE_NATIVE_GCORE_TARGET=1
5248 fi
783e057b 5249 fi
20e95c23
DJ
5250done
5251
783e057b
DJ
5252if test x${all_targets} = xtrue; then
5253
5254 # We want all 64-bit targets if we either:
5255 # - run on a 64-bit host or
5256 # - already require 64-bit support for some other target or
5257 # - the --enable-64-bit-bfd option was supplied
5258 # Otherwise we only support all 32-bit targets.
5259 #
5260 # NOTE: This test must be in sync with the corresponding
5261 # tests in BFD!
20e95c23 5262
783e057b 5263 if test x${want64} = xfalse; then
81ecdfbb
RW
5264 # The cast to long int works around a bug in the HP C Compiler
5265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5267# This bug is HP SR number 8606223364.
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5269$as_echo_n "checking size of long... " >&6; }
5270if test "${ac_cv_sizeof_long+set}" = set; then :
5271 $as_echo_n "(cached) " >&6
c0993dbe 5272else
81ecdfbb 5273 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5274
81ecdfbb
RW
5275else
5276 if test "$ac_cv_type_long" = yes; then
5277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5279{ as_fn_set_status 77
5280as_fn_error "cannot compute sizeof (long)
5281See \`config.log' for more details." "$LINENO" 5; }; }
5282 else
5283 ac_cv_sizeof_long=0
5284 fi
c0993dbe 5285fi
81ecdfbb 5286
c0993dbe 5287fi
81ecdfbb
RW
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5289$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5290
c0993dbe 5291
c0993dbe 5292
c0993dbe
UW
5293cat >>confdefs.h <<_ACEOF
5294#define SIZEOF_LONG $ac_cv_sizeof_long
5295_ACEOF
5296
5297
5298 if test "x${ac_cv_sizeof_long}" = "x8"; then
5299 want64=true
5300 fi
5301 fi
5302 if test x${want64} = xtrue; then
5303 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5304 else
5305 TARGET_OBS='$(ALL_TARGET_OBS)'
5306 fi
5307fi
5308
5309
5310
b292c783 5311
c0993dbe
UW
5312# For other settings, only the main target counts.
5313gdb_sim=
5314gdb_osabi=
5315build_gdbserver=
5316targ=$target; . ${srcdir}/configure.tgt
5317
5318# Fetch the default architecture and default target vector from BFD.
5319targ=$target; . $srcdir/../bfd/config.bfd
5320
5321# We only want the first architecture, so strip off the others if
5322# there is more than one.
5323targ_archs=`echo $targ_archs | sed 's/ .*//'`
5324
5325if test "x$targ_archs" != x; then
5326
5327cat >>confdefs.h <<_ACEOF
5328#define DEFAULT_BFD_ARCH $targ_archs
5329_ACEOF
5330
5331fi
5332if test "x$targ_defvec" != x; then
5333
5334cat >>confdefs.h <<_ACEOF
5335#define DEFAULT_BFD_VEC $targ_defvec
5336_ACEOF
5337
5338fi
5339
c0993dbe
UW
5340# The CLI cannot be disabled yet, but may be in the future.
5341
5342# Enable CLI.
81ecdfbb
RW
5343# Check whether --enable-gdbcli was given.
5344if test "${enable_gdbcli+set}" = set; then :
5345 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5346 yes)
5347 ;;
5348 no)
81ecdfbb 5349 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5350 *)
81ecdfbb 5351 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5352 esac
5353else
5354 enable_gdbcli=yes
81ecdfbb
RW
5355fi
5356
c0993dbe
UW
5357if test x"$enable_gdbcli" = xyes; then
5358 if test -d $srcdir/cli; then
5359 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5360 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5361 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5362 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5363 fi
5364fi
5365
5366# Enable MI.
81ecdfbb
RW
5367# Check whether --enable-gdbmi was given.
5368if test "${enable_gdbmi+set}" = set; then :
5369 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5370 yes | no)
5371 ;;
5372 *)
81ecdfbb 5373 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5374 esac
5375else
5376 enable_gdbmi=yes
81ecdfbb
RW
5377fi
5378
c0993dbe
UW
5379if test x"$enable_gdbmi" = xyes; then
5380 if test -d $srcdir/mi; then
5381 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5382 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5383 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5384 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5385 fi
5386fi
5387
5388# Enable TUI.
81ecdfbb
RW
5389# Check whether --enable-tui was given.
5390if test "${enable_tui+set}" = set; then :
5391 enableval=$enable_tui; case $enableval in
3ca64bd3 5392 yes | no | auto)
c0993dbe
UW
5393 ;;
5394 *)
81ecdfbb 5395 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5396 esac
5397else
3ca64bd3 5398 enable_tui=auto
81ecdfbb
RW
5399fi
5400
c0993dbe
UW
5401
5402# Enable gdbtk.
81ecdfbb
RW
5403# Check whether --enable-gdbtk was given.
5404if test "${enable_gdbtk+set}" = set; then :
5405 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5406 yes | no)
5407 ;;
5408 *)
81ecdfbb 5409 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5410 esac
5411else
5062cc19 5412 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5413 enable_gdbtk=yes
5414 else
5415 enable_gdbtk=no
5416 fi
81ecdfbb
RW
5417fi
5418
c0993dbe
UW
5419# We unconditionally disable gdbtk tests on selected platforms.
5420case $host_os in
5421 go32* | windows*)
81ecdfbb
RW
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5423$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5424 enable_gdbtk=no ;;
5425esac
5426
05e7c244 5427# Libunwind support for ia64.
bec39cab 5428
05e7c244
JK
5429
5430# Check whether --with-libunwind-ia64 was given.
5431if test "${with_libunwind_ia64+set}" = set; then :
5432 withval=$with_libunwind_ia64;
bec39cab 5433else
05e7c244
JK
5434 with_libunwind_ia64=auto
5435fi
bec39cab 5436
05e7c244
JK
5437
5438# Backward compatibility option.
5439if test "${with_libunwind+set}" = set; then
5440 if test x"$with_libunwind_ia64" != xauto; then
5441 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5442 fi
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5444$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5445 with_libunwind_ia64="$with_libunwind"
5446fi
5447
5448case "$with_libunwind_ia64" in
5449 yes | no)
5450 ;;
5451 auto)
5452 for ac_header in libunwind-ia64.h
81ecdfbb 5453do :
b54a8fd7
PA
5454 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5455if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5456 cat >>confdefs.h <<_ACEOF
b54a8fd7 5457#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5458_ACEOF
5459
5460fi
5461
5462done
5463
05e7c244
JK
5464 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5465 ;;
5466 *)
5467 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5468 ;;
5469esac
bec39cab 5470
05e7c244 5471if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5472 for ac_header in libunwind-ia64.h
81ecdfbb 5473do :
b54a8fd7
PA
5474 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5475if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5476 cat >>confdefs.h <<_ACEOF
b54a8fd7 5477#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5478_ACEOF
5479
5480fi
5481
5482done
5483
05e7c244
JK
5484 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5485 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5486 fi
5487 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5488 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5489 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5490fi
5491
cb01cfba
JB
5492opt_curses=no
5493
81ecdfbb
RW
5494# Check whether --with-curses was given.
5495if test "${with_curses+set}" = set; then :
5496 withval=$with_curses; opt_curses=$withval
5497fi
5498
cb01cfba 5499
76a39ba7 5500prefer_curses=no
cb01cfba 5501if test "$opt_curses" = "yes"; then
76a39ba7 5502 prefer_curses=yes
cb01cfba
JB
5503fi
5504
a9322a30 5505# Profiling support.
81ecdfbb
RW
5506# Check whether --enable-profiling was given.
5507if test "${enable_profiling+set}" = set; then :
5508 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5509 yes | no)
5510 ;;
5511 *)
81ecdfbb 5512 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5513 esac
5514else
5515 enable_profiling=no
81ecdfbb 5516fi
bec39cab 5517
a9322a30
TT
5518
5519for ac_func in monstartup _mcleanup
81ecdfbb
RW
5520do :
5521 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5522ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5523eval as_val=\$$as_ac_var
5524 if test "x$as_val" = x""yes; then :
5525 cat >>confdefs.h <<_ACEOF
5526#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5527_ACEOF
a9322a30 5528
81ecdfbb
RW
5529fi
5530done
a9322a30 5531
81ecdfbb
RW
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5533$as_echo_n "checking for _etext... " >&6; }
5534if test "${ac_cv_var__etext+set}" = set; then :
5535 $as_echo_n "(cached) " >&6
5536else
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <stdlib.h>
5540extern char _etext;
a9322a30
TT
5541
5542int
5543main ()
5544{
5545free (&_etext);
5546 ;
5547 return 0;
5548}
bec39cab 5549_ACEOF
81ecdfbb 5550if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5551 ac_cv_var__etext=yes
bec39cab 5552else
81ecdfbb 5553 ac_cv_var__etext=no
bec39cab 5554fi
81ecdfbb
RW
5555rm -f core conftest.err conftest.$ac_objext \
5556 conftest$ac_exeext conftest.$ac_ext
bec39cab 5557fi
81ecdfbb
RW
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5559$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5560if test $ac_cv_var__etext = yes; then
60ca704f 5561
81ecdfbb 5562$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5563
bec39cab 5564fi
81ecdfbb
RW
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5566$as_echo_n "checking for etext... " >&6; }
5567if test "${ac_cv_var_etext+set}" = set; then :
5568 $as_echo_n "(cached) " >&6
bec39cab 5569else
81ecdfbb 5570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5571/* end confdefs.h. */
a9322a30
TT
5572#include <stdlib.h>
5573extern char etext;
bec39cab
AC
5574
5575int
5576main ()
5577{
a9322a30 5578free (&etext);
bec39cab
AC
5579 ;
5580 return 0;
5581}
5582_ACEOF
81ecdfbb 5583if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5584 ac_cv_var_etext=yes
bec39cab 5585else
81ecdfbb 5586 ac_cv_var_etext=no
bec39cab 5587fi
81ecdfbb
RW
5588rm -f core conftest.err conftest.$ac_objext \
5589 conftest$ac_exeext conftest.$ac_ext
bec39cab 5590fi
81ecdfbb
RW
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5592$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5593if test $ac_cv_var_etext = yes; then
5594
81ecdfbb 5595$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5596
5597fi
a9322a30
TT
5598if test "$enable_profiling" = yes ; then
5599 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5600 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5601 fi
5602 PROFILE_CFLAGS=-pg
5603 OLD_CFLAGS="$CFLAGS"
5604 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5605
81ecdfbb
RW
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5607$as_echo_n "checking whether $CC supports -pg... " >&6; }
5608if test "${ac_cv_cc_supports_pg+set}" = set; then :
5609 $as_echo_n "(cached) " >&6
bec39cab 5610else
81ecdfbb 5611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5612/* end confdefs.h. */
bec39cab
AC
5613
5614int
5615main ()
5616{
a9322a30 5617int x;
bec39cab
AC
5618 ;
5619 return 0;
5620}
5621_ACEOF
81ecdfbb 5622if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5623 ac_cv_cc_supports_pg=yes
bec39cab 5624else
81ecdfbb 5625 ac_cv_cc_supports_pg=no
bec39cab 5626fi
81ecdfbb 5627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5628fi
81ecdfbb
RW
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5630$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5631
a9322a30 5632 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5633 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5634 fi
bec39cab 5635
a9322a30 5636 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5637fi
5638
c16158bc
JM
5639
5640
81ecdfbb
RW
5641# Check whether --with-pkgversion was given.
5642if test "${with_pkgversion+set}" = set; then :
5643 withval=$with_pkgversion; case "$withval" in
5644 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5645 no) PKGVERSION= ;;
5646 *) PKGVERSION="($withval) " ;;
5647 esac
5648else
5649 PKGVERSION="(GDB) "
5650
81ecdfbb 5651fi
c16158bc
JM
5652
5653
5654
5655
81ecdfbb
RW
5656
5657# Check whether --with-bugurl was given.
5658if test "${with_bugurl+set}" = set; then :
5659 withval=$with_bugurl; case "$withval" in
5660 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5661 no) BUGURL=
5662 ;;
5663 *) BUGURL="$withval"
5664 ;;
5665 esac
5666else
5667 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5668
81ecdfbb
RW
5669fi
5670
c16158bc
JM
5671 case ${BUGURL} in
5672 "")
5673 REPORT_BUGS_TO=
5674 REPORT_BUGS_TEXI=
5675 ;;
5676 *)
5677 REPORT_BUGS_TO="<$BUGURL>"
5678 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5679 ;;
5680 esac;
5681
5682
5683
5684
5685cat >>confdefs.h <<_ACEOF
5686#define PKGVERSION "$PKGVERSION"
5687_ACEOF
5688
5689
5690cat >>confdefs.h <<_ACEOF
5691#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5692_ACEOF
5693
5694
bec39cab
AC
5695# --------------------- #
5696# Checks for programs. #
5697# --------------------- #
5698
5699for ac_prog in gawk mawk nawk awk
5700do
5701 # Extract the first word of "$ac_prog", so it can be a program name with args.
5702set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5704$as_echo_n "checking for $ac_word... " >&6; }
5705if test "${ac_cv_prog_AWK+set}" = set; then :
5706 $as_echo_n "(cached) " >&6
bec39cab
AC
5707else
5708 if test -n "$AWK"; then
5709 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5710else
5711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714 IFS=$as_save_IFS
5715 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5716 for ac_exec_ext in '' $ac_executable_extensions; do
5717 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5718 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5720 break 2
5721 fi
5722done
81ecdfbb
RW
5723 done
5724IFS=$as_save_IFS
bec39cab
AC
5725
5726fi
5727fi
5728AWK=$ac_cv_prog_AWK
5729if test -n "$AWK"; then
81ecdfbb
RW
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5731$as_echo "$AWK" >&6; }
bec39cab 5732else
81ecdfbb
RW
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
bec39cab
AC
5735fi
5736
bec39cab 5737
81ecdfbb 5738 test -n "$AWK" && break
bec39cab
AC
5739done
5740
c971b7fa
PA
5741# Find a good install program. We prefer a C program (faster),
5742# so one script is as good as another. But avoid the broken or
5743# incompatible versions:
5744# SysV /etc/install, /usr/sbin/install
5745# SunOS /usr/etc/install
5746# IRIX /sbin/install
5747# AIX /bin/install
5748# AmigaOS /C/install, which installs bootblocks on floppy discs
5749# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5750# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5751# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5752# OS/2's system install, which has a completely different semantic
5753# ./install, which can be erroneously created by make from ./install.sh.
5754# Reject install programs that cannot install multiple files.
5755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5756$as_echo_n "checking for a BSD-compatible install... " >&6; }
5757if test -z "$INSTALL"; then
5758if test "${ac_cv_path_install+set}" = set; then :
5759 $as_echo_n "(cached) " >&6
5760else
5761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764 IFS=$as_save_IFS
5765 test -z "$as_dir" && as_dir=.
5766 # Account for people who put trailing slashes in PATH elements.
5767case $as_dir/ in #((
5768 ./ | .// | /[cC]/* | \
5769 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5770 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5771 /usr/ucb/* ) ;;
5772 *)
5773 # OSF1 and SCO ODT 3.0 have their own names for install.
5774 # Don't use installbsd from OSF since it installs stuff as root
5775 # by default.
5776 for ac_prog in ginstall scoinst install; do
5777 for ac_exec_ext in '' $ac_executable_extensions; do
5778 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5779 if test $ac_prog = install &&
5780 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5781 # AIX install. It has an incompatible calling convention.
5782 :
5783 elif test $ac_prog = install &&
5784 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5785 # program-specific install script used by HP pwplus--don't use.
5786 :
5787 else
5788 rm -rf conftest.one conftest.two conftest.dir
5789 echo one > conftest.one
5790 echo two > conftest.two
5791 mkdir conftest.dir
5792 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5793 test -s conftest.one && test -s conftest.two &&
5794 test -s conftest.dir/conftest.one &&
5795 test -s conftest.dir/conftest.two
5796 then
5797 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5798 break 3
5799 fi
5800 fi
5801 fi
5802 done
5803 done
5804 ;;
5805esac
5806
5807 done
5808IFS=$as_save_IFS
5809
5810rm -rf conftest.one conftest.two conftest.dir
5811
5812fi
5813 if test "${ac_cv_path_install+set}" = set; then
5814 INSTALL=$ac_cv_path_install
5815 else
5816 # As a last resort, use the slow shell script. Don't cache a
5817 # value for INSTALL within a source directory, because that will
5818 # break other packages using the cache if that directory is
5819 # removed, or if the value is a relative name.
5820 INSTALL=$ac_install_sh
5821 fi
5822fi
5823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5824$as_echo "$INSTALL" >&6; }
5825
5826# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5827# It thinks the first close brace ends the variable substitution.
5828test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5829
5830test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5831
5832test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5833
81ecdfbb
RW
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5835$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5836LN_S=$as_ln_s
5837if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5839$as_echo "yes" >&6; }
bec39cab 5840else
81ecdfbb
RW
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5842$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5843fi
5844
5845if test -n "$ac_tool_prefix"; then
5846 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5847set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if test "${ac_cv_prog_RANLIB+set}" = set; then :
5851 $as_echo_n "(cached) " >&6
bec39cab
AC
5852else
5853 if test -n "$RANLIB"; then
5854 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5855else
5856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5861 for ac_exec_ext in '' $ac_executable_extensions; do
5862 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5863 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5865 break 2
5866 fi
5867done
81ecdfbb
RW
5868 done
5869IFS=$as_save_IFS
bec39cab
AC
5870
5871fi
5872fi
5873RANLIB=$ac_cv_prog_RANLIB
5874if test -n "$RANLIB"; then
81ecdfbb
RW
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5876$as_echo "$RANLIB" >&6; }
bec39cab 5877else
81ecdfbb
RW
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
bec39cab
AC
5880fi
5881
81ecdfbb 5882
bec39cab
AC
5883fi
5884if test -z "$ac_cv_prog_RANLIB"; then
5885 ac_ct_RANLIB=$RANLIB
5886 # Extract the first word of "ranlib", so it can be a program name with args.
5887set dummy ranlib; ac_word=$2
81ecdfbb
RW
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889$as_echo_n "checking for $ac_word... " >&6; }
5890if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5891 $as_echo_n "(cached) " >&6
bec39cab
AC
5892else
5893 if test -n "$ac_ct_RANLIB"; then
5894 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5895else
5896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899 IFS=$as_save_IFS
5900 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5901 for ac_exec_ext in '' $ac_executable_extensions; do
5902 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5903 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5905 break 2
5906 fi
5907done
81ecdfbb
RW
5908 done
5909IFS=$as_save_IFS
bec39cab 5910
bec39cab
AC
5911fi
5912fi
5913ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5914if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5916$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5917else
81ecdfbb
RW
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }
bec39cab
AC
5920fi
5921
81ecdfbb
RW
5922 if test "x$ac_ct_RANLIB" = x; then
5923 RANLIB=":"
5924 else
5925 case $cross_compiling:$ac_tool_warned in
5926yes:)
5927{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5928$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5929ac_tool_warned=yes ;;
5930esac
5931 RANLIB=$ac_ct_RANLIB
5932 fi
bec39cab
AC
5933else
5934 RANLIB="$ac_cv_prog_RANLIB"
5935fi
5936
5937for ac_prog in 'bison -y' byacc
5938do
5939 # Extract the first word of "$ac_prog", so it can be a program name with args.
5940set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
5943if test "${ac_cv_prog_YACC+set}" = set; then :
5944 $as_echo_n "(cached) " >&6
bec39cab
AC
5945else
5946 if test -n "$YACC"; then
5947 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5954 for ac_exec_ext in '' $ac_executable_extensions; do
5955 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5956 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5958 break 2
5959 fi
5960done
81ecdfbb
RW
5961 done
5962IFS=$as_save_IFS
bec39cab
AC
5963
5964fi
5965fi
5966YACC=$ac_cv_prog_YACC
5967if test -n "$YACC"; then
81ecdfbb
RW
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5969$as_echo "$YACC" >&6; }
bec39cab 5970else
81ecdfbb
RW
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
bec39cab
AC
5973fi
5974
81ecdfbb 5975
bec39cab
AC
5976 test -n "$YACC" && break
5977done
5978test -n "$YACC" || YACC="yacc"
5979
5980
5981if test -n "$ac_tool_prefix"; then
5982 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5983set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if test "${ac_cv_prog_AR+set}" = set; then :
5987 $as_echo_n "(cached) " >&6
bec39cab
AC
5988else
5989 if test -n "$AR"; then
5990 ac_cv_prog_AR="$AR" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995 IFS=$as_save_IFS
5996 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5997 for ac_exec_ext in '' $ac_executable_extensions; do
5998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5999 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6001 break 2
6002 fi
6003done
81ecdfbb
RW
6004 done
6005IFS=$as_save_IFS
bec39cab
AC
6006
6007fi
6008fi
6009AR=$ac_cv_prog_AR
6010if test -n "$AR"; then
81ecdfbb
RW
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6012$as_echo "$AR" >&6; }
bec39cab 6013else
81ecdfbb
RW
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
bec39cab
AC
6016fi
6017
81ecdfbb 6018
bec39cab
AC
6019fi
6020if test -z "$ac_cv_prog_AR"; then
6021 ac_ct_AR=$AR
6022 # Extract the first word of "ar", so it can be a program name with args.
6023set dummy ar; ac_word=$2
81ecdfbb
RW
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6025$as_echo_n "checking for $ac_word... " >&6; }
6026if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6027 $as_echo_n "(cached) " >&6
bec39cab
AC
6028else
6029 if test -n "$ac_ct_AR"; then
6030 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6031else
6032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033for as_dir in $PATH
6034do
6035 IFS=$as_save_IFS
6036 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6037 for ac_exec_ext in '' $ac_executable_extensions; do
6038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6039 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6041 break 2
6042 fi
6043done
81ecdfbb
RW
6044 done
6045IFS=$as_save_IFS
bec39cab
AC
6046
6047fi
6048fi
6049ac_ct_AR=$ac_cv_prog_ac_ct_AR
6050if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6052$as_echo "$ac_ct_AR" >&6; }
bec39cab 6053else
81ecdfbb
RW
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
bec39cab
AC
6056fi
6057
81ecdfbb
RW
6058 if test "x$ac_ct_AR" = x; then
6059 AR=""
6060 else
6061 case $cross_compiling:$ac_tool_warned in
6062yes:)
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6065ac_tool_warned=yes ;;
6066esac
6067 AR=$ac_ct_AR
6068 fi
bec39cab
AC
6069else
6070 AR="$ac_cv_prog_AR"
6071fi
6072
6073if test -n "$ac_tool_prefix"; then
6074 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6075set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6077$as_echo_n "checking for $ac_word... " >&6; }
6078if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6079 $as_echo_n "(cached) " >&6
bec39cab
AC
6080else
6081 if test -n "$DLLTOOL"; then
6082 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6083else
6084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087 IFS=$as_save_IFS
6088 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6089 for ac_exec_ext in '' $ac_executable_extensions; do
6090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6091 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6093 break 2
6094 fi
6095done
81ecdfbb
RW
6096 done
6097IFS=$as_save_IFS
bec39cab
AC
6098
6099fi
6100fi
6101DLLTOOL=$ac_cv_prog_DLLTOOL
6102if test -n "$DLLTOOL"; then
81ecdfbb
RW
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6104$as_echo "$DLLTOOL" >&6; }
bec39cab 6105else
81ecdfbb
RW
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
bec39cab
AC
6108fi
6109
81ecdfbb 6110
bec39cab
AC
6111fi
6112if test -z "$ac_cv_prog_DLLTOOL"; then
6113 ac_ct_DLLTOOL=$DLLTOOL
6114 # Extract the first word of "dlltool", so it can be a program name with args.
6115set dummy dlltool; ac_word=$2
81ecdfbb
RW
6116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6117$as_echo_n "checking for $ac_word... " >&6; }
6118if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6119 $as_echo_n "(cached) " >&6
bec39cab
AC
6120else
6121 if test -n "$ac_ct_DLLTOOL"; then
6122 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6123else
6124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127 IFS=$as_save_IFS
6128 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6129 for ac_exec_ext in '' $ac_executable_extensions; do
6130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6131 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6133 break 2
6134 fi
6135done
81ecdfbb
RW
6136 done
6137IFS=$as_save_IFS
bec39cab
AC
6138
6139fi
6140fi
6141ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6142if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6144$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6145else
81ecdfbb
RW
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147$as_echo "no" >&6; }
bec39cab
AC
6148fi
6149
81ecdfbb
RW
6150 if test "x$ac_ct_DLLTOOL" = x; then
6151 DLLTOOL=""
6152 else
6153 case $cross_compiling:$ac_tool_warned in
6154yes:)
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6157ac_tool_warned=yes ;;
6158esac
6159 DLLTOOL=$ac_ct_DLLTOOL
6160 fi
bec39cab
AC
6161else
6162 DLLTOOL="$ac_cv_prog_DLLTOOL"
6163fi
6164
6165if test -n "$ac_tool_prefix"; then
6166 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6167set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6169$as_echo_n "checking for $ac_word... " >&6; }
6170if test "${ac_cv_prog_WINDRES+set}" = set; then :
6171 $as_echo_n "(cached) " >&6
bec39cab
AC
6172else
6173 if test -n "$WINDRES"; then
6174 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6175else
6176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179 IFS=$as_save_IFS
6180 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6181 for ac_exec_ext in '' $ac_executable_extensions; do
6182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6183 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6184 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6185 break 2
6186 fi
6187done
81ecdfbb
RW
6188 done
6189IFS=$as_save_IFS
bec39cab
AC
6190
6191fi
6192fi
6193WINDRES=$ac_cv_prog_WINDRES
6194if test -n "$WINDRES"; then
81ecdfbb
RW
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6196$as_echo "$WINDRES" >&6; }
bec39cab 6197else
81ecdfbb
RW
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
bec39cab
AC
6200fi
6201
81ecdfbb 6202
bec39cab
AC
6203fi
6204if test -z "$ac_cv_prog_WINDRES"; then
6205 ac_ct_WINDRES=$WINDRES
6206 # Extract the first word of "windres", so it can be a program name with args.
6207set dummy windres; ac_word=$2
81ecdfbb
RW
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6209$as_echo_n "checking for $ac_word... " >&6; }
6210if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6211 $as_echo_n "(cached) " >&6
bec39cab
AC
6212else
6213 if test -n "$ac_ct_WINDRES"; then
6214 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6215else
6216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219 IFS=$as_save_IFS
6220 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6221 for ac_exec_ext in '' $ac_executable_extensions; do
6222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6223 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6225 break 2
6226 fi
6227done
81ecdfbb
RW
6228 done
6229IFS=$as_save_IFS
bec39cab
AC
6230
6231fi
6232fi
6233ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6234if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6236$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6237else
81ecdfbb
RW
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6239$as_echo "no" >&6; }
c906108c 6240fi
bec39cab 6241
81ecdfbb
RW
6242 if test "x$ac_ct_WINDRES" = x; then
6243 WINDRES=""
6244 else
6245 case $cross_compiling:$ac_tool_warned in
6246yes:)
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6248$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6249ac_tool_warned=yes ;;
6250esac
6251 WINDRES=$ac_ct_WINDRES
6252 fi
c906108c 6253else
bec39cab 6254 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6255fi
6256
bec39cab 6257
036c3acb
TS
6258case $host_os in
6259 gnu*)
6260 # Needed for GNU Hurd hosts.
6261 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6262 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6263set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6265$as_echo_n "checking for $ac_word... " >&6; }
6266if test "${ac_cv_prog_MIG+set}" = set; then :
6267 $as_echo_n "(cached) " >&6
c906108c 6268else
bec39cab
AC
6269 if test -n "$MIG"; then
6270 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6271else
6272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH
6274do
6275 IFS=$as_save_IFS
6276 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6277 for ac_exec_ext in '' $ac_executable_extensions; do
6278 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6279 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6281 break 2
6282 fi
6283done
81ecdfbb
RW
6284 done
6285IFS=$as_save_IFS
bec39cab 6286
c906108c 6287fi
bec39cab
AC
6288fi
6289MIG=$ac_cv_prog_MIG
6290if test -n "$MIG"; then
81ecdfbb
RW
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6292$as_echo "$MIG" >&6; }
c906108c 6293else
81ecdfbb
RW
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295$as_echo "no" >&6; }
c906108c
SS
6296fi
6297
81ecdfbb 6298
bec39cab
AC
6299fi
6300if test -z "$ac_cv_prog_MIG"; then
6301 ac_ct_MIG=$MIG
6302 # Extract the first word of "mig", so it can be a program name with args.
6303set dummy mig; ac_word=$2
81ecdfbb
RW
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6307 $as_echo_n "(cached) " >&6
bec39cab
AC
6308else
6309 if test -n "$ac_ct_MIG"; then
6310 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6311else
6312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6317 for ac_exec_ext in '' $ac_executable_extensions; do
6318 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6319 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6321 break 2
6322 fi
6323done
81ecdfbb
RW
6324 done
6325IFS=$as_save_IFS
c906108c 6326
bec39cab
AC
6327fi
6328fi
6329ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6330if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6332$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6333else
81ecdfbb
RW
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
bec39cab 6336fi
c906108c 6337
81ecdfbb
RW
6338 if test "x$ac_ct_MIG" = x; then
6339 MIG=""
6340 else
6341 case $cross_compiling:$ac_tool_warned in
6342yes:)
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6345ac_tool_warned=yes ;;
6346esac
6347 MIG=$ac_ct_MIG
6348 fi
bec39cab
AC
6349else
6350 MIG="$ac_cv_prog_MIG"
6351fi
c906108c 6352
036c3acb
TS
6353 if test x"$MIG" = x; then
6354 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6355 fi
6356 ;;
6357esac
c906108c 6358
bec39cab
AC
6359# ---------------------- #
6360# Checks for libraries. #
6361# ---------------------- #
c906108c 6362
bec39cab 6363# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6365$as_echo_n "checking for main in -lm... " >&6; }
6366if test "${ac_cv_lib_m_main+set}" = set; then :
6367 $as_echo_n "(cached) " >&6
bec39cab
AC
6368else
6369 ac_check_lib_save_LIBS=$LIBS
6370LIBS="-lm $LIBS"
81ecdfbb 6371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6372/* end confdefs.h. */
c906108c 6373
c906108c 6374
bec39cab
AC
6375int
6376main ()
6377{
81ecdfbb 6378return main ();
bec39cab
AC
6379 ;
6380 return 0;
6381}
6382_ACEOF
81ecdfbb 6383if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6384 ac_cv_lib_m_main=yes
6385else
81ecdfbb 6386 ac_cv_lib_m_main=no
bec39cab 6387fi
81ecdfbb
RW
6388rm -f core conftest.err conftest.$ac_objext \
6389 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6390LIBS=$ac_check_lib_save_LIBS
6391fi
81ecdfbb
RW
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6393$as_echo "$ac_cv_lib_m_main" >&6; }
6394if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6395 cat >>confdefs.h <<_ACEOF
6396#define HAVE_LIBM 1
6397_ACEOF
6398
6399 LIBS="-lm $LIBS"
c906108c 6400
c906108c 6401fi
bec39cab
AC
6402
6403
6404# We need to link with -lw to get `wctype' on Solaris before Solaris
6405# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6406# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6407# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6408ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6409if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6410
c906108c 6411else
81ecdfbb
RW
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6413$as_echo_n "checking for wctype in -lw... " >&6; }
6414if test "${ac_cv_lib_w_wctype+set}" = set; then :
6415 $as_echo_n "(cached) " >&6
bec39cab
AC
6416else
6417 ac_check_lib_save_LIBS=$LIBS
6418LIBS="-lw $LIBS"
81ecdfbb 6419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6420/* end confdefs.h. */
c906108c 6421
81ecdfbb
RW
6422/* Override any GCC internal prototype to avoid an error.
6423 Use char because int might match the return type of a GCC
6424 builtin and then its argument prototype would still apply. */
bec39cab
AC
6425#ifdef __cplusplus
6426extern "C"
6427#endif
bec39cab
AC
6428char wctype ();
6429int
6430main ()
6431{
81ecdfbb 6432return wctype ();
bec39cab
AC
6433 ;
6434 return 0;
6435}
6436_ACEOF
81ecdfbb 6437if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6438 ac_cv_lib_w_wctype=yes
6439else
81ecdfbb 6440 ac_cv_lib_w_wctype=no
bec39cab 6441fi
81ecdfbb
RW
6442rm -f core conftest.err conftest.$ac_objext \
6443 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6444LIBS=$ac_check_lib_save_LIBS
6445fi
81ecdfbb
RW
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6447$as_echo "$ac_cv_lib_w_wctype" >&6; }
6448if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6449 cat >>confdefs.h <<_ACEOF
6450#define HAVE_LIBW 1
6451_ACEOF
c906108c 6452
bec39cab 6453 LIBS="-lw $LIBS"
c906108c 6454
bec39cab 6455fi
c906108c 6456
bec39cab 6457fi
c906108c 6458
ddc9cd0f 6459
bec39cab 6460# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6462$as_echo_n "checking for library containing gethostbyname... " >&6; }
6463if test "${ac_cv_search_gethostbyname+set}" = set; then :
6464 $as_echo_n "(cached) " >&6
bec39cab
AC
6465else
6466 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6468/* end confdefs.h. */
ddc9cd0f 6469
81ecdfbb
RW
6470/* Override any GCC internal prototype to avoid an error.
6471 Use char because int might match the return type of a GCC
6472 builtin and then its argument prototype would still apply. */
bec39cab
AC
6473#ifdef __cplusplus
6474extern "C"
6475#endif
bec39cab
AC
6476char gethostbyname ();
6477int
6478main ()
6479{
81ecdfbb 6480return gethostbyname ();
bec39cab
AC
6481 ;
6482 return 0;
6483}
6484_ACEOF
81ecdfbb
RW
6485for ac_lib in '' nsl; do
6486 if test -z "$ac_lib"; then
6487 ac_res="none required"
6488 else
6489 ac_res=-l$ac_lib
b4e70030 6490 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6491 fi
6492 if ac_fn_c_try_link "$LINENO"; then :
6493 ac_cv_search_gethostbyname=$ac_res
6494fi
6495rm -f core conftest.err conftest.$ac_objext \
6496 conftest$ac_exeext
6497 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6498 break
6499fi
6500done
6501if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6502
bec39cab 6503else
81ecdfbb 6504 ac_cv_search_gethostbyname=no
bec39cab 6505fi
81ecdfbb 6506rm conftest.$ac_ext
bec39cab
AC
6507LIBS=$ac_func_search_save_LIBS
6508fi
81ecdfbb
RW
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6510$as_echo "$ac_cv_search_gethostbyname" >&6; }
6511ac_res=$ac_cv_search_gethostbyname
6512if test "$ac_res" != no; then :
6513 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6514
bec39cab 6515fi
96baa820 6516
c906108c 6517
b4e70030 6518# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6520$as_echo_n "checking for library containing socketpair... " >&6; }
6521if test "${ac_cv_search_socketpair+set}" = set; then :
6522 $as_echo_n "(cached) " >&6
b4e70030
JB
6523else
6524 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6526/* end confdefs.h. */
6527
81ecdfbb
RW
6528/* Override any GCC internal prototype to avoid an error.
6529 Use char because int might match the return type of a GCC
6530 builtin and then its argument prototype would still apply. */
b4e70030
JB
6531#ifdef __cplusplus
6532extern "C"
6533#endif
b4e70030
JB
6534char socketpair ();
6535int
6536main ()
6537{
81ecdfbb 6538return socketpair ();
b4e70030
JB
6539 ;
6540 return 0;
6541}
6542_ACEOF
81ecdfbb
RW
6543for ac_lib in '' socket; do
6544 if test -z "$ac_lib"; then
6545 ac_res="none required"
6546 else
6547 ac_res=-l$ac_lib
b4e70030 6548 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6549 fi
6550 if ac_fn_c_try_link "$LINENO"; then :
6551 ac_cv_search_socketpair=$ac_res
6552fi
6553rm -f core conftest.err conftest.$ac_objext \
6554 conftest$ac_exeext
6555 if test "${ac_cv_search_socketpair+set}" = set; then :
6556 break
6557fi
6558done
6559if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6560
b4e70030 6561else
81ecdfbb 6562 ac_cv_search_socketpair=no
b4e70030 6563fi
81ecdfbb 6564rm conftest.$ac_ext
b4e70030
JB
6565LIBS=$ac_func_search_save_LIBS
6566fi
81ecdfbb
RW
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6568$as_echo "$ac_cv_search_socketpair" >&6; }
6569ac_res=$ac_cv_search_socketpair
6570if test "$ac_res" != no; then :
6571 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6572
6573fi
6574
6575
233a11ab 6576# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6577
6578 # See if the user specified whether he wants zlib support or not.
6579
6580# Check whether --with-zlib was given.
6581if test "${with_zlib+set}" = set; then :
6582 withval=$with_zlib;
6583else
6584 with_zlib=auto
6585fi
6586
6587
6588 if test "$with_zlib" != "no"; then
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6590$as_echo_n "checking for library containing zlibVersion... " >&6; }
6591if test "${ac_cv_search_zlibVersion+set}" = set; then :
6592 $as_echo_n "(cached) " >&6
233a11ab
CS
6593else
6594 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6596/* end confdefs.h. */
6597
81ecdfbb
RW
6598/* Override any GCC internal prototype to avoid an error.
6599 Use char because int might match the return type of a GCC
233a11ab 6600 builtin and then its argument prototype would still apply. */
233a11ab
CS
6601#ifdef __cplusplus
6602extern "C"
6603#endif
233a11ab
CS
6604char zlibVersion ();
6605int
6606main ()
6607{
81ecdfbb 6608return zlibVersion ();
233a11ab
CS
6609 ;
6610 return 0;
6611}
6612_ACEOF
81ecdfbb
RW
6613for ac_lib in '' z; do
6614 if test -z "$ac_lib"; then
6615 ac_res="none required"
233a11ab 6616 else
81ecdfbb
RW
6617 ac_res=-l$ac_lib
6618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6619 fi
81ecdfbb
RW
6620 if ac_fn_c_try_link "$LINENO"; then :
6621 ac_cv_search_zlibVersion=$ac_res
233a11ab 6622fi
81ecdfbb
RW
6623rm -f core conftest.err conftest.$ac_objext \
6624 conftest$ac_exeext
6625 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6626 break
233a11ab 6627fi
81ecdfbb
RW
6628done
6629if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6630
233a11ab 6631else
81ecdfbb 6632 ac_cv_search_zlibVersion=no
233a11ab 6633fi
81ecdfbb
RW
6634rm conftest.$ac_ext
6635LIBS=$ac_func_search_save_LIBS
233a11ab 6636fi
81ecdfbb
RW
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6638$as_echo "$ac_cv_search_zlibVersion" >&6; }
6639ac_res=$ac_cv_search_zlibVersion
6640if test "$ac_res" != no; then :
6641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6642 for ac_header in zlib.h
6643do :
6644 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6645if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6646 cat >>confdefs.h <<_ACEOF
81ecdfbb 6647#define HAVE_ZLIB_H 1
233a11ab
CS
6648_ACEOF
6649
6650fi
6651
6652done
6653
6654fi
6655
b040ad30
JB
6656 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6657 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6658 fi
6659 fi
6660
233a11ab 6661
77f120bf 6662# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6664$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6665if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6666 $as_echo_n "(cached) " >&6
bec39cab
AC
6667else
6668 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6670/* end confdefs.h. */
c906108c 6671
81ecdfbb
RW
6672/* Override any GCC internal prototype to avoid an error.
6673 Use char because int might match the return type of a GCC
6674 builtin and then its argument prototype would still apply. */
bec39cab
AC
6675#ifdef __cplusplus
6676extern "C"
6677#endif
77f120bf 6678char dlgetmodinfo ();
bec39cab
AC
6679int
6680main ()
6681{
81ecdfbb 6682return dlgetmodinfo ();
bec39cab
AC
6683 ;
6684 return 0;
6685}
6686_ACEOF
81ecdfbb
RW
6687for ac_lib in '' dl xpdl; do
6688 if test -z "$ac_lib"; then
6689 ac_res="none required"
6690 else
6691 ac_res=-l$ac_lib
b4e70030 6692 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6693 fi
6694 if ac_fn_c_try_link "$LINENO"; then :
6695 ac_cv_search_dlgetmodinfo=$ac_res
6696fi
6697rm -f core conftest.err conftest.$ac_objext \
6698 conftest$ac_exeext
6699 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6700 break
6701fi
6702done
6703if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6704
4e8d927d 6705else
81ecdfbb 6706 ac_cv_search_dlgetmodinfo=no
1ba607ad 6707fi
81ecdfbb 6708rm conftest.$ac_ext
bec39cab
AC
6709LIBS=$ac_func_search_save_LIBS
6710fi
81ecdfbb
RW
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6712$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6713ac_res=$ac_cv_search_dlgetmodinfo
6714if test "$ac_res" != no; then :
6715 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6716
8bb2c122 6717fi
8bb2c122 6718
8bb2c122 6719
77f120bf 6720
77f120bf 6721
6c7a06a3 6722
81ecdfbb
RW
6723# Check whether --with-libiconv-prefix was given.
6724if test "${with_libiconv_prefix+set}" = set; then :
6725 withval=$with_libiconv_prefix;
6c7a06a3 6726 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6727 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6728 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6729 done
6730
81ecdfbb
RW
6731fi
6732
6c7a06a3 6733
f18c4681 6734 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6735 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6736
81ecdfbb
RW
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6738$as_echo_n "checking for iconv... " >&6; }
6739if test "${am_cv_func_iconv+set}" = set; then :
6740 $as_echo_n "(cached) " >&6
d542061a 6741else
6c7a06a3
TT
6742
6743 am_cv_func_iconv="no, consider installing GNU libiconv"
6744 am_cv_lib_iconv=no
6745 am_cv_use_build_libiconv=no
f0f20949 6746 am_cv_build_libiconv_path=
4edb1e84
JB
6747
6748 # If libiconv is part of the build tree, then try using it over
6749 # any system iconv.
6750 if test -d ../libiconv; then
f18c4681
JB
6751 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6752 am_save_LIBS="$LIBS"
6753 am_save_CPPFLAGS="$CPPFLAGS"
6754 LIBS="$LIBS $lib_dir/libiconv.a"
6755 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6757/* end confdefs.h. */
6c7a06a3
TT
6758#include <stdlib.h>
6759#include <iconv.h>
d542061a
UW
6760int
6761main ()
6762{
6c7a06a3 6763iconv_t cd = iconv_open("","");
f18c4681
JB
6764 iconv(cd,NULL,NULL,NULL,NULL);
6765 iconv_close(cd);
d542061a
UW
6766 ;
6767 return 0;
6768}
6769_ACEOF
81ecdfbb 6770if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6771 am_cv_use_build_libiconv=yes
f0f20949 6772 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6773 am_cv_lib_iconv=yes
6774 am_cv_func_iconv=yes
d542061a 6775fi
81ecdfbb
RW
6776rm -f core conftest.err conftest.$ac_objext \
6777 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6778 LIBS="$am_save_LIBS"
6779 CPPFLAGS="$am_save_CPPFLAGS"
6780 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6781 break
6782 fi
6783 done
4edb1e84 6784 fi
94ae1714 6785
4edb1e84 6786 # Next, try to find iconv in libc.
6c7a06a3 6787 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6789/* end confdefs.h. */
6c7a06a3
TT
6790#include <stdlib.h>
6791#include <iconv.h>
d542061a
UW
6792int
6793main ()
6794{
6c7a06a3
TT
6795iconv_t cd = iconv_open("","");
6796 iconv(cd,NULL,NULL,NULL,NULL);
6797 iconv_close(cd);
d542061a
UW
6798 ;
6799 return 0;
6800}
6801_ACEOF
81ecdfbb 6802if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6803 am_cv_func_iconv=yes
d542061a 6804fi
81ecdfbb
RW
6805rm -f core conftest.err conftest.$ac_objext \
6806 conftest$ac_exeext conftest.$ac_ext
77f120bf 6807 fi
94ae1714 6808
4edb1e84
JB
6809 # If iconv was not in libc, try -liconv. In this case, arrange to
6810 # look in the libiconv prefix, if it was specified by the user.
6811 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6812 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6813 am_save_LIBS="$LIBS"
6814 if test -n "$LIBICONV_INCLUDE"; then
6815 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6816 LIBS="$LIBS $LIBICONV_LIBDIR"
6817 fi
6818 LIBS="$LIBS -liconv"
81ecdfbb 6819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6820/* end confdefs.h. */
6c7a06a3
TT
6821#include <stdlib.h>
6822#include <iconv.h>
bec39cab
AC
6823int
6824main ()
6825{
6c7a06a3
TT
6826iconv_t cd = iconv_open("","");
6827 iconv(cd,NULL,NULL,NULL,NULL);
6828 iconv_close(cd);
bec39cab
AC
6829 ;
6830 return 0;
6831}
6832_ACEOF
81ecdfbb 6833if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6834 am_cv_lib_iconv=yes
6c7a06a3 6835 am_cv_func_iconv=yes
627af7ea 6836fi
81ecdfbb
RW
6837rm -f core conftest.err conftest.$ac_objext \
6838 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6839 LIBS="$am_save_LIBS"
fc3b640d 6840 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6841 fi
6842
6843fi
81ecdfbb
RW
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6845$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6846
6847 # Set the various flags based on the cache variables. We can't rely
6848 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6849 LIBICONV=
6850 if test "$am_cv_lib_iconv" = yes; then
6851 LIBICONV="-liconv"
94ae1714
TT
6852 else
6853 LIBICONV_LIBDIR=
6854 LIBICONV_INCLUDE=
fc3b640d
TT
6855 fi
6856 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6857 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6858 LIBICONV_LIBDIR=""
fc3b640d
TT
6859 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6860 fi
6861 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6862 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6863
6c7a06a3
TT
6864 if test "$am_cv_func_iconv" = yes; then
6865
81ecdfbb 6866$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6867
81ecdfbb
RW
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6869$as_echo_n "checking for iconv declaration... " >&6; }
6870 if test "${am_cv_proto_iconv+set}" = set; then :
6871 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6872else
6873
81ecdfbb 6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6875/* end confdefs.h. */
6876
6c7a06a3
TT
6877#include <stdlib.h>
6878#include <iconv.h>
6879extern
b4e70030 6880#ifdef __cplusplus
6c7a06a3 6881"C"
b4e70030 6882#endif
6c7a06a3
TT
6883#if defined(__STDC__) || defined(__cplusplus)
6884size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6885#else
6886size_t iconv();
6887#endif
6888
b4e70030
JB
6889int
6890main ()
6891{
6c7a06a3 6892
b4e70030
JB
6893 ;
6894 return 0;
6895}
6896_ACEOF
81ecdfbb 6897if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6898 am_cv_proto_iconv_arg1=""
4e8d927d 6899else
81ecdfbb 6900 am_cv_proto_iconv_arg1="const"
b4e70030 6901fi
81ecdfbb 6902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6903 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);"
6904fi
6905
6906 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6908 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6909$as_echo "${ac_t:-
6910 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6911
6912cat >>confdefs.h <<_ACEOF
6913#define ICONV_CONST $am_cv_proto_iconv_arg1
6914_ACEOF
6915
6916 fi
6c7a06a3
TT
6917
6918
478aac75
DE
6919# GDB may fork/exec the iconv program to get the list of supported character
6920# sets. Allow the user to specify where to find it.
6921# There are several factors affecting the choice of option name:
6922# - There is already --with-libiconv-prefix but we can't use it, it specifies
6923# the build-time location of libiconv files.
6924# - The program we need to find is iconv, which comes with glibc. The user
6925# doesn't necessarily have libiconv installed. Therefore naming this
6926# --with-libiconv-foo feels wrong.
6927# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6928# defined to work on directories not files (though it really doesn't know
6929# the difference).
6930# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6931# with --with-libiconv-prefix.
6932# Putting these together is why the option name is --with-iconv-bin.
6933
6934
6935# Check whether --with-iconv-bin was given.
6936if test "${with_iconv_bin+set}" = set; then :
6937 withval=$with_iconv_bin; iconv_bin="${withval}"
6938
6939cat >>confdefs.h <<_ACEOF
6940#define ICONV_BIN "${iconv_bin}"
6941_ACEOF
6942
6943
6944 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6945 if test "x$prefix" = xNONE; then
6946 test_prefix=/usr/local
6947 else
6948 test_prefix=$prefix
6949 fi
6950 else
6951 test_prefix=$exec_prefix
6952 fi
6953 value=0
6954 case ${iconv_bin} in
6955 "${test_prefix}"|"${test_prefix}/"*|\
6956 '${exec_prefix}'|'${exec_prefix}/'*)
6957 value=1
6958 ;;
6959 esac
6960
6961cat >>confdefs.h <<_ACEOF
6962#define ICONV_BIN_RELOCATABLE $value
6963_ACEOF
6964
6965
6966
6967fi
6968
6969
6c7a06a3
TT
6970# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6971# There is a very specific comment in /usr/include/curses.h explaining that
6972# termcap routines built into libcurses must not be used.
6973#
6974# The symptoms we observed so far is GDB unexpectedly changing
6975# the terminal settings when tgetent is called - this is particularly
6976# visible as the output is missing carriage returns, and so rapidly
6977# becomes very hard to read.
6978#
6979# The readline configure script has already decided that libtermcap
6980# was enough for its purposes, and so decided to build readline using
6981# libtermcap. Since the TUI mode requires curses, building GDB with
6982# TUI enabled results in both libraries to be used at the same time,
6983# which is not allowed. This basically means that GDB with TUI is
6984# broken on alpha-osf.
6985
6986case $host_os in
6bcc772d
RO
6987 osf* )
6988 if test x"$enable_tui" = xyes; then
81ecdfbb 6989 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6990 fi
6bcc772d 6991 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6992 enable_tui=no
6993 fi
6994 ;;
6995esac
6996
cb01cfba 6997# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6998if test x"$enable_tui" != xno; then
cb01cfba
JB
6999 prefer_curses=yes
7000fi
7001
7002curses_found=no
7003if test x"$prefer_curses" = xyes; then
7004 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7005 # curses library because the latter might not provide all the
7006 # functionality we need. However, this leads to problems on systems
7007 # where the linker searches /usr/local/lib, but the compiler doesn't
7008 # search /usr/local/include, if ncurses is installed in /usr/local. A
7009 # default installation of ncurses on alpha*-dec-osf* will lead to such
7010 # a situation.
81ecdfbb
RW
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7012$as_echo_n "checking for library containing waddstr... " >&6; }
7013if test "${ac_cv_search_waddstr+set}" = set; then :
7014 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7015else
7016 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7018/* end confdefs.h. */
7019
81ecdfbb
RW
7020/* Override any GCC internal prototype to avoid an error.
7021 Use char because int might match the return type of a GCC
7022 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7023#ifdef __cplusplus
7024extern "C"
7025#endif
6c7a06a3
TT
7026char waddstr ();
7027int
7028main ()
7029{
81ecdfbb 7030return waddstr ();
6c7a06a3
TT
7031 ;
7032 return 0;
7033}
7034_ACEOF
81ecdfbb
RW
7035for ac_lib in '' ncurses cursesX curses; do
7036 if test -z "$ac_lib"; then
7037 ac_res="none required"
7038 else
7039 ac_res=-l$ac_lib
7040 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7041 fi
7042 if ac_fn_c_try_link "$LINENO"; then :
7043 ac_cv_search_waddstr=$ac_res
7044fi
7045rm -f core conftest.err conftest.$ac_objext \
7046 conftest$ac_exeext
7047 if test "${ac_cv_search_waddstr+set}" = set; then :
7048 break
7049fi
7050done
7051if test "${ac_cv_search_waddstr+set}" = set; then :
7052
6c7a06a3 7053else
81ecdfbb
RW
7054 ac_cv_search_waddstr=no
7055fi
7056rm conftest.$ac_ext
7057LIBS=$ac_func_search_save_LIBS
7058fi
7059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7060$as_echo "$ac_cv_search_waddstr" >&6; }
7061ac_res=$ac_cv_search_waddstr
7062if test "$ac_res" != no; then :
7063 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7064
7065fi
7066
7067
cb01cfba
JB
7068 if test "$ac_cv_search_waddstr" != no; then
7069 curses_found=yes
7070 fi
7071fi
7072
7073# Check whether we should enable the TUI, but only do so if we really
7074# can.
7075if test x"$enable_tui" != xno; then
7076 if test -d $srcdir/tui; then
7077 if test "$curses_found" != no; then
6c7a06a3
TT
7078 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7079 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7080 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7081 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7082 else
7083 if test x"$enable_tui" = xyes; then
81ecdfbb 7084 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7085 else
81ecdfbb
RW
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7087$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7088 fi
7089 fi
7090 fi
7091fi
7092
7093# Since GDB uses Readline, we need termcap functionality. In many
7094# cases this will be provided by the curses library, but some systems
7095# have a seperate termcap library, or no curses library at all.
7096
7097case $host_os in
7098 cygwin*)
7099 if test -d $srcdir/libtermcap; then
7100 LIBS="../libtermcap/libtermcap.a $LIBS"
7101 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7102 fi ;;
7103 go32* | *djgpp*)
7104 ac_cv_search_tgetent="none required"
7105 ;;
7106 *mingw32*)
7107 ac_cv_search_tgetent="none required"
7108 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7109 ;;
7110esac
7111
7112# These are the libraries checked by Readline.
81ecdfbb
RW
7113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7114$as_echo_n "checking for library containing tgetent... " >&6; }
7115if test "${ac_cv_search_tgetent+set}" = set; then :
7116 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7117else
7118 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7120/* end confdefs.h. */
7121
81ecdfbb
RW
7122/* Override any GCC internal prototype to avoid an error.
7123 Use char because int might match the return type of a GCC
7124 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7125#ifdef __cplusplus
7126extern "C"
7127#endif
6c7a06a3
TT
7128char tgetent ();
7129int
7130main ()
7131{
81ecdfbb 7132return tgetent ();
6c7a06a3
TT
7133 ;
7134 return 0;
7135}
7136_ACEOF
81ecdfbb
RW
7137for ac_lib in '' termcap tinfo curses ncurses; do
7138 if test -z "$ac_lib"; then
7139 ac_res="none required"
7140 else
7141 ac_res=-l$ac_lib
6c7a06a3 7142 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7143 fi
7144 if ac_fn_c_try_link "$LINENO"; then :
7145 ac_cv_search_tgetent=$ac_res
7146fi
7147rm -f core conftest.err conftest.$ac_objext \
7148 conftest$ac_exeext
7149 if test "${ac_cv_search_tgetent+set}" = set; then :
7150 break
7151fi
7152done
7153if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7154
6c7a06a3 7155else
81ecdfbb 7156 ac_cv_search_tgetent=no
6c7a06a3 7157fi
81ecdfbb 7158rm conftest.$ac_ext
6c7a06a3
TT
7159LIBS=$ac_func_search_save_LIBS
7160fi
81ecdfbb
RW
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7162$as_echo "$ac_cv_search_tgetent" >&6; }
7163ac_res=$ac_cv_search_tgetent
7164if test "$ac_res" != no; then :
7165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7166
06825bd1
MK
7167fi
7168
06825bd1 7169
bec39cab 7170if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7171 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7172fi
7173
3841debe 7174
81ecdfbb
RW
7175# Check whether --with-system-readline was given.
7176if test "${with_system_readline+set}" = set; then :
7177 withval=$with_system_readline;
7178fi
6a30b0a5 7179
6a30b0a5
AS
7180
7181if test "$with_system_readline" = yes; then
7182 READLINE=-lreadline
7183 READLINE_DEPS=
7184 READLINE_CFLAGS=
39037522 7185 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7186else
7187 READLINE='$(READLINE_DIR)/libreadline.a'
7188 READLINE_DEPS='$(READLINE)'
7189 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7190 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7191fi
7192
7193
7194
7195
7196
f997c383
SD
7197# Generate jit-reader.h
7198
7199# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7200TARGET_PTR=
7201
7202# The cast to long int works around a bug in the HP C Compiler
7203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7205# This bug is HP SR number 8606223364.
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7207$as_echo_n "checking size of unsigned long long... " >&6; }
7208if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7209 $as_echo_n "(cached) " >&6
7210else
7211 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7212
7213else
7214 if test "$ac_cv_type_unsigned_long_long" = yes; then
7215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7217{ as_fn_set_status 77
7218as_fn_error "cannot compute sizeof (unsigned long long)
7219See \`config.log' for more details." "$LINENO" 5; }; }
7220 else
7221 ac_cv_sizeof_unsigned_long_long=0
7222 fi
7223fi
7224
7225fi
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7227$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7228
7229
7230
7231cat >>confdefs.h <<_ACEOF
7232#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7233_ACEOF
7234
7235
7236# The cast to long int works around a bug in the HP C Compiler
7237# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7238# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7239# This bug is HP SR number 8606223364.
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7241$as_echo_n "checking size of unsigned long... " >&6; }
7242if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7243 $as_echo_n "(cached) " >&6
7244else
7245 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7246
7247else
7248 if test "$ac_cv_type_unsigned_long" = yes; then
7249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7251{ as_fn_set_status 77
7252as_fn_error "cannot compute sizeof (unsigned long)
7253See \`config.log' for more details." "$LINENO" 5; }; }
7254 else
7255 ac_cv_sizeof_unsigned_long=0
7256 fi
7257fi
7258
7259fi
7260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7261$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7262
7263
7264
7265cat >>confdefs.h <<_ACEOF
7266#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7267_ACEOF
7268
7269
7270# The cast to long int works around a bug in the HP C Compiler
7271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7273# This bug is HP SR number 8606223364.
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7275$as_echo_n "checking size of unsigned __int128... " >&6; }
7276if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7277 $as_echo_n "(cached) " >&6
7278else
7279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7280
7281else
7282 if test "$ac_cv_type_unsigned___int128" = yes; then
7283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7285{ as_fn_set_status 77
7286as_fn_error "cannot compute sizeof (unsigned __int128)
7287See \`config.log' for more details." "$LINENO" 5; }; }
7288 else
7289 ac_cv_sizeof_unsigned___int128=0
7290 fi
7291fi
7292
7293fi
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7295$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7296
7297
7298
7299cat >>confdefs.h <<_ACEOF
7300#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7301_ACEOF
7302
7303
7304
7305if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7306 TARGET_PTR="unsigned long"
7307elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7308 TARGET_PTR="unsigned long long"
7309elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7310 TARGET_PTR="unsigned __int128"
7311else
7312 TARGET_PTR="unsigned long"
7313fi
7314
7315
7316ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7317
7318
a2d08b9e
SD
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7320$as_echo_n "checking for library containing dlopen... " >&6; }
7321if test "${ac_cv_search_dlopen+set}" = set; then :
7322 $as_echo_n "(cached) " >&6
7323else
7324 ac_func_search_save_LIBS=$LIBS
7325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7326/* end confdefs.h. */
7327
7328/* Override any GCC internal prototype to avoid an error.
7329 Use char because int might match the return type of a GCC
7330 builtin and then its argument prototype would still apply. */
7331#ifdef __cplusplus
7332extern "C"
7333#endif
7334char dlopen ();
7335int
7336main ()
7337{
7338return dlopen ();
7339 ;
7340 return 0;
7341}
7342_ACEOF
7343for ac_lib in '' dl; do
7344 if test -z "$ac_lib"; then
7345 ac_res="none required"
7346 else
7347 ac_res=-l$ac_lib
7348 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7349 fi
7350 if ac_fn_c_try_link "$LINENO"; then :
7351 ac_cv_search_dlopen=$ac_res
7352fi
7353rm -f core conftest.err conftest.$ac_objext \
7354 conftest$ac_exeext
7355 if test "${ac_cv_search_dlopen+set}" = set; then :
7356 break
7357fi
7358done
7359if test "${ac_cv_search_dlopen+set}" = set; then :
7360
7361else
7362 ac_cv_search_dlopen=no
7363fi
7364rm conftest.$ac_ext
7365LIBS=$ac_func_search_save_LIBS
7366fi
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7368$as_echo "$ac_cv_search_dlopen" >&6; }
7369ac_res=$ac_cv_search_dlopen
7370if test "$ac_res" != no; then :
7371 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7372
7373fi
7374
7375
39037522 7376
b8e0a31c
SD
7377
7378# Check whether --with-jit-reader-dir was given.
7379if test "${with_jit_reader_dir+set}" = set; then :
7380 withval=$with_jit_reader_dir;
7381 JIT_READER_DIR=$withval
7382else
7383 JIT_READER_DIR=${libdir}/gdb
7384fi
7385
7386
7387 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7388 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7389 ac_define_dir=`eval echo $JIT_READER_DIR`
7390 ac_define_dir=`eval echo $ac_define_dir`
7391
7392cat >>confdefs.h <<_ACEOF
7393#define JIT_READER_DIR "$ac_define_dir"
7394_ACEOF
7395
7396
7397
7398
7399 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7400 if test "x$prefix" = xNONE; then
7401 test_prefix=/usr/local
7402 else
7403 test_prefix=$prefix
7404 fi
7405 else
7406 test_prefix=$exec_prefix
7407 fi
7408 value=0
7409 case ${ac_define_dir} in
7410 "${test_prefix}"|"${test_prefix}/"*|\
7411 '${exec_prefix}'|'${exec_prefix}/'*)
7412 value=1
7413 ;;
7414 esac
7415
7416cat >>confdefs.h <<_ACEOF
7417#define JIT_READER_DIR_RELOCATABLE $value
7418_ACEOF
7419
7420
7421
7422
7423
81ecdfbb
RW
7424# Check whether --with-expat was given.
7425if test "${with_expat+set}" = set; then :
7426 withval=$with_expat;
5c39566f
DJ
7427else
7428 with_expat=auto
81ecdfbb
RW
7429fi
7430
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7432$as_echo_n "checking whether to use expat... " >&6; }
7433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7434$as_echo "$with_expat" >&6; }
5c39566f
DJ
7435
7436if test "${with_expat}" = no; then
81ecdfbb
RW
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7438$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7439 HAVE_LIBEXPAT=no
7440else
7441
3841debe
DJ
7442 if test "X$prefix" = "XNONE"; then
7443 acl_final_prefix="$ac_default_prefix"
7444 else
7445 acl_final_prefix="$prefix"
7446 fi
7447 if test "X$exec_prefix" = "XNONE"; then
7448 acl_final_exec_prefix='${prefix}'
7449 else
7450 acl_final_exec_prefix="$exec_prefix"
7451 fi
7452 acl_save_prefix="$prefix"
7453 prefix="$acl_final_prefix"
7454 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7455 prefix="$acl_save_prefix"
7456
7457
81ecdfbb
RW
7458# Check whether --with-gnu-ld was given.
7459if test "${with_gnu_ld+set}" = set; then :
7460 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7461else
7462 with_gnu_ld=no
81ecdfbb
RW
7463fi
7464
3841debe
DJ
7465# Prepare PATH_SEPARATOR.
7466# The user is always right.
7467if test "${PATH_SEPARATOR+set}" != set; then
7468 echo "#! /bin/sh" >conf$$.sh
7469 echo "exit 0" >>conf$$.sh
7470 chmod +x conf$$.sh
7471 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7472 PATH_SEPARATOR=';'
7473 else
7474 PATH_SEPARATOR=:
7475 fi
7476 rm -f conf$$.sh
7477fi
7478ac_prog=ld
7479if test "$GCC" = yes; then
7480 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7482$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7483 case $host in
7484 *-*-mingw*)
7485 # gcc leaves a trailing carriage return which upsets mingw
7486 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7487 *)
7488 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7489 esac
7490 case $ac_prog in
7491 # Accept absolute paths.
7492 [\\/]* | [A-Za-z]:[\\/]*)
7493 re_direlt='/[^/][^/]*/\.\./'
7494 # Canonicalize the path of ld
7495 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7496 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7497 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7498 done
7499 test -z "$LD" && LD="$ac_prog"
7500 ;;
7501 "")
7502 # If it fails, then pretend we aren't using GCC.
7503 ac_prog=ld
7504 ;;
7505 *)
7506 # If it is relative, then search for the first ld in PATH.
7507 with_gnu_ld=unknown
7508 ;;
7509 esac
7510elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7512$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7513else
81ecdfbb
RW
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7515$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7516fi
81ecdfbb
RW
7517if test "${acl_cv_path_LD+set}" = set; then :
7518 $as_echo_n "(cached) " >&6
3841debe
DJ
7519else
7520 if test -z "$LD"; then
7521 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7522 for ac_dir in $PATH; do
7523 test -z "$ac_dir" && ac_dir=.
7524 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7525 acl_cv_path_LD="$ac_dir/$ac_prog"
7526 # Check to see if the program is GNU ld. I'd rather use --version,
7527 # but apparently some GNU ld's only accept -v.
7528 # Break only if it was the GNU/non-GNU ld that we prefer.
7529 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7530 test "$with_gnu_ld" != no && break
7531 else
7532 test "$with_gnu_ld" != yes && break
7533 fi
7534 fi
7535 done
7536 IFS="$ac_save_ifs"
7537else
7538 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7539fi
7540fi
7541
7542LD="$acl_cv_path_LD"
7543if test -n "$LD"; then
81ecdfbb
RW
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7545$as_echo "$LD" >&6; }
3841debe 7546else
81ecdfbb
RW
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548$as_echo "no" >&6; }
3841debe 7549fi
81ecdfbb
RW
7550test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7552$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7553if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7554 $as_echo_n "(cached) " >&6
3841debe
DJ
7555else
7556 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7557if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7558 acl_cv_prog_gnu_ld=yes
7559else
7560 acl_cv_prog_gnu_ld=no
7561fi
7562fi
81ecdfbb
RW
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7564$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7565with_gnu_ld=$acl_cv_prog_gnu_ld
7566
7567
7568
81ecdfbb
RW
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7570$as_echo_n "checking for shared library run path origin... " >&6; }
7571if test "${acl_cv_rpath+set}" = set; then :
7572 $as_echo_n "(cached) " >&6
3841debe
DJ
7573else
7574
7575 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7576 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7577 . ./conftest.sh
7578 rm -f ./conftest.sh
7579 acl_cv_rpath=done
7580
7581fi
81ecdfbb
RW
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7583$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7584 wl="$acl_cv_wl"
7585 libext="$acl_cv_libext"
7586 shlibext="$acl_cv_shlibext"
7587 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7588 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7589 hardcode_direct="$acl_cv_hardcode_direct"
7590 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7591 # Check whether --enable-rpath was given.
7592if test "${enable_rpath+set}" = set; then :
7593 enableval=$enable_rpath; :
3841debe
DJ
7594else
7595 enable_rpath=yes
81ecdfbb
RW
7596fi
7597
3841debe
DJ
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607 use_additional=yes
7608
7609 acl_save_prefix="$prefix"
7610 prefix="$acl_final_prefix"
7611 acl_save_exec_prefix="$exec_prefix"
7612 exec_prefix="$acl_final_exec_prefix"
7613
7614 eval additional_includedir=\"$includedir\"
7615 eval additional_libdir=\"$libdir\"
7616
7617 exec_prefix="$acl_save_exec_prefix"
7618 prefix="$acl_save_prefix"
7619
7620
81ecdfbb
RW
7621# Check whether --with-libexpat-prefix was given.
7622if test "${with_libexpat_prefix+set}" = set; then :
7623 withval=$with_libexpat_prefix;
3841debe
DJ
7624 if test "X$withval" = "Xno"; then
7625 use_additional=no
7626 else
7627 if test "X$withval" = "X"; then
7628
7629 acl_save_prefix="$prefix"
7630 prefix="$acl_final_prefix"
7631 acl_save_exec_prefix="$exec_prefix"
7632 exec_prefix="$acl_final_exec_prefix"
7633
7634 eval additional_includedir=\"$includedir\"
7635 eval additional_libdir=\"$libdir\"
7636
7637 exec_prefix="$acl_save_exec_prefix"
7638 prefix="$acl_save_prefix"
7639
7640 else
7641 additional_includedir="$withval/include"
7642 additional_libdir="$withval/lib"
7643 fi
7644 fi
7645
81ecdfbb
RW
7646fi
7647
3841debe
DJ
7648 LIBEXPAT=
7649 LTLIBEXPAT=
7650 INCEXPAT=
7651 rpathdirs=
7652 ltrpathdirs=
7653 names_already_handled=
7654 names_next_round='expat '
7655 while test -n "$names_next_round"; do
7656 names_this_round="$names_next_round"
7657 names_next_round=
7658 for name in $names_this_round; do
7659 already_handled=
7660 for n in $names_already_handled; do
7661 if test "$n" = "$name"; then
7662 already_handled=yes
7663 break
7664 fi
7665 done
7666 if test -z "$already_handled"; then
7667 names_already_handled="$names_already_handled $name"
7668 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7669 eval value=\"\$HAVE_LIB$uppername\"
7670 if test -n "$value"; then
7671 if test "$value" = yes; then
7672 eval value=\"\$LIB$uppername\"
7673 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7674 eval value=\"\$LTLIB$uppername\"
7675 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7676 else
7677 :
7678 fi
7679 else
7680 found_dir=
7681 found_la=
7682 found_so=
7683 found_a=
7684 if test $use_additional = yes; then
7685 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7686 found_dir="$additional_libdir"
7687 found_so="$additional_libdir/lib$name.$shlibext"
7688 if test -f "$additional_libdir/lib$name.la"; then
7689 found_la="$additional_libdir/lib$name.la"
7690 fi
7691 else
7692 if test -f "$additional_libdir/lib$name.$libext"; then
7693 found_dir="$additional_libdir"
7694 found_a="$additional_libdir/lib$name.$libext"
7695 if test -f "$additional_libdir/lib$name.la"; then
7696 found_la="$additional_libdir/lib$name.la"
7697 fi
7698 fi
7699 fi
7700 fi
7701 if test "X$found_dir" = "X"; then
7702 for x in $LDFLAGS $LTLIBEXPAT; do
7703
7704 acl_save_prefix="$prefix"
7705 prefix="$acl_final_prefix"
7706 acl_save_exec_prefix="$exec_prefix"
7707 exec_prefix="$acl_final_exec_prefix"
7708 eval x=\"$x\"
7709 exec_prefix="$acl_save_exec_prefix"
7710 prefix="$acl_save_prefix"
7711
7712 case "$x" in
7713 -L*)
7714 dir=`echo "X$x" | sed -e 's/^X-L//'`
7715 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7716 found_dir="$dir"
7717 found_so="$dir/lib$name.$shlibext"
7718 if test -f "$dir/lib$name.la"; then
7719 found_la="$dir/lib$name.la"
7720 fi
7721 else
7722 if test -f "$dir/lib$name.$libext"; then
7723 found_dir="$dir"
7724 found_a="$dir/lib$name.$libext"
7725 if test -f "$dir/lib$name.la"; then
7726 found_la="$dir/lib$name.la"
7727 fi
7728 fi
7729 fi
7730 ;;
7731 esac
7732 if test "X$found_dir" != "X"; then
7733 break
7734 fi
7735 done
7736 fi
7737 if test "X$found_dir" != "X"; then
7738 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7739 if test "X$found_so" != "X"; then
7740 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7741 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7742 else
7743 haveit=
7744 for x in $ltrpathdirs; do
7745 if test "X$x" = "X$found_dir"; then
7746 haveit=yes
7747 break
7748 fi
7749 done
7750 if test -z "$haveit"; then
7751 ltrpathdirs="$ltrpathdirs $found_dir"
7752 fi
7753 if test "$hardcode_direct" = yes; then
7754 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7755 else
7756 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7758 haveit=
7759 for x in $rpathdirs; do
7760 if test "X$x" = "X$found_dir"; then
7761 haveit=yes
7762 break
7763 fi
7764 done
7765 if test -z "$haveit"; then
7766 rpathdirs="$rpathdirs $found_dir"
7767 fi
7768 else
7769 haveit=
7770 for x in $LDFLAGS $LIBEXPAT; do
7771
7772 acl_save_prefix="$prefix"
7773 prefix="$acl_final_prefix"
7774 acl_save_exec_prefix="$exec_prefix"
7775 exec_prefix="$acl_final_exec_prefix"
7776 eval x=\"$x\"
7777 exec_prefix="$acl_save_exec_prefix"
7778 prefix="$acl_save_prefix"
7779
7780 if test "X$x" = "X-L$found_dir"; then
7781 haveit=yes
7782 break
7783 fi
7784 done
7785 if test -z "$haveit"; then
7786 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7787 fi
7788 if test "$hardcode_minus_L" != no; then
7789 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7790 else
7791 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7792 fi
7793 fi
7794 fi
7795 fi
7796 else
7797 if test "X$found_a" != "X"; then
7798 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7799 else
7800 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7801 fi
7802 fi
7803 additional_includedir=
7804 case "$found_dir" in
7805 */lib | */lib/)
7806 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7807 additional_includedir="$basedir/include"
7808 ;;
7809 esac
7810 if test "X$additional_includedir" != "X"; then
7811 if test "X$additional_includedir" != "X/usr/include"; then
7812 haveit=
7813 if test "X$additional_includedir" = "X/usr/local/include"; then
7814 if test -n "$GCC"; then
7815 case $host_os in
7816 linux*) haveit=yes;;
7817 esac
7818 fi
7819 fi
7820 if test -z "$haveit"; then
7821 for x in $CPPFLAGS $INCEXPAT; do
7822
7823 acl_save_prefix="$prefix"
7824 prefix="$acl_final_prefix"
7825 acl_save_exec_prefix="$exec_prefix"
7826 exec_prefix="$acl_final_exec_prefix"
7827 eval x=\"$x\"
7828 exec_prefix="$acl_save_exec_prefix"
7829 prefix="$acl_save_prefix"
7830
7831 if test "X$x" = "X-I$additional_includedir"; then
7832 haveit=yes
7833 break
7834 fi
7835 done
7836 if test -z "$haveit"; then
7837 if test -d "$additional_includedir"; then
7838 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7839 fi
7840 fi
7841 fi
7842 fi
7843 fi
7844 if test -n "$found_la"; then
7845 save_libdir="$libdir"
7846 case "$found_la" in
7847 */* | *\\*) . "$found_la" ;;
7848 *) . "./$found_la" ;;
7849 esac
7850 libdir="$save_libdir"
7851 for dep in $dependency_libs; do
7852 case "$dep" in
7853 -L*)
7854 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7855 if test "X$additional_libdir" != "X/usr/lib"; then
7856 haveit=
7857 if test "X$additional_libdir" = "X/usr/local/lib"; then
7858 if test -n "$GCC"; then
7859 case $host_os in
7860 linux*) haveit=yes;;
7861 esac
7862 fi
7863 fi
7864 if test -z "$haveit"; then
7865 haveit=
7866 for x in $LDFLAGS $LIBEXPAT; do
7867
7868 acl_save_prefix="$prefix"
7869 prefix="$acl_final_prefix"
7870 acl_save_exec_prefix="$exec_prefix"
7871 exec_prefix="$acl_final_exec_prefix"
7872 eval x=\"$x\"
7873 exec_prefix="$acl_save_exec_prefix"
7874 prefix="$acl_save_prefix"
7875
7876 if test "X$x" = "X-L$additional_libdir"; then
7877 haveit=yes
7878 break
7879 fi
7880 done
7881 if test -z "$haveit"; then
7882 if test -d "$additional_libdir"; then
7883 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7884 fi
7885 fi
7886 haveit=
7887 for x in $LDFLAGS $LTLIBEXPAT; do
7888
7889 acl_save_prefix="$prefix"
7890 prefix="$acl_final_prefix"
7891 acl_save_exec_prefix="$exec_prefix"
7892 exec_prefix="$acl_final_exec_prefix"
7893 eval x=\"$x\"
7894 exec_prefix="$acl_save_exec_prefix"
7895 prefix="$acl_save_prefix"
7896
7897 if test "X$x" = "X-L$additional_libdir"; then
7898 haveit=yes
7899 break
7900 fi
7901 done
7902 if test -z "$haveit"; then
7903 if test -d "$additional_libdir"; then
7904 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7905 fi
7906 fi
7907 fi
7908 fi
7909 ;;
7910 -R*)
7911 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7912 if test "$enable_rpath" != no; then
7913 haveit=
7914 for x in $rpathdirs; do
7915 if test "X$x" = "X$dir"; then
7916 haveit=yes
7917 break
7918 fi
7919 done
7920 if test -z "$haveit"; then
7921 rpathdirs="$rpathdirs $dir"
7922 fi
7923 haveit=
7924 for x in $ltrpathdirs; do
7925 if test "X$x" = "X$dir"; then
7926 haveit=yes
7927 break
7928 fi
7929 done
7930 if test -z "$haveit"; then
7931 ltrpathdirs="$ltrpathdirs $dir"
7932 fi
7933 fi
7934 ;;
7935 -l*)
7936 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7937 ;;
7938 *.la)
7939 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7940 ;;
7941 *)
7942 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7943 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7944 ;;
81ecdfbb
RW
7945 esac
7946 done
7947 fi
7948 else
7949 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7950 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7951 fi
7952 fi
7953 fi
7954 done
7955 done
7956 if test "X$rpathdirs" != "X"; then
7957 if test -n "$hardcode_libdir_separator"; then
7958 alldirs=
7959 for found_dir in $rpathdirs; do
7960 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7961 done
7962 acl_save_libdir="$libdir"
7963 libdir="$alldirs"
7964 eval flag=\"$hardcode_libdir_flag_spec\"
7965 libdir="$acl_save_libdir"
7966 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7967 else
7968 for found_dir in $rpathdirs; do
7969 acl_save_libdir="$libdir"
7970 libdir="$found_dir"
7971 eval flag=\"$hardcode_libdir_flag_spec\"
7972 libdir="$acl_save_libdir"
7973 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7974 done
7975 fi
7976 fi
7977 if test "X$ltrpathdirs" != "X"; then
7978 for found_dir in $ltrpathdirs; do
7979 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7980 done
7981 fi
a9322a30
TT
7982
7983
81ecdfbb 7984 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7985
81ecdfbb
RW
7986 for element in $INCEXPAT; do
7987 haveit=
7988 for x in $CPPFLAGS; do
a9322a30 7989
81ecdfbb
RW
7990 acl_save_prefix="$prefix"
7991 prefix="$acl_final_prefix"
7992 acl_save_exec_prefix="$exec_prefix"
7993 exec_prefix="$acl_final_exec_prefix"
7994 eval x=\"$x\"
7995 exec_prefix="$acl_save_exec_prefix"
7996 prefix="$acl_save_prefix"
a8111142 7997
81ecdfbb
RW
7998 if test "X$x" = "X$element"; then
7999 haveit=yes
8000 break
8001 fi
8002 done
8003 if test -z "$haveit"; then
8004 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8005 fi
8006 done
a9322a30
TT
8007
8008
81ecdfbb
RW
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8010$as_echo_n "checking for libexpat... " >&6; }
8011if test "${ac_cv_libexpat+set}" = set; then :
8012 $as_echo_n "(cached) " >&6
bec39cab 8013else
bec39cab 8014
81ecdfbb
RW
8015 ac_save_LIBS="$LIBS"
8016 LIBS="$LIBS $LIBEXPAT"
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8018/* end confdefs.h. */
81ecdfbb
RW
8019#include "expat.h"
8020int
8021main ()
8022{
8023XML_Parser p = XML_ParserCreate (0);
8024 ;
8025 return 0;
8026}
bec39cab 8027_ACEOF
81ecdfbb
RW
8028if ac_fn_c_try_link "$LINENO"; then :
8029 ac_cv_libexpat=yes
c906108c 8030else
81ecdfbb 8031 ac_cv_libexpat=no
bec39cab 8032fi
81ecdfbb
RW
8033rm -f core conftest.err conftest.$ac_objext \
8034 conftest$ac_exeext conftest.$ac_ext
8035 LIBS="$ac_save_LIBS"
c906108c 8036
95ca63c4 8037fi
81ecdfbb
RW
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8039$as_echo "$ac_cv_libexpat" >&6; }
8040 if test "$ac_cv_libexpat" = yes; then
8041 HAVE_LIBEXPAT=yes
bec39cab 8042
81ecdfbb 8043$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8044
81ecdfbb
RW
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8046$as_echo_n "checking how to link with libexpat... " >&6; }
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8048$as_echo "$LIBEXPAT" >&6; }
8049 else
8050 HAVE_LIBEXPAT=no
8051 CPPFLAGS="$ac_save_CPPFLAGS"
8052 LIBEXPAT=
8053 LTLIBEXPAT=
8054 fi
95ca63c4
CF
8055
8056
8057
7cb9022a
MK
8058
8059
bec39cab 8060
81ecdfbb
RW
8061 if test "$HAVE_LIBEXPAT" != yes; then
8062 if test "$with_expat" = yes; then
8063 as_fn_error "expat is missing or unusable" "$LINENO" 5
8064 else
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8066$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8067 fi
8068 else
8069 save_LIBS=$LIBS
8070 LIBS="$LIBS $LIBEXPAT"
8071 for ac_func in XML_StopParser
8072do :
8073 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8074if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8075 cat >>confdefs.h <<_ACEOF
81ecdfbb 8076#define HAVE_XML_STOPPARSER 1
bec39cab 8077_ACEOF
95ca63c4 8078
bec39cab 8079fi
bec39cab 8080done
95ca63c4 8081
81ecdfbb
RW
8082 LIBS=$save_LIBS
8083 fi
a9322a30
TT
8084fi
8085
d344e670
DE
8086# --------------------- #
8087# Check for libpython. #
8088# --------------------- #
8089
a9322a30 8090
a9322a30
TT
8091
8092
ec685c5e 8093
0c4a4063 8094
81ecdfbb
RW
8095# Check whether --with-python was given.
8096if test "${with_python+set}" = set; then :
8097 withval=$with_python;
bec39cab 8098else
81ecdfbb 8099 with_python=auto
bec39cab 8100fi
bec39cab 8101
81ecdfbb
RW
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8103$as_echo_n "checking whether to use python... " >&6; }
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8105$as_echo "$with_python" >&6; }
9a156167 8106
81ecdfbb
RW
8107if test "${with_python}" = no; then
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8109$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8110 have_libpython=no
bec39cab 8111else
81ecdfbb 8112 case "${with_python}" in
8c85a4e2 8113 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8114 if test -d ${with_python}; then
8115 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8116 python_prog="${with_python}/bin/python"
0c4a4063 8117 python_prefix=
9c4ea6c5
JB
8118 # If python does not exit ${with_python}/bin, then try in
8119 # ${with_python}. On Windows/MinGW, this is where the Python
8120 # executable is.
8121 if test ! -x "${python_prog}"; then
8122 python_prog="${with_python}/python"
8123 python_prefix=
8124 fi
e7a30f46 8125 if test ! -x "${python_prog}"; then
ec685c5e
DE
8126 # Fall back to gdb 7.0/7.1 behaviour.
8127 python_prog=missing
0c4a4063 8128 python_prefix=${with_python}
ec685c5e 8129 fi
e7a30f46 8130 elif test -x "${with_python}"; then
ec685c5e
DE
8131 # While we can't run python compiled for $host (unless host == build),
8132 # the user could write a script that provides the needed information,
8133 # so we support that.
ec685c5e 8134 python_prog=${with_python}
0c4a4063 8135 python_prefix=
ec685c5e
DE
8136 else
8137 as_fn_error "invalid value for --with-python" "$LINENO" 5
8138 fi
81ecdfbb 8139 ;;
ec685c5e
DE
8140 */*)
8141 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8142 as_fn_error "invalid value for --with-python" "$LINENO" 5
8143 ;;
ec685c5e
DE
8144 *)
8145 # The user has either specified auto, yes, or the name of the python
8146 # program assumed to be in $PATH.
8147 python_prefix=
8148 case "${with_python}" in
8149 yes | auto)
8150 if test ${build} = ${host}; then
8151 # Extract the first word of "python", so it can be a program name with args.
8152set dummy python; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if test "${ac_cv_path_python_prog_path+set}" = set; then :
8156 $as_echo_n "(cached) " >&6
8157else
8158 case $python_prog_path in
8159 [\\/]* | ?:[\\/]*)
8160 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8161 ;;
8162 *)
8163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166 IFS=$as_save_IFS
8167 test -z "$as_dir" && as_dir=.
8168 for ac_exec_ext in '' $ac_executable_extensions; do
8169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8170 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172 break 2
8173 fi
8174done
8175 done
8176IFS=$as_save_IFS
8177
8178 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8179 ;;
8180esac
8181fi
8182python_prog_path=$ac_cv_path_python_prog_path
8183if test -n "$python_prog_path"; then
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8185$as_echo "$python_prog_path" >&6; }
8186else
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192 if test "${python_prog_path}" = missing; then
8193 python_prog=missing
8194 else
8195 python_prog=${python_prog_path}
8196 fi
8197 else
8198 # Not much we can do except assume the cross-compiler will find the
8199 # right files.
8200 python_prog=missing
8201 fi
8202 ;;
8203 *)
8204 # While we can't run python compiled for $host (unless host == build),
8205 # the user could write a script that provides the needed information,
8206 # so we support that.
8207 python_prog="${with_python}"
8208 # Extract the first word of "${python_prog}", so it can be a program name with args.
8209set dummy ${python_prog}; ac_word=$2
8210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8211$as_echo_n "checking for $ac_word... " >&6; }
8212if test "${ac_cv_path_python_prog_path+set}" = set; then :
8213 $as_echo_n "(cached) " >&6
8214else
8215 case $python_prog_path in
8216 [\\/]* | ?:[\\/]*)
8217 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8218 ;;
8219 *)
8220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8221for as_dir in $PATH
8222do
8223 IFS=$as_save_IFS
8224 test -z "$as_dir" && as_dir=.
8225 for ac_exec_ext in '' $ac_executable_extensions; do
8226 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8227 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8229 break 2
8230 fi
8231done
8232 done
8233IFS=$as_save_IFS
8234
8235 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8236 ;;
8237esac
8238fi
8239python_prog_path=$ac_cv_path_python_prog_path
8240if test -n "$python_prog_path"; then
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8242$as_echo "$python_prog_path" >&6; }
8243else
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249 if test "${python_prog_path}" = missing; then
8250 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8251 fi
8252 ;;
8253 esac
81ecdfbb
RW
8254 esac
8255
ec685c5e 8256 if test "${python_prog}" != missing; then
e7a30f46
DE
8257 # We have a python program to use, but it may be too old.
8258 # Don't flag an error for --with-python=auto (the default).
8259 have_python_config=yes
ec685c5e
DE
8260 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8261 if test $? != 0; then
e7a30f46
DE
8262 have_python_config=failed
8263 if test "${with_python}" != auto; then
8264 as_fn_error "failure running python-config --includes" "$LINENO" 5
8265 fi
ec685c5e
DE
8266 fi
8267 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8268 if test $? != 0; then
e7a30f46
DE
8269 have_python_config=failed
8270 if test "${with_python}" != auto; then
8271 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8272 fi
ec685c5e 8273 fi
0c4a4063
DE
8274 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8275 if test $? != 0; then
e7a30f46
DE
8276 have_python_config=failed
8277 if test "${with_python}" != auto; then
8278 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8279 fi
0c4a4063 8280 fi
ec685c5e 8281 else
ac534cba
JB
8282 # We do not have a python executable we can use to determine where
8283 # to find the Python headers and libs. We cannot guess the include
8284 # path from the python_prefix either, because that include path
8285 # depends on the Python version. So, there is nothing much we can
8286 # do except assume that the compiler will be able to find those files.
8287 python_includes=
8288 python_libs=
0c4a4063 8289 have_python_config=no
ec685c5e 8290 fi
bec39cab 8291
ec685c5e
DE
8292 # If we have python-config, only try the configuration it provides.
8293 # Otherwise fallback on the old way of trying different versions of
8294 # python in turn.
81ecdfbb 8295
ec685c5e
DE
8296 have_libpython=no
8297 if test "${have_python_config}" = yes; then
c1039e3c
JB
8298 # Determine the Python version by extracting "-lpython<version>"
8299 # part of the python_libs. <version> is usually X.Y with X and Y
8300 # being decimal numbers, but can also be XY (seen on Windows).
8301 #
8302 # The extraction is performed using sed with a regular expression.
8303 # Initially, the regexp used was using the '?' quantifier to make
8304 # the dot in the version number optional. Unfortunately, this
8305 # does not work with non-GNU versions of sed because, because of
8306 # what looks like a limitation (the '?' quantifier does not work
8307 # with back-references). We work around this limitation by using
8308 # the '*' quantifier instead. It means that, in theory, we might
8309 # match unexpected version strings such as "-lpython2..7", but
8310 # this seems unlikely in practice. And even if that happens,
8311 # an error will be triggered later on, when checking that version
8312 # number.
ec685c5e 8313 python_version=`echo " ${python_libs} " \
c1039e3c 8314 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8315 case "${python_version}" in
8316 python*)
ec685c5e
DE
8317
8318 version=${python_version}
8319
8320 new_CPPFLAGS=${python_includes}
8321 new_LIBS=${python_libs}
81ecdfbb
RW
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8323$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8324 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8325 save_LIBS=$LIBS
ec685c5e
DE
8326 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8327 LIBS="$LIBS $new_LIBS"
8328 found_usable_python=no
81ecdfbb 8329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8330/* end confdefs.h. */
ac534cba 8331#include "Python.h"
81ecdfbb
RW
8332int
8333main ()
8334{
8335Py_Initialize ();
8336 ;
8337 return 0;
8338}
bec39cab 8339_ACEOF
81ecdfbb 8340if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8341 have_libpython=${version}
8342 found_usable_python=yes
ac534cba
JB
8343 PYTHON_CPPFLAGS=$new_CPPFLAGS
8344 PYTHON_LIBS=$new_LIBS
9a156167 8345fi
81ecdfbb
RW
8346rm -f core conftest.err conftest.$ac_objext \
8347 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8348 CPPFLAGS=$save_CPPFLAGS
8349 LIBS=$save_LIBS
ec685c5e
DE
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8351$as_echo "${found_usable_python}" >&6; }
9a156167 8352
0c4a4063
DE
8353 ;;
8354 *)
ec685c5e 8355 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8356 ;;
8357 esac
e7a30f46 8358 elif test "${have_python_config}" != failed; then
ec685c5e 8359 if test "${have_libpython}" = no; then
9a156167 8360
420697bb
TT
8361 version=python2.7
8362
8363 new_CPPFLAGS=${python_includes}
8364 new_LIBS="${python_libs} -lpython2.7"
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8366$as_echo_n "checking for ${version}... " >&6; }
8367 save_CPPFLAGS=$CPPFLAGS
8368 save_LIBS=$LIBS
8369 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8370 LIBS="$LIBS $new_LIBS"
8371 found_usable_python=no
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373/* end confdefs.h. */
ac534cba 8374#include "Python.h"
420697bb
TT
8375int
8376main ()
8377{
8378Py_Initialize ();
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383if ac_fn_c_try_link "$LINENO"; then :
8384 have_libpython=${version}
8385 found_usable_python=yes
ac534cba
JB
8386 PYTHON_CPPFLAGS=$new_CPPFLAGS
8387 PYTHON_LIBS=$new_LIBS
420697bb
TT
8388fi
8389rm -f core conftest.err conftest.$ac_objext \
8390 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8391 CPPFLAGS=$save_CPPFLAGS
8392 LIBS=$save_LIBS
420697bb
TT
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8394$as_echo "${found_usable_python}" >&6; }
8395
8396 fi
8397 if test "${have_libpython}" = no; then
8398
ec685c5e
DE
8399 version=python2.6
8400
8401 new_CPPFLAGS=${python_includes}
8402 new_LIBS="${python_libs} -lpython2.6"
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8404$as_echo_n "checking for ${version}... " >&6; }
8405 save_CPPFLAGS=$CPPFLAGS
8406 save_LIBS=$LIBS
8407 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8408 LIBS="$LIBS $new_LIBS"
8409 found_usable_python=no
8410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8411/* end confdefs.h. */
ac534cba 8412#include "Python.h"
ec685c5e
DE
8413int
8414main ()
8415{
8416Py_Initialize ();
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421if ac_fn_c_try_link "$LINENO"; then :
8422 have_libpython=${version}
8423 found_usable_python=yes
ac534cba
JB
8424 PYTHON_CPPFLAGS=$new_CPPFLAGS
8425 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8426fi
8427rm -f core conftest.err conftest.$ac_objext \
8428 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8429 CPPFLAGS=$save_CPPFLAGS
8430 LIBS=$save_LIBS
ec685c5e
DE
8431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8432$as_echo "${found_usable_python}" >&6; }
9a156167 8433
81ecdfbb 8434 fi
ec685c5e 8435 if test ${have_libpython} = no; then
9a156167 8436
81ecdfbb 8437 version=python2.5
9a156167 8438
ec685c5e
DE
8439 new_CPPFLAGS=${python_includes}
8440 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8442$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8443 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8444 save_LIBS=$LIBS
ec685c5e
DE
8445 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8446 LIBS="$LIBS $new_LIBS"
8447 found_usable_python=no
81ecdfbb 8448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8449/* end confdefs.h. */
ac534cba 8450#include "Python.h"
81ecdfbb
RW
8451int
8452main ()
8453{
8454Py_Initialize ();
8455 ;
8456 return 0;
8457}
436868fb 8458_ACEOF
81ecdfbb 8459if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8460 have_libpython=${version}
8461 found_usable_python=yes
ac534cba
JB
8462 PYTHON_CPPFLAGS=$new_CPPFLAGS
8463 PYTHON_LIBS=$new_LIBS
436868fb 8464fi
81ecdfbb
RW
8465rm -f core conftest.err conftest.$ac_objext \
8466 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8467 CPPFLAGS=$save_CPPFLAGS
8468 LIBS=$save_LIBS
ec685c5e
DE
8469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8470$as_echo "${found_usable_python}" >&6; }
a9322a30 8471
81ecdfbb 8472 fi
ec685c5e 8473 if test ${have_libpython} = no; then
a9322a30 8474
81ecdfbb 8475 version=python2.4
a9322a30 8476
ec685c5e
DE
8477 new_CPPFLAGS=${python_includes}
8478 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8480$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8481 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8482 save_LIBS=$LIBS
ec685c5e
DE
8483 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8484 LIBS="$LIBS $new_LIBS"
8485 found_usable_python=no
81ecdfbb 8486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8487/* end confdefs.h. */
ac534cba 8488#include "Python.h"
a9322a30
TT
8489int
8490main ()
8491{
81ecdfbb 8492Py_Initialize ();
a9322a30
TT
8493 ;
8494 return 0;
8495}
436868fb 8496_ACEOF
81ecdfbb 8497if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8498 have_libpython=${version}
8499 found_usable_python=yes
ac534cba
JB
8500 PYTHON_CPPFLAGS=$new_CPPFLAGS
8501 PYTHON_LIBS=$new_LIBS
436868fb 8502fi
81ecdfbb
RW
8503rm -f core conftest.err conftest.$ac_objext \
8504 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8505 CPPFLAGS=$save_CPPFLAGS
8506 LIBS=$save_LIBS
ec685c5e
DE
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8508$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8509
ec685c5e
DE
8510 fi
8511 fi
9c4ea6c5 8512 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8513
8514$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8515
9c4ea6c5 8516 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8517
8518$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8519
9c4ea6c5 8520 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8521
8522$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8523
9c4ea6c5 8524 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8525
8526$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8527
81ecdfbb 8528 fi
ec685c5e
DE
8529
8530 if test "${have_libpython}" = no; then
81ecdfbb
RW
8531 case "${with_python}" in
8532 yes)
8533 as_fn_error "python is missing or unusable" "$LINENO" 5
8534 ;;
8535 auto)
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8537$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8538 ;;
8539 *)
8540 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8541 ;;
8542 esac
0c4a4063
DE
8543 else
8544 if test -n "${python_prefix}"; then
8545
8546cat >>confdefs.h <<_ACEOF
8547#define WITH_PYTHON_PATH "${python_prefix}"
8548_ACEOF
8549
8550
8551 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8552 if test "x$prefix" = xNONE; then
8553 test_prefix=/usr/local
8554 else
8555 test_prefix=$prefix
8556 fi
8557 else
8558 test_prefix=$exec_prefix
8559 fi
8560 value=0
8561 case ${python_prefix} in
8562 "${test_prefix}"|"${test_prefix}/"*|\
8563 '${exec_prefix}'|'${exec_prefix}/'*)
8564 value=1
8565 ;;
8566 esac
8567
8568cat >>confdefs.h <<_ACEOF
8569#define PYTHON_PATH_RELOCATABLE $value
8570_ACEOF
8571
8572
8573 fi
81ecdfbb 8574 fi
436868fb 8575fi
436868fb 8576
ec685c5e 8577if test "${have_libpython}" != no; then
436868fb 8578
81ecdfbb 8579$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8580
81ecdfbb
RW
8581 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8582 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8583 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8584 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8585 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8586
81ecdfbb
RW
8587 # Flags needed to compile Python code (taken from python-config --cflags).
8588 # We cannot call python-config directly because it will output whatever was
8589 # used when compiling the Python interpreter itself, including flags which
8590 # would make the python-related objects be compiled differently from the
8591 # rest of GDB (e.g., -O2 and -fPIC).
8592 if test "${GCC}" = yes; then
8593 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8594 fi
436868fb 8595
81ecdfbb
RW
8596 if test "x${tentative_python_cflags}" != x; then
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8598$as_echo_n "checking compiler flags for python code... " >&6; }
8599 for flag in ${tentative_python_cflags}; do
8600 # Check that the compiler accepts it
8601 saved_CFLAGS="$CFLAGS"
8602 CFLAGS="$CFLAGS $flag"
8603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8604/* end confdefs.h. */
81ecdfbb 8605
a9322a30
TT
8606int
8607main ()
8608{
a9322a30
TT
8609
8610 ;
8611 return 0;
8612}
bec39cab 8613_ACEOF
81ecdfbb
RW
8614if ac_fn_c_try_compile "$LINENO"; then :
8615 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8616fi
81ecdfbb
RW
8617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8618 CFLAGS="$saved_CFLAGS"
8619 done
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8621$as_echo "${PYTHON_CFLAGS}" >&6; }
8622 fi
043b6510
JB
8623
8624 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8625 # #if _SGIAPI
8626 # #define siginfo __siginfo
8627 # #endif
8628 # The problem is that including Python causes some XOPEN macros to be
8629 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8630 # to false. So, we work around this issue by defining siginfo ourself
8631 # though the command-line.
c83393b9
JB
8632 #
8633 # On x64 Windows, Python's include headers, and pyconfig.h in
8634 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8635 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8636 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8637 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8638 # The issue was reported to the Python community, but still isn't
8639 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8640
043b6510
JB
8641 case "$gdb_host" in
8642 irix*) if test "${GCC}" = yes; then
8643 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8644 fi
8645 ;;
c83393b9
JB
8646 mingw64)
8647 if test "${GCC}" = yes; then
8648 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8649 fi
8650 ;;
043b6510 8651 esac
a8db4212
YPK
8652
8653 # Note that "python -m threading" cannot be used to check for
8654 # threading support due to a bug in Python 2.7.3
8655 # (http://bugs.python.org/issue15567).
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8657$as_echo_n "checking whether python supports threads... " >&6; }
8658 saved_CPPFLAGS="${CPPFLAGS}"
8659 CPPFLAGS="${PYTHON_CPPFLAGS}"
8660 # Note that the test is reversed so that python_has_threads=yes on
8661 # unexpected failures.
8662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8663/* end confdefs.h. */
8664
8665#include <Python.h>
8666#ifdef WITH_THREAD
8667# error
8668#endif
8669
8670_ACEOF
8671if ac_fn_c_try_cpp "$LINENO"; then :
8672 python_has_threads=no
8673else
8674 python_has_threads=yes
8675fi
8676rm -f conftest.err conftest.$ac_ext
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8678$as_echo "${python_has_threads}" >&6; }
8679 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 8680else
6dddc817
DE
8681 # Even if Python support is not compiled in, we need to have this file
8682 # included so that the "python" command, et.al., still exists.
8683 CONFIG_OBS="$CONFIG_OBS python.o"
8684 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 8685fi
9a156167 8686
ed3ef339
DE
8687
8688
8689
8690# -------------------- #
8691# Check for libguile. #
8692# -------------------- #
8693
8694
e1402065
DE
8695
8696
8697
8698
8699# Check whether --with-guile was given.
8700if test "${with_guile+set}" = set; then :
8701 withval=$with_guile;
8702else
8703 with_guile=auto
8704fi
8705
8706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8707$as_echo_n "checking whether to use guile... " >&6; }
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8709$as_echo "$with_guile" >&6; }
8710
ed3ef339
DE
8711# Extract the first word of "pkg-config", so it can be a program name with args.
8712set dummy pkg-config; ac_word=$2
8713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8714$as_echo_n "checking for $ac_word... " >&6; }
8715if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8716 $as_echo_n "(cached) " >&6
8717else
8718 case $pkg_config_prog_path in
8719 [\\/]* | ?:[\\/]*)
8720 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8721 ;;
8722 *)
8723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8724for as_dir in $PATH
8725do
8726 IFS=$as_save_IFS
8727 test -z "$as_dir" && as_dir=.
8728 for ac_exec_ext in '' $ac_executable_extensions; do
8729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8730 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8732 break 2
8733 fi
8734done
8735 done
8736IFS=$as_save_IFS
8737
8738 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8739 ;;
8740esac
8741fi
8742pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8743if test -n "$pkg_config_prog_path"; then
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8745$as_echo "$pkg_config_prog_path" >&6; }
8746else
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748$as_echo "no" >&6; }
8749fi
8750
8751
8752
214ab2da 8753try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
8754have_libguile=no
8755case "${with_guile}" in
8756no)
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8758$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8759 ;;
8760auto)
e1402065
DE
8761 if test "${pkg_config_prog_path}" = "missing"; then
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8763$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8764 else
ed3ef339
DE
8765
8766 pkg_config=${pkg_config_prog_path}
8767 guile_version_list=${try_guile_versions}
8768 flag_errors=no
8769
ed3ef339
DE
8770 found_usable_guile=checking
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8772$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8773 for guile_version in ${guile_version_list}; do
8774 ${pkg_config} --exists ${guile_version} 2>/dev/null
8775 if test $? != 0; then
8776 continue
8777 fi
8778 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8779 if test $? != 0; then
8780 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8781 fi
8782 new_LIBS=`${pkg_config} --libs ${guile_version}`
8783 if test $? != 0; then
8784 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8785 fi
8786 found_usable_guile=${guile_version}
8787 break
8788 done
8789 if test "${found_usable_guile}" = "checking"; then
8790 if test "${flag_errors}" = "yes"; then
8791 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8792 else
8793 found_usable_guile=no
8794 fi
8795 fi
8796 if test "${found_usable_guile}" != no; then
8797 save_CPPFLAGS=$CPPFLAGS
8798 save_LIBS=$LIBS
8799 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8800 LIBS="$LIBS $new_LIBS"
8801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8802/* end confdefs.h. */
8803#include "libguile.h"
8804int
8805main ()
8806{
8807scm_init_guile ();
8808 ;
8809 return 0;
8810}
8811_ACEOF
8812if ac_fn_c_try_link "$LINENO"; then :
8813 have_libguile=yes
8814 GUILE_CPPFLAGS=$new_CPPFLAGS
8815 GUILE_LIBS=$new_LIBS
8816else
8817 found_usable_guile=no
8818fi
8819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
8821 CPPFLAGS=$save_CPPFLAGS
8822 LIBS=$save_LIBS
8823 if test "${found_usable_guile}" = no; then
8824 if test "${flag_errors}" = yes; then
8825 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8826$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8827as_fn_error "linking guile version ${guile_version} test program failed
8828See \`config.log' for more details." "$LINENO" 5; }
8829 fi
8830 fi
8831 fi
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8833$as_echo "${found_usable_guile}" >&6; }
8834
e1402065 8835 fi
ed3ef339
DE
8836 ;;
8837yes)
e1402065
DE
8838 if test "${pkg_config_prog_path}" = "missing"; then
8839 as_fn_error "pkg-config not found" "$LINENO" 5
8840 fi
ed3ef339
DE
8841
8842 pkg_config=${pkg_config_prog_path}
8843 guile_version_list=${try_guile_versions}
8844 flag_errors=yes
8845
ed3ef339
DE
8846 found_usable_guile=checking
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8848$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8849 for guile_version in ${guile_version_list}; do
8850 ${pkg_config} --exists ${guile_version} 2>/dev/null
8851 if test $? != 0; then
8852 continue
8853 fi
8854 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8855 if test $? != 0; then
8856 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8857 fi
8858 new_LIBS=`${pkg_config} --libs ${guile_version}`
8859 if test $? != 0; then
8860 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8861 fi
8862 found_usable_guile=${guile_version}
8863 break
8864 done
8865 if test "${found_usable_guile}" = "checking"; then
8866 if test "${flag_errors}" = "yes"; then
8867 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8868 else
8869 found_usable_guile=no
8870 fi
8871 fi
8872 if test "${found_usable_guile}" != no; then
8873 save_CPPFLAGS=$CPPFLAGS
8874 save_LIBS=$LIBS
8875 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8876 LIBS="$LIBS $new_LIBS"
8877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8878/* end confdefs.h. */
8879#include "libguile.h"
8880int
8881main ()
8882{
8883scm_init_guile ();
8884 ;
8885 return 0;
8886}
8887_ACEOF
8888if ac_fn_c_try_link "$LINENO"; then :
8889 have_libguile=yes
8890 GUILE_CPPFLAGS=$new_CPPFLAGS
8891 GUILE_LIBS=$new_LIBS
8892else
8893 found_usable_guile=no
8894fi
8895rm -f core conftest.err conftest.$ac_objext \
8896 conftest$ac_exeext conftest.$ac_ext
8897 CPPFLAGS=$save_CPPFLAGS
8898 LIBS=$save_LIBS
8899 if test "${found_usable_guile}" = no; then
8900 if test "${flag_errors}" = yes; then
8901 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8903as_fn_error "linking guile version ${guile_version} test program failed
8904See \`config.log' for more details." "$LINENO" 5; }
8905 fi
8906 fi
8907 fi
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8909$as_echo "${found_usable_guile}" >&6; }
8910
8911 ;;
8912[\\/]* | ?:[\\/]*)
e1402065 8913 if test -x "${with_guile}"; then
ed3ef339
DE
8914
8915 pkg_config=${with_guile}
8916 guile_version_list=${try_guile_versions}
8917 flag_errors=yes
8918
ed3ef339
DE
8919 found_usable_guile=checking
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8921$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8922 for guile_version in ${guile_version_list}; do
8923 ${pkg_config} --exists ${guile_version} 2>/dev/null
8924 if test $? != 0; then
8925 continue
8926 fi
8927 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8928 if test $? != 0; then
8929 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8930 fi
8931 new_LIBS=`${pkg_config} --libs ${guile_version}`
8932 if test $? != 0; then
8933 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8934 fi
8935 found_usable_guile=${guile_version}
8936 break
8937 done
8938 if test "${found_usable_guile}" = "checking"; then
8939 if test "${flag_errors}" = "yes"; then
8940 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8941 else
8942 found_usable_guile=no
8943 fi
8944 fi
8945 if test "${found_usable_guile}" != no; then
8946 save_CPPFLAGS=$CPPFLAGS
8947 save_LIBS=$LIBS
8948 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8949 LIBS="$LIBS $new_LIBS"
8950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8951/* end confdefs.h. */
8952#include "libguile.h"
8953int
8954main ()
8955{
8956scm_init_guile ();
8957 ;
8958 return 0;
8959}
8960_ACEOF
8961if ac_fn_c_try_link "$LINENO"; then :
8962 have_libguile=yes
8963 GUILE_CPPFLAGS=$new_CPPFLAGS
8964 GUILE_LIBS=$new_LIBS
8965else
8966 found_usable_guile=no
8967fi
8968rm -f core conftest.err conftest.$ac_objext \
8969 conftest$ac_exeext conftest.$ac_ext
8970 CPPFLAGS=$save_CPPFLAGS
8971 LIBS=$save_LIBS
8972 if test "${found_usable_guile}" = no; then
8973 if test "${flag_errors}" = yes; then
8974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8976as_fn_error "linking guile version ${guile_version} test program failed
8977See \`config.log' for more details." "$LINENO" 5; }
8978 fi
8979 fi
8980 fi
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8982$as_echo "${found_usable_guile}" >&6; }
8983
e1402065
DE
8984 else
8985 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
8986 fi
ed3ef339
DE
8987 ;;
8988"" | */*)
8989 # Disallow --with=guile="" and --with-guile=foo/bar.
8990 as_fn_error "invalid value for --with-guile" "$LINENO" 5
8991 ;;
8992*)
8993 # A space separate list of guile versions to try, in order.
e1402065
DE
8994 if test "${pkg_config_prog_path}" = "missing"; then
8995 as_fn_error "pkg-config not found" "$LINENO" 5
8996 fi
ed3ef339
DE
8997
8998 pkg_config=${pkg_config_prog_path}
8999 guile_version_list=${with_guile}
9000 flag_errors=yes
9001
ed3ef339
DE
9002 found_usable_guile=checking
9003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9004$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9005 for guile_version in ${guile_version_list}; do
9006 ${pkg_config} --exists ${guile_version} 2>/dev/null
9007 if test $? != 0; then
9008 continue
9009 fi
9010 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9011 if test $? != 0; then
9012 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9013 fi
9014 new_LIBS=`${pkg_config} --libs ${guile_version}`
9015 if test $? != 0; then
9016 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9017 fi
9018 found_usable_guile=${guile_version}
9019 break
9020 done
9021 if test "${found_usable_guile}" = "checking"; then
9022 if test "${flag_errors}" = "yes"; then
9023 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9024 else
9025 found_usable_guile=no
9026 fi
9027 fi
9028 if test "${found_usable_guile}" != no; then
9029 save_CPPFLAGS=$CPPFLAGS
9030 save_LIBS=$LIBS
9031 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9032 LIBS="$LIBS $new_LIBS"
9033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034/* end confdefs.h. */
9035#include "libguile.h"
9036int
9037main ()
9038{
9039scm_init_guile ();
9040 ;
9041 return 0;
9042}
9043_ACEOF
9044if ac_fn_c_try_link "$LINENO"; then :
9045 have_libguile=yes
9046 GUILE_CPPFLAGS=$new_CPPFLAGS
9047 GUILE_LIBS=$new_LIBS
9048else
9049 found_usable_guile=no
9050fi
9051rm -f core conftest.err conftest.$ac_objext \
9052 conftest$ac_exeext conftest.$ac_ext
9053 CPPFLAGS=$save_CPPFLAGS
9054 LIBS=$save_LIBS
9055 if test "${found_usable_guile}" = no; then
9056 if test "${flag_errors}" = yes; then
9057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9059as_fn_error "linking guile version ${guile_version} test program failed
9060See \`config.log' for more details." "$LINENO" 5; }
9061 fi
9062 fi
9063 fi
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9065$as_echo "${found_usable_guile}" >&6; }
9066
9067 ;;
9068esac
9069
9070if test "${have_libguile}" != no; then
9071
9072$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9073
9074 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9075 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9076 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9077 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9078 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9079else
9080 # Even if Guile support is not compiled in, we need to have these files
9081 # included.
9082 CONFIG_OBS="$CONFIG_OBS guile.o"
9083 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9084fi
9a156167 9085
ac534cba
JB
9086
9087
d344e670
DE
9088# --------------------- #
9089# Check for libmcheck. #
9090# --------------------- #
9091
a8db4212
YPK
9092# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9093# but turn it off if Python is enabled with threads, since -lmcheck is
9094# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9095# and for releases.
17ef446e
PA
9096if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9097 && $development; then
9098 libmcheck_default=yes
9099else
9100 libmcheck_default=no
a8db4212
YPK
9101fi
9102
17ef446e
PA
9103 # Check whether --enable-libmcheck was given.
9104if test "${enable_libmcheck+set}" = set; then :
9105 enableval=$enable_libmcheck; case "${enableval}" in
9106 yes | y) ENABLE_LIBMCHECK="yes" ;;
9107 no | n) ENABLE_LIBMCHECK="no" ;;
9108 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9109 esac
9110fi
9111
9112
9113 if test -z "${ENABLE_LIBMCHECK}"; then
9114 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9115 fi
17ef446e
PA
9116
9117 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9119$as_echo_n "checking for main in -lmcheck... " >&6; }
9120if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9121 $as_echo_n "(cached) " >&6
9122else
9123 ac_check_lib_save_LIBS=$LIBS
9124LIBS="-lmcheck $LIBS"
9125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9126/* end confdefs.h. */
9127
9128
9129int
9130main ()
9131{
9132return main ();
9133 ;
9134 return 0;
9135}
9136_ACEOF
9137if ac_fn_c_try_link "$LINENO"; then :
9138 ac_cv_lib_mcheck_main=yes
9139else
9140 ac_cv_lib_mcheck_main=no
9141fi
9142rm -f core conftest.err conftest.$ac_objext \
9143 conftest$ac_exeext conftest.$ac_ext
9144LIBS=$ac_check_lib_save_LIBS
9145fi
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9147$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9148if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9149 cat >>confdefs.h <<_ACEOF
9150#define HAVE_LIBMCHECK 1
9151_ACEOF
9152
9153 LIBS="-lmcheck $LIBS"
9154
9155fi
9156
17ef446e
PA
9157 fi
9158
9159
9160if test "$ENABLE_LIBMCHECK" = "yes" \
9161 -a "${have_libpython}" != "no" \
9162 -a "${python_has_threads}" = "yes" ; then
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9164$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9165fi
9166
81ecdfbb
RW
9167# ------------------------- #
9168# Checks for header files. #
9169# ------------------------- #
c890192f 9170
81ecdfbb
RW
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9172$as_echo_n "checking for ANSI C header files... " >&6; }
9173if test "${ac_cv_header_stdc+set}" = set; then :
9174 $as_echo_n "(cached) " >&6
bec39cab 9175else
81ecdfbb 9176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9177/* end confdefs.h. */
81ecdfbb
RW
9178#include <stdlib.h>
9179#include <stdarg.h>
9180#include <string.h>
9181#include <float.h>
9182
a9322a30
TT
9183int
9184main ()
9185{
a9322a30
TT
9186
9187 ;
9188 return 0;
9189}
bec39cab 9190_ACEOF
81ecdfbb
RW
9191if ac_fn_c_try_compile "$LINENO"; then :
9192 ac_cv_header_stdc=yes
bec39cab 9193else
81ecdfbb 9194 ac_cv_header_stdc=no
a9322a30 9195fi
81ecdfbb 9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9197
81ecdfbb
RW
9198if test $ac_cv_header_stdc = yes; then
9199 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201/* end confdefs.h. */
9202#include <string.h>
bec39cab 9203
81ecdfbb
RW
9204_ACEOF
9205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9206 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9207
bec39cab 9208else
81ecdfbb
RW
9209 ac_cv_header_stdc=no
9210fi
9211rm -f conftest*
9212
9213fi
9214
9215if test $ac_cv_header_stdc = yes; then
9216 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218/* end confdefs.h. */
9219#include <stdlib.h>
9220
bec39cab 9221_ACEOF
81ecdfbb
RW
9222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9223 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9224
81ecdfbb
RW
9225else
9226 ac_cv_header_stdc=no
9227fi
9228rm -f conftest*
bec39cab 9229
bec39cab 9230fi
81ecdfbb
RW
9231
9232if test $ac_cv_header_stdc = yes; then
9233 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9234 if test "$cross_compiling" = yes; then :
9235 :
bec39cab 9236else
81ecdfbb 9237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9238/* end confdefs.h. */
81ecdfbb
RW
9239#include <ctype.h>
9240#include <stdlib.h>
9241#if ((' ' & 0x0FF) == 0x020)
9242# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9243# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9244#else
9245# define ISLOWER(c) \
9246 (('a' <= (c) && (c) <= 'i') \
9247 || ('j' <= (c) && (c) <= 'r') \
9248 || ('s' <= (c) && (c) <= 'z'))
9249# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9250#endif
9251
9252#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9253int
9254main ()
9255{
81ecdfbb
RW
9256 int i;
9257 for (i = 0; i < 256; i++)
9258 if (XOR (islower (i), ISLOWER (i))
9259 || toupper (i) != TOUPPER (i))
9260 return 2;
a9322a30
TT
9261 return 0;
9262}
bec39cab 9263_ACEOF
81ecdfbb
RW
9264if ac_fn_c_try_run "$LINENO"; then :
9265
bec39cab 9266else
81ecdfbb
RW
9267 ac_cv_header_stdc=no
9268fi
9269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9270 conftest.$ac_objext conftest.beam conftest.$ac_ext
9271fi
bec39cab 9272
bec39cab 9273fi
a9322a30 9274fi
81ecdfbb
RW
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9276$as_echo "$ac_cv_header_stdc" >&6; }
9277if test $ac_cv_header_stdc = yes; then
bec39cab 9278
81ecdfbb 9279$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9280
81ecdfbb 9281fi
bec39cab 9282
81ecdfbb 9283# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9284for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9285 thread_db.h \
0080a2f6 9286 sys/fault.h \
81ecdfbb
RW
9287 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9288 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9289 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9290 termios.h termio.h \
3447c057 9291 sgtty.h elf_hp.h \
9467110b 9292 dlfcn.h
81ecdfbb
RW
9293do :
9294 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9295ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9296eval as_val=\$$as_ac_Header
9297 if test "x$as_val" = x""yes; then :
bec39cab 9298 cat >>confdefs.h <<_ACEOF
81ecdfbb 9299#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9300_ACEOF
c906108c 9301
bec39cab 9302fi
81ecdfbb
RW
9303
9304done
9305
81ecdfbb
RW
9306for ac_header in sys/proc.h
9307do :
9308 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9309# include <sys/param.h>
9310#endif
c906108c 9311
81ecdfbb
RW
9312"
9313if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9314 cat >>confdefs.h <<_ACEOF
81ecdfbb 9315#define HAVE_SYS_PROC_H 1
bec39cab 9316_ACEOF
5ee754fc 9317
bec39cab 9318fi
81ecdfbb
RW
9319
9320done
9321
9322for ac_header in sys/user.h
9323do :
9324 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9325# include <sys/param.h>
a9322a30
TT
9326#endif
9327
81ecdfbb
RW
9328"
9329if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9330 cat >>confdefs.h <<_ACEOF
9331#define HAVE_SYS_USER_H 1
bec39cab 9332_ACEOF
bec39cab 9333
a9322a30 9334fi
bec39cab 9335
81ecdfbb 9336done
5ee754fc 9337
5ee754fc 9338
81ecdfbb
RW
9339# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9340# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9341# think that we don't have <curses.h> if we're using GCC.
9342case $host_os in
9343 solaris2.[789])
9344 if test "$GCC" = yes; then
9345
9346$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9347
9348 fi ;;
9349esac
9350for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9351do :
9352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9353ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9354eval as_val=\$$as_ac_Header
9355 if test "x$as_val" = x""yes; then :
bec39cab 9356 cat >>confdefs.h <<_ACEOF
81ecdfbb 9357#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9358_ACEOF
5ee754fc
MK
9359
9360fi
9361
81ecdfbb 9362done
bec39cab 9363
81ecdfbb
RW
9364for ac_header in term.h
9365do :
9366 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9367# include <curses.h>
9368#endif
bec39cab 9369
81ecdfbb
RW
9370"
9371if test "x$ac_cv_header_term_h" = x""yes; then :
9372 cat >>confdefs.h <<_ACEOF
9373#define HAVE_TERM_H 1
a8111142 9374_ACEOF
a8111142 9375
a8111142 9376fi
a8111142 9377
81ecdfbb 9378done
a8111142
TT
9379
9380
81ecdfbb
RW
9381# ------------------------- #
9382# Checks for declarations. #
9383# ------------------------- #
a9322a30 9384
81ecdfbb
RW
9385ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9386if test "x$ac_cv_have_decl_free" = x""yes; then :
9387 ac_have_decl=1
bec39cab 9388else
81ecdfbb
RW
9389 ac_have_decl=0
9390fi
9391
9392cat >>confdefs.h <<_ACEOF
9393#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9394_ACEOF
81ecdfbb
RW
9395ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9396if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9397 ac_have_decl=1
9398else
9399 ac_have_decl=0
9400fi
9401
9402cat >>confdefs.h <<_ACEOF
9403#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9404_ACEOF
81ecdfbb
RW
9405ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9406if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9407 ac_have_decl=1
bec39cab 9408else
81ecdfbb
RW
9409 ac_have_decl=0
9410fi
bec39cab 9411
81ecdfbb
RW
9412cat >>confdefs.h <<_ACEOF
9413#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9414_ACEOF
81ecdfbb
RW
9415ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9416if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9417 ac_have_decl=1
9418else
9419 ac_have_decl=0
5ee754fc 9420fi
81ecdfbb
RW
9421
9422cat >>confdefs.h <<_ACEOF
9423#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 9424_ACEOF
5ee754fc 9425
5ee754fc 9426
81ecdfbb
RW
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9428$as_echo_n "checking for LC_MESSAGES... " >&6; }
9429if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9430 $as_echo_n "(cached) " >&6
bec39cab 9431else
81ecdfbb 9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9433/* end confdefs.h. */
81ecdfbb 9434#include <locale.h>
a9322a30
TT
9435int
9436main ()
9437{
81ecdfbb 9438return LC_MESSAGES
a9322a30
TT
9439 ;
9440 return 0;
9441}
bec39cab 9442_ACEOF
81ecdfbb
RW
9443if ac_fn_c_try_link "$LINENO"; then :
9444 am_cv_val_LC_MESSAGES=yes
bec39cab 9445else
81ecdfbb
RW
9446 am_cv_val_LC_MESSAGES=no
9447fi
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
9450fi
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9452$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9453 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9454
81ecdfbb
RW
9455$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9456
9457 fi
9458
9459
9460# ----------------------- #
9461# Checks for structures. #
9462# ----------------------- #
9463
9464ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9465if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9466
9467cat >>confdefs.h <<_ACEOF
9468#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9469_ACEOF
7eb368b3 9470
81ecdfbb 9471
7eb368b3 9472fi
81ecdfbb
RW
9473ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9474if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9475
a9322a30
TT
9476cat >>confdefs.h <<_ACEOF
9477#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9478_ACEOF
9479
a9322a30 9480
7eb368b3
NR
9481fi
9482
7eb368b3 9483
a9322a30
TT
9484# ------------------ #
9485# Checks for types. #
9486# ------------------ #
7eb368b3 9487
81ecdfbb
RW
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9489$as_echo_n "checking return type of signal handlers... " >&6; }
9490if test "${ac_cv_type_signal+set}" = set; then :
9491 $as_echo_n "(cached) " >&6
bec39cab 9492else
81ecdfbb 9493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9494/* end confdefs.h. */
a9322a30
TT
9495#include <sys/types.h>
9496#include <signal.h>
7cb9022a 9497
a9322a30
TT
9498int
9499main ()
9500{
81ecdfbb 9501return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9502 ;
9503 return 0;
9504}
bec39cab 9505_ACEOF
81ecdfbb
RW
9506if ac_fn_c_try_compile "$LINENO"; then :
9507 ac_cv_type_signal=int
bec39cab 9508else
81ecdfbb 9509 ac_cv_type_signal=void
bec39cab 9510fi
81ecdfbb 9511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9512fi
81ecdfbb
RW
9513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9514$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9515
a9322a30
TT
9516cat >>confdefs.h <<_ACEOF
9517#define RETSIGTYPE $ac_cv_type_signal
9518_ACEOF
5ee754fc 9519
bec39cab 9520
81ecdfbb 9521ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9522#include <sys/socket.h>
9523
81ecdfbb
RW
9524"
9525if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9526
a9322a30
TT
9527cat >>confdefs.h <<_ACEOF
9528#define HAVE_SOCKLEN_T 1
9529_ACEOF
9530
9531
9532fi
9533
9534
9535# ------------------------------------- #
9536# Checks for compiler characteristics. #
9537# ------------------------------------- #
9538
81ecdfbb
RW
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9540$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9541if test "${ac_cv_c_const+set}" = set; then :
9542 $as_echo_n "(cached) " >&6
a9322a30 9543else
81ecdfbb 9544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9545/* end confdefs.h. */
a9322a30
TT
9546
9547int
9548main ()
9549{
9550/* FIXME: Include the comments suggested by Paul. */
9551#ifndef __cplusplus
9552 /* Ultrix mips cc rejects this. */
9553 typedef int charset[2];
81ecdfbb 9554 const charset cs;
a9322a30 9555 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9556 char const *const *pcpcc;
9557 char **ppc;
a9322a30
TT
9558 /* NEC SVR4.0.2 mips cc rejects this. */
9559 struct point {int x, y;};
9560 static struct point const zero = {0,0};
9561 /* AIX XL C 1.02.0.0 rejects this.
9562 It does not let you subtract one const X* pointer from another in
9563 an arm of an if-expression whose if-part is not a constant
9564 expression */
9565 const char *g = "string";
81ecdfbb 9566 pcpcc = &g + (g ? g-g : 0);
a9322a30 9567 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9568 ++pcpcc;
9569 ppc = (char**) pcpcc;
9570 pcpcc = (char const *const *) ppc;
a9322a30
TT
9571 { /* SCO 3.2v4 cc rejects this. */
9572 char *t;
9573 char const *s = 0 ? (char *) 0 : (char const *) 0;
9574
9575 *t++ = 0;
81ecdfbb 9576 if (s) return 0;
a9322a30
TT
9577 }
9578 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9579 int x[] = {25, 17};
9580 const int *foo = &x[0];
9581 ++foo;
9582 }
9583 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9584 typedef const int *iptr;
9585 iptr p = 0;
9586 ++p;
9587 }
9588 { /* AIX XL C 1.02.0.0 rejects this saying
9589 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9590 struct s { int j; const int *ap[3]; };
9591 struct s *b; b->j = 5;
9592 }
9593 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9594 const int foo = 10;
81ecdfbb 9595 if (!foo) return 0;
a9322a30 9596 }
81ecdfbb 9597 return !cs[0] && !zero.x;
a9322a30
TT
9598#endif
9599
9600 ;
9601 return 0;
9602}
bec39cab 9603_ACEOF
81ecdfbb 9604if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9605 ac_cv_c_const=yes
5ee754fc 9606else
81ecdfbb 9607 ac_cv_c_const=no
5ee754fc 9608fi
81ecdfbb 9609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9610fi
81ecdfbb
RW
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9612$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9613if test $ac_cv_c_const = no; then
bec39cab 9614
81ecdfbb 9615$as_echo "#define const /**/" >>confdefs.h
bec39cab 9616
5ee754fc 9617fi
bec39cab 9618
81ecdfbb
RW
9619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9620$as_echo_n "checking for inline... " >&6; }
9621if test "${ac_cv_c_inline+set}" = set; then :
9622 $as_echo_n "(cached) " >&6
bec39cab 9623else
a9322a30
TT
9624 ac_cv_c_inline=no
9625for ac_kw in inline __inline__ __inline; do
81ecdfbb 9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9627/* end confdefs.h. */
a9322a30
TT
9628#ifndef __cplusplus
9629typedef int foo_t;
9630static $ac_kw foo_t static_foo () {return 0; }
9631$ac_kw foo_t foo () {return 0; }
9632#endif
9633
bec39cab 9634_ACEOF
81ecdfbb
RW
9635if ac_fn_c_try_compile "$LINENO"; then :
9636 ac_cv_c_inline=$ac_kw
bec39cab 9637fi
81ecdfbb
RW
9638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9639 test "$ac_cv_c_inline" != no && break
a9322a30 9640done
bec39cab 9641
5ee754fc 9642fi
81ecdfbb
RW
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9644$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9645
a9322a30
TT
9646case $ac_cv_c_inline in
9647 inline | yes) ;;
9648 *)
9649 case $ac_cv_c_inline in
9650 no) ac_val=;;
9651 *) ac_val=$ac_cv_c_inline;;
9652 esac
9653 cat >>confdefs.h <<_ACEOF
9654#ifndef __cplusplus
9655#define inline $ac_val
9656#endif
9657_ACEOF
bec39cab
AC
9658 ;;
9659esac
bec39cab 9660
81ecdfbb
RW
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9662$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9663if test "${ac_cv_c_bigendian+set}" = set; then :
9664 $as_echo_n "(cached) " >&6
bec39cab 9665else
81ecdfbb
RW
9666 ac_cv_c_bigendian=unknown
9667 # See if we're dealing with a universal compiler.
9668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9669/* end confdefs.h. */
9670#ifndef __APPLE_CC__
9671 not a universal capable compiler
9672 #endif
9673 typedef int dummy;
9674
9675_ACEOF
9676if ac_fn_c_try_compile "$LINENO"; then :
9677
9678 # Check for potential -arch flags. It is not universal unless
9679 # there are at least two -arch flags with different values.
9680 ac_arch=
9681 ac_prev=
9682 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9683 if test -n "$ac_prev"; then
9684 case $ac_word in
9685 i?86 | x86_64 | ppc | ppc64)
9686 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9687 ac_arch=$ac_word
9688 else
9689 ac_cv_c_bigendian=universal
9690 break
9691 fi
9692 ;;
9693 esac
9694 ac_prev=
9695 elif test "x$ac_word" = "x-arch"; then
9696 ac_prev=arch
9697 fi
9698 done
9699fi
9700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9701 if test $ac_cv_c_bigendian = unknown; then
9702 # See if sys/param.h defines the BYTE_ORDER macro.
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9704/* end confdefs.h. */
a9322a30 9705#include <sys/types.h>
81ecdfbb 9706 #include <sys/param.h>
a9322a30
TT
9707
9708int
9709main ()
9710{
81ecdfbb
RW
9711#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9712 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9713 && LITTLE_ENDIAN)
9714 bogus endian macros
9715 #endif
a9322a30
TT
9716
9717 ;
9718 return 0;
9719}
bec39cab 9720_ACEOF
81ecdfbb 9721if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9722 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9724/* end confdefs.h. */
a9322a30 9725#include <sys/types.h>
81ecdfbb 9726 #include <sys/param.h>
a9322a30
TT
9727
9728int
9729main ()
9730{
9731#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9732 not big endian
9733 #endif
a9322a30
TT
9734
9735 ;
9736 return 0;
9737}
bec39cab 9738_ACEOF
81ecdfbb 9739if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9740 ac_cv_c_bigendian=yes
5ee754fc 9741else
81ecdfbb 9742 ac_cv_c_bigendian=no
5ee754fc 9743fi
81ecdfbb
RW
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9745fi
9746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9747 fi
9748 if test $ac_cv_c_bigendian = unknown; then
9749 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751/* end confdefs.h. */
9752#include <limits.h>
bec39cab 9753
81ecdfbb
RW
9754int
9755main ()
9756{
9757#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9758 bogus endian macros
9759 #endif
9760
9761 ;
9762 return 0;
9763}
7eb368b3 9764_ACEOF
81ecdfbb
RW
9765if ac_fn_c_try_compile "$LINENO"; then :
9766 # It does; now see whether it defined to _BIG_ENDIAN or not.
9767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9768/* end confdefs.h. */
81ecdfbb
RW
9769#include <limits.h>
9770
7eb368b3
NR
9771int
9772main ()
9773{
81ecdfbb
RW
9774#ifndef _BIG_ENDIAN
9775 not big endian
9776 #endif
9777
7eb368b3
NR
9778 ;
9779 return 0;
9780}
9781_ACEOF
81ecdfbb 9782if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9783 ac_cv_c_bigendian=yes
81ecdfbb
RW
9784else
9785 ac_cv_c_bigendian=no
a9322a30 9786fi
81ecdfbb 9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9788fi
81ecdfbb
RW
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9790 fi
9791 if test $ac_cv_c_bigendian = unknown; then
9792 # Compile a test program.
9793 if test "$cross_compiling" = yes; then :
9794 # Try to guess by grepping values from an object file.
9795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9796/* end confdefs.h. */
9797short int ascii_mm[] =
9798 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9799 short int ascii_ii[] =
9800 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9801 int use_ascii (int i) {
9802 return ascii_mm[i] + ascii_ii[i];
9803 }
9804 short int ebcdic_ii[] =
9805 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9806 short int ebcdic_mm[] =
9807 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9808 int use_ebcdic (int i) {
9809 return ebcdic_mm[i] + ebcdic_ii[i];
9810 }
9811 extern int foo;
7eb368b3 9812
81ecdfbb
RW
9813int
9814main ()
9815{
9816return use_ascii (foo) == use_ebcdic (foo);
9817 ;
9818 return 0;
9819}
9820_ACEOF
9821if ac_fn_c_try_compile "$LINENO"; then :
9822 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9823 ac_cv_c_bigendian=yes
9824 fi
9825 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9826 if test "$ac_cv_c_bigendian" = unknown; then
9827 ac_cv_c_bigendian=no
9828 else
9829 # finding both strings is unlikely to happen, but who knows?
9830 ac_cv_c_bigendian=unknown
9831 fi
9832 fi
7eb368b3 9833fi
81ecdfbb 9834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9835else
81ecdfbb 9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9837/* end confdefs.h. */
81ecdfbb 9838$ac_includes_default
d3ea6809
MM
9839int
9840main ()
9841{
81ecdfbb
RW
9842
9843 /* Are we little or big endian? From Harbison&Steele. */
9844 union
9845 {
9846 long int l;
9847 char c[sizeof (long int)];
9848 } u;
9849 u.l = 1;
9850 return u.c[sizeof (long int) - 1] == 1;
9851
9852 ;
9853 return 0;
d3ea6809
MM
9854}
9855_ACEOF
81ecdfbb 9856if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9857 ac_cv_c_bigendian=no
d3ea6809 9858else
81ecdfbb 9859 ac_cv_c_bigendian=yes
d3ea6809 9860fi
81ecdfbb
RW
9861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9862 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9863fi
a9322a30 9864
81ecdfbb
RW
9865 fi
9866fi
9867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9868$as_echo "$ac_cv_c_bigendian" >&6; }
9869 case $ac_cv_c_bigendian in #(
9870 yes)
9871 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9872;; #(
9873 no)
9874 ;; #(
9875 universal)
9876
9877$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9878
9879 ;; #(
9880 *)
9881 as_fn_error "unknown endianness
9882 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9883 esac
d3ea6809
MM
9884
9885
a9322a30
TT
9886# ------------------------------ #
9887# Checks for library functions. #
9888# ------------------------------ #
d3ea6809 9889
a9322a30
TT
9890# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9891# for constant arguments. Useless!
81ecdfbb
RW
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9893$as_echo_n "checking for working alloca.h... " >&6; }
9894if test "${ac_cv_working_alloca_h+set}" = set; then :
9895 $as_echo_n "(cached) " >&6
d3ea6809 9896else
81ecdfbb 9897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9898/* end confdefs.h. */
a9322a30 9899#include <alloca.h>
bec39cab
AC
9900int
9901main ()
9902{
a9322a30 9903char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9904 if (p) return 0;
bec39cab
AC
9905 ;
9906 return 0;
9907}
9908_ACEOF
81ecdfbb 9909if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9910 ac_cv_working_alloca_h=yes
bec39cab 9911else
81ecdfbb 9912 ac_cv_working_alloca_h=no
bec39cab 9913fi
81ecdfbb
RW
9914rm -f core conftest.err conftest.$ac_objext \
9915 conftest$ac_exeext conftest.$ac_ext
bec39cab 9916fi
81ecdfbb
RW
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9918$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9919if test $ac_cv_working_alloca_h = yes; then
9920
81ecdfbb 9921$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9922
c906108c 9923fi
bec39cab 9924
81ecdfbb
RW
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9926$as_echo_n "checking for alloca... " >&6; }
9927if test "${ac_cv_func_alloca_works+set}" = set; then :
9928 $as_echo_n "(cached) " >&6
bec39cab 9929else
81ecdfbb 9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9931/* end confdefs.h. */
a9322a30
TT
9932#ifdef __GNUC__
9933# define alloca __builtin_alloca
b4e70030 9934#else
a9322a30
TT
9935# ifdef _MSC_VER
9936# include <malloc.h>
9937# define alloca _alloca
9938# else
81ecdfbb 9939# ifdef HAVE_ALLOCA_H
a9322a30
TT
9940# include <alloca.h>
9941# else
9942# ifdef _AIX
9943 #pragma alloca
9944# else
9945# ifndef alloca /* predefined by HP cc +Olibcalls */
9946char *alloca ();
9947# endif
9948# endif
9949# endif
9950# endif
c906108c 9951#endif
97bf5e38 9952
bec39cab
AC
9953int
9954main ()
9955{
a9322a30 9956char *p = (char *) alloca (1);
81ecdfbb 9957 if (p) return 0;
bec39cab
AC
9958 ;
9959 return 0;
9960}
9961_ACEOF
81ecdfbb 9962if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9963 ac_cv_func_alloca_works=yes
bec39cab 9964else
81ecdfbb 9965 ac_cv_func_alloca_works=no
bec39cab 9966fi
81ecdfbb
RW
9967rm -f core conftest.err conftest.$ac_objext \
9968 conftest$ac_exeext conftest.$ac_ext
bec39cab 9969fi
81ecdfbb
RW
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9971$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9972
9973if test $ac_cv_func_alloca_works = yes; then
9974
81ecdfbb 9975$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9976
a9322a30
TT
9977else
9978 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9979# that cause trouble. Some versions do not even contain alloca or
9980# contain a buggy version. If you still want to use their alloca,
9981# use ar to extract alloca.o from them instead of compiling alloca.c.
9982
81ecdfbb 9983ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9984
81ecdfbb 9985$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9986
bec39cab 9987
81ecdfbb
RW
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9989$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9990if test "${ac_cv_os_cray+set}" = set; then :
9991 $as_echo_n "(cached) " >&6
a9322a30 9992else
81ecdfbb 9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9994/* end confdefs.h. */
81ecdfbb 9995#if defined CRAY && ! defined CRAY2
a9322a30
TT
9996webecray
9997#else
9998wenotbecray
9999#endif
10000
10001_ACEOF
10002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 10003 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
10004 ac_cv_os_cray=yes
10005else
81ecdfbb 10006 ac_cv_os_cray=no
bec39cab 10007fi
81ecdfbb
RW
10008rm -f conftest*
10009
bec39cab 10010fi
81ecdfbb
RW
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10012$as_echo "$ac_cv_os_cray" >&6; }
10013if test $ac_cv_os_cray = yes; then
10014 for ac_func in _getb67 GETB67 getb67; do
10015 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10016ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10017eval as_val=\$$as_ac_var
10018 if test "x$as_val" = x""yes; then :
a9322a30
TT
10019
10020cat >>confdefs.h <<_ACEOF
10021#define CRAY_STACKSEG_END $ac_func
bec39cab 10022_ACEOF
c906108c 10023
a9322a30 10024 break
c906108c
SS
10025fi
10026
a9322a30
TT
10027 done
10028fi
bec39cab 10029
81ecdfbb
RW
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10031$as_echo_n "checking stack direction for C alloca... " >&6; }
10032if test "${ac_cv_c_stack_direction+set}" = set; then :
10033 $as_echo_n "(cached) " >&6
a9322a30 10034else
81ecdfbb 10035 if test "$cross_compiling" = yes; then :
a9322a30 10036 ac_cv_c_stack_direction=0
bec39cab 10037else
81ecdfbb 10038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10039/* end confdefs.h. */
81ecdfbb 10040$ac_includes_default
a9322a30
TT
10041int
10042find_stack_direction ()
b4e70030 10043{
a9322a30
TT
10044 static char *addr = 0;
10045 auto char dummy;
10046 if (addr == 0)
10047 {
10048 addr = &dummy;
10049 return find_stack_direction ();
10050 }
10051 else
10052 return (&dummy > addr) ? 1 : -1;
b4e70030 10053}
b757528f 10054
bec39cab
AC
10055int
10056main ()
10057{
81ecdfbb 10058 return find_stack_direction () < 0;
bec39cab
AC
10059}
10060_ACEOF
81ecdfbb 10061if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10062 ac_cv_c_stack_direction=1
10063else
81ecdfbb 10064 ac_cv_c_stack_direction=-1
a9322a30 10065fi
81ecdfbb
RW
10066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10067 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10068fi
a9322a30 10069
81ecdfbb
RW
10070fi
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10072$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
10073cat >>confdefs.h <<_ACEOF
10074#define STACK_DIRECTION $ac_cv_c_stack_direction
10075_ACEOF
10076
10077
10078fi
10079
a9322a30 10080for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10081do :
10082 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10083ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10084eval as_val=\$$as_ac_Header
10085 if test "x$as_val" = x""yes; then :
bec39cab 10086 cat >>confdefs.h <<_ACEOF
81ecdfbb 10087#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10088_ACEOF
b757528f 10089
b757528f 10090fi
bec39cab 10091
a9322a30 10092done
a3828db0 10093
a9322a30 10094for ac_func in getpagesize
81ecdfbb
RW
10095do :
10096 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10097if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10098 cat >>confdefs.h <<_ACEOF
81ecdfbb 10099#define HAVE_GETPAGESIZE 1
bec39cab 10100_ACEOF
bcb3dc3d 10101
bcb3dc3d
MK
10102fi
10103done
10104
81ecdfbb
RW
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10106$as_echo_n "checking for working mmap... " >&6; }
10107if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10108 $as_echo_n "(cached) " >&6
a9322a30 10109else
81ecdfbb 10110 if test "$cross_compiling" = yes; then :
a9322a30 10111 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10112else
81ecdfbb 10113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10114/* end confdefs.h. */
a9322a30
TT
10115$ac_includes_default
10116/* malloc might have been renamed as rpl_malloc. */
10117#undef malloc
bec39cab 10118
a9322a30
TT
10119/* Thanks to Mike Haertel and Jim Avera for this test.
10120 Here is a matrix of mmap possibilities:
10121 mmap private not fixed
10122 mmap private fixed at somewhere currently unmapped
10123 mmap private fixed at somewhere already mapped
10124 mmap shared not fixed
10125 mmap shared fixed at somewhere currently unmapped
10126 mmap shared fixed at somewhere already mapped
10127 For private mappings, we should verify that changes cannot be read()
10128 back from the file, nor mmap's back from the file at a different
10129 address. (There have been systems where private was not correctly
10130 implemented like the infamous i386 svr4.0, and systems where the
10131 VM page cache was not coherent with the file system buffer cache
10132 like early versions of FreeBSD and possibly contemporary NetBSD.)
10133 For shared mappings, we should conversely verify that changes get
10134 propagated back to all the places they're supposed to be.
bec39cab 10135
a9322a30
TT
10136 Grep wants private fixed already mapped.
10137 The main things grep needs to know about mmap are:
10138 * does it exist and is it safe to write into the mmap'd area
10139 * how to use it (BSD variants) */
8b9cf735 10140
a9322a30
TT
10141#include <fcntl.h>
10142#include <sys/mman.h>
8b9cf735 10143
81ecdfbb 10144#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10145char *malloc ();
a3828db0
MK
10146#endif
10147
a9322a30 10148/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10149#ifndef HAVE_GETPAGESIZE
a9322a30 10150/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10151# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10152# define HAVE_SYS_PARAM_H 1
10153# endif
10154
10155# ifdef _SC_PAGESIZE
10156# define getpagesize() sysconf(_SC_PAGESIZE)
10157# else /* no _SC_PAGESIZE */
81ecdfbb 10158# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10159# include <sys/param.h>
10160# ifdef EXEC_PAGESIZE
10161# define getpagesize() EXEC_PAGESIZE
10162# else /* no EXEC_PAGESIZE */
10163# ifdef NBPG
10164# define getpagesize() NBPG * CLSIZE
10165# ifndef CLSIZE
10166# define CLSIZE 1
10167# endif /* no CLSIZE */
10168# else /* no NBPG */
10169# ifdef NBPC
10170# define getpagesize() NBPC
10171# else /* no NBPC */
10172# ifdef PAGESIZE
10173# define getpagesize() PAGESIZE
10174# endif /* PAGESIZE */
10175# endif /* no NBPC */
10176# endif /* no NBPG */
10177# endif /* no EXEC_PAGESIZE */
10178# else /* no HAVE_SYS_PARAM_H */
10179# define getpagesize() 8192 /* punt totally */
10180# endif /* no HAVE_SYS_PARAM_H */
10181# endif /* no _SC_PAGESIZE */
10182
10183#endif /* no HAVE_GETPAGESIZE */
10184
bec39cab
AC
10185int
10186main ()
10187{
a9322a30
TT
10188 char *data, *data2, *data3;
10189 int i, pagesize;
10190 int fd;
10191
10192 pagesize = getpagesize ();
10193
10194 /* First, make a file with some known garbage in it. */
10195 data = (char *) malloc (pagesize);
10196 if (!data)
81ecdfbb 10197 return 1;
a9322a30
TT
10198 for (i = 0; i < pagesize; ++i)
10199 *(data + i) = rand ();
10200 umask (0);
10201 fd = creat ("conftest.mmap", 0600);
10202 if (fd < 0)
81ecdfbb 10203 return 1;
a9322a30 10204 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10205 return 1;
a9322a30
TT
10206 close (fd);
10207
10208 /* Next, try to mmap the file at a fixed address which already has
10209 something else allocated at it. If we can, also make sure that
10210 we see the same garbage. */
10211 fd = open ("conftest.mmap", O_RDWR);
10212 if (fd < 0)
81ecdfbb 10213 return 1;
a9322a30
TT
10214 data2 = (char *) malloc (2 * pagesize);
10215 if (!data2)
81ecdfbb
RW
10216 return 1;
10217 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10218 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10219 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10220 return 1;
a9322a30
TT
10221 for (i = 0; i < pagesize; ++i)
10222 if (*(data + i) != *(data2 + i))
81ecdfbb 10223 return 1;
a9322a30
TT
10224
10225 /* Finally, make sure that changes to the mapped area do not
10226 percolate back to the file as seen by read(). (This is a bug on
10227 some variants of i386 svr4.0.) */
10228 for (i = 0; i < pagesize; ++i)
10229 *(data2 + i) = *(data2 + i) + 1;
10230 data3 = (char *) malloc (pagesize);
10231 if (!data3)
81ecdfbb 10232 return 1;
a9322a30 10233 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10234 return 1;
a9322a30
TT
10235 for (i = 0; i < pagesize; ++i)
10236 if (*(data + i) != *(data3 + i))
81ecdfbb 10237 return 1;
a9322a30 10238 close (fd);
81ecdfbb 10239 return 0;
bec39cab
AC
10240}
10241_ACEOF
81ecdfbb 10242if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10243 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10244else
81ecdfbb 10245 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10246fi
81ecdfbb
RW
10247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10248 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10249fi
81ecdfbb 10250
a9322a30 10251fi
81ecdfbb
RW
10252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10253$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10254if test $ac_cv_func_mmap_fixed_mapped = yes; then
10255
81ecdfbb 10256$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10257
086ec9eb 10258fi
a9322a30 10259rm -f conftest.mmap
a3828db0 10260
81ecdfbb
RW
10261ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10262if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10263
a9322a30
TT
10264else
10265
10266cat >>confdefs.h <<_ACEOF
10267#define pid_t int
bec39cab 10268_ACEOF
086ec9eb
MK
10269
10270fi
10271
81ecdfbb
RW
10272for ac_header in vfork.h
10273do :
10274 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10275if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10276 cat >>confdefs.h <<_ACEOF
81ecdfbb 10277#define HAVE_VFORK_H 1
bec39cab 10278_ACEOF
c906108c
SS
10279
10280fi
a9322a30 10281
a3828db0 10282done
c906108c 10283
a9322a30 10284for ac_func in fork vfork
81ecdfbb
RW
10285do :
10286 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10287ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10288eval as_val=\$$as_ac_var
10289 if test "x$as_val" = x""yes; then :
a3828db0 10290 cat >>confdefs.h <<_ACEOF
81ecdfbb 10291#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10292_ACEOF
b83266a0 10293
97bf5e38 10294fi
a3828db0 10295done
b83266a0 10296
a9322a30 10297if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10299$as_echo_n "checking for working fork... " >&6; }
10300if test "${ac_cv_func_fork_works+set}" = set; then :
10301 $as_echo_n "(cached) " >&6
a9322a30 10302else
81ecdfbb 10303 if test "$cross_compiling" = yes; then :
a9322a30
TT
10304 ac_cv_func_fork_works=cross
10305else
81ecdfbb
RW
10306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10307/* end confdefs.h. */
10308$ac_includes_default
10309int
10310main ()
10311{
10312
10313 /* By Ruediger Kuhlmann. */
10314 return fork () < 0;
10315
10316 ;
10317 return 0;
10318}
a9322a30 10319_ACEOF
81ecdfbb 10320if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10321 ac_cv_func_fork_works=yes
10322else
81ecdfbb 10323 ac_cv_func_fork_works=no
a9322a30 10324fi
81ecdfbb
RW
10325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10326 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10327fi
81ecdfbb 10328
a9322a30 10329fi
81ecdfbb
RW
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10331$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10332
10333else
10334 ac_cv_func_fork_works=$ac_cv_func_fork
10335fi
10336if test "x$ac_cv_func_fork_works" = xcross; then
10337 case $host in
10338 *-*-amigaos* | *-*-msdosdjgpp*)
10339 # Override, as these systems have only a dummy fork() stub
10340 ac_cv_func_fork_works=no
10341 ;;
10342 *)
10343 ac_cv_func_fork_works=yes
10344 ;;
10345 esac
81ecdfbb
RW
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10347$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10348fi
10349ac_cv_func_vfork_works=$ac_cv_func_vfork
10350if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10352$as_echo_n "checking for working vfork... " >&6; }
10353if test "${ac_cv_func_vfork_works+set}" = set; then :
10354 $as_echo_n "(cached) " >&6
a9322a30 10355else
81ecdfbb 10356 if test "$cross_compiling" = yes; then :
a9322a30
TT
10357 ac_cv_func_vfork_works=cross
10358else
81ecdfbb 10359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10360/* end confdefs.h. */
10361/* Thanks to Paul Eggert for this test. */
81ecdfbb 10362$ac_includes_default
a9322a30 10363#include <sys/wait.h>
81ecdfbb 10364#ifdef HAVE_VFORK_H
a9322a30
TT
10365# include <vfork.h>
10366#endif
10367/* On some sparc systems, changes by the child to local and incoming
10368 argument registers are propagated back to the parent. The compiler
10369 is told about this with #include <vfork.h>, but some compilers
10370 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10371 static variable whose address is put into a register that is
10372 clobbered by the vfork. */
10373static void
10374#ifdef __cplusplus
10375sparc_address_test (int arg)
10376# else
10377sparc_address_test (arg) int arg;
10378#endif
10379{
10380 static pid_t child;
10381 if (!child) {
10382 child = vfork ();
10383 if (child < 0) {
10384 perror ("vfork");
10385 _exit(2);
10386 }
10387 if (!child) {
10388 arg = getpid();
10389 write(-1, "", 0);
10390 _exit (arg);
10391 }
10392 }
10393}
10394
10395int
10396main ()
10397{
10398 pid_t parent = getpid ();
10399 pid_t child;
10400
10401 sparc_address_test (0);
10402
10403 child = vfork ();
10404
10405 if (child == 0) {
10406 /* Here is another test for sparc vfork register problems. This
10407 test uses lots of local variables, at least as many local
10408 variables as main has allocated so far including compiler
10409 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10410 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10411 reuse the register of parent for one of the local variables,
10412 since it will think that parent can't possibly be used any more
10413 in this routine. Assigning to the local variable will thus
10414 munge parent in the parent process. */
10415 pid_t
10416 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10417 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10418 /* Convince the compiler that p..p7 are live; otherwise, it might
10419 use the same hardware register for all 8 local variables. */
10420 if (p != p1 || p != p2 || p != p3 || p != p4
10421 || p != p5 || p != p6 || p != p7)
10422 _exit(1);
10423
10424 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10425 from child file descriptors. If the child closes a descriptor
10426 before it execs or exits, this munges the parent's descriptor
10427 as well. Test for this by closing stdout in the child. */
10428 _exit(close(fileno(stdout)) != 0);
10429 } else {
10430 int status;
10431 struct stat st;
10432
10433 while (wait(&status) != child)
10434 ;
81ecdfbb 10435 return (
a9322a30
TT
10436 /* Was there some problem with vforking? */
10437 child < 0
10438
10439 /* Did the child fail? (This shouldn't happen.) */
10440 || status
10441
10442 /* Did the vfork/compiler bug occur? */
10443 || parent != getpid()
10444
10445 /* Did the file descriptor bug occur? */
10446 || fstat(fileno(stdout), &st) != 0
10447 );
10448 }
10449}
10450_ACEOF
81ecdfbb 10451if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10452 ac_cv_func_vfork_works=yes
10453else
81ecdfbb 10454 ac_cv_func_vfork_works=no
a9322a30 10455fi
81ecdfbb
RW
10456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10457 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10458fi
81ecdfbb 10459
a9322a30 10460fi
81ecdfbb
RW
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10462$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10463
10464fi;
10465if test "x$ac_cv_func_fork_works" = xcross; then
10466 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10468$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10469fi
10470
10471if test "x$ac_cv_func_vfork_works" = xyes; then
10472
81ecdfbb 10473$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10474
10475else
10476
81ecdfbb 10477$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10478
10479fi
10480if test "x$ac_cv_func_fork_works" = xyes; then
10481
81ecdfbb 10482$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10483
10484fi
10485
7313baad 10486for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10487 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10488 sbrk setpgid setpgrp setsid \
9467110b 10489 sigaction sigprocmask sigsetmask socketpair \
110ed339 10490 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d 10491 setrlimit getrlimit posix_madvise waitpid lstat \
9467110b 10492 ptrace64
81ecdfbb
RW
10493do :
10494 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10495ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10496eval as_val=\$$as_ac_var
10497 if test "x$as_val" = x""yes; then :
6c7a06a3 10498 cat >>confdefs.h <<_ACEOF
81ecdfbb 10499#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10500_ACEOF
10501
10502fi
10503done
10504
10505
81ecdfbb
RW
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10507$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10508if test "${am_cv_langinfo_codeset+set}" = set; then :
10509 $as_echo_n "(cached) " >&6
6c7a06a3 10510else
81ecdfbb 10511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10512/* end confdefs.h. */
10513#include <langinfo.h>
10514int
10515main ()
10516{
10517char* cs = nl_langinfo(CODESET);
bec39cab
AC
10518 ;
10519 return 0;
10520}
10521_ACEOF
81ecdfbb 10522if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10523 am_cv_langinfo_codeset=yes
a4db0f07 10524else
81ecdfbb 10525 am_cv_langinfo_codeset=no
a4db0f07 10526fi
81ecdfbb
RW
10527rm -f core conftest.err conftest.$ac_objext \
10528 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10529
a4db0f07 10530fi
81ecdfbb
RW
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10532$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10533 if test $am_cv_langinfo_codeset = yes; then
10534
81ecdfbb 10535$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10536
6c7a06a3 10537 fi
c906108c 10538
06825bd1 10539
3266f10b
TT
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10541$as_echo_n "checking for ANSI C header files... " >&6; }
10542if test "${ac_cv_header_stdc+set}" = set; then :
10543 $as_echo_n "(cached) " >&6
10544else
10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10546/* end confdefs.h. */
10547#include <stdlib.h>
10548#include <stdarg.h>
10549#include <string.h>
10550#include <float.h>
10551
10552int
10553main ()
10554{
10555
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560if ac_fn_c_try_compile "$LINENO"; then :
10561 ac_cv_header_stdc=yes
10562else
10563 ac_cv_header_stdc=no
10564fi
10565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10566
10567if test $ac_cv_header_stdc = yes; then
10568 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10570/* end confdefs.h. */
10571#include <string.h>
10572
10573_ACEOF
10574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10575 $EGREP "memchr" >/dev/null 2>&1; then :
10576
10577else
10578 ac_cv_header_stdc=no
10579fi
10580rm -f conftest*
10581
10582fi
10583
10584if test $ac_cv_header_stdc = yes; then
10585 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587/* end confdefs.h. */
10588#include <stdlib.h>
10589
10590_ACEOF
10591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10592 $EGREP "free" >/dev/null 2>&1; then :
10593
10594else
10595 ac_cv_header_stdc=no
10596fi
10597rm -f conftest*
10598
10599fi
10600
10601if test $ac_cv_header_stdc = yes; then
10602 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10603 if test "$cross_compiling" = yes; then :
10604 :
10605else
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607/* end confdefs.h. */
10608#include <ctype.h>
10609#include <stdlib.h>
10610#if ((' ' & 0x0FF) == 0x020)
10611# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10612# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10613#else
10614# define ISLOWER(c) \
10615 (('a' <= (c) && (c) <= 'i') \
10616 || ('j' <= (c) && (c) <= 'r') \
10617 || ('s' <= (c) && (c) <= 'z'))
10618# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10619#endif
10620
10621#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10622int
10623main ()
10624{
10625 int i;
10626 for (i = 0; i < 256; i++)
10627 if (XOR (islower (i), ISLOWER (i))
10628 || toupper (i) != TOUPPER (i))
10629 return 2;
10630 return 0;
10631}
10632_ACEOF
10633if ac_fn_c_try_run "$LINENO"; then :
10634
10635else
10636 ac_cv_header_stdc=no
10637fi
10638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10639 conftest.$ac_objext conftest.beam conftest.$ac_ext
10640fi
10641
10642fi
10643fi
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10645$as_echo "$ac_cv_header_stdc" >&6; }
10646if test $ac_cv_header_stdc = yes; then
10647
10648$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10649
3266f10b
TT
10650fi
10651
10652 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10653# for constant arguments. Useless!
10654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10655$as_echo_n "checking for working alloca.h... " >&6; }
10656if test "${ac_cv_working_alloca_h+set}" = set; then :
10657 $as_echo_n "(cached) " >&6
10658else
10659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10660/* end confdefs.h. */
10661#include <alloca.h>
10662int
10663main ()
10664{
10665char *p = (char *) alloca (2 * sizeof (int));
10666 if (p) return 0;
10667 ;
10668 return 0;
10669}
10670_ACEOF
10671if ac_fn_c_try_link "$LINENO"; then :
10672 ac_cv_working_alloca_h=yes
10673else
10674 ac_cv_working_alloca_h=no
10675fi
10676rm -f core conftest.err conftest.$ac_objext \
10677 conftest$ac_exeext conftest.$ac_ext
10678fi
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10680$as_echo "$ac_cv_working_alloca_h" >&6; }
10681if test $ac_cv_working_alloca_h = yes; then
10682
10683$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10684
10685fi
10686
10687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10688$as_echo_n "checking for alloca... " >&6; }
10689if test "${ac_cv_func_alloca_works+set}" = set; then :
10690 $as_echo_n "(cached) " >&6
10691else
10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10693/* end confdefs.h. */
10694#ifdef __GNUC__
10695# define alloca __builtin_alloca
10696#else
10697# ifdef _MSC_VER
10698# include <malloc.h>
10699# define alloca _alloca
10700# else
10701# ifdef HAVE_ALLOCA_H
10702# include <alloca.h>
10703# else
10704# ifdef _AIX
10705 #pragma alloca
10706# else
10707# ifndef alloca /* predefined by HP cc +Olibcalls */
10708char *alloca ();
10709# endif
10710# endif
10711# endif
10712# endif
10713#endif
10714
10715int
10716main ()
10717{
10718char *p = (char *) alloca (1);
10719 if (p) return 0;
10720 ;
10721 return 0;
10722}
10723_ACEOF
10724if ac_fn_c_try_link "$LINENO"; then :
10725 ac_cv_func_alloca_works=yes
10726else
10727 ac_cv_func_alloca_works=no
10728fi
10729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
10731fi
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10733$as_echo "$ac_cv_func_alloca_works" >&6; }
10734
10735if test $ac_cv_func_alloca_works = yes; then
10736
10737$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10738
10739else
10740 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10741# that cause trouble. Some versions do not even contain alloca or
10742# contain a buggy version. If you still want to use their alloca,
10743# use ar to extract alloca.o from them instead of compiling alloca.c.
10744
10745ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10746
10747$as_echo "#define C_ALLOCA 1" >>confdefs.h
10748
10749
10750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10751$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10752if test "${ac_cv_os_cray+set}" = set; then :
10753 $as_echo_n "(cached) " >&6
10754else
10755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10756/* end confdefs.h. */
10757#if defined CRAY && ! defined CRAY2
10758webecray
10759#else
10760wenotbecray
10761#endif
10762
10763_ACEOF
10764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10765 $EGREP "webecray" >/dev/null 2>&1; then :
10766 ac_cv_os_cray=yes
10767else
10768 ac_cv_os_cray=no
10769fi
10770rm -f conftest*
10771
10772fi
10773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10774$as_echo "$ac_cv_os_cray" >&6; }
10775if test $ac_cv_os_cray = yes; then
10776 for ac_func in _getb67 GETB67 getb67; do
10777 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10778ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10779eval as_val=\$$as_ac_var
10780 if test "x$as_val" = x""yes; then :
10781
10782cat >>confdefs.h <<_ACEOF
10783#define CRAY_STACKSEG_END $ac_func
10784_ACEOF
10785
10786 break
10787fi
10788
10789 done
10790fi
10791
10792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10793$as_echo_n "checking stack direction for C alloca... " >&6; }
10794if test "${ac_cv_c_stack_direction+set}" = set; then :
10795 $as_echo_n "(cached) " >&6
10796else
10797 if test "$cross_compiling" = yes; then :
10798 ac_cv_c_stack_direction=0
10799else
10800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10801/* end confdefs.h. */
10802$ac_includes_default
10803int
10804find_stack_direction ()
10805{
10806 static char *addr = 0;
10807 auto char dummy;
10808 if (addr == 0)
10809 {
10810 addr = &dummy;
10811 return find_stack_direction ();
10812 }
10813 else
10814 return (&dummy > addr) ? 1 : -1;
10815}
10816
10817int
10818main ()
10819{
10820 return find_stack_direction () < 0;
10821}
10822_ACEOF
10823if ac_fn_c_try_run "$LINENO"; then :
10824 ac_cv_c_stack_direction=1
10825else
10826 ac_cv_c_stack_direction=-1
10827fi
10828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10829 conftest.$ac_objext conftest.beam conftest.$ac_ext
10830fi
10831
10832fi
10833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10834$as_echo "$ac_cv_c_stack_direction" >&6; }
10835cat >>confdefs.h <<_ACEOF
10836#define STACK_DIRECTION $ac_cv_c_stack_direction
10837_ACEOF
10838
10839
10840fi
10841
10842
10843
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10845$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10846if test "${am_cv_langinfo_codeset+set}" = set; then :
10847 $as_echo_n "(cached) " >&6
10848else
10849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10850/* end confdefs.h. */
10851#include <langinfo.h>
10852int
10853main ()
10854{
10855char* cs = nl_langinfo(CODESET);
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860if ac_fn_c_try_link "$LINENO"; then :
10861 am_cv_langinfo_codeset=yes
10862else
10863 am_cv_langinfo_codeset=no
10864fi
10865rm -f core conftest.err conftest.$ac_objext \
10866 conftest$ac_exeext conftest.$ac_ext
10867
10868fi
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10870$as_echo "$am_cv_langinfo_codeset" >&6; }
10871 if test $am_cv_langinfo_codeset = yes; then
10872
10873$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10874
10875 fi
10876
10877
a3d08894 10878 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
10879do :
10880 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10881ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10882eval as_val=\$$as_ac_Header
10883 if test "x$as_val" = x""yes; then :
10884 cat >>confdefs.h <<_ACEOF
10885#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10886_ACEOF
10887
10888fi
10889
10890done
10891
10892
10893 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
10894do :
10895 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10896ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10897eval as_val=\$$as_ac_var
10898 if test "x$as_val" = x""yes; then :
10899 cat >>confdefs.h <<_ACEOF
10900#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10901_ACEOF
10902
10903fi
10904done
10905
10906
10907 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10908if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10909 ac_have_decl=1
10910else
10911 ac_have_decl=0
10912fi
10913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_DECL_STRERROR $ac_have_decl
10916_ACEOF
10917ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10918if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10919 ac_have_decl=1
10920else
10921 ac_have_decl=0
10922fi
10923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_DECL_STRSTR $ac_have_decl
10926_ACEOF
10927
10928
10929
a3828db0
MK
10930# Check the return and argument types of ptrace. No canned test for
10931# this, so roll our own.
10932gdb_ptrace_headers='
4ff70b84 10933#include <sys/types.h>
a3828db0
MK
10934#if HAVE_SYS_PTRACE_H
10935# include <sys/ptrace.h>
10936#endif
10937#if HAVE_UNISTD_H
10938# include <unistd.h>
10939#endif
10940'
10941# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10942ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10943"
10944if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10945 ac_have_decl=1
06825bd1 10946else
81ecdfbb 10947 ac_have_decl=0
06825bd1 10948fi
06825bd1 10949
a3828db0 10950cat >>confdefs.h <<_ACEOF
81ecdfbb 10951#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10952_ACEOF
81ecdfbb 10953if test $ac_have_decl = 1; then :
bec39cab 10954
a3828db0 10955else
a3828db0
MK
10956
10957 : ${gdb_cv_func_ptrace_ret='int'}
10958 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10959
06825bd1
MK
10960fi
10961
064ef605
DJ
10962# Check return type. Varargs (used on GNU/Linux) conflict with the
10963# empty argument list, so check for that explicitly.
81ecdfbb
RW
10964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10965$as_echo_n "checking return type of ptrace... " >&6; }
10966if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10967 $as_echo_n "(cached) " >&6
bec39cab 10968else
81ecdfbb 10969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10970/* end confdefs.h. */
a3828db0 10971$gdb_ptrace_headers
bec39cab
AC
10972int
10973main ()
10974{
064ef605
DJ
10975extern long ptrace (enum __ptrace_request, ...);
10976 ;
10977 return 0;
10978}
10979_ACEOF
81ecdfbb 10980if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10981 gdb_cv_func_ptrace_ret='long'
10982else
81ecdfbb 10983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10984/* end confdefs.h. */
10985$gdb_ptrace_headers
10986int
10987main ()
10988{
a3828db0 10989extern int ptrace ();
bec39cab
AC
10990 ;
10991 return 0;
10992}
10993_ACEOF
81ecdfbb 10994if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10995 gdb_cv_func_ptrace_ret='int'
70f9f479 10996else
81ecdfbb 10997 gdb_cv_func_ptrace_ret='long'
70f9f479 10998fi
81ecdfbb 10999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11000fi
81ecdfbb 11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11002fi
81ecdfbb
RW
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11004$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11005
a3828db0
MK
11006cat >>confdefs.h <<_ACEOF
11007#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11008_ACEOF
70f9f479 11009
a3828db0 11010# Check argument types.
81ecdfbb
RW
11011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11012$as_echo_n "checking types of arguments for ptrace... " >&6; }
11013if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11014 $as_echo_n "(cached) " >&6
bec39cab 11015else
a3828db0 11016
81ecdfbb 11017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11018/* end confdefs.h. */
11019$gdb_ptrace_headers
11020int
11021main ()
11022{
11023extern long ptrace (enum __ptrace_request, ...);
11024 ;
11025 return 0;
11026}
11027_ACEOF
81ecdfbb 11028if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11029 gdb_cv_func_ptrace_args='int,int,long,long'
11030else
064ef605 11031
a3828db0
MK
11032for gdb_arg1 in 'int' 'long'; do
11033 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11034 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11035 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11037/* end confdefs.h. */
a3828db0 11038$gdb_ptrace_headers
bec39cab
AC
11039int
11040main ()
11041{
a3828db0
MK
11042
11043extern $gdb_cv_func_ptrace_ret
11044 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11045
bec39cab
AC
11046 ;
11047 return 0;
11048}
11049_ACEOF
81ecdfbb 11050if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11051 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11052 break 4;
5c7f2947 11053fi
81ecdfbb 11054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11055 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11057/* end confdefs.h. */
a3828db0 11058$gdb_ptrace_headers
bec39cab
AC
11059int
11060main ()
11061{
a3828db0
MK
11062
11063extern $gdb_cv_func_ptrace_ret
11064 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11065
bec39cab
AC
11066 ;
11067 return 0;
11068}
11069_ACEOF
81ecdfbb 11070if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11071
11072gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11073 break 5;
78434e59 11074fi
81ecdfbb 11075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11076 done
11077 done
11078 done
11079 done
11080done
11081# Provide a safe default value.
11082: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11083
064ef605 11084fi
81ecdfbb 11085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11086fi
81ecdfbb
RW
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11088$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11089ac_save_IFS=$IFS; IFS=','
11090set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11091IFS=$ac_save_IFS
11092shift
bec39cab 11093
a3828db0
MK
11094cat >>confdefs.h <<_ACEOF
11095#define PTRACE_TYPE_ARG3 $3
11096_ACEOF
11097
96d7229d
LM
11098
11099cat >>confdefs.h <<_ACEOF
11100#define PTRACE_TYPE_ARG4 $4
11101_ACEOF
11102
a3828db0
MK
11103if test -n "$5"; then
11104
11105cat >>confdefs.h <<_ACEOF
11106#define PTRACE_TYPE_ARG5 $5
bec39cab 11107_ACEOF
78434e59
MK
11108
11109fi
11110
a3828db0 11111if test "$cross_compiling" = no; then
81ecdfbb
RW
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11113$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11114if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11115 $as_echo_n "(cached) " >&6
a3828db0 11116else
81ecdfbb
RW
11117 if test "$cross_compiling" = yes; then :
11118 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11119else
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11121/* end confdefs.h. */
81ecdfbb 11122$ac_includes_default
bec39cab
AC
11123int
11124main ()
11125{
a3828db0
MK
11126/* If this system has a BSD-style setpgrp which takes arguments,
11127 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11128 exit successfully. */
81ecdfbb 11129 return setpgrp (1,1) != -1;
bec39cab
AC
11130 ;
11131 return 0;
11132}
11133_ACEOF
81ecdfbb 11134if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11135 ac_cv_func_setpgrp_void=no
c906108c 11136else
81ecdfbb 11137 ac_cv_func_setpgrp_void=yes
c906108c 11138fi
81ecdfbb
RW
11139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11140 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11141fi
81ecdfbb 11142
a3828db0 11143fi
81ecdfbb
RW
11144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11145$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11146if test $ac_cv_func_setpgrp_void = yes; then
11147
81ecdfbb 11148$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11149
11150fi
a3828db0
MK
11151
11152else
81ecdfbb
RW
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11154$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11155if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11156 $as_echo_n "(cached) " >&6
97bf5e38 11157else
81ecdfbb 11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11159/* end confdefs.h. */
a3828db0
MK
11160
11161#include <unistd.h>
11162
bec39cab
AC
11163int
11164main ()
11165{
a3828db0
MK
11166
11167 if (setpgrp(1,1) == -1)
11168 exit (0);
11169 else
11170 exit (1);
11171
bec39cab
AC
11172 ;
11173 return 0;
11174}
11175_ACEOF
81ecdfbb 11176if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11177 ac_cv_func_setpgrp_void=no
c906108c 11178else
81ecdfbb 11179 ac_cv_func_setpgrp_void=yes
c906108c 11180fi
81ecdfbb 11181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11182fi
81ecdfbb
RW
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11184$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11185if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11186 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11187
a3828db0 11188fi
c906108c
SS
11189fi
11190
a3828db0
MK
11191# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
11192# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
11193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11194$as_echo_n "checking for sigsetjmp... " >&6; }
11195if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11196 $as_echo_n "(cached) " >&6
bec39cab 11197else
81ecdfbb 11198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11199/* end confdefs.h. */
a3828db0
MK
11200
11201#include <setjmp.h>
11202
bec39cab
AC
11203int
11204main ()
11205{
a3828db0 11206sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
11207 ;
11208 return 0;
11209}
11210_ACEOF
81ecdfbb 11211if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11212 gdb_cv_func_sigsetjmp=yes
c906108c 11213else
81ecdfbb 11214 gdb_cv_func_sigsetjmp=no
c906108c 11215fi
81ecdfbb 11216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11217fi
81ecdfbb
RW
11218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11219$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 11220if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 11221
81ecdfbb 11222$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 11223
97bf5e38 11224fi
c906108c 11225
a3828db0
MK
11226# Assume we'll default to using the included libiberty regex.
11227gdb_use_included_regex=yes
11228
11229# However, if the system regex is GNU regex, then default to *not*
11230# using the included regex.
81ecdfbb
RW
11231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11232$as_echo_n "checking for GNU regex... " >&6; }
11233if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11234 $as_echo_n "(cached) " >&6
bec39cab 11235else
81ecdfbb 11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11237/* end confdefs.h. */
a3828db0 11238#include <gnu-versions.h>
bec39cab
AC
11239int
11240main ()
11241{
81ecdfbb
RW
11242#define REGEX_INTERFACE_VERSION 1
11243#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11244# error "Version mismatch"
11245#endif
5c45e068
MK
11246 ;
11247 return 0;
11248}
11249_ACEOF
81ecdfbb
RW
11250if ac_fn_c_try_compile "$LINENO"; then :
11251 gdb_cv_have_gnu_regex=yes
5c45e068 11252else
81ecdfbb
RW
11253 gdb_cv_have_gnu_regex=no
11254fi
11255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11256fi
11257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11258$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11259if test $gdb_cv_have_gnu_regex = yes; then
11260 gdb_use_included_regex=no
5c45e068 11261fi
81ecdfbb
RW
11262
11263
11264# Check whether --with-included-regex was given.
11265if test "${with_included_regex+set}" = set; then :
11266 withval=$with_included_regex; gdb_with_regex=$withval
11267else
11268 gdb_with_regex=$gdb_use_included_regex
c906108c 11269fi
81ecdfbb
RW
11270
11271if test "$gdb_with_regex" = yes; then
11272
11273$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11274
c906108c 11275fi
81ecdfbb
RW
11276
11277# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11278ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11279#include <sys/proc.h>
11280
11281"
11282if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11283
5c45e068 11284cat >>confdefs.h <<_ACEOF
a3828db0 11285#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11286_ACEOF
c906108c 11287
5c45e068 11288
97bf5e38 11289fi
c906108c 11290
5c45e068 11291
a3828db0 11292# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11294$as_echo_n "checking for struct lwp... " >&6; }
11295if test "${gdb_cv_struct_lwp+set}" = set; then :
11296 $as_echo_n "(cached) " >&6
bec39cab 11297else
81ecdfbb 11298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11299/* end confdefs.h. */
a3828db0
MK
11300#include <sys/param.h>
11301#include <sys/lwp.h>
bec39cab
AC
11302int
11303main ()
11304{
a3828db0 11305struct lwp l;
bec39cab
AC
11306 ;
11307 return 0;
11308}
11309_ACEOF
81ecdfbb 11310if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11311 gdb_cv_struct_lwp=yes
c906108c 11312else
81ecdfbb 11313 gdb_cv_struct_lwp=no
c906108c 11314fi
81ecdfbb 11315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11316fi
81ecdfbb
RW
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11318$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11319if test $gdb_cv_struct_lwp = yes; then
c906108c 11320
81ecdfbb 11321$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11322
97bf5e38 11323fi
c906108c 11324
a3828db0 11325# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11327$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11328if test "${gdb_cv_struct_reg+set}" = set; then :
11329 $as_echo_n "(cached) " >&6
bec39cab 11330else
81ecdfbb 11331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11332/* end confdefs.h. */
a3828db0
MK
11333#include <sys/types.h>
11334#include <machine/reg.h>
bec39cab
AC
11335int
11336main ()
11337{
a3828db0 11338struct reg r;
bec39cab
AC
11339 ;
11340 return 0;
11341}
11342_ACEOF
81ecdfbb 11343if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11344 gdb_cv_struct_reg=yes
27ca5dad 11345else
81ecdfbb 11346 gdb_cv_struct_reg=no
27ca5dad 11347fi
81ecdfbb 11348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11349fi
81ecdfbb
RW
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11351$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11352if test $gdb_cv_struct_reg = yes; then
bec39cab 11353
81ecdfbb 11354$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11355
11356fi
97bf5e38 11357
a3828db0
MK
11358# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11359# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11360ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11361"
11362if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11363
11364cat >>confdefs.h <<_ACEOF
a3828db0 11365#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11366_ACEOF
3862412b 11367
5c45e068 11368
97bf5e38 11369fi
81ecdfbb
RW
11370ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11371"
11372if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11373
11374cat >>confdefs.h <<_ACEOF
a3828db0 11375#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11376_ACEOF
3862412b 11377
5c45e068 11378
97bf5e38 11379fi
3862412b 11380
5c45e068 11381
6fea9e18
L
11382# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11383# Older amd64 Linux's don't have the fs_base and gs_base members of
11384# `struct user_regs_struct'.
11385ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11386"
11387if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11388
11389cat >>confdefs.h <<_ACEOF
11390#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11391_ACEOF
11392
11393
11394fi
11395ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11396"
11397if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11398
11399cat >>confdefs.h <<_ACEOF
11400#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11401_ACEOF
11402
11403
11404fi
11405
11406
a3828db0 11407# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11409$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11410if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11411 $as_echo_n "(cached) " >&6
451928c5 11412else
81ecdfbb 11413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11414/* end confdefs.h. */
a3828db0 11415#include <sys/ptrace.h>
bec39cab
AC
11416int
11417main ()
11418{
a3828db0 11419PTRACE_GETREGS;
bec39cab
AC
11420 ;
11421 return 0;
11422}
11423_ACEOF
81ecdfbb 11424if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11425 gdb_cv_have_ptrace_getregs=yes
451928c5 11426else
81ecdfbb 11427 gdb_cv_have_ptrace_getregs=no
451928c5 11428fi
81ecdfbb 11429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11430fi
11431
81ecdfbb
RW
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11433$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11434if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11435
81ecdfbb 11436$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11437
97bf5e38 11438fi
451928c5 11439
a3828db0 11440# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11442$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11443if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11444 $as_echo_n "(cached) " >&6
451928c5 11445else
81ecdfbb 11446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11447/* end confdefs.h. */
a3828db0 11448#include <sys/ptrace.h>
bec39cab
AC
11449int
11450main ()
11451{
a3828db0 11452PTRACE_GETFPXREGS;
bec39cab
AC
11453 ;
11454 return 0;
11455}
11456_ACEOF
81ecdfbb 11457if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11458 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11459else
81ecdfbb 11460 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11461fi
81ecdfbb 11462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11463fi
11464
81ecdfbb
RW
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11466$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11467if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11468
81ecdfbb 11469$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11470
97bf5e38 11471fi
451928c5 11472
a3828db0 11473# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11475$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11476if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11477 $as_echo_n "(cached) " >&6
3862412b 11478else
81ecdfbb 11479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11480/* end confdefs.h. */
a3828db0
MK
11481#include <sys/types.h>
11482#include <sys/ptrace.h>
bec39cab
AC
11483int
11484main ()
11485{
a3828db0 11486PT_GETDBREGS;
bec39cab
AC
11487 ;
11488 return 0;
11489}
11490_ACEOF
81ecdfbb 11491if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11492 gdb_cv_have_pt_getdbregs=yes
3862412b 11493else
81ecdfbb 11494 gdb_cv_have_pt_getdbregs=no
3862412b 11495fi
81ecdfbb 11496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11497fi
11498
81ecdfbb
RW
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11500$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11501if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11502
81ecdfbb 11503$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11504
97bf5e38 11505fi
3862412b 11506
a3828db0 11507# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11509$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11510if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11511 $as_echo_n "(cached) " >&6
3862412b 11512else
81ecdfbb 11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11514/* end confdefs.h. */
a3828db0
MK
11515#include <sys/types.h>
11516#include <sys/ptrace.h>
bec39cab
AC
11517int
11518main ()
11519{
a3828db0 11520PT_GETXMMREGS;
bec39cab
AC
11521 ;
11522 return 0;
11523}
11524_ACEOF
81ecdfbb 11525if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11526 gdb_cv_have_pt_getxmmregs=yes
3862412b 11527else
81ecdfbb 11528 gdb_cv_have_pt_getxmmregs=no
3862412b 11529fi
81ecdfbb 11530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11531fi
11532
81ecdfbb
RW
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11534$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11535if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11536
81ecdfbb 11537$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11538
97bf5e38 11539fi
3862412b 11540
05b4bd79 11541# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11542
11543if test "${target}" = "${host}"; then
11544 case "${host}" in
7b00db47 11545 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11546
81ecdfbb 11547$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11548
11549 ;;
c162e8c9 11550 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11551
81ecdfbb 11552$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11553
11554 ;;
11555 mips-sgi-irix5*)
11556 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11557
81ecdfbb 11558$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11559
11560 ;;
11561 esac
11562fi
11563
11564if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11566$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11567 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11568 $as_echo_n "(cached) " >&6
596c9d4b 11569else
81ecdfbb 11570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11571/* end confdefs.h. */
596c9d4b
KB
11572
11573#define _SYSCALL32
d30c5336
JK
11574/* Needed for new procfs interface on sparc-solaris. */
11575#define _STRUCTURED_PROC 1
596c9d4b 11576#include <sys/procfs.h>
bec39cab
AC
11577int
11578main ()
11579{
97bf5e38 11580gregset_t avar
bec39cab
AC
11581 ;
11582 return 0;
11583}
11584_ACEOF
81ecdfbb 11585if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11586 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11587else
81ecdfbb 11588 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11589
596c9d4b 11590fi
81ecdfbb 11591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11592fi
11593
97bf5e38 11594 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11595
81ecdfbb 11596$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11597
11598 fi
81ecdfbb
RW
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11600$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11601
81ecdfbb
RW
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11603$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11604 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11605 $as_echo_n "(cached) " >&6
d84dd0c5 11606else
81ecdfbb 11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11608/* end confdefs.h. */
97bf5e38
MK
11609
11610#define _SYSCALL32
d30c5336
JK
11611/* Needed for new procfs interface on sparc-solaris. */
11612#define _STRUCTURED_PROC 1
d84dd0c5 11613#include <sys/procfs.h>
bec39cab
AC
11614int
11615main ()
11616{
97bf5e38 11617fpregset_t avar
bec39cab
AC
11618 ;
11619 return 0;
11620}
11621_ACEOF
81ecdfbb 11622if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11623 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11624else
81ecdfbb 11625 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11626
d84dd0c5 11627fi
81ecdfbb 11628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11629fi
11630
97bf5e38 11631 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11632
81ecdfbb 11633$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11634
97bf5e38 11635 fi
81ecdfbb
RW
11636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11637$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11638
81ecdfbb
RW
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11640$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11641 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11642 $as_echo_n "(cached) " >&6
c906108c 11643else
81ecdfbb 11644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11645/* end confdefs.h. */
c906108c 11646
97bf5e38 11647#define _SYSCALL32
d30c5336
JK
11648/* Needed for new procfs interface on sparc-solaris. */
11649#define _STRUCTURED_PROC 1
97bf5e38 11650#include <sys/procfs.h>
bec39cab
AC
11651int
11652main ()
11653{
97bf5e38 11654prgregset_t avar
bec39cab
AC
11655 ;
11656 return 0;
11657}
11658_ACEOF
81ecdfbb 11659if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11660 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11661else
81ecdfbb 11662 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11663
c906108c 11664fi
81ecdfbb 11665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11666fi
11667
97bf5e38 11668 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11669
81ecdfbb 11670$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11671
97bf5e38 11672 fi
81ecdfbb
RW
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11674$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11675
81ecdfbb
RW
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11677$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11678 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11679 $as_echo_n "(cached) " >&6
d45fe813 11680else
81ecdfbb 11681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11682/* end confdefs.h. */
97bf5e38
MK
11683
11684#define _SYSCALL32
d30c5336
JK
11685/* Needed for new procfs interface on sparc-solaris. */
11686#define _STRUCTURED_PROC 1
97bf5e38 11687#include <sys/procfs.h>
bec39cab
AC
11688int
11689main ()
11690{
97bf5e38 11691prfpregset_t avar
bec39cab
AC
11692 ;
11693 return 0;
11694}
11695_ACEOF
81ecdfbb 11696if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11697 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11698else
81ecdfbb 11699 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11700
d45fe813 11701fi
81ecdfbb 11702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11703fi
11704
97bf5e38 11705 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11706
81ecdfbb 11707$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11708
97bf5e38 11709 fi
81ecdfbb
RW
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11711$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11712
81ecdfbb
RW
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11714$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11715 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11716 $as_echo_n "(cached) " >&6
d45fe813 11717else
81ecdfbb 11718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11719/* end confdefs.h. */
97bf5e38
MK
11720
11721#define _SYSCALL32
d30c5336
JK
11722/* Needed for new procfs interface on sparc-solaris. */
11723#define _STRUCTURED_PROC 1
97bf5e38 11724#include <sys/procfs.h>
bec39cab
AC
11725int
11726main ()
11727{
97bf5e38 11728prgregset32_t avar
bec39cab
AC
11729 ;
11730 return 0;
11731}
11732_ACEOF
81ecdfbb 11733if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11734 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11735else
81ecdfbb 11736 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11737
d45fe813 11738fi
81ecdfbb 11739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11740fi
11741
97bf5e38 11742 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11743
81ecdfbb 11744$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11745
97bf5e38 11746 fi
81ecdfbb
RW
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11748$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11749
81ecdfbb
RW
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11751$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11752 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11753 $as_echo_n "(cached) " >&6
d45fe813 11754else
81ecdfbb 11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11756/* end confdefs.h. */
97bf5e38 11757
d45fe813 11758#define _SYSCALL32
d30c5336
JK
11759/* Needed for new procfs interface on sparc-solaris. */
11760#define _STRUCTURED_PROC 1
97bf5e38 11761#include <sys/procfs.h>
bec39cab
AC
11762int
11763main ()
11764{
97bf5e38 11765lwpid_t avar
bec39cab
AC
11766 ;
11767 return 0;
11768}
11769_ACEOF
81ecdfbb 11770if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11771 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11772else
81ecdfbb 11773 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11774
d45fe813 11775fi
81ecdfbb 11776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11777fi
11778
97bf5e38 11779 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11780
81ecdfbb 11781$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11782
97bf5e38 11783 fi
81ecdfbb
RW
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11785$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11786
81ecdfbb
RW
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11788$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11789 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11790 $as_echo_n "(cached) " >&6
c906108c 11791else
81ecdfbb 11792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11793/* end confdefs.h. */
c906108c 11794
97bf5e38 11795#define _SYSCALL32
d30c5336
JK
11796/* Needed for new procfs interface on sparc-solaris. */
11797#define _STRUCTURED_PROC 1
97bf5e38 11798#include <sys/procfs.h>
bec39cab
AC
11799int
11800main ()
11801{
97bf5e38 11802psaddr_t avar
bec39cab
AC
11803 ;
11804 return 0;
11805}
11806_ACEOF
81ecdfbb 11807if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11808 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11809else
81ecdfbb 11810 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11811
c906108c 11812fi
81ecdfbb 11813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11814fi
11815
97bf5e38 11816 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11817
81ecdfbb 11818$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11819
97bf5e38 11820 fi
81ecdfbb
RW
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11822$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11823
81ecdfbb
RW
11824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11825$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11826 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11827 $as_echo_n "(cached) " >&6
c906108c 11828else
81ecdfbb 11829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11830/* end confdefs.h. */
c906108c 11831
97bf5e38 11832#define _SYSCALL32
d30c5336
JK
11833/* Needed for new procfs interface on sparc-solaris. */
11834#define _STRUCTURED_PROC 1
97bf5e38 11835#include <sys/procfs.h>
bec39cab
AC
11836int
11837main ()
11838{
97bf5e38 11839prsysent_t avar
bec39cab
AC
11840 ;
11841 return 0;
11842}
11843_ACEOF
81ecdfbb 11844if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11845 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11846else
81ecdfbb 11847 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11848
c906108c 11849fi
81ecdfbb 11850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11851fi
11852
97bf5e38 11853 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11854
81ecdfbb 11855$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11856
97bf5e38 11857 fi
81ecdfbb
RW
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11859$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11860
81ecdfbb
RW
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11862$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11863 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11864 $as_echo_n "(cached) " >&6
c906108c 11865else
81ecdfbb 11866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11867/* end confdefs.h. */
c906108c 11868
97bf5e38 11869#define _SYSCALL32
d30c5336
JK
11870/* Needed for new procfs interface on sparc-solaris. */
11871#define _STRUCTURED_PROC 1
97bf5e38 11872#include <sys/procfs.h>
bec39cab
AC
11873int
11874main ()
11875{
97bf5e38 11876pr_sigset_t avar
bec39cab
AC
11877 ;
11878 return 0;
11879}
11880_ACEOF
81ecdfbb 11881if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11882 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11883else
81ecdfbb 11884 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11885
c906108c 11886fi
81ecdfbb 11887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11888fi
11889
97bf5e38 11890 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11891
81ecdfbb 11892$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11893
97bf5e38 11894 fi
81ecdfbb
RW
11895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11896$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11897
81ecdfbb
RW
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11899$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11900 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11901 $as_echo_n "(cached) " >&6
c906108c 11902else
81ecdfbb 11903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11904/* end confdefs.h. */
c906108c 11905
97bf5e38 11906#define _SYSCALL32
d30c5336
JK
11907/* Needed for new procfs interface on sparc-solaris. */
11908#define _STRUCTURED_PROC 1
97bf5e38 11909#include <sys/procfs.h>
bec39cab
AC
11910int
11911main ()
11912{
97bf5e38 11913pr_sigaction64_t avar
bec39cab
AC
11914 ;
11915 return 0;
11916}
11917_ACEOF
81ecdfbb 11918if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11919 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11920else
81ecdfbb 11921 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11922
c906108c 11923fi
81ecdfbb 11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11925fi
11926
97bf5e38 11927 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11928
81ecdfbb 11929$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11930
97bf5e38 11931 fi
81ecdfbb
RW
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11933$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11934
81ecdfbb
RW
11935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11936$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11937 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11938 $as_echo_n "(cached) " >&6
97bf5e38 11939else
81ecdfbb 11940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11941/* end confdefs.h. */
97bf5e38
MK
11942
11943#define _SYSCALL32
d30c5336
JK
11944/* Needed for new procfs interface on sparc-solaris. */
11945#define _STRUCTURED_PROC 1
97bf5e38 11946#include <sys/procfs.h>
bec39cab
AC
11947int
11948main ()
11949{
97bf5e38 11950pr_siginfo64_t avar
bec39cab
AC
11951 ;
11952 return 0;
11953}
11954_ACEOF
81ecdfbb 11955if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11956 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11957else
81ecdfbb 11958 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11959
97bf5e38 11960fi
81ecdfbb 11961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11962fi
c906108c 11963
97bf5e38 11964 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11965
81ecdfbb 11966$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11967
97bf5e38 11968 fi
81ecdfbb
RW
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11970$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11971
11972
97bf5e38
MK
11973
11974
11975
97bf5e38 11976 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11978$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11979 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11980 $as_echo_n "(cached) " >&6
c906108c 11981else
81ecdfbb 11982 if test "$cross_compiling" = yes; then :
97bf5e38 11983 gdb_cv_prfpregset_t_broken=yes
c906108c 11984else
81ecdfbb 11985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11986/* end confdefs.h. */
97bf5e38
MK
11987#include <sys/procfs.h>
11988 int main ()
11989 {
11990 if (sizeof (prfpregset_t) == sizeof (void *))
11991 return 1;
11992 return 0;
11993 }
bec39cab 11994_ACEOF
81ecdfbb 11995if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11996 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11997else
11998 gdb_cv_prfpregset_t_broken=yes
c906108c 11999fi
81ecdfbb
RW
12000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12001 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12002fi
81ecdfbb 12003
c906108c
SS
12004fi
12005
81ecdfbb
RW
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12007$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12008 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12009
81ecdfbb 12010$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12011
97bf5e38
MK
12012 fi
12013 fi
c906108c 12014fi
c906108c 12015
bc8bcb4b 12016# Check if the compiler supports the `long long' type.
c906108c 12017
81ecdfbb
RW
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12019$as_echo_n "checking for long long support in compiler... " >&6; }
12020if test "${gdb_cv_c_long_long+set}" = set; then :
12021 $as_echo_n "(cached) " >&6
97bf5e38 12022else
81ecdfbb 12023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12024/* end confdefs.h. */
bc8bcb4b 12025extern long long foo;
bec39cab
AC
12026int
12027main ()
12028{
bc8bcb4b 12029switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12030 ;
12031 return 0;
12032}
12033_ACEOF
81ecdfbb 12034if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12035 gdb_cv_c_long_long=yes
12036else
81ecdfbb 12037 gdb_cv_c_long_long=no
97bf5e38 12038fi
81ecdfbb 12039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12040fi
81ecdfbb
RW
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12042$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12043if test $gdb_cv_c_long_long != yes; then
12044 # libdecnumber requires long long.
12045 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12046fi
12047
bc8bcb4b 12048# Check if the compiler and runtime support printing long longs.
97bf5e38 12049
81ecdfbb
RW
12050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12051$as_echo_n "checking for long long support in printf... " >&6; }
12052if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12053 $as_echo_n "(cached) " >&6
97bf5e38 12054else
81ecdfbb 12055 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12056 gdb_cv_printf_has_long_long=no
12057else
81ecdfbb 12058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12059/* end confdefs.h. */
bc8bcb4b
MK
12060$ac_includes_default
12061int
12062main ()
12063{
12064char buf[32];
97bf5e38
MK
12065 long long l = 0;
12066 l = (l << 16) + 0x0123;
12067 l = (l << 16) + 0x4567;
12068 l = (l << 16) + 0x89ab;
12069 l = (l << 16) + 0xcdef;
12070 sprintf (buf, "0x%016llx", l);
12071 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12072 ;
12073 return 0;
c906108c 12074}
bec39cab 12075_ACEOF
81ecdfbb 12076if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12077 gdb_cv_printf_has_long_long=yes
12078else
81ecdfbb 12079 gdb_cv_printf_has_long_long=no
97bf5e38 12080fi
81ecdfbb
RW
12081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12082 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12083fi
81ecdfbb 12084
97bf5e38 12085fi
81ecdfbb
RW
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12087$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12088if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12089
81ecdfbb 12090$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12091
12092fi
97bf5e38 12093
1a619819
LM
12094# Check if the compiler and runtime support printing decfloats.
12095
81ecdfbb
RW
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12097$as_echo_n "checking for decfloat support in printf... " >&6; }
12098if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12099 $as_echo_n "(cached) " >&6
1a619819 12100else
81ecdfbb 12101 if test "$cross_compiling" = yes; then :
1a619819
LM
12102 gdb_cv_printf_has_decfloat=no
12103else
81ecdfbb 12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12105/* end confdefs.h. */
12106$ac_includes_default
12107int
12108main ()
12109{
12110char buf[64];
12111 _Decimal32 d32 = 1.2345df;
12112 _Decimal64 d64 = 1.2345dd;
12113 _Decimal128 d128 = 1.2345dl;
12114 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12115 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12116 ;
12117 return 0;
12118}
12119_ACEOF
81ecdfbb 12120if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12121 gdb_cv_printf_has_decfloat=yes
12122else
81ecdfbb 12123 gdb_cv_printf_has_decfloat=no
1a619819 12124fi
81ecdfbb
RW
12125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12126 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12127fi
81ecdfbb 12128
1a619819 12129fi
81ecdfbb
RW
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12131$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12132if test $gdb_cv_printf_has_decfloat = yes; then
12133
81ecdfbb 12134$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12135
12136fi
12137
bc8bcb4b
MK
12138# Check if the compiler supports the `long double' type. We can't use
12139# AC_C_LONG_DOUBLE because that one does additional checks on the
12140# constants defined in <float.h> that fail on some systems,
12141# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12142
81ecdfbb
RW
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12144$as_echo_n "checking for long double support in compiler... " >&6; }
12145if test "${gdb_cv_c_long_double+set}" = set; then :
12146 $as_echo_n "(cached) " >&6
97bf5e38 12147else
81ecdfbb 12148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12149/* end confdefs.h. */
97bf5e38 12150long double foo;
bec39cab 12151_ACEOF
81ecdfbb 12152if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12153 gdb_cv_c_long_double=yes
97bf5e38 12154else
81ecdfbb 12155 gdb_cv_c_long_double=no
97bf5e38 12156fi
81ecdfbb 12157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12158fi
81ecdfbb
RW
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12160$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12161if test $gdb_cv_c_long_double = yes; then
c906108c 12162
81ecdfbb 12163$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12164
12165fi
12166
bc8bcb4b 12167# Check if the compiler and runtime support printing long doubles.
97bf5e38 12168
81ecdfbb
RW
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12170$as_echo_n "checking for long double support in printf... " >&6; }
12171if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12172 $as_echo_n "(cached) " >&6
97bf5e38 12173else
81ecdfbb 12174 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12175 gdb_cv_printf_has_long_double=no
12176else
81ecdfbb 12177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12178/* end confdefs.h. */
bc8bcb4b
MK
12179$ac_includes_default
12180int
12181main ()
12182{
12183char buf[16];
97bf5e38
MK
12184 long double f = 3.141592653;
12185 sprintf (buf, "%Lg", f);
12186 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12187 ;
12188 return 0;
97bf5e38 12189}
bec39cab 12190_ACEOF
81ecdfbb 12191if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12192 gdb_cv_printf_has_long_double=yes
c906108c 12193else
81ecdfbb 12194 gdb_cv_printf_has_long_double=no
c906108c 12195fi
81ecdfbb
RW
12196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12197 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12198fi
81ecdfbb 12199
c906108c 12200fi
81ecdfbb
RW
12201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12202$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12203if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12204
81ecdfbb 12205$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12206
12207fi
97bf5e38 12208
bc8bcb4b 12209# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12210
81ecdfbb
RW
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12212$as_echo_n "checking for long double support in scanf... " >&6; }
12213if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12214 $as_echo_n "(cached) " >&6
97bf5e38 12215else
81ecdfbb 12216 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12217 gdb_cv_scanf_has_long_double=no
12218else
81ecdfbb 12219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12220/* end confdefs.h. */
bc8bcb4b
MK
12221#include <stdio.h>
12222int
12223main ()
12224{
12225char *buf = "3.141592653";
97bf5e38
MK
12226 long double f = 0;
12227 sscanf (buf, "%Lg", &f);
12228 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12229 ;
12230 return 0;
97bf5e38 12231}
bec39cab 12232_ACEOF
81ecdfbb 12233if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12234 gdb_cv_scanf_has_long_double=yes
12235else
81ecdfbb 12236 gdb_cv_scanf_has_long_double=no
97bf5e38 12237fi
81ecdfbb
RW
12238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12239 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12240fi
81ecdfbb 12241
c906108c 12242fi
81ecdfbb
RW
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12244$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12245if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12246
81ecdfbb 12247$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12248
12249fi
c906108c 12250
438013df
AO
12251case ${host_os} in
12252aix*)
81ecdfbb
RW
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12254$as_echo_n "checking for -bbigtoc option... " >&6; }
12255if test "${gdb_cv_bigtoc+set}" = set; then :
12256 $as_echo_n "(cached) " >&6
438013df 12257else
bec39cab 12258
438013df
AO
12259 SAVE_LDFLAGS=$LDFLAGS
12260
12261 case $GCC in
12262 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12263 *) gdb_cv_bigtoc=-bbigtoc ;;
12264 esac
12265
12266 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12268/* end confdefs.h. */
438013df 12269
bec39cab
AC
12270int
12271main ()
12272{
438013df 12273int i;
bec39cab
AC
12274 ;
12275 return 0;
12276}
12277_ACEOF
81ecdfbb 12278if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12279
81ecdfbb
RW
12280else
12281 gdb_cv_bigtoc=
438013df 12282fi
81ecdfbb
RW
12283rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12285 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12286
bec39cab 12287fi
81ecdfbb
RW
12288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12289$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12290 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12291 ;;
12292esac
12293
38f6b338 12294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12295$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12296dynamic_list=false
12297if test "${gdb_native}" = yes; then
12298 # The dynamically loaded libthread_db needs access to symbols in the gdb
12299 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12300 # may not be supported there.
12301 old_LDFLAGS="$LDFLAGS"
12302 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12303 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12304 LDFLAGS="$LDFLAGS $RDYNAMIC"
12305 if test "${have_libpython}" = no; then
12306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12307/* end confdefs.h. */
12308
12309int
12310main ()
12311{
12312
12313 ;
12314 return 0;
12315}
12316_ACEOF
12317if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12318 dynamic_list=true
12319fi
12320rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12322 else
12323 # Workaround http://bugs.python.org/issue4434 where static
12324 # libpythonX.Y.a would get its symbols required for
12325 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12326 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12327 old_CFLAGS="$CFLAGS"
12328 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12329 old_LIBS="$LIBS"
12330 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12331 if test "$cross_compiling" = yes; then :
3bebe2f2 12332 true
f6528abd 12333else
3bebe2f2
JK
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335/* end confdefs.h. */
12336#include "${have_libpython}/Python.h"
12337int
12338main ()
12339{
12340int err;
38f6b338
JK
12341 Py_Initialize ();
12342 err = PyRun_SimpleString ("import itertools\n");
12343 Py_Finalize ();
12344 return err == 0 ? 0 : 1;
3bebe2f2
JK
12345 ;
12346 return 0;
12347}
12348_ACEOF
12349if ac_fn_c_try_run "$LINENO"; then :
12350 dynamic_list=true
12351fi
12352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12353 conftest.$ac_objext conftest.beam conftest.$ac_ext
12354fi
12355
8c1fb155 12356 LIBS="$old_LIBS"
38f6b338
JK
12357 CFLAGS="$old_CFLAGS"
12358 fi
12359 LDFLAGS="$old_LDFLAGS"
12360fi
12361if $dynamic_list; then
12362 found="-Wl,--dynamic-list"
12363 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12364else
38f6b338
JK
12365 found="-rdynamic"
12366 RDYNAMIC="-rdynamic"
f6528abd 12367fi
f6528abd 12368
38f6b338 12369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12370$as_echo "$found" >&6; }
0407b3f1 12371
f6528abd 12372
0407b3f1 12373if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12374 case ${host_os} in
c906108c 12375 solaris*)
d92419e5
JB
12376 # See if thread_db library is around for Solaris thread debugging.
12377 # Note that we must explicitly test for version 1 of the library
12378 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12379 # the same API.
81ecdfbb
RW
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12381$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12382 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12384$as_echo "yes" >&6; }
60ca704f 12385
81ecdfbb 12386$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12387
3483b318 12388 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12389 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12391$as_echo_n "checking for dlopen in -ldl... " >&6; }
12392if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12393 $as_echo_n "(cached) " >&6
c906108c 12394else
bec39cab 12395 ac_check_lib_save_LIBS=$LIBS
c906108c 12396LIBS="-ldl $LIBS"
81ecdfbb 12397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12398/* end confdefs.h. */
12399
81ecdfbb
RW
12400/* Override any GCC internal prototype to avoid an error.
12401 Use char because int might match the return type of a GCC
12402 builtin and then its argument prototype would still apply. */
bec39cab
AC
12403#ifdef __cplusplus
12404extern "C"
12405#endif
bec39cab
AC
12406char dlopen ();
12407int
12408main ()
12409{
81ecdfbb 12410return dlopen ();
bec39cab
AC
12411 ;
12412 return 0;
12413}
12414_ACEOF
81ecdfbb 12415if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12416 ac_cv_lib_dl_dlopen=yes
12417else
81ecdfbb 12418 ac_cv_lib_dl_dlopen=no
bec39cab 12419fi
81ecdfbb
RW
12420rm -f core conftest.err conftest.$ac_objext \
12421 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12422LIBS=$ac_check_lib_save_LIBS
12423fi
81ecdfbb
RW
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12425$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12426if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12427 cat >>confdefs.h <<_ACEOF
12428#define HAVE_LIBDL 1
12429_ACEOF
c906108c
SS
12430
12431 LIBS="-ldl $LIBS"
12432
c906108c
SS
12433fi
12434
f6528abd 12435 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12436 # Sun randomly tweaked the prototypes in <proc_service.h>
12437 # at one point.
81ecdfbb
RW
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12439$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12440 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12441 $as_echo_n "(cached) " >&6
c906108c 12442else
bec39cab 12443
81ecdfbb 12444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12445/* end confdefs.h. */
c906108c
SS
12446
12447 #include <proc_service.h>
12448 ps_err_e ps_pdwrite
12449 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12450
bec39cab
AC
12451int
12452main ()
12453{
12454
12455 ;
12456 return 0;
12457}
12458_ACEOF
81ecdfbb 12459if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12460 gdb_cv_proc_service_is_old=no
12461else
81ecdfbb 12462 gdb_cv_proc_service_is_old=yes
c906108c 12463fi
81ecdfbb 12464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12465
c906108c
SS
12466fi
12467
81ecdfbb
RW
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12469$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12470 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12471
81ecdfbb 12472$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12473
12474 fi
12475 else
81ecdfbb
RW
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12477$as_echo "no" >&6; }
c906108c
SS
12478 fi
12479 ;;
d92419e5 12480 aix*)
81ecdfbb
RW
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12482$as_echo_n "checking for AiX thread debugging library... " >&6; }
12483 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12484 $as_echo_n "(cached) " >&6
bec39cab 12485else
81ecdfbb 12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12487/* end confdefs.h. */
d92419e5 12488#include <sys/pthdebug.h>
bec39cab
AC
12489int
12490main ()
12491{
d92419e5
JB
12492#ifndef PTHDB_VERSION_3
12493 #error
12494 #endif
bec39cab
AC
12495 ;
12496 return 0;
12497}
12498_ACEOF
81ecdfbb 12499if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12500 gdb_cv_have_aix_thread_debug=yes
12501else
81ecdfbb 12502 gdb_cv_have_aix_thread_debug=no
d92419e5 12503fi
81ecdfbb 12504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12505fi
12506
81ecdfbb
RW
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12508$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12509 if test $gdb_cv_have_aix_thread_debug = yes; then
12510 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12511 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12512 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12513
12514 # Older versions of AIX do not provide the declaration for
12515 # the getthrds function (it appears that it was introduced
12516 # with AIX 6.x).
12517 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12518"
12519if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12520 ac_have_decl=1
12521else
12522 ac_have_decl=0
12523fi
12524
12525cat >>confdefs.h <<_ACEOF
12526#define HAVE_DECL_GETTHRDS $ac_have_decl
12527_ACEOF
12528
d92419e5
JB
12529 fi
12530 ;;
c906108c 12531 esac
bec39cab 12532
c906108c
SS
12533fi
12534
3f47be5c 12535if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12537$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12538if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12539 $as_echo_n "(cached) " >&6
bec39cab 12540else
81ecdfbb 12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12542/* end confdefs.h. */
3f47be5c 12543#include <thread_db.h>
bec39cab
AC
12544int
12545main ()
12546{
3f47be5c 12547int i = TD_NOTALLOC;
bec39cab
AC
12548 ;
12549 return 0;
12550}
12551_ACEOF
81ecdfbb 12552if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12553 gdb_cv_thread_db_h_has_td_notalloc=yes
12554else
81ecdfbb 12555 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12556
3f47be5c 12557fi
81ecdfbb 12558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12559
bec39cab 12560fi
81ecdfbb
RW
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12562$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12564$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12565if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12566 $as_echo_n "(cached) " >&6
59f80f10 12567else
81ecdfbb 12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12569/* end confdefs.h. */
12570#include <thread_db.h>
12571int
12572main ()
12573{
12574int i = TD_VERSION;
12575 ;
12576 return 0;
12577}
12578_ACEOF
81ecdfbb 12579if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12580 gdb_cv_thread_db_h_has_td_version=yes
12581else
81ecdfbb 12582 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12583
12584fi
81ecdfbb 12585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12586
12587fi
81ecdfbb
RW
12588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12589$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12591$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12592if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12593 $as_echo_n "(cached) " >&6
59f80f10 12594else
81ecdfbb 12595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12596/* end confdefs.h. */
12597#include <thread_db.h>
12598int
12599main ()
12600{
12601int i = TD_NOTLS;
12602 ;
12603 return 0;
12604}
12605_ACEOF
81ecdfbb 12606if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12607 gdb_cv_thread_db_h_has_td_notls=yes
12608else
81ecdfbb 12609 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12610
12611fi
81ecdfbb 12612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12613
12614fi
81ecdfbb
RW
12615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12616$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12617fi
12618if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12619
81ecdfbb 12620$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12621
59f80f10
DJ
12622fi
12623if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12624
81ecdfbb 12625$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12626
12627fi
12628if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12629
81ecdfbb 12630$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12631
3f47be5c
EZ
12632fi
12633
b757528f 12634if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12636$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12637if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12638 $as_echo_n "(cached) " >&6
bec39cab 12639else
81ecdfbb 12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12641/* end confdefs.h. */
b757528f 12642#include <sys/syscall.h>
bec39cab
AC
12643int
12644main ()
12645{
b757528f 12646int i = __NR_tkill;
bec39cab
AC
12647 ;
12648 return 0;
12649}
12650_ACEOF
81ecdfbb 12651if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12652 gdb_cv_sys_syscall_h_has_tkill=yes
12653else
81ecdfbb 12654 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12655
b757528f 12656fi
81ecdfbb 12657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12658
bec39cab 12659fi
81ecdfbb
RW
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12661$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12662fi
99c1d451
TT
12663if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12664 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12665if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12666
81ecdfbb 12667$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12668
99c1d451
TT
12669
12670fi
12671
b757528f
JJ
12672fi
12673
81ecdfbb
RW
12674ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12675"
12676if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12677 ac_have_decl=1
10568435 12678else
81ecdfbb 12679 ac_have_decl=0
10568435 12680fi
10568435
JK
12681
12682cat >>confdefs.h <<_ACEOF
81ecdfbb 12683#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12684_ACEOF
12685
12686
81ecdfbb
RW
12687if test "$cross_compiling" = yes; then :
12688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12689/* end confdefs.h. */
12690#include <sys/personality.h>
12691int
12692main ()
12693{
12694
12695# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12696# define ADDR_NO_RANDOMIZE 0x0040000
12697# endif
12698 /* Test the flag could be set and stays set. */
12699 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12700 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12701 return 1
12702 ;
12703 return 0;
12704}
12705_ACEOF
81ecdfbb 12706if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12707 have_personality=true
12708else
81ecdfbb 12709 have_personality=false
10568435 12710fi
81ecdfbb
RW
12711rm -f core conftest.err conftest.$ac_objext \
12712 conftest$ac_exeext conftest.$ac_ext
10568435 12713else
81ecdfbb 12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12715/* end confdefs.h. */
12716#include <sys/personality.h>
12717int
12718main ()
12719{
12720
12721# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12722# define ADDR_NO_RANDOMIZE 0x0040000
12723# endif
12724 /* Test the flag could be set and stays set. */
12725 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12726 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12727 return 1
12728 ;
12729 return 0;
12730}
12731_ACEOF
81ecdfbb 12732if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12733 have_personality=true
12734else
81ecdfbb 12735 have_personality=false
10568435 12736fi
81ecdfbb
RW
12737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12738 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12739fi
81ecdfbb 12740
10568435
JK
12741if $have_personality
12742then
12743
81ecdfbb 12744$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12745
12746fi
12747
e655c1a2
PA
12748case $host_os in
12749 go32* | *djgpp*)
12750 gdbinit=gdb.ini
12751 ;;
12752 *)
12753 gdbinit=.gdbinit
12754 ;;
12755esac
12756
12757cat >>confdefs.h <<_ACEOF
12758#define GDBINIT "$gdbinit"
12759_ACEOF
12760
12761
fb40c209 12762
f83d8a90
DE
12763# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12764# except that the argument to --with-sysroot is optional.
12765# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12766if test "x$with_sysroot" = xyes; then
12767 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12768fi
bec39cab 12769
81ecdfbb
RW
12770# Check whether --with-sysroot was given.
12771if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12772 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12773else
12774 TARGET_SYSTEM_ROOT=
12775fi
030292b7 12776
030292b7 12777
f83d8a90
DE
12778 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12779 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12780 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12781 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12782
f83d8a90
DE
12783cat >>confdefs.h <<_ACEOF
12784#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12785_ACEOF
bec39cab 12786
030292b7 12787
b14b1491 12788
f83d8a90
DE
12789
12790 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12791 if test "x$prefix" = xNONE; then
12792 test_prefix=/usr/local
12793 else
12794 test_prefix=$prefix
12795 fi
12796 else
12797 test_prefix=$exec_prefix
12798 fi
12799 value=0
12800 case ${ac_define_dir} in
12801 "${test_prefix}"|"${test_prefix}/"*|\
12802 '${exec_prefix}'|'${exec_prefix}/'*)
12803 value=1
12804 ;;
12805 esac
12806
12807cat >>confdefs.h <<_ACEOF
12808#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12809_ACEOF
030292b7
DJ
12810
12811
12812
16e7150e 12813
16e7150e 12814
81ecdfbb
RW
12815# Check whether --with-system-gdbinit was given.
12816if test "${with_system_gdbinit+set}" = set; then :
12817 withval=$with_system_gdbinit;
b14b1491
TT
12818 SYSTEM_GDBINIT=$withval
12819else
12820 SYSTEM_GDBINIT=
81ecdfbb
RW
12821fi
12822
16e7150e
JG
12823
12824 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12825 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12826 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12827 ac_define_dir=`eval echo $ac_define_dir`
12828
12829cat >>confdefs.h <<_ACEOF
12830#define SYSTEM_GDBINIT "$ac_define_dir"
12831_ACEOF
12832
12833
12834
0c4a4063 12835
b14b1491
TT
12836 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12837 if test "x$prefix" = xNONE; then
12838 test_prefix=/usr/local
12839 else
12840 test_prefix=$prefix
12841 fi
12842 else
12843 test_prefix=$exec_prefix
12844 fi
12845 value=0
12846 case ${ac_define_dir} in
12847 "${test_prefix}"|"${test_prefix}/"*|\
12848 '${exec_prefix}'|'${exec_prefix}/'*)
12849 value=1
12850 ;;
12851 esac
16e7150e 12852
b14b1491
TT
12853cat >>confdefs.h <<_ACEOF
12854#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12855_ACEOF
12856
b14b1491 12857
16e7150e 12858
0c4a4063 12859
81ecdfbb
RW
12860# Check whether --enable-werror was given.
12861if test "${enable_werror+set}" = set; then :
12862 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12863 yes | y) ERROR_ON_WARNING="yes" ;;
12864 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12865 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12866 esac
81ecdfbb
RW
12867fi
12868
094a342e 12869
a68ffae9
JK
12870# Enable -Werror by default when using gcc. Turn it off for releases.
12871if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12872 ERROR_ON_WARNING=yes
12873fi
12874
12875WERROR_CFLAGS=""
12876if test "${ERROR_ON_WARNING}" = yes ; then
12877 WERROR_CFLAGS="-Werror"
12878fi
12879
aa79a185 12880build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 12881-Wpointer-sign \
1cb5e2a4 12882-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12883-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 12884-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 12885-Wold-style-declaration -Wold-style-definition"
a3b362c4 12886
3526781e
DJ
12887# Enable -Wno-format by default when using gcc on mingw since many
12888# GCC versions complain about %I64.
12889case "${host}" in
12890 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 12891 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
12892esac
12893
81ecdfbb
RW
12894# Check whether --enable-build-warnings was given.
12895if test "${enable_build_warnings+set}" = set; then :
12896 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12897 yes) ;;
12898 no) build_warnings="-w";;
12899 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12900 build_warnings="${build_warnings} ${t}";;
12901 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12902 build_warnings="${t} ${build_warnings}";;
12903 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12904esac
d4f3574e 12905if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12906 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12907fi
81ecdfbb
RW
12908fi
12909# Check whether --enable-gdb-build-warnings was given.
12910if test "${enable_gdb_build_warnings+set}" = set; then :
12911 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12912 yes) ;;
12913 no) build_warnings="-w";;
12914 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12915 build_warnings="${build_warnings} ${t}";;
12916 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12917 build_warnings="${t} ${build_warnings}";;
12918 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12919esac
12920if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12921 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12922fi
81ecdfbb
RW
12923fi
12924WARN_CFLAGS=""
c906108c
SS
12925if test "x${build_warnings}" != x -a "x$GCC" = xyes
12926then
81ecdfbb
RW
12927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12928$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12929 # Separate out the -Werror flag as some files just cannot be
12930 # compiled with it enabled.
12931 for w in ${build_warnings}; do
12932 case $w in
12933 -Werr*) WERROR_CFLAGS=-Werror ;;
12934 *) # Check that GCC accepts it
4536bbc6
AC
12935 saved_CFLAGS="$CFLAGS"
12936 CFLAGS="$CFLAGS $w"
81ecdfbb 12937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12938/* end confdefs.h. */
4536bbc6 12939
bec39cab
AC
12940int
12941main ()
12942{
4536bbc6 12943
bec39cab
AC
12944 ;
12945 return 0;
12946}
12947_ACEOF
81ecdfbb 12948if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12949 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12950fi
81ecdfbb 12951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12952 CFLAGS="$saved_CFLAGS"
746a987d
AC
12953 esac
12954 done
81ecdfbb
RW
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12956$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12957fi
12958
12959
104c1213 12960
7a292a7a 12961# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12963$as_echo_n "checking for cygwin... " >&6; }
12964if test "${gdb_cv_os_cygwin+set}" = set; then :
12965 $as_echo_n "(cached) " >&6
bec39cab 12966else
81ecdfbb 12967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12968/* end confdefs.h. */
7a292a7a
SS
12969
12970#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12971lose
12972#endif
bec39cab 12973_ACEOF
7a292a7a 12974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 12975 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
12976 gdb_cv_os_cygwin=yes
12977else
7a292a7a
SS
12978 gdb_cv_os_cygwin=no
12979fi
12980rm -f conftest*
12981
12982fi
81ecdfbb
RW
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12984$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12985
aff38e61 12986
3eb25fda 12987SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12988case ${host} in
95cbc983
AC
12989 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12990 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12991 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12992esac
12993
12994
cd0fc7c3
SS
12995# libreadline needs libuser32.a in a cygwin environment
12996WIN32LIBS=
12997if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12998 WIN32LIBS="-luser32"
12999 case "${target}" in
13000 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13001 ;;
13002 esac
cd0fc7c3 13003fi
c906108c 13004
b4505029
MM
13005# The ser-tcp.c module requires sockets.
13006case ${host} in
13007 *mingw32*)
13008
81ecdfbb 13009$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13010
13011 WIN32LIBS="$WIN32LIBS -lws2_32"
13012 ;;
13013esac
13014
7a292a7a 13015
31d99776 13016# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13017
13018 OLD_CFLAGS=$CFLAGS
13019 OLD_LDFLAGS=$LDFLAGS
13020 OLD_LIBS=$LIBS
13021 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13022 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13023 # always want our bfd.
13024 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13025 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13026 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13027 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13028 if test "$plugins" = "yes"; then
a48b32c0
L
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13030$as_echo_n "checking for library containing dlopen... " >&6; }
13031if test "${ac_cv_search_dlopen+set}" = set; then :
13032 $as_echo_n "(cached) " >&6
13033else
13034 ac_func_search_save_LIBS=$LIBS
13035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13036/* end confdefs.h. */
13037
13038/* Override any GCC internal prototype to avoid an error.
13039 Use char because int might match the return type of a GCC
13040 builtin and then its argument prototype would still apply. */
13041#ifdef __cplusplus
13042extern "C"
13043#endif
13044char dlopen ();
13045int
13046main ()
13047{
13048return dlopen ();
13049 ;
13050 return 0;
13051}
13052_ACEOF
13053for ac_lib in '' dl; do
13054 if test -z "$ac_lib"; then
13055 ac_res="none required"
13056 else
13057 ac_res=-l$ac_lib
13058 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13059 fi
13060 if ac_fn_c_try_link "$LINENO"; then :
13061 ac_cv_search_dlopen=$ac_res
13062fi
13063rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext
13065 if test "${ac_cv_search_dlopen+set}" = set; then :
13066 break
13067fi
13068done
13069if test "${ac_cv_search_dlopen+set}" = set; then :
13070
13071else
13072 ac_cv_search_dlopen=no
13073fi
13074rm conftest.$ac_ext
13075LIBS=$ac_func_search_save_LIBS
13076fi
13077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13078$as_echo "$ac_cv_search_dlopen" >&6; }
13079ac_res=$ac_cv_search_dlopen
13080if test "$ac_res" != no; then :
13081 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13082
13083fi
13084
def63ff0
TT
13085 fi
13086 LIBS="-lbfd -liberty $intl $LIBS"
13087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13088$as_echo_n "checking for ELF support in BFD... " >&6; }
13089if test "${gdb_cv_var_elf+set}" = set; then :
13090 $as_echo_n "(cached) " >&6
31d99776 13091else
81ecdfbb 13092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13093/* end confdefs.h. */
13094#include <stdlib.h>
def63ff0
TT
13095 #include "bfd.h"
13096 #include "elf-bfd.h"
31d99776
DJ
13097
13098int
13099main ()
13100{
def63ff0 13101return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13102 ;
13103 return 0;
13104}
13105_ACEOF
81ecdfbb 13106if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13107 gdb_cv_var_elf=yes
13108else
81ecdfbb 13109 gdb_cv_var_elf=no
31d99776 13110fi
81ecdfbb
RW
13111rm -f core conftest.err conftest.$ac_objext \
13112 conftest$ac_exeext conftest.$ac_ext
31d99776 13113fi
81ecdfbb
RW
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13115$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13116 CFLAGS=$OLD_CFLAGS
13117 LDFLAGS=$OLD_LDFLAGS
13118 LIBS=$OLD_LIBS
31d99776 13119if test $gdb_cv_var_elf = yes; then
55aa24fb 13120 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 13121
81ecdfbb 13122$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13123
075ff26d
JK
13124 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13125 if test "$plugins" = "yes"; then
a48b32c0
L
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13127$as_echo_n "checking for library containing dlopen... " >&6; }
13128if test "${ac_cv_search_dlopen+set}" = set; then :
13129 $as_echo_n "(cached) " >&6
13130else
13131 ac_func_search_save_LIBS=$LIBS
13132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13133/* end confdefs.h. */
13134
13135/* Override any GCC internal prototype to avoid an error.
13136 Use char because int might match the return type of a GCC
13137 builtin and then its argument prototype would still apply. */
13138#ifdef __cplusplus
13139extern "C"
13140#endif
13141char dlopen ();
13142int
13143main ()
13144{
13145return dlopen ();
13146 ;
13147 return 0;
13148}
13149_ACEOF
13150for ac_lib in '' dl; do
13151 if test -z "$ac_lib"; then
13152 ac_res="none required"
13153 else
13154 ac_res=-l$ac_lib
13155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13156 fi
13157 if ac_fn_c_try_link "$LINENO"; then :
13158 ac_cv_search_dlopen=$ac_res
13159fi
13160rm -f core conftest.err conftest.$ac_objext \
13161 conftest$ac_exeext
13162 if test "${ac_cv_search_dlopen+set}" = set; then :
13163 break
13164fi
13165done
13166if test "${ac_cv_search_dlopen+set}" = set; then :
13167
13168else
13169 ac_cv_search_dlopen=no
13170fi
13171rm conftest.$ac_ext
13172LIBS=$ac_func_search_save_LIBS
13173fi
13174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13175$as_echo "$ac_cv_search_dlopen" >&6; }
13176ac_res=$ac_cv_search_dlopen
13177if test "$ac_res" != no; then :
13178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13179
13180fi
13181
075ff26d 13182 fi
31d99776 13183fi
31d99776 13184
4f05add4
TT
13185# Add macho support to GDB, but only if BFD includes it.
13186
13187 OLD_CFLAGS=$CFLAGS
13188 OLD_LDFLAGS=$LDFLAGS
13189 OLD_LIBS=$LIBS
13190 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13191 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13192 # always want our bfd.
13193 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13194 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13195 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13196 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13197 if test "$plugins" = "yes"; then
a48b32c0
L
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13199$as_echo_n "checking for library containing dlopen... " >&6; }
13200if test "${ac_cv_search_dlopen+set}" = set; then :
13201 $as_echo_n "(cached) " >&6
13202else
13203 ac_func_search_save_LIBS=$LIBS
13204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13205/* end confdefs.h. */
13206
13207/* Override any GCC internal prototype to avoid an error.
13208 Use char because int might match the return type of a GCC
13209 builtin and then its argument prototype would still apply. */
13210#ifdef __cplusplus
13211extern "C"
13212#endif
13213char dlopen ();
13214int
13215main ()
13216{
13217return dlopen ();
13218 ;
13219 return 0;
13220}
13221_ACEOF
13222for ac_lib in '' dl; do
13223 if test -z "$ac_lib"; then
13224 ac_res="none required"
13225 else
13226 ac_res=-l$ac_lib
13227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13228 fi
13229 if ac_fn_c_try_link "$LINENO"; then :
13230 ac_cv_search_dlopen=$ac_res
13231fi
13232rm -f core conftest.err conftest.$ac_objext \
13233 conftest$ac_exeext
13234 if test "${ac_cv_search_dlopen+set}" = set; then :
13235 break
13236fi
13237done
13238if test "${ac_cv_search_dlopen+set}" = set; then :
13239
13240else
13241 ac_cv_search_dlopen=no
13242fi
13243rm conftest.$ac_ext
13244LIBS=$ac_func_search_save_LIBS
13245fi
13246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13247$as_echo "$ac_cv_search_dlopen" >&6; }
13248ac_res=$ac_cv_search_dlopen
13249if test "$ac_res" != no; then :
13250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13251
13252fi
13253
4f05add4
TT
13254 fi
13255 LIBS="-lbfd -liberty $intl $LIBS"
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13257$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13258if test "${gdb_cv_var_macho+set}" = set; then :
13259 $as_echo_n "(cached) " >&6
13260else
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h. */
13263#include <stdlib.h>
13264 #include "bfd.h"
13265 #include "mach-o.h"
13266
13267int
13268main ()
13269{
13270return bfd_mach_o_lookup_command (NULL, 0, NULL);
13271 ;
13272 return 0;
13273}
13274_ACEOF
13275if ac_fn_c_try_link "$LINENO"; then :
13276 gdb_cv_var_macho=yes
13277else
13278 gdb_cv_var_macho=no
13279fi
13280rm -f core conftest.err conftest.$ac_objext \
13281 conftest$ac_exeext conftest.$ac_ext
13282fi
13283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13284$as_echo "$gdb_cv_var_macho" >&6; }
13285 CFLAGS=$OLD_CFLAGS
13286 LDFLAGS=$OLD_LDFLAGS
13287 LIBS=$OLD_LIBS
13288if test $gdb_cv_var_macho = yes; then
13289 CONFIG_OBS="$CONFIG_OBS machoread.o"
13290fi
13291
b2259038
TT
13292# Add SOM support to GDB, but only if BFD includes it.
13293
13294 OLD_CFLAGS=$CFLAGS
13295 OLD_LDFLAGS=$LDFLAGS
13296 OLD_LIBS=$LIBS
13297 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13298 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13299 # always want our bfd.
13300 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13301 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13302 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13303 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13304 if test "$plugins" = "yes"; then
a48b32c0
L
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13306$as_echo_n "checking for library containing dlopen... " >&6; }
13307if test "${ac_cv_search_dlopen+set}" = set; then :
13308 $as_echo_n "(cached) " >&6
13309else
13310 ac_func_search_save_LIBS=$LIBS
13311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13312/* end confdefs.h. */
13313
13314/* Override any GCC internal prototype to avoid an error.
13315 Use char because int might match the return type of a GCC
13316 builtin and then its argument prototype would still apply. */
13317#ifdef __cplusplus
13318extern "C"
13319#endif
13320char dlopen ();
13321int
13322main ()
13323{
13324return dlopen ();
13325 ;
13326 return 0;
13327}
13328_ACEOF
13329for ac_lib in '' dl; do
13330 if test -z "$ac_lib"; then
13331 ac_res="none required"
13332 else
13333 ac_res=-l$ac_lib
13334 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13335 fi
13336 if ac_fn_c_try_link "$LINENO"; then :
13337 ac_cv_search_dlopen=$ac_res
13338fi
13339rm -f core conftest.err conftest.$ac_objext \
13340 conftest$ac_exeext
13341 if test "${ac_cv_search_dlopen+set}" = set; then :
13342 break
13343fi
13344done
13345if test "${ac_cv_search_dlopen+set}" = set; then :
13346
13347else
13348 ac_cv_search_dlopen=no
13349fi
13350rm conftest.$ac_ext
13351LIBS=$ac_func_search_save_LIBS
13352fi
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13354$as_echo "$ac_cv_search_dlopen" >&6; }
13355ac_res=$ac_cv_search_dlopen
13356if test "$ac_res" != no; then :
13357 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13358
13359fi
13360
b2259038
TT
13361 fi
13362 LIBS="-lbfd -liberty $intl $LIBS"
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13364$as_echo_n "checking for SOM support in BFD... " >&6; }
13365if test "${gdb_cv_var_som+set}" = set; then :
13366 $as_echo_n "(cached) " >&6
13367else
13368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13369/* end confdefs.h. */
13370#include <stdlib.h>
13371 #include "bfd.h"
13372 #include "som.h"
13373
13374int
13375main ()
13376{
13377return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13378 ;
13379 return 0;
13380}
13381_ACEOF
13382if ac_fn_c_try_link "$LINENO"; then :
13383 gdb_cv_var_som=yes
13384else
13385 gdb_cv_var_som=no
13386fi
13387rm -f core conftest.err conftest.$ac_objext \
13388 conftest$ac_exeext conftest.$ac_ext
13389fi
13390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13391$as_echo "$gdb_cv_var_som" >&6; }
13392 CFLAGS=$OLD_CFLAGS
13393 LDFLAGS=$OLD_LDFLAGS
13394 LIBS=$OLD_LIBS
13395if test $gdb_cv_var_som = yes; then
13396 CONFIG_OBS="$CONFIG_OBS somread.o"
13397fi
13398
121ce6e5
DJ
13399# Add any host-specific objects to GDB.
13400CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13401
608e2dbb
TT
13402# If building on ELF, look for lzma support for embedded compressed debug info.
13403if test $gdb_cv_var_elf = yes; then
13404
13405# Check whether --with-lzma was given.
13406if test "${with_lzma+set}" = set; then :
13407 withval=$with_lzma;
13408else
13409 with_lzma=auto
13410fi
13411
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13413$as_echo_n "checking whether to use lzma... " >&6; }
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13415$as_echo "$with_lzma" >&6; }
13416
13417 if test "${with_lzma}" != no; then
13418
13419
13420
13421
13422
13423
13424
13425
13426 use_additional=yes
13427
13428 acl_save_prefix="$prefix"
13429 prefix="$acl_final_prefix"
13430 acl_save_exec_prefix="$exec_prefix"
13431 exec_prefix="$acl_final_exec_prefix"
13432
13433 eval additional_includedir=\"$includedir\"
13434 eval additional_libdir=\"$libdir\"
13435
13436 exec_prefix="$acl_save_exec_prefix"
13437 prefix="$acl_save_prefix"
13438
13439
13440# Check whether --with-liblzma-prefix was given.
13441if test "${with_liblzma_prefix+set}" = set; then :
13442 withval=$with_liblzma_prefix;
13443 if test "X$withval" = "Xno"; then
13444 use_additional=no
13445 else
13446 if test "X$withval" = "X"; then
13447
13448 acl_save_prefix="$prefix"
13449 prefix="$acl_final_prefix"
13450 acl_save_exec_prefix="$exec_prefix"
13451 exec_prefix="$acl_final_exec_prefix"
13452
13453 eval additional_includedir=\"$includedir\"
13454 eval additional_libdir=\"$libdir\"
13455
13456 exec_prefix="$acl_save_exec_prefix"
13457 prefix="$acl_save_prefix"
13458
13459 else
13460 additional_includedir="$withval/include"
13461 additional_libdir="$withval/lib"
13462 fi
13463 fi
13464
13465fi
13466
13467 LIBLZMA=
13468 LTLIBLZMA=
13469 INCLZMA=
13470 rpathdirs=
13471 ltrpathdirs=
13472 names_already_handled=
13473 names_next_round='lzma '
13474 while test -n "$names_next_round"; do
13475 names_this_round="$names_next_round"
13476 names_next_round=
13477 for name in $names_this_round; do
13478 already_handled=
13479 for n in $names_already_handled; do
13480 if test "$n" = "$name"; then
13481 already_handled=yes
13482 break
13483 fi
13484 done
13485 if test -z "$already_handled"; then
13486 names_already_handled="$names_already_handled $name"
13487 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13488 eval value=\"\$HAVE_LIB$uppername\"
13489 if test -n "$value"; then
13490 if test "$value" = yes; then
13491 eval value=\"\$LIB$uppername\"
13492 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13493 eval value=\"\$LTLIB$uppername\"
13494 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13495 else
13496 :
13497 fi
13498 else
13499 found_dir=
13500 found_la=
13501 found_so=
13502 found_a=
13503 if test $use_additional = yes; then
13504 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13505 found_dir="$additional_libdir"
13506 found_so="$additional_libdir/lib$name.$shlibext"
13507 if test -f "$additional_libdir/lib$name.la"; then
13508 found_la="$additional_libdir/lib$name.la"
13509 fi
13510 else
13511 if test -f "$additional_libdir/lib$name.$libext"; then
13512 found_dir="$additional_libdir"
13513 found_a="$additional_libdir/lib$name.$libext"
13514 if test -f "$additional_libdir/lib$name.la"; then
13515 found_la="$additional_libdir/lib$name.la"
13516 fi
13517 fi
13518 fi
13519 fi
13520 if test "X$found_dir" = "X"; then
13521 for x in $LDFLAGS $LTLIBLZMA; do
13522
13523 acl_save_prefix="$prefix"
13524 prefix="$acl_final_prefix"
13525 acl_save_exec_prefix="$exec_prefix"
13526 exec_prefix="$acl_final_exec_prefix"
13527 eval x=\"$x\"
13528 exec_prefix="$acl_save_exec_prefix"
13529 prefix="$acl_save_prefix"
13530
13531 case "$x" in
13532 -L*)
13533 dir=`echo "X$x" | sed -e 's/^X-L//'`
13534 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13535 found_dir="$dir"
13536 found_so="$dir/lib$name.$shlibext"
13537 if test -f "$dir/lib$name.la"; then
13538 found_la="$dir/lib$name.la"
13539 fi
13540 else
13541 if test -f "$dir/lib$name.$libext"; then
13542 found_dir="$dir"
13543 found_a="$dir/lib$name.$libext"
13544 if test -f "$dir/lib$name.la"; then
13545 found_la="$dir/lib$name.la"
13546 fi
13547 fi
13548 fi
13549 ;;
13550 esac
13551 if test "X$found_dir" != "X"; then
13552 break
13553 fi
13554 done
13555 fi
13556 if test "X$found_dir" != "X"; then
13557 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13558 if test "X$found_so" != "X"; then
13559 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13560 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13561 else
13562 haveit=
13563 for x in $ltrpathdirs; do
13564 if test "X$x" = "X$found_dir"; then
13565 haveit=yes
13566 break
13567 fi
13568 done
13569 if test -z "$haveit"; then
13570 ltrpathdirs="$ltrpathdirs $found_dir"
13571 fi
13572 if test "$hardcode_direct" = yes; then
13573 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13574 else
13575 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13576 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13577 haveit=
13578 for x in $rpathdirs; do
13579 if test "X$x" = "X$found_dir"; then
13580 haveit=yes
13581 break
13582 fi
13583 done
13584 if test -z "$haveit"; then
13585 rpathdirs="$rpathdirs $found_dir"
13586 fi
13587 else
13588 haveit=
13589 for x in $LDFLAGS $LIBLZMA; do
13590
13591 acl_save_prefix="$prefix"
13592 prefix="$acl_final_prefix"
13593 acl_save_exec_prefix="$exec_prefix"
13594 exec_prefix="$acl_final_exec_prefix"
13595 eval x=\"$x\"
13596 exec_prefix="$acl_save_exec_prefix"
13597 prefix="$acl_save_prefix"
13598
13599 if test "X$x" = "X-L$found_dir"; then
13600 haveit=yes
13601 break
13602 fi
13603 done
13604 if test -z "$haveit"; then
13605 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13606 fi
13607 if test "$hardcode_minus_L" != no; then
13608 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13609 else
13610 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13611 fi
13612 fi
13613 fi
13614 fi
13615 else
13616 if test "X$found_a" != "X"; then
13617 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13618 else
13619 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13620 fi
13621 fi
13622 additional_includedir=
13623 case "$found_dir" in
13624 */lib | */lib/)
13625 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13626 additional_includedir="$basedir/include"
13627 ;;
13628 esac
13629 if test "X$additional_includedir" != "X"; then
13630 if test "X$additional_includedir" != "X/usr/include"; then
13631 haveit=
13632 if test "X$additional_includedir" = "X/usr/local/include"; then
13633 if test -n "$GCC"; then
13634 case $host_os in
13635 linux*) haveit=yes;;
13636 esac
13637 fi
13638 fi
13639 if test -z "$haveit"; then
13640 for x in $CPPFLAGS $INCLZMA; do
13641
13642 acl_save_prefix="$prefix"
13643 prefix="$acl_final_prefix"
13644 acl_save_exec_prefix="$exec_prefix"
13645 exec_prefix="$acl_final_exec_prefix"
13646 eval x=\"$x\"
13647 exec_prefix="$acl_save_exec_prefix"
13648 prefix="$acl_save_prefix"
13649
13650 if test "X$x" = "X-I$additional_includedir"; then
13651 haveit=yes
13652 break
13653 fi
13654 done
13655 if test -z "$haveit"; then
13656 if test -d "$additional_includedir"; then
13657 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13658 fi
13659 fi
13660 fi
13661 fi
13662 fi
13663 if test -n "$found_la"; then
13664 save_libdir="$libdir"
13665 case "$found_la" in
13666 */* | *\\*) . "$found_la" ;;
13667 *) . "./$found_la" ;;
13668 esac
13669 libdir="$save_libdir"
13670 for dep in $dependency_libs; do
13671 case "$dep" in
13672 -L*)
13673 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13674 if test "X$additional_libdir" != "X/usr/lib"; then
13675 haveit=
13676 if test "X$additional_libdir" = "X/usr/local/lib"; then
13677 if test -n "$GCC"; then
13678 case $host_os in
13679 linux*) haveit=yes;;
13680 esac
13681 fi
13682 fi
13683 if test -z "$haveit"; then
13684 haveit=
13685 for x in $LDFLAGS $LIBLZMA; do
13686
13687 acl_save_prefix="$prefix"
13688 prefix="$acl_final_prefix"
13689 acl_save_exec_prefix="$exec_prefix"
13690 exec_prefix="$acl_final_exec_prefix"
13691 eval x=\"$x\"
13692 exec_prefix="$acl_save_exec_prefix"
13693 prefix="$acl_save_prefix"
13694
13695 if test "X$x" = "X-L$additional_libdir"; then
13696 haveit=yes
13697 break
13698 fi
13699 done
13700 if test -z "$haveit"; then
13701 if test -d "$additional_libdir"; then
13702 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13703 fi
13704 fi
13705 haveit=
13706 for x in $LDFLAGS $LTLIBLZMA; do
13707
13708 acl_save_prefix="$prefix"
13709 prefix="$acl_final_prefix"
13710 acl_save_exec_prefix="$exec_prefix"
13711 exec_prefix="$acl_final_exec_prefix"
13712 eval x=\"$x\"
13713 exec_prefix="$acl_save_exec_prefix"
13714 prefix="$acl_save_prefix"
13715
13716 if test "X$x" = "X-L$additional_libdir"; then
13717 haveit=yes
13718 break
13719 fi
13720 done
13721 if test -z "$haveit"; then
13722 if test -d "$additional_libdir"; then
13723 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13724 fi
13725 fi
13726 fi
13727 fi
13728 ;;
13729 -R*)
13730 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13731 if test "$enable_rpath" != no; then
13732 haveit=
13733 for x in $rpathdirs; do
13734 if test "X$x" = "X$dir"; then
13735 haveit=yes
13736 break
13737 fi
13738 done
13739 if test -z "$haveit"; then
13740 rpathdirs="$rpathdirs $dir"
13741 fi
13742 haveit=
13743 for x in $ltrpathdirs; do
13744 if test "X$x" = "X$dir"; then
13745 haveit=yes
13746 break
13747 fi
13748 done
13749 if test -z "$haveit"; then
13750 ltrpathdirs="$ltrpathdirs $dir"
13751 fi
13752 fi
13753 ;;
13754 -l*)
13755 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13756 ;;
13757 *.la)
13758 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13759 ;;
13760 *)
13761 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13762 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13763 ;;
13764 esac
13765 done
13766 fi
13767 else
13768 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13769 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13770 fi
13771 fi
13772 fi
13773 done
13774 done
13775 if test "X$rpathdirs" != "X"; then
13776 if test -n "$hardcode_libdir_separator"; then
13777 alldirs=
13778 for found_dir in $rpathdirs; do
13779 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13780 done
13781 acl_save_libdir="$libdir"
13782 libdir="$alldirs"
13783 eval flag=\"$hardcode_libdir_flag_spec\"
13784 libdir="$acl_save_libdir"
13785 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13786 else
13787 for found_dir in $rpathdirs; do
13788 acl_save_libdir="$libdir"
13789 libdir="$found_dir"
13790 eval flag=\"$hardcode_libdir_flag_spec\"
13791 libdir="$acl_save_libdir"
13792 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13793 done
13794 fi
13795 fi
13796 if test "X$ltrpathdirs" != "X"; then
13797 for found_dir in $ltrpathdirs; do
13798 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13799 done
13800 fi
13801
13802
13803 ac_save_CPPFLAGS="$CPPFLAGS"
13804
13805 for element in $INCLZMA; do
13806 haveit=
13807 for x in $CPPFLAGS; do
13808
13809 acl_save_prefix="$prefix"
13810 prefix="$acl_final_prefix"
13811 acl_save_exec_prefix="$exec_prefix"
13812 exec_prefix="$acl_final_exec_prefix"
13813 eval x=\"$x\"
13814 exec_prefix="$acl_save_exec_prefix"
13815 prefix="$acl_save_prefix"
13816
13817 if test "X$x" = "X$element"; then
13818 haveit=yes
13819 break
13820 fi
13821 done
13822 if test -z "$haveit"; then
13823 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13824 fi
13825 done
13826
13827
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13829$as_echo_n "checking for liblzma... " >&6; }
13830if test "${ac_cv_liblzma+set}" = set; then :
13831 $as_echo_n "(cached) " >&6
13832else
13833
13834 ac_save_LIBS="$LIBS"
13835 LIBS="$LIBS $LIBLZMA"
13836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13837/* end confdefs.h. */
13838#include "lzma.h"
13839int
13840main ()
13841{
13842lzma_index_iter iter;
13843 lzma_index_iter_init (&iter, 0);
13844 lzma_mf_is_supported (LZMA_MF_HC3);
13845 ;
13846 return 0;
13847}
13848_ACEOF
13849if ac_fn_c_try_link "$LINENO"; then :
13850 ac_cv_liblzma=yes
13851else
13852 ac_cv_liblzma=no
13853fi
13854rm -f core conftest.err conftest.$ac_objext \
13855 conftest$ac_exeext conftest.$ac_ext
13856 LIBS="$ac_save_LIBS"
13857
13858fi
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13860$as_echo "$ac_cv_liblzma" >&6; }
13861 if test "$ac_cv_liblzma" = yes; then
13862 HAVE_LIBLZMA=yes
13863
13864$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13865
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13867$as_echo_n "checking how to link with liblzma... " >&6; }
13868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13869$as_echo "$LIBLZMA" >&6; }
13870 else
13871 HAVE_LIBLZMA=no
13872 CPPFLAGS="$ac_save_CPPFLAGS"
13873 LIBLZMA=
13874 LTLIBLZMA=
13875 fi
13876
13877
13878
13879
13880
13881
13882 if test "$HAVE_LIBLZMA" != yes; then
13883 if test "$with_lzma" = yes; then
13884 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13885 fi
13886 fi
13887 fi
13888fi
13889
3fc11d3e
JM
13890LIBGUI="../libgui/src/libgui.a"
13891GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13892
13893
7a292a7a 13894
3fc11d3e
JM
13895WIN32LDAPP=
13896
13897
13898
d91670b9 13899case "${host}" in
686a5eed 13900*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13901 configdir="win"
13902 ;;
13903*)
13904 configdir="unix"
13905 ;;
13906esac
3fc11d3e
JM
13907
13908GDBTKLIBS=
13909if test "${enable_gdbtk}" = "yes"; then
13910
d1c3b63a
KS
13911 # Gdbtk must have an absolute path to srcdir in order to run
13912 # properly when not installed.
13913 here=`pwd`
13914 cd ${srcdir}
13915 GDBTK_SRC_DIR=`pwd`
13916 cd $here
13917
bec39cab 13918
5062cc19
KS
13919 #
13920 # Ok, lets find the tcl configuration
13921 # First, look for one uninstalled.
13922 # the alternative search directory is invoked by --with-tcl
13923 #
3fc11d3e 13924
5062cc19
KS
13925 if test x"${no_tcl}" = x ; then
13926 # we reset no_tcl in case something fails here
13927 no_tcl=true
bec39cab 13928
81ecdfbb
RW
13929# Check whether --with-tcl was given.
13930if test "${with_tcl+set}" = set; then :
13931 withval=$with_tcl; with_tclconfig=${withval}
13932fi
13933
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13935$as_echo_n "checking for Tcl configuration... " >&6; }
13936 if test "${ac_cv_c_tclconfig+set}" = set; then :
13937 $as_echo_n "(cached) " >&6
3fc11d3e 13938else
bec39cab 13939
3fc11d3e 13940
5062cc19
KS
13941 # First check to see if --with-tcl was specified.
13942 case "${host}" in
13943 *-*-cygwin*) platDir="win" ;;
13944 *) platDir="unix" ;;
13945 esac
13946 if test x"${with_tclconfig}" != x ; then
13947 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13948 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13949 else
81ecdfbb 13950 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13951 fi
13952 fi
13953
13954 # then check for a private Tcl installation
13955 if test x"${ac_cv_c_tclconfig}" = x ; then
13956 for i in \
13957 ../tcl \
13958 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13959 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13960 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13961 ../../tcl \
13962 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13963 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13964 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13965 ../../../tcl \
13966 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13967 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13968 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13969 if test -f "$i/$platDir/tclConfig.sh" ; then
13970 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13971 break
13972 fi
13973 done
13974 fi
13975
13976 # on Darwin, check in Framework installation locations
13977 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13978 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13979 `ls -d /Library/Frameworks 2>/dev/null` \
13980 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13981 `ls -d /System/Library/Frameworks 2>/dev/null` \
13982 ; do
13983 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13984 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13985 break
13986 fi
13987 done
13988 fi
13989
13990 # check in a few common install locations
13991 if test x"${ac_cv_c_tclconfig}" = x ; then
13992 for i in `ls -d ${libdir} 2>/dev/null` \
13993 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13994 `ls -d ${prefix}/lib 2>/dev/null` \
13995 `ls -d /usr/local/lib 2>/dev/null` \
13996 `ls -d /usr/contrib/lib 2>/dev/null` \
13997 `ls -d /usr/lib 2>/dev/null` \
13998 ; do
13999 if test -f "$i/tclConfig.sh" ; then
14000 ac_cv_c_tclconfig=`(cd $i; pwd)`
14001 break
14002 fi
14003 done
14004 fi
3fc11d3e 14005
5062cc19
KS
14006 # check in a few other private locations
14007 if test x"${ac_cv_c_tclconfig}" = x ; then
14008 for i in \
14009 ${srcdir}/../tcl \
14010 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14011 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14012 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14013 if test -f "$i/$platDir/tclConfig.sh" ; then
14014 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14015 break
14016 fi
14017 done
14018 fi
bec39cab 14019
3fc11d3e
JM
14020fi
14021
5062cc19
KS
14022
14023 if test x"${ac_cv_c_tclconfig}" = x ; then
14024 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14026$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14027 else
14028 no_tcl=
14029 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14031$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14032 fi
14033 fi
3fc11d3e 14034
bec39cab 14035
85541719
DE
14036 # If $no_tk is nonempty, then we can't do Tk, and there is no
14037 # point to doing Tcl.
bec39cab 14038
5062cc19
KS
14039 #
14040 # Ok, lets find the tk configuration
14041 # First, look for one uninstalled.
14042 # the alternative search directory is invoked by --with-tk
14043 #
3fc11d3e 14044
5062cc19
KS
14045 if test x"${no_tk}" = x ; then
14046 # we reset no_tk in case something fails here
14047 no_tk=true
bec39cab 14048
81ecdfbb
RW
14049# Check whether --with-tk was given.
14050if test "${with_tk+set}" = set; then :
14051 withval=$with_tk; with_tkconfig=${withval}
14052fi
14053
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14055$as_echo_n "checking for Tk configuration... " >&6; }
14056 if test "${ac_cv_c_tkconfig+set}" = set; then :
14057 $as_echo_n "(cached) " >&6
bec39cab 14058else
3fc11d3e
JM
14059
14060
5062cc19
KS
14061 # First check to see if --with-tkconfig was specified.
14062 if test x"${with_tkconfig}" != x ; then
14063 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14064 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14065 else
81ecdfbb 14066 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14067 fi
14068 fi
3fc11d3e 14069
5062cc19
KS
14070 # then check for a private Tk library
14071 case "${host}" in
14072 *-*-cygwin*) platDir="win" ;;
14073 *) platDir="unix" ;;
14074 esac
14075 if test x"${ac_cv_c_tkconfig}" = x ; then
14076 for i in \
14077 ../tk \
14078 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14079 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14080 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14081 ../../tk \
14082 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14083 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14084 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14085 ../../../tk \
14086 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14087 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14088 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14089 if test -f "$i/$platDir/tkConfig.sh" ; then
14090 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14091 break
14092 fi
14093 done
14094 fi
14095
14096 # on Darwin, check in Framework installation locations
14097 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14098 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14099 `ls -d /Library/Frameworks 2>/dev/null` \
14100 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14101 `ls -d /System/Library/Frameworks 2>/dev/null` \
14102 ; do
14103 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14104 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14105 break
14106 fi
14107 done
14108 fi
14109
14110 # check in a few common install locations
14111 if test x"${ac_cv_c_tkconfig}" = x ; then
14112 for i in `ls -d ${libdir} 2>/dev/null` \
14113 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14114 `ls -d ${prefix}/lib 2>/dev/null` \
14115 `ls -d /usr/local/lib 2>/dev/null` \
14116 `ls -d /usr/contrib/lib 2>/dev/null` \
14117 `ls -d /usr/lib 2>/dev/null` \
14118 ; do
14119 if test -f "$i/tkConfig.sh" ; then
14120 ac_cv_c_tkconfig=`(cd $i; pwd)`
14121 break
14122 fi
14123 done
14124 fi
14125 # check in a few other private locations
14126 if test x"${ac_cv_c_tkconfig}" = x ; then
14127 for i in \
14128 ${srcdir}/../tk \
14129 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14130 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14131 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14132 if test -f "$i/$platDir/tkConfig.sh" ; then
14133 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14134 break
14135 fi
14136 done
14137 fi
3fc11d3e 14138
3fc11d3e
JM
14139fi
14140
14141
5062cc19
KS
14142 if test x"${ac_cv_c_tkconfig}" = x ; then
14143 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14145$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14146 else
14147 no_tk=
14148 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14150$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14151 fi
3fc11d3e 14152 fi
dd2504ab 14153
dd2504ab 14154
85541719
DE
14155 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14156
81ecdfbb
RW
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14158$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14159
14160 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14162$as_echo "loading" >&6; }
85541719
DE
14163 . ${TCL_BIN_DIR}/tclConfig.sh
14164 else
81ecdfbb
RW
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14166$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14167 fi
14168
14169 # eval is required to do the TCL_DBGX substitution
14170 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14171 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14172
14173 # If the TCL_BIN_DIR is the build directory (not the install directory),
14174 # then set the common variable name to the value of the build variables.
14175 # For example, the variable TCL_LIB_SPEC will be set to the value
14176 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14177 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14178 # installed and uninstalled version of Tcl.
14179 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14180 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14181 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14182 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14183 elif test "`uname -s`" = "Darwin"; then
14184 # If Tcl was built as a framework, attempt to use the libraries
14185 # from the framework at the given location so that linking works
a68ffae9 14186 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14187 case ${TCL_DEFS} in
14188 *TCL_FRAMEWORK*)
14189 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14190 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14191 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14192 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14193 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14194 break
14195 fi
14196 done
14197 fi
14198 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14199 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14200 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14201 fi
14202 ;;
14203 esac
14204 fi
14205
14206 # eval is required to do the TCL_DBGX substitution
14207 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14208 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14209 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14210 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226 # Check for in-tree tcl
14227 here=`pwd`
14228 cd ${srcdir}/..
14229 topdir=`pwd`
14230 cd ${here}
14231
14232 intree="no"
14233 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14234 intree="yes"
14235 fi
14236
14237 # Find Tcl private headers
14238 if test x"${intree}" = xno; then
14239
81ecdfbb
RW
14240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14241$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14242 private_dir=""
14243 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14244 if test -f ${dir}/tclInt.h ; then
14245 private_dir=${dir}
14246 fi
14247
14248 if test x"${private_dir}" = x; then
81ecdfbb 14249 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14250 else
14251 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14253$as_echo "${private_dir}" >&6; }
85541719
DE
14254 fi
14255
14256 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14257 TCL_LIBRARY="${TCL_LIB_SPEC}"
14258 TCL_DEPS=""
14259 else
14260 # If building tcl in the same src tree, private headers
14261 # are not needed, but we need to be sure to use the right
14262 # headers library
14263 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14264 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14265 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14266 fi
14267
14268
14269
14270
14271
81ecdfbb
RW
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14273$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14274
5062cc19 14275 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14277$as_echo "loading" >&6; }
5062cc19 14278 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14279 else
81ecdfbb
RW
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14281$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14282 fi
bec39cab 14283
5062cc19
KS
14284 # eval is required to do the TK_DBGX substitution
14285 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14286 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14287
14288 # If the TK_BIN_DIR is the build directory (not the install directory),
14289 # then set the common variable name to the value of the build variables.
14290 # For example, the variable TK_LIB_SPEC will be set to the value
14291 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14292 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14293 # installed and uninstalled version of Tcl.
85541719 14294 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14295 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14296 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14297 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14298 elif test "`uname -s`" = "Darwin"; then
14299 # If Tk was built as a framework, attempt to use the libraries
14300 # from the framework at the given location so that linking works
a68ffae9 14301 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14302 case ${TK_DEFS} in
14303 *TK_FRAMEWORK*)
85541719 14304 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14305 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14306 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14307 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14308 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14309 break
14310 fi
14311 done
14312 fi
85541719 14313 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14314 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14315 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14316 fi
14317 ;;
14318 esac
3fc11d3e
JM
14319 fi
14320
5062cc19
KS
14321 # eval is required to do the TK_DBGX substitution
14322 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14323 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14324 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14325 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14326
3fc11d3e
JM
14327
14328
bec39cab
AC
14329
14330
14331
14332
14333
14334
14335
3fc11d3e 14336
3fc11d3e 14337
bec39cab 14338
bec39cab 14339
85541719
DE
14340 # Check for in-tree Tk
14341 intree="no"
14342 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14343 intree="yes"
14344 fi
3fc11d3e 14345
85541719
DE
14346 # Find Tk private headers
14347 if test x"${intree}" = xno; then
3fc11d3e 14348
81ecdfbb
RW
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14350$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14351 private_dir=""
14352 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14353 if test -f ${dir}/tkInt.h; then
14354 private_dir=${dir}
3fc11d3e 14355 fi
bec39cab 14356
5062cc19 14357 if test x"${private_dir}" = x; then
81ecdfbb 14358 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14359 else
5062cc19 14360 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14362$as_echo "${private_dir}" >&6; }
3fc11d3e 14363 fi
3fc11d3e 14364
85541719
DE
14365 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14366 TK_LIBRARY=${TK_LIB_SPEC}
14367 TK_DEPS=""
14368 else
14369 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14370 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14371 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14372 fi
3fc11d3e
JM
14373
14374
3fc11d3e
JM
14375
14376
3fc11d3e 14377
85541719 14378 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14379
85541719
DE
14380 # Include some libraries that Tcl and Tk want.
14381 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14382 # Yes, the ordering seems wrong here. But it isn't.
14383 # TK_LIBS is the list of libraries that need to be linked
14384 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14385 # were in LIBS then any link tests after this point would
14386 # try to include things like `$(LIBGUI)', which wouldn't work.
14387 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14388
85541719
DE
14389 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14390 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14391 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14392 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14393 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14394 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14395 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14396
85541719
DE
14397 if test x$gdb_cv_os_cygwin = xyes; then
14398 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14399 WIN32LDAPP="-Wl,--subsystem,console"
14400 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14401 fi
ffc6a242 14402
81ecdfbb 14403 subdirs="$subdirs gdbtk"
3ace7edb 14404
85541719 14405 fi
3fc11d3e
JM
14406fi
14407
14408
14409
14410
14411
14412
14413
14414
81ecdfbb
RW
14415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14416$as_echo_n "checking for X... " >&6; }
bec39cab 14417
c906108c 14418
81ecdfbb
RW
14419# Check whether --with-x was given.
14420if test "${with_x+set}" = set; then :
14421 withval=$with_x;
14422fi
c906108c
SS
14423
14424# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14425if test "x$with_x" = xno; then
14426 # The user explicitly disabled X.
14427 have_x=disabled
14428else
81ecdfbb
RW
14429 case $x_includes,$x_libraries in #(
14430 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14431 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14432 $as_echo_n "(cached) " >&6
c906108c
SS
14433else
14434 # One or both of the vars are not set, and there is no cached value.
bec39cab 14435ac_x_includes=no ac_x_libraries=no
81ecdfbb 14436rm -f -r conftest.dir
bec39cab
AC
14437if mkdir conftest.dir; then
14438 cd conftest.dir
bec39cab 14439 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14440incroot:
14441 @echo incroot='${INCROOT}'
14442usrlibdir:
14443 @echo usrlibdir='${USRLIBDIR}'
14444libdir:
14445 @echo libdir='${LIBDIR}'
14446_ACEOF
14447 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14448 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14449 for ac_var in incroot usrlibdir libdir; do
14450 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14451 done
c906108c 14452 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14453 for ac_extension in a so sl dylib la dll; do
14454 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14455 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14456 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14457 fi
14458 done
14459 # Screen out bogus values from the imake configuration. They are
14460 # bogus both because they are the default anyway, and because
14461 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14462 case $ac_im_incroot in
81ecdfbb 14463 /usr/include) ac_x_includes= ;;
bec39cab 14464 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14465 esac
bec39cab 14466 case $ac_im_usrlibdir in
81ecdfbb 14467 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14468 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14469 esac
14470 fi
14471 cd ..
81ecdfbb 14472 rm -f -r conftest.dir
c906108c
SS
14473fi
14474
bec39cab
AC
14475# Standard set of common directories for X headers.
14476# Check X11 before X11Rn because it is often a symlink to the current release.
14477ac_x_header_dirs='
14478/usr/X11/include
81ecdfbb 14479/usr/X11R7/include
bec39cab
AC
14480/usr/X11R6/include
14481/usr/X11R5/include
14482/usr/X11R4/include
14483
14484/usr/include/X11
81ecdfbb 14485/usr/include/X11R7
bec39cab
AC
14486/usr/include/X11R6
14487/usr/include/X11R5
14488/usr/include/X11R4
14489
14490/usr/local/X11/include
81ecdfbb 14491/usr/local/X11R7/include
bec39cab
AC
14492/usr/local/X11R6/include
14493/usr/local/X11R5/include
14494/usr/local/X11R4/include
14495
14496/usr/local/include/X11
81ecdfbb 14497/usr/local/include/X11R7
bec39cab
AC
14498/usr/local/include/X11R6
14499/usr/local/include/X11R5
14500/usr/local/include/X11R4
14501
14502/usr/X386/include
14503/usr/x386/include
14504/usr/XFree86/include/X11
14505
14506/usr/include
14507/usr/local/include
14508/usr/unsupported/include
14509/usr/athena/include
14510/usr/local/x11r5/include
14511/usr/lpp/Xamples/include
14512
14513/usr/openwin/include
14514/usr/openwin/share/include'
14515
14516if test "$ac_x_includes" = no; then
81ecdfbb 14517 # Guess where to find include files, by looking for Xlib.h.
c906108c 14518 # First, try using that file with no special directory specified.
81ecdfbb 14519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14520/* end confdefs.h. */
81ecdfbb 14521#include <X11/Xlib.h>
bec39cab 14522_ACEOF
81ecdfbb 14523if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14524 # We can compile using X headers with no special include directory.
14525ac_x_includes=
14526else
bec39cab 14527 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14528 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14529 ac_x_includes=$ac_dir
14530 break
14531 fi
14532done
c906108c 14533fi
bec39cab
AC
14534rm -f conftest.err conftest.$ac_ext
14535fi # $ac_x_includes = no
c906108c 14536
bec39cab 14537if test "$ac_x_libraries" = no; then
c906108c 14538 # Check for the libraries.
c906108c
SS
14539 # See if we find them without any special options.
14540 # Don't add to $LIBS permanently.
bec39cab 14541 ac_save_LIBS=$LIBS
81ecdfbb
RW
14542 LIBS="-lX11 $LIBS"
14543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14544/* end confdefs.h. */
81ecdfbb 14545#include <X11/Xlib.h>
bec39cab
AC
14546int
14547main ()
14548{
81ecdfbb 14549XrmInitialize ()
bec39cab
AC
14550 ;
14551 return 0;
14552}
14553_ACEOF
81ecdfbb 14554if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14555 LIBS=$ac_save_LIBS
c906108c
SS
14556# We can link X programs with no special library path.
14557ac_x_libraries=
14558else
81ecdfbb
RW
14559 LIBS=$ac_save_LIBS
14560for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14561do
bec39cab 14562 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14563 for ac_extension in a so sl dylib la dll; do
14564 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14565 ac_x_libraries=$ac_dir
14566 break 2
14567 fi
14568 done
14569done
14570fi
81ecdfbb
RW
14571rm -f core conftest.err conftest.$ac_objext \
14572 conftest$ac_exeext conftest.$ac_ext
bec39cab 14573fi # $ac_x_libraries = no
c906108c 14574
81ecdfbb
RW
14575case $ac_x_includes,$ac_x_libraries in #(
14576 no,* | *,no | *\'*)
14577 # Didn't find X, or a directory has "'" in its name.
14578 ac_cv_have_x="have_x=no";; #(
14579 *)
14580 # Record where we found X for the cache.
14581 ac_cv_have_x="have_x=yes\
14582 ac_x_includes='$ac_x_includes'\
14583 ac_x_libraries='$ac_x_libraries'"
14584esac
c906108c 14585fi
81ecdfbb
RW
14586;; #(
14587 *) have_x=yes;;
14588 esac
c906108c
SS
14589 eval "$ac_cv_have_x"
14590fi # $with_x != no
14591
14592if test "$have_x" != yes; then
81ecdfbb
RW
14593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14594$as_echo "$have_x" >&6; }
c906108c
SS
14595 no_x=yes
14596else
14597 # If each of the values was on the command line, it overrides each guess.
14598 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14599 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14600 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14601 ac_cv_have_x="have_x=yes\
14602 ac_x_includes='$x_includes'\
14603 ac_x_libraries='$x_libraries'"
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14605$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14606fi
14607
14608
bec39cab 14609# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14610# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14611# This code just checks for a few cases where we'd like to ignore those
14612# definitions, even when they're present in the '.mt' file. These cases
14613# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14614# not part of the source tree.
7a292a7a 14615#
81ecdfbb
RW
14616# Check whether --enable-sim was given.
14617if test "${enable_sim+set}" = set; then :
14618 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14619 echo "enableval = ${enableval}";
14620 case "${enableval}" in
14621 yes) ignore_sim=false ;;
14622 no) ignore_sim=true ;;
14623 *) ignore_sim=false ;;
14624 esac
14625else
14626 ignore_sim=false
81ecdfbb
RW
14627fi
14628
7a292a7a
SS
14629
14630if test ! -d "${srcdir}/../sim"; then
14631 ignore_sim=true
14632fi
14633
9b624dbe
UW
14634SIM=
14635SIM_OBS=
14636if test "${ignore_sim}" = "false"; then
14637 if test x"${gdb_sim}" != x ; then
14638 SIM="${gdb_sim}"
14639 SIM_OBS="remote-sim.o"
60ca704f 14640
81ecdfbb 14641$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14642
9b624dbe 14643 fi
7a292a7a
SS
14644fi
14645
14646
14647
c906108c
SS
14648
14649
14650
14651
14652
14653
dfcd3bfb 14654
e56ac5c3
AC
14655
14656
b3a90332
AC
14657
14658
c35f4ffc 14659# List of host floatformats.
bec39cab
AC
14660
14661cat >>confdefs.h <<_ACEOF
c35f4ffc 14662#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14663_ACEOF
c35f4ffc 14664
bec39cab
AC
14665
14666cat >>confdefs.h <<_ACEOF
c35f4ffc 14667#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14668_ACEOF
14669
c35f4ffc 14670
bec39cab 14671cat >>confdefs.h <<_ACEOF
c35f4ffc 14672#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14673_ACEOF
c35f4ffc
AC
14674
14675
c906108c
SS
14676# target_subdir is used by the testsuite to find the target libraries.
14677target_subdir=
14678if test "${host}" != "${target}"; then
14679 target_subdir="${target_alias}/"
14680fi
14681
14682
14683frags=
771b4502 14684if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14685 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14686 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14687 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14688 fi
14689 frags="$frags $host_makefile_frag"
14690else
14691 host_makefile_frag=/dev/null
c906108c 14692fi
c906108c 14693
c906108c
SS
14694
14695
14696
771b4502 14697if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14698# We pick this up from the host configuration file (.mh) because we
14699# do not have a native configuration Makefile fragment.
c906108c
SS
14700nativefile=`sed -n '
14701s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14702' ${host_makefile_frag}`
c906108c
SS
14703fi
14704
14705
b00a8037 14706if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14707
14708cat >>confdefs.h <<_ACEOF
b00a8037 14709#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14710_ACEOF
b00a8037
DJ
14711
14712fi
14713
8dcde887 14714# Enable multi-ice-gdb-server.
81ecdfbb
RW
14715# Check whether --enable-multi-ice was given.
14716if test "${enable_multi_ice+set}" = set; then :
14717 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14718 yes | no)
14719 ;;
81ecdfbb 14720 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14721 esac
81ecdfbb 14722fi
b4e70030 14723
81ecdfbb
RW
14724if test "x$enable_multi_ice" = xyes; then
14725 subdirs="$subdirs multi-ice"
3ace7edb 14726
a85f51e7
DJ
14727fi
14728
496c0e1b
JB
14729# Check whether --enable-gdbserver was given.
14730if test "${enable_gdbserver+set}" = set; then :
14731 enableval=$enable_gdbserver; case "${enableval}" in
14732 yes| no|auto) ;;
14733 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14734esac
14735else
14736 enable_gdbserver=auto
14737fi
14738
14739
14740# We only build gdbserver automatically in a native configuration, and
14741# only if the user did not explicitly disable its build.
14742if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14744$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14745 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14747$as_echo "yes" >&6; }
14748 subdirs="$subdirs gdbserver"
3ace7edb 14749
496c0e1b 14750 gdbserver_build_enabled=yes
8dcde887 14751 else
81ecdfbb
RW
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14753$as_echo "no" >&6; }
8dcde887
MK
14754 fi
14755fi
14756
496c0e1b
JB
14757# If the user explicitly request the gdbserver to be built, verify that
14758# we were in fact able to enable it.
14759if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14760 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14761fi
14762
393fd4c3
YQ
14763# Check for babeltrace and babeltrace-ctf
14764
14765# Check whether --with-babeltrace was given.
14766if test "${with_babeltrace+set}" = set; then :
14767 withval=$with_babeltrace;
14768else
14769 with_babeltrace=auto
14770fi
14771
14772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14773$as_echo_n "checking whether to use babeltrace... " >&6; }
14774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14775$as_echo "$with_babeltrace" >&6; }
14776
14777if test "x$with_babeltrace" = "xno"; then
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14779$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14780else
14781 # Append -Werror to CFLAGS so that configure can catch the warning
14782 # "assignment from incompatible pointer type", which is related to
14783 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14784 # in GDB, while babeltrace 1.0.3 is broken.
14785 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14786 # safe to save and restore CFLAGS here.
14787 saved_CFLAGS=$CFLAGS
14788 CFLAGS="$CFLAGS -Werror"
14789
14790
14791
14792
14793
14794
14795
14796
14797 use_additional=yes
14798
14799 acl_save_prefix="$prefix"
14800 prefix="$acl_final_prefix"
14801 acl_save_exec_prefix="$exec_prefix"
14802 exec_prefix="$acl_final_exec_prefix"
14803
14804 eval additional_includedir=\"$includedir\"
14805 eval additional_libdir=\"$libdir\"
14806
14807 exec_prefix="$acl_save_exec_prefix"
14808 prefix="$acl_save_prefix"
14809
14810
14811# Check whether --with-libbabeltrace-prefix was given.
14812if test "${with_libbabeltrace_prefix+set}" = set; then :
14813 withval=$with_libbabeltrace_prefix;
14814 if test "X$withval" = "Xno"; then
14815 use_additional=no
14816 else
14817 if test "X$withval" = "X"; then
14818
14819 acl_save_prefix="$prefix"
14820 prefix="$acl_final_prefix"
14821 acl_save_exec_prefix="$exec_prefix"
14822 exec_prefix="$acl_final_exec_prefix"
14823
14824 eval additional_includedir=\"$includedir\"
14825 eval additional_libdir=\"$libdir\"
14826
14827 exec_prefix="$acl_save_exec_prefix"
14828 prefix="$acl_save_prefix"
14829
14830 else
14831 additional_includedir="$withval/include"
14832 additional_libdir="$withval/lib"
14833 fi
14834 fi
14835
14836fi
14837
14838 LIBBABELTRACE=
14839 LTLIBBABELTRACE=
14840 INCBABELTRACE=
14841 rpathdirs=
14842 ltrpathdirs=
14843 names_already_handled=
14844 names_next_round='babeltrace babeltrace-ctf'
14845 while test -n "$names_next_round"; do
14846 names_this_round="$names_next_round"
14847 names_next_round=
14848 for name in $names_this_round; do
14849 already_handled=
14850 for n in $names_already_handled; do
14851 if test "$n" = "$name"; then
14852 already_handled=yes
14853 break
14854 fi
14855 done
14856 if test -z "$already_handled"; then
14857 names_already_handled="$names_already_handled $name"
14858 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14859 eval value=\"\$HAVE_LIB$uppername\"
14860 if test -n "$value"; then
14861 if test "$value" = yes; then
14862 eval value=\"\$LIB$uppername\"
14863 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14864 eval value=\"\$LTLIB$uppername\"
14865 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14866 else
14867 :
14868 fi
14869 else
14870 found_dir=
14871 found_la=
14872 found_so=
14873 found_a=
14874 if test $use_additional = yes; then
14875 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14876 found_dir="$additional_libdir"
14877 found_so="$additional_libdir/lib$name.$shlibext"
14878 if test -f "$additional_libdir/lib$name.la"; then
14879 found_la="$additional_libdir/lib$name.la"
14880 fi
14881 else
14882 if test -f "$additional_libdir/lib$name.$libext"; then
14883 found_dir="$additional_libdir"
14884 found_a="$additional_libdir/lib$name.$libext"
14885 if test -f "$additional_libdir/lib$name.la"; then
14886 found_la="$additional_libdir/lib$name.la"
14887 fi
14888 fi
14889 fi
14890 fi
14891 if test "X$found_dir" = "X"; then
14892 for x in $LDFLAGS $LTLIBBABELTRACE; do
14893
14894 acl_save_prefix="$prefix"
14895 prefix="$acl_final_prefix"
14896 acl_save_exec_prefix="$exec_prefix"
14897 exec_prefix="$acl_final_exec_prefix"
14898 eval x=\"$x\"
14899 exec_prefix="$acl_save_exec_prefix"
14900 prefix="$acl_save_prefix"
14901
14902 case "$x" in
14903 -L*)
14904 dir=`echo "X$x" | sed -e 's/^X-L//'`
14905 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14906 found_dir="$dir"
14907 found_so="$dir/lib$name.$shlibext"
14908 if test -f "$dir/lib$name.la"; then
14909 found_la="$dir/lib$name.la"
14910 fi
14911 else
14912 if test -f "$dir/lib$name.$libext"; then
14913 found_dir="$dir"
14914 found_a="$dir/lib$name.$libext"
14915 if test -f "$dir/lib$name.la"; then
14916 found_la="$dir/lib$name.la"
14917 fi
14918 fi
14919 fi
14920 ;;
14921 esac
14922 if test "X$found_dir" != "X"; then
14923 break
14924 fi
14925 done
14926 fi
14927 if test "X$found_dir" != "X"; then
14928 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14929 if test "X$found_so" != "X"; then
14930 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14931 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14932 else
14933 haveit=
14934 for x in $ltrpathdirs; do
14935 if test "X$x" = "X$found_dir"; then
14936 haveit=yes
14937 break
14938 fi
14939 done
14940 if test -z "$haveit"; then
14941 ltrpathdirs="$ltrpathdirs $found_dir"
14942 fi
14943 if test "$hardcode_direct" = yes; then
14944 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14945 else
14946 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14947 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14948 haveit=
14949 for x in $rpathdirs; do
14950 if test "X$x" = "X$found_dir"; then
14951 haveit=yes
14952 break
14953 fi
14954 done
14955 if test -z "$haveit"; then
14956 rpathdirs="$rpathdirs $found_dir"
14957 fi
14958 else
14959 haveit=
14960 for x in $LDFLAGS $LIBBABELTRACE; do
14961
14962 acl_save_prefix="$prefix"
14963 prefix="$acl_final_prefix"
14964 acl_save_exec_prefix="$exec_prefix"
14965 exec_prefix="$acl_final_exec_prefix"
14966 eval x=\"$x\"
14967 exec_prefix="$acl_save_exec_prefix"
14968 prefix="$acl_save_prefix"
14969
14970 if test "X$x" = "X-L$found_dir"; then
14971 haveit=yes
14972 break
14973 fi
14974 done
14975 if test -z "$haveit"; then
14976 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14977 fi
14978 if test "$hardcode_minus_L" != no; then
14979 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14980 else
14981 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14982 fi
14983 fi
14984 fi
14985 fi
14986 else
14987 if test "X$found_a" != "X"; then
14988 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14989 else
14990 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14991 fi
14992 fi
14993 additional_includedir=
14994 case "$found_dir" in
14995 */lib | */lib/)
14996 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14997 additional_includedir="$basedir/include"
14998 ;;
14999 esac
15000 if test "X$additional_includedir" != "X"; then
15001 if test "X$additional_includedir" != "X/usr/include"; then
15002 haveit=
15003 if test "X$additional_includedir" = "X/usr/local/include"; then
15004 if test -n "$GCC"; then
15005 case $host_os in
15006 linux*) haveit=yes;;
15007 esac
15008 fi
15009 fi
15010 if test -z "$haveit"; then
15011 for x in $CPPFLAGS $INCBABELTRACE; do
15012
15013 acl_save_prefix="$prefix"
15014 prefix="$acl_final_prefix"
15015 acl_save_exec_prefix="$exec_prefix"
15016 exec_prefix="$acl_final_exec_prefix"
15017 eval x=\"$x\"
15018 exec_prefix="$acl_save_exec_prefix"
15019 prefix="$acl_save_prefix"
15020
15021 if test "X$x" = "X-I$additional_includedir"; then
15022 haveit=yes
15023 break
15024 fi
15025 done
15026 if test -z "$haveit"; then
15027 if test -d "$additional_includedir"; then
15028 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15029 fi
15030 fi
15031 fi
15032 fi
15033 fi
15034 if test -n "$found_la"; then
15035 save_libdir="$libdir"
15036 case "$found_la" in
15037 */* | *\\*) . "$found_la" ;;
15038 *) . "./$found_la" ;;
15039 esac
15040 libdir="$save_libdir"
15041 for dep in $dependency_libs; do
15042 case "$dep" in
15043 -L*)
15044 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15045 if test "X$additional_libdir" != "X/usr/lib"; then
15046 haveit=
15047 if test "X$additional_libdir" = "X/usr/local/lib"; then
15048 if test -n "$GCC"; then
15049 case $host_os in
15050 linux*) haveit=yes;;
15051 esac
15052 fi
15053 fi
15054 if test -z "$haveit"; then
15055 haveit=
15056 for x in $LDFLAGS $LIBBABELTRACE; do
15057
15058 acl_save_prefix="$prefix"
15059 prefix="$acl_final_prefix"
15060 acl_save_exec_prefix="$exec_prefix"
15061 exec_prefix="$acl_final_exec_prefix"
15062 eval x=\"$x\"
15063 exec_prefix="$acl_save_exec_prefix"
15064 prefix="$acl_save_prefix"
15065
15066 if test "X$x" = "X-L$additional_libdir"; then
15067 haveit=yes
15068 break
15069 fi
15070 done
15071 if test -z "$haveit"; then
15072 if test -d "$additional_libdir"; then
15073 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15074 fi
15075 fi
15076 haveit=
15077 for x in $LDFLAGS $LTLIBBABELTRACE; do
15078
15079 acl_save_prefix="$prefix"
15080 prefix="$acl_final_prefix"
15081 acl_save_exec_prefix="$exec_prefix"
15082 exec_prefix="$acl_final_exec_prefix"
15083 eval x=\"$x\"
15084 exec_prefix="$acl_save_exec_prefix"
15085 prefix="$acl_save_prefix"
15086
15087 if test "X$x" = "X-L$additional_libdir"; then
15088 haveit=yes
15089 break
15090 fi
15091 done
15092 if test -z "$haveit"; then
15093 if test -d "$additional_libdir"; then
15094 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15095 fi
15096 fi
15097 fi
15098 fi
15099 ;;
15100 -R*)
15101 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15102 if test "$enable_rpath" != no; then
15103 haveit=
15104 for x in $rpathdirs; do
15105 if test "X$x" = "X$dir"; then
15106 haveit=yes
15107 break
15108 fi
15109 done
15110 if test -z "$haveit"; then
15111 rpathdirs="$rpathdirs $dir"
15112 fi
15113 haveit=
15114 for x in $ltrpathdirs; do
15115 if test "X$x" = "X$dir"; then
15116 haveit=yes
15117 break
15118 fi
15119 done
15120 if test -z "$haveit"; then
15121 ltrpathdirs="$ltrpathdirs $dir"
15122 fi
15123 fi
15124 ;;
15125 -l*)
15126 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15127 ;;
15128 *.la)
15129 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15130 ;;
15131 *)
15132 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15133 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15134 ;;
15135 esac
15136 done
15137 fi
15138 else
15139 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15140 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15141 fi
15142 fi
15143 fi
15144 done
15145 done
15146 if test "X$rpathdirs" != "X"; then
15147 if test -n "$hardcode_libdir_separator"; then
15148 alldirs=
15149 for found_dir in $rpathdirs; do
15150 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15151 done
15152 acl_save_libdir="$libdir"
15153 libdir="$alldirs"
15154 eval flag=\"$hardcode_libdir_flag_spec\"
15155 libdir="$acl_save_libdir"
15156 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15157 else
15158 for found_dir in $rpathdirs; do
15159 acl_save_libdir="$libdir"
15160 libdir="$found_dir"
15161 eval flag=\"$hardcode_libdir_flag_spec\"
15162 libdir="$acl_save_libdir"
15163 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15164 done
15165 fi
15166 fi
15167 if test "X$ltrpathdirs" != "X"; then
15168 for found_dir in $ltrpathdirs; do
15169 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15170 done
15171 fi
15172
15173
15174 ac_save_CPPFLAGS="$CPPFLAGS"
15175
15176 for element in $INCBABELTRACE; do
15177 haveit=
15178 for x in $CPPFLAGS; do
15179
15180 acl_save_prefix="$prefix"
15181 prefix="$acl_final_prefix"
15182 acl_save_exec_prefix="$exec_prefix"
15183 exec_prefix="$acl_final_exec_prefix"
15184 eval x=\"$x\"
15185 exec_prefix="$acl_save_exec_prefix"
15186 prefix="$acl_save_prefix"
15187
15188 if test "X$x" = "X$element"; then
15189 haveit=yes
15190 break
15191 fi
15192 done
15193 if test -z "$haveit"; then
15194 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15195 fi
15196 done
15197
15198
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15200$as_echo_n "checking for libbabeltrace... " >&6; }
15201if test "${ac_cv_libbabeltrace+set}" = set; then :
15202 $as_echo_n "(cached) " >&6
15203else
15204
15205 ac_save_LIBS="$LIBS"
15206 LIBS="$LIBS $LIBBABELTRACE"
15207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208/* end confdefs.h. */
15209#include <babeltrace/babeltrace.h>
15210 #include <babeltrace/ctf/events.h>
15211 #include <babeltrace/ctf/iterator.h>
15212int
15213main ()
15214{
15215struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15216 struct bt_ctf_event *event = NULL;
15217 const struct bt_definition *scope;
15218
15219 scope = bt_ctf_get_top_level_scope (event,
15220 BT_STREAM_EVENT_HEADER);
15221 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15222
15223 ;
15224 return 0;
15225}
15226_ACEOF
15227if ac_fn_c_try_link "$LINENO"; then :
15228 ac_cv_libbabeltrace=yes
15229else
15230 ac_cv_libbabeltrace=no
15231fi
15232rm -f core conftest.err conftest.$ac_objext \
15233 conftest$ac_exeext conftest.$ac_ext
15234 LIBS="$ac_save_LIBS"
15235
15236fi
15237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15238$as_echo "$ac_cv_libbabeltrace" >&6; }
15239 if test "$ac_cv_libbabeltrace" = yes; then
15240 HAVE_LIBBABELTRACE=yes
15241
15242$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15243
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15245$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15247$as_echo "$LIBBABELTRACE" >&6; }
15248 else
15249 HAVE_LIBBABELTRACE=no
15250 CPPFLAGS="$ac_save_CPPFLAGS"
15251 LIBBABELTRACE=
15252 LTLIBBABELTRACE=
15253 fi
15254
15255
15256
15257
15258
15259
15260 CFLAGS=$saved_CFLAGS
15261
15262 if test "$HAVE_LIBBABELTRACE" != yes; then
15263 if test "$with_babeltrace" = yes; then
15264 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15265 else
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15267$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15268 fi
15269 fi
15270fi
15271
db985757 15272# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15273# to an empty version.
c906108c
SS
15274
15275files=
15276links=
5a2402b8 15277
c906108c
SS
15278rm -f nm.h
15279if test "${nativefile}" != ""; then
0f475e27
AC
15280 case "${nativefile}" in
15281 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15282 * ) GDB_NM_FILE="${nativefile}"
15283 esac
5a2402b8
AC
15284 files="${files} ${GDB_NM_FILE}"
15285 links="${links} nm.h"
60ca704f
SE
15286
15287cat >>confdefs.h <<_ACEOF
b78960be 15288#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15289_ACEOF
5a2402b8 15290
c906108c 15291fi
5a2402b8
AC
15292
15293
bec39cab
AC
15294ac_sources="$files"
15295ac_dests="$links"
15296while test -n "$ac_sources"; do
15297 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15298 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15299 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15300done
81ecdfbb 15301ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15302
15303
c906108c
SS
15304
15305
c906108c 15306
81ecdfbb 15307$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15308
bec39cab 15309
b292c783
JK
15310# Undo the $ec_script escaping suitable for Makefile.
15311transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15312GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15313if test "x$GDB_TRANSFORM_NAME" = x; then
15314 GDB_TRANSFORM_NAME=gdb
15315fi
15316
15317GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15318if test "x$GCORE_TRANSFORM_NAME" = x; then
15319 GCORE_TRANSFORM_NAME=gcore
15320fi
15321
15322ac_config_files="$ac_config_files gcore"
15323
15324
c971b7fa 15325ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15326
15327ac_config_commands="$ac_config_commands default"
89a34d1b 15328
bec39cab
AC
15329cat >confcache <<\_ACEOF
15330# This file is a shell script that caches the results of configure
15331# tests run on this system so they can be shared between configure
15332# scripts and configure runs, see configure's option --config-cache.
15333# It is not useful on other systems. If it contains results you don't
15334# want to keep, you may remove or edit it.
15335#
15336# config.status only pays attention to the cache file if you give it
15337# the --recheck option to rerun configure.
15338#
15339# `ac_cv_env_foo' variables (set or unset) will be overridden when
15340# loading this file, other *unset* `ac_cv_foo' will be assigned the
15341# following values.
15342
15343_ACEOF
15344
15345# The following way of writing the cache mishandles newlines in values,
15346# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15347# So, we kill variables containing newlines.
bec39cab
AC
15348# Ultrix sh set writes to stderr and can't be redirected directly,
15349# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15350(
15351 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15352 eval ac_val=\$$ac_var
15353 case $ac_val in #(
15354 *${as_nl}*)
15355 case $ac_var in #(
15356 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15357$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15358 esac
15359 case $ac_var in #(
15360 _ | IFS | as_nl) ;; #(
15361 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15362 *) { eval $ac_var=; unset $ac_var;} ;;
15363 esac ;;
15364 esac
15365 done
15366
bec39cab 15367 (set) 2>&1 |
81ecdfbb
RW
15368 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15369 *${as_nl}ac_space=\ *)
15370 # `set' does not quote correctly, so add quotes: double-quote
15371 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15372 sed -n \
15373 "s/'/'\\\\''/g;
15374 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15375 ;; #(
bec39cab
AC
15376 *)
15377 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15378 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15379 ;;
81ecdfbb
RW
15380 esac |
15381 sort
15382) |
bec39cab 15383 sed '
81ecdfbb 15384 /^ac_cv_env_/b end
bec39cab 15385 t clear
81ecdfbb 15386 :clear
bec39cab
AC
15387 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15388 t end
81ecdfbb
RW
15389 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15390 :end' >>confcache
15391if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15392 if test -w "$cache_file"; then
15393 test "x$cache_file" != "x/dev/null" &&
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15395$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15396 cat confcache >$cache_file
15397 else
81ecdfbb
RW
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15399$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15400 fi
15401fi
15402rm -f confcache
15403
15404test "x$prefix" = xNONE && prefix=$ac_default_prefix
15405# Let make expand exec_prefix.
15406test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15407
bec39cab
AC
15408DEFS=-DHAVE_CONFIG_H
15409
15410ac_libobjs=
15411ac_ltlibobjs=
15412for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15413 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15414 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15415 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15416 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15417 # will be set to the directory where LIBOBJS objects are built.
15418 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15419 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15420done
15421LIBOBJS=$ac_libobjs
15422
15423LTLIBOBJS=$ac_ltlibobjs
15424
15425
85981d60 15426if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15427 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15428Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15429fi
a417dc56 15430if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15431 as_fn_error "conditional \"GMAKE\" was never defined.
15432Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15433fi
81ecdfbb
RW
15434
15435
bec39cab 15436: ${CONFIG_STATUS=./config.status}
81ecdfbb 15437ac_write_fail=0
bec39cab
AC
15438ac_clean_files_save=$ac_clean_files
15439ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15440{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15441$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15442as_write_fail=0
15443cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15444#! $SHELL
15445# Generated by $as_me.
15446# Run this file to recreate the current configuration.
15447# Compiler output produced by configure, useful for debugging
15448# configure, is in config.log if it exists.
15449
15450debug=false
15451ac_cs_recheck=false
15452ac_cs_silent=false
bec39cab 15453
81ecdfbb
RW
15454SHELL=\${CONFIG_SHELL-$SHELL}
15455export SHELL
15456_ASEOF
15457cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15458## -------------------- ##
15459## M4sh Initialization. ##
15460## -------------------- ##
15461
15462# Be more Bourne compatible
15463DUALCASE=1; export DUALCASE # for MKS sh
15464if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15465 emulate sh
15466 NULLCMD=:
81ecdfbb 15467 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15468 # is contrary to our usage. Disable this feature.
15469 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15470 setopt NO_GLOB_SUBST
15471else
15472 case `(set -o) 2>/dev/null` in #(
15473 *posix*) :
15474 set -o posix ;; #(
15475 *) :
15476 ;;
15477esac
bec39cab 15478fi
bec39cab 15479
81ecdfbb
RW
15480
15481as_nl='
15482'
15483export as_nl
15484# Printing a long string crashes Solaris 7 /usr/bin/printf.
15485as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15486as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15487as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15488# Prefer a ksh shell builtin over an external printf program on Solaris,
15489# but without wasting forks for bash or zsh.
15490if test -z "$BASH_VERSION$ZSH_VERSION" \
15491 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15492 as_echo='print -r --'
15493 as_echo_n='print -rn --'
15494elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15495 as_echo='printf %s\n'
15496 as_echo_n='printf %s'
15497else
15498 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15499 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15500 as_echo_n='/usr/ucb/echo -n'
15501 else
15502 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15503 as_echo_n_body='eval
15504 arg=$1;
15505 case $arg in #(
15506 *"$as_nl"*)
15507 expr "X$arg" : "X\\(.*\\)$as_nl";
15508 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15509 esac;
15510 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15511 '
15512 export as_echo_n_body
15513 as_echo_n='sh -c $as_echo_n_body as_echo'
15514 fi
15515 export as_echo_body
15516 as_echo='sh -c $as_echo_body as_echo'
15517fi
15518
15519# The user is always right.
15520if test "${PATH_SEPARATOR+set}" != set; then
15521 PATH_SEPARATOR=:
15522 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15523 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15524 PATH_SEPARATOR=';'
15525 }
bec39cab
AC
15526fi
15527
15528
81ecdfbb
RW
15529# IFS
15530# We need space, tab and new line, in precisely that order. Quoting is
15531# there to prevent editors from complaining about space-tab.
15532# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15533# splitting by setting IFS to empty value.)
15534IFS=" "" $as_nl"
15535
15536# Find who we are. Look in the path if we contain no directory separator.
15537case $0 in #((
15538 *[\\/]* ) as_myself=$0 ;;
15539 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15540for as_dir in $PATH
15541do
15542 IFS=$as_save_IFS
15543 test -z "$as_dir" && as_dir=.
15544 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15545 done
15546IFS=$as_save_IFS
15547
15548 ;;
15549esac
15550# We did not find ourselves, most probably we were run as `sh COMMAND'
15551# in which case we are not to be found in the path.
15552if test "x$as_myself" = x; then
15553 as_myself=$0
15554fi
15555if test ! -f "$as_myself"; then
15556 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15557 exit 1
15558fi
15559
15560# Unset variables that we do not need and which cause bugs (e.g. in
15561# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15562# suppresses any "Segmentation fault" message there. '((' could
15563# trigger a bug in pdksh 5.2.14.
15564for as_var in BASH_ENV ENV MAIL MAILPATH
15565do eval test x\${$as_var+set} = xset \
15566 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15567done
bec39cab
AC
15568PS1='$ '
15569PS2='> '
15570PS4='+ '
15571
15572# NLS nuisances.
81ecdfbb
RW
15573LC_ALL=C
15574export LC_ALL
15575LANGUAGE=C
15576export LANGUAGE
15577
15578# CDPATH.
15579(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15580
15581
15582# as_fn_error ERROR [LINENO LOG_FD]
15583# ---------------------------------
15584# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15585# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15586# script with status $?, using 1 if that was 0.
15587as_fn_error ()
15588{
15589 as_status=$?; test $as_status -eq 0 && as_status=1
15590 if test "$3"; then
15591 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15592 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15593 fi
15594 $as_echo "$as_me: error: $1" >&2
15595 as_fn_exit $as_status
15596} # as_fn_error
15597
15598
15599# as_fn_set_status STATUS
15600# -----------------------
15601# Set $? to STATUS, without forking.
15602as_fn_set_status ()
15603{
15604 return $1
15605} # as_fn_set_status
15606
15607# as_fn_exit STATUS
15608# -----------------
15609# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15610as_fn_exit ()
15611{
15612 set +e
15613 as_fn_set_status $1
15614 exit $1
15615} # as_fn_exit
15616
15617# as_fn_unset VAR
15618# ---------------
15619# Portably unset VAR.
15620as_fn_unset ()
15621{
15622 { eval $1=; unset $1;}
15623}
15624as_unset=as_fn_unset
15625# as_fn_append VAR VALUE
15626# ----------------------
15627# Append the text in VALUE to the end of the definition contained in VAR. Take
15628# advantage of any shell optimizations that allow amortized linear growth over
15629# repeated appends, instead of the typical quadratic growth present in naive
15630# implementations.
15631if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15632 eval 'as_fn_append ()
15633 {
15634 eval $1+=\$2
15635 }'
15636else
15637 as_fn_append ()
15638 {
15639 eval $1=\$$1\$2
15640 }
15641fi # as_fn_append
15642
15643# as_fn_arith ARG...
15644# ------------------
15645# Perform arithmetic evaluation on the ARGs, and store the result in the
15646# global $as_val. Take advantage of shells that can avoid forks. The arguments
15647# must be portable across $(()) and expr.
15648if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15649 eval 'as_fn_arith ()
15650 {
15651 as_val=$(( $* ))
15652 }'
15653else
15654 as_fn_arith ()
15655 {
15656 as_val=`expr "$@" || test $? -eq 1`
15657 }
15658fi # as_fn_arith
bec39cab 15659
81ecdfbb
RW
15660
15661if expr a : '\(a\)' >/dev/null 2>&1 &&
15662 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15663 as_expr=expr
15664else
15665 as_expr=false
15666fi
15667
81ecdfbb 15668if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15669 as_basename=basename
15670else
15671 as_basename=false
15672fi
15673
81ecdfbb
RW
15674if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15675 as_dirname=dirname
15676else
15677 as_dirname=false
15678fi
bec39cab 15679
81ecdfbb 15680as_me=`$as_basename -- "$0" ||
bec39cab
AC
15681$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15682 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15683 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15684$as_echo X/"$0" |
15685 sed '/^.*\/\([^/][^/]*\)\/*$/{
15686 s//\1/
15687 q
15688 }
15689 /^X\/\(\/\/\)$/{
15690 s//\1/
15691 q
15692 }
15693 /^X\/\(\/\).*/{
15694 s//\1/
15695 q
15696 }
15697 s/.*/./; q'`
b4e70030 15698
b4e70030
JB
15699# Avoid depending upon Character Ranges.
15700as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15701as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15702as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15703as_cr_digits='0123456789'
15704as_cr_alnum=$as_cr_Letters$as_cr_digits
15705
81ecdfbb
RW
15706ECHO_C= ECHO_N= ECHO_T=
15707case `echo -n x` in #(((((
15708-n*)
15709 case `echo 'xy\c'` in
15710 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15711 xy) ECHO_C='\c';;
15712 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15713 ECHO_T=' ';;
15714 esac;;
15715*)
15716 ECHO_N='-n';;
bec39cab
AC
15717esac
15718
81ecdfbb
RW
15719rm -f conf$$ conf$$.exe conf$$.file
15720if test -d conf$$.dir; then
15721 rm -f conf$$.dir/conf$$.file
bec39cab 15722else
81ecdfbb
RW
15723 rm -f conf$$.dir
15724 mkdir conf$$.dir 2>/dev/null
bec39cab 15725fi
81ecdfbb
RW
15726if (echo >conf$$.file) 2>/dev/null; then
15727 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15728 as_ln_s='ln -s'
81ecdfbb
RW
15729 # ... but there are two gotchas:
15730 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15731 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15732 # In both cases, we have to default to `cp -p'.
15733 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15734 as_ln_s='cp -p'
15735 elif ln conf$$.file conf$$ 2>/dev/null; then
15736 as_ln_s=ln
15737 else
15738 as_ln_s='cp -p'
b4e70030 15739 fi
bec39cab
AC
15740else
15741 as_ln_s='cp -p'
15742fi
81ecdfbb
RW
15743rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15744rmdir conf$$.dir 2>/dev/null
15745
15746
15747# as_fn_mkdir_p
15748# -------------
15749# Create "$as_dir" as a directory, including parents if necessary.
15750as_fn_mkdir_p ()
15751{
15752
15753 case $as_dir in #(
15754 -*) as_dir=./$as_dir;;
15755 esac
15756 test -d "$as_dir" || eval $as_mkdir_p || {
15757 as_dirs=
15758 while :; do
15759 case $as_dir in #(
15760 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15761 *) as_qdir=$as_dir;;
15762 esac
15763 as_dirs="'$as_qdir' $as_dirs"
15764 as_dir=`$as_dirname -- "$as_dir" ||
15765$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15766 X"$as_dir" : 'X\(//\)[^/]' \| \
15767 X"$as_dir" : 'X\(//\)$' \| \
15768 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15769$as_echo X"$as_dir" |
15770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15771 s//\1/
15772 q
15773 }
15774 /^X\(\/\/\)[^/].*/{
15775 s//\1/
15776 q
15777 }
15778 /^X\(\/\/\)$/{
15779 s//\1/
15780 q
15781 }
15782 /^X\(\/\).*/{
15783 s//\1/
15784 q
15785 }
15786 s/.*/./; q'`
15787 test -d "$as_dir" && break
15788 done
15789 test -z "$as_dirs" || eval "mkdir $as_dirs"
15790 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15791
bec39cab 15792
81ecdfbb 15793} # as_fn_mkdir_p
bec39cab 15794if mkdir -p . 2>/dev/null; then
81ecdfbb 15795 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15796else
15797 test -d ./-p && rmdir ./-p
15798 as_mkdir_p=false
15799fi
15800
81ecdfbb
RW
15801if test -x / >/dev/null 2>&1; then
15802 as_test_x='test -x'
15803else
15804 if ls -dL / >/dev/null 2>&1; then
15805 as_ls_L_option=L
15806 else
15807 as_ls_L_option=
15808 fi
15809 as_test_x='
15810 eval sh -c '\''
15811 if test -d "$1"; then
15812 test -d "$1/.";
15813 else
15814 case $1 in #(
15815 -*)set "./$1";;
15816 esac;
15817 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15818 ???[sx]*):;;*)false;;esac;fi
15819 '\'' sh
15820 '
15821fi
15822as_executable_p=$as_test_x
bec39cab
AC
15823
15824# Sed expression to map a string onto a valid CPP name.
15825as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15826
15827# Sed expression to map a string onto a valid variable name.
15828as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15829
15830
bec39cab 15831exec 6>&1
81ecdfbb
RW
15832## ----------------------------------- ##
15833## Main body of $CONFIG_STATUS script. ##
15834## ----------------------------------- ##
15835_ASEOF
15836test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15837
15838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15839# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15840# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15841# values after options handling.
15842ac_log="
bec39cab 15843This file was extended by $as_me, which was
81ecdfbb 15844generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15845
15846 CONFIG_FILES = $CONFIG_FILES
15847 CONFIG_HEADERS = $CONFIG_HEADERS
15848 CONFIG_LINKS = $CONFIG_LINKS
15849 CONFIG_COMMANDS = $CONFIG_COMMANDS
15850 $ $0 $@
15851
81ecdfbb
RW
15852on `(hostname || uname -n) 2>/dev/null | sed 1q`
15853"
15854
bec39cab
AC
15855_ACEOF
15856
81ecdfbb
RW
15857case $ac_config_files in *"
15858"*) set x $ac_config_files; shift; ac_config_files=$*;;
15859esac
234b45d4 15860
81ecdfbb
RW
15861case $ac_config_headers in *"
15862"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15863esac
b4e70030 15864
b4e70030 15865
81ecdfbb
RW
15866cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15867# Files that config.status was made for.
15868config_files="$ac_config_files"
15869config_headers="$ac_config_headers"
15870config_links="$ac_config_links"
15871config_commands="$ac_config_commands"
234b45d4 15872
81ecdfbb 15873_ACEOF
b4e70030 15874
81ecdfbb 15875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15876ac_cs_usage="\
81ecdfbb
RW
15877\`$as_me' instantiates files and other configuration actions
15878from templates according to the current configuration. Unless the files
15879and actions are specified as TAGs, all are instantiated by default.
234b45d4 15880
81ecdfbb 15881Usage: $0 [OPTION]... [TAG]...
234b45d4 15882
bec39cab 15883 -h, --help print this help, then exit
81ecdfbb
RW
15884 -V, --version print version number and configuration settings, then exit
15885 -q, --quiet, --silent
15886 do not print progress messages
bec39cab
AC
15887 -d, --debug don't remove temporary files
15888 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15889 --file=FILE[:TEMPLATE]
15890 instantiate the configuration file FILE
15891 --header=FILE[:TEMPLATE]
15892 instantiate the configuration header FILE
234b45d4 15893
bec39cab
AC
15894Configuration files:
15895$config_files
234b45d4 15896
bec39cab
AC
15897Configuration headers:
15898$config_headers
234b45d4 15899
bec39cab
AC
15900Configuration links:
15901$config_links
234b45d4 15902
bec39cab
AC
15903Configuration commands:
15904$config_commands
15905
81ecdfbb 15906Report bugs to the package provider."
b4e70030 15907
81ecdfbb
RW
15908_ACEOF
15909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15910ac_cs_version="\\
15911config.status
81ecdfbb
RW
15912configured by $0, generated by GNU Autoconf 2.64,
15913 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15914
81ecdfbb 15915Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15916This config.status script is free software; the Free Software Foundation
15917gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15918
15919ac_pwd='$ac_pwd'
15920srcdir='$srcdir'
15921INSTALL='$INSTALL'
81ecdfbb
RW
15922AWK='$AWK'
15923test -n "\$AWK" || AWK=awk
bec39cab
AC
15924_ACEOF
15925
81ecdfbb
RW
15926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15927# The default lists apply if the user does not specify any file.
bec39cab
AC
15928ac_need_defaults=:
15929while test $# != 0
15930do
15931 case $1 in
15932 --*=*)
81ecdfbb
RW
15933 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15934 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15935 ac_shift=:
c906108c 15936 ;;
81ecdfbb 15937 *)
bec39cab
AC
15938 ac_option=$1
15939 ac_optarg=$2
15940 ac_shift=shift
c906108c 15941 ;;
bec39cab 15942 esac
c906108c 15943
bec39cab
AC
15944 case $ac_option in
15945 # Handling of the options.
bec39cab
AC
15946 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15947 ac_cs_recheck=: ;;
81ecdfbb
RW
15948 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15949 $as_echo "$ac_cs_version"; exit ;;
15950 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15951 debug=: ;;
15952 --file | --fil | --fi | --f )
15953 $ac_shift
81ecdfbb
RW
15954 case $ac_optarg in
15955 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15956 esac
15957 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15958 ac_need_defaults=false;;
15959 --header | --heade | --head | --hea )
15960 $ac_shift
81ecdfbb
RW
15961 case $ac_optarg in
15962 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15963 esac
15964 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15965 ac_need_defaults=false;;
81ecdfbb
RW
15966 --he | --h)
15967 # Conflict between --help and --header
15968 as_fn_error "ambiguous option: \`$1'
15969Try \`$0 --help' for more information.";;
15970 --help | --hel | -h )
15971 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15972 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15973 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15974 ac_cs_silent=: ;;
c906108c 15975
bec39cab 15976 # This is an error.
81ecdfbb
RW
15977 -*) as_fn_error "unrecognized option: \`$1'
15978Try \`$0 --help' for more information." ;;
c906108c 15979
81ecdfbb
RW
15980 *) as_fn_append ac_config_targets " $1"
15981 ac_need_defaults=false ;;
c906108c 15982
bec39cab
AC
15983 esac
15984 shift
15985done
c906108c 15986
bec39cab 15987ac_configure_extra_args=
c906108c 15988
bec39cab
AC
15989if $ac_cs_silent; then
15990 exec 6>/dev/null
15991 ac_configure_extra_args="$ac_configure_extra_args --silent"
15992fi
c906108c 15993
bec39cab 15994_ACEOF
81ecdfbb 15995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15996if \$ac_cs_recheck; then
81ecdfbb
RW
15997 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15998 shift
15999 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16000 CONFIG_SHELL='$SHELL'
16001 export CONFIG_SHELL
16002 exec "\$@"
bec39cab
AC
16003fi
16004
16005_ACEOF
81ecdfbb
RW
16006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16007exec 5>>config.log
16008{
16009 echo
16010 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16011## Running $as_me. ##
16012_ASBOX
16013 $as_echo "$ac_log"
16014} >&5
bec39cab 16015
81ecdfbb
RW
16016_ACEOF
16017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16018#
81ecdfbb 16019# INIT-COMMANDS
c906108c 16020#
a417dc56 16021ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16022
bec39cab
AC
16023_ACEOF
16024
81ecdfbb 16025cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16026
81ecdfbb 16027# Handling of arguments.
bec39cab 16028for ac_config_target in $ac_config_targets
c906108c 16029do
81ecdfbb
RW
16030 case $ac_config_target in
16031 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16032 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16033 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16034 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16035 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16036 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16037 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16038 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16039 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16040 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16041
16042 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16043 esac
16044done
16045
81ecdfbb 16046
bec39cab
AC
16047# If the user did not use the arguments to specify the items to instantiate,
16048# then the envvar interface is used. Set only those that are not.
16049# We use the long form for the default assignment because of an extremely
16050# bizarre bug on SunOS 4.1.3.
16051if $ac_need_defaults; then
16052 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16053 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16054 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16055 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16056fi
16057
b4e70030 16058# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16059# simply because there is no reason against having it here, and in addition,
b4e70030 16060# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16061# Hook for its removal unless debugging.
16062# Note that there is a small window in which the directory will not be cleaned:
16063# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16064$debug ||
16065{
81ecdfbb
RW
16066 tmp=
16067 trap 'exit_status=$?
16068 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16069' 0
16070 trap 'as_fn_exit 1' 1 2 13 15
16071}
16072# Create a (secure) tmp directory for tmp files.
16073
16074{
16075 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16076 test -n "$tmp" && test -d "$tmp"
16077} ||
16078{
16079 tmp=./conf$$-$RANDOM
16080 (umask 077 && mkdir "$tmp")
16081} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16082
16083# Set up the scripts for CONFIG_FILES section.
16084# No need to generate them if there are no CONFIG_FILES.
16085# This happens for instance with `./config.status config.h'.
16086if test -n "$CONFIG_FILES"; then
16087
16088if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16089 ac_cs_awk_getline=:
16090 ac_cs_awk_pipe_init=
16091 ac_cs_awk_read_file='
16092 while ((getline aline < (F[key])) > 0)
16093 print(aline)
16094 close(F[key])'
16095 ac_cs_awk_pipe_fini=
16096else
16097 ac_cs_awk_getline=false
16098 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16099 ac_cs_awk_read_file='
16100 print "|#_!!_#|"
16101 print "cat " F[key] " &&"
16102 '$ac_cs_awk_pipe_init
16103 # The final `:' finishes the AND list.
16104 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16105fi
16106ac_cr=`echo X | tr X '\015'`
16107# On cygwin, bash can eat \r inside `` if the user requested igncr.
16108# But we know of no other shell where ac_cr would be empty at this
16109# point, so we can use a bashism as a fallback.
16110if test "x$ac_cr" = x; then
16111 eval ac_cr=\$\'\\r\'
16112fi
16113ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16114if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16115 ac_cs_awk_cr='\r'
16116else
16117 ac_cs_awk_cr=$ac_cr
16118fi
16119
16120echo 'BEGIN {' >"$tmp/subs1.awk" &&
16121_ACEOF
16122
16123# Create commands to substitute file output variables.
16124{
16125 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16126 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16127 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16128 echo "_ACAWK" &&
16129 echo "_ACEOF"
16130} >conf$$files.sh &&
16131. ./conf$$files.sh ||
16132 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16133rm -f conf$$files.sh
16134
16135{
16136 echo "cat >conf$$subs.awk <<_ACEOF" &&
16137 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16138 echo "_ACEOF"
16139} >conf$$subs.sh ||
16140 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16141ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16142ac_delim='%!_!# '
16143for ac_last_try in false false false false false :; do
16144 . ./conf$$subs.sh ||
16145 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16146
16147 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16148 if test $ac_delim_n = $ac_delim_num; then
16149 break
16150 elif $ac_last_try; then
16151 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16152 else
16153 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16154 fi
16155done
16156rm -f conf$$subs.sh
16157
16158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16159cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16160_ACEOF
16161sed -n '
16162h
16163s/^/S["/; s/!.*/"]=/
16164p
16165g
16166s/^[^!]*!//
16167:repl
16168t repl
16169s/'"$ac_delim"'$//
16170t delim
16171:nl
16172h
16173s/\(.\{148\}\).*/\1/
16174t more1
16175s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16176p
16177n
16178b repl
16179:more1
16180s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16181p
16182g
16183s/.\{148\}//
16184t nl
16185:delim
16186h
16187s/\(.\{148\}\).*/\1/
16188t more2
16189s/["\\]/\\&/g; s/^/"/; s/$/"/
16190p
16191b
16192:more2
16193s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16194p
16195g
16196s/.\{148\}//
16197t delim
16198' <conf$$subs.awk | sed '
16199/^[^""]/{
16200 N
16201 s/\n//
16202}
16203' >>$CONFIG_STATUS || ac_write_fail=1
16204rm -f conf$$subs.awk
16205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16206_ACAWK
16207cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16208 for (key in S) S_is_set[key] = 1
16209 FS = "\a"
16210 \$ac_cs_awk_pipe_init
16211}
16212{
16213 line = $ 0
16214 nfields = split(line, field, "@")
16215 substed = 0
16216 len = length(field[1])
16217 for (i = 2; i < nfields; i++) {
16218 key = field[i]
16219 keylen = length(key)
16220 if (S_is_set[key]) {
16221 value = S[key]
16222 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16223 len += length(value) + length(field[++i])
16224 substed = 1
16225 } else
16226 len += 1 + keylen
16227 }
16228 if (nfields == 3 && !substed) {
16229 key = field[2]
16230 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16231 \$ac_cs_awk_read_file
16232 next
16233 }
16234 }
16235 print line
b4e70030 16236}
81ecdfbb
RW
16237\$ac_cs_awk_pipe_fini
16238_ACAWK
16239_ACEOF
16240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16241if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16242 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16243else
16244 cat
16245fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16246 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16247_ACEOF
16248
16249# VPATH may cause trouble with some makes, so we remove $(srcdir),
16250# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16251# trailing colons and then remove the whole line if VPATH becomes empty
16252# (actually we leave an empty line to preserve line numbers).
16253if test "x$srcdir" = x.; then
16254 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16255s/:*\$(srcdir):*/:/
16256s/:*\${srcdir}:*/:/
16257s/:*@srcdir@:*/:/
16258s/^\([^=]*=[ ]*\):*/\1/
16259s/:*$//
16260s/^[^=]*=[ ]*$//
16261}'
16262fi
16263
16264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16265fi # test -n "$CONFIG_FILES"
16266
16267# Set up the scripts for CONFIG_HEADERS section.
16268# No need to generate them if there are no CONFIG_HEADERS.
16269# This happens for instance with `./config.status Makefile'.
16270if test -n "$CONFIG_HEADERS"; then
16271cat >"$tmp/defines.awk" <<\_ACAWK ||
16272BEGIN {
16273_ACEOF
16274
16275# Transform confdefs.h into an awk script `defines.awk', embedded as
16276# here-document in config.status, that substitutes the proper values into
16277# config.h.in to produce config.h.
4e8d927d 16278
81ecdfbb
RW
16279# Create a delimiter string that does not exist in confdefs.h, to ease
16280# handling of long lines.
16281ac_delim='%!_!# '
16282for ac_last_try in false false :; do
16283 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16284 if test -z "$ac_t"; then
16285 break
16286 elif $ac_last_try; then
16287 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16288 else
16289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16290 fi
16291done
4e8d927d 16292
81ecdfbb
RW
16293# For the awk script, D is an array of macro values keyed by name,
16294# likewise P contains macro parameters if any. Preserve backslash
16295# newline sequences.
16296
16297ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16298sed -n '
16299s/.\{148\}/&'"$ac_delim"'/g
16300t rset
16301:rset
16302s/^[ ]*#[ ]*define[ ][ ]*/ /
16303t def
16304d
16305:def
16306s/\\$//
16307t bsnl
16308s/["\\]/\\&/g
16309s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16310D["\1"]=" \3"/p
16311s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16312d
16313:bsnl
16314s/["\\]/\\&/g
16315s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16316D["\1"]=" \3\\\\\\n"\\/p
16317t cont
16318s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16319t cont
16320d
16321:cont
16322n
16323s/.\{148\}/&'"$ac_delim"'/g
16324t clear
16325:clear
16326s/\\$//
16327t bsnlc
16328s/["\\]/\\&/g; s/^/"/; s/$/"/p
16329d
16330:bsnlc
16331s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16332b cont
16333' <confdefs.h | sed '
16334s/'"$ac_delim"'/"\\\
16335"/g' >>$CONFIG_STATUS || ac_write_fail=1
16336
16337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16338 for (key in D) D_is_set[key] = 1
16339 FS = "\a"
16340}
16341/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16342 line = \$ 0
16343 split(line, arg, " ")
16344 if (arg[1] == "#") {
16345 defundef = arg[2]
16346 mac1 = arg[3]
16347 } else {
16348 defundef = substr(arg[1], 2)
16349 mac1 = arg[2]
16350 }
16351 split(mac1, mac2, "(") #)
16352 macro = mac2[1]
16353 prefix = substr(line, 1, index(line, defundef) - 1)
16354 if (D_is_set[macro]) {
16355 # Preserve the white space surrounding the "#".
16356 print prefix "define", macro P[macro] D[macro]
16357 next
16358 } else {
16359 # Replace #undef with comments. This is necessary, for example,
16360 # in the case of _POSIX_SOURCE, which is predefined and required
16361 # on some systems where configure will not decide to define it.
16362 if (defundef == "undef") {
16363 print "/*", prefix defundef, macro, "*/"
16364 next
16365 }
16366 }
b4e70030 16367}
81ecdfbb
RW
16368{ print }
16369_ACAWK
b4e70030 16370_ACEOF
81ecdfbb
RW
16371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16372 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16373fi # test -n "$CONFIG_HEADERS"
4e8d927d 16374
4e8d927d 16375
81ecdfbb
RW
16376eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16377shift
16378for ac_tag
16379do
16380 case $ac_tag in
16381 :[FHLC]) ac_mode=$ac_tag; continue;;
16382 esac
16383 case $ac_mode$ac_tag in
16384 :[FHL]*:*);;
16385 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16386 :[FH]-) ac_tag=-:-;;
16387 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16388 esac
16389 ac_save_IFS=$IFS
16390 IFS=:
16391 set x $ac_tag
16392 IFS=$ac_save_IFS
16393 shift
16394 ac_file=$1
16395 shift
4e8d927d 16396
81ecdfbb
RW
16397 case $ac_mode in
16398 :L) ac_source=$1;;
16399 :[FH])
16400 ac_file_inputs=
16401 for ac_f
16402 do
16403 case $ac_f in
16404 -) ac_f="$tmp/stdin";;
16405 *) # Look for the file first in the build tree, then in the source tree
16406 # (if the path is not absolute). The absolute path cannot be DOS-style,
16407 # because $ac_f cannot contain `:'.
16408 test -f "$ac_f" ||
16409 case $ac_f in
16410 [\\/$]*) false;;
16411 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16412 esac ||
16413 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16414 esac
16415 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16416 as_fn_append ac_file_inputs " '$ac_f'"
16417 done
16418
16419 # Let's still pretend it is `configure' which instantiates (i.e., don't
16420 # use $as_me), people would be surprised to read:
16421 # /* config.h. Generated by config.status. */
16422 configure_input='Generated from '`
16423 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16424 `' by configure.'
16425 if test x"$ac_file" != x-; then
16426 configure_input="$ac_file. $configure_input"
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16428$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16429 fi
81ecdfbb
RW
16430 # Neutralize special characters interpreted by sed in replacement strings.
16431 case $configure_input in #(
16432 *\&* | *\|* | *\\* )
16433 ac_sed_conf_input=`$as_echo "$configure_input" |
16434 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16435 *) ac_sed_conf_input=$configure_input;;
16436 esac
4e8d927d 16437
81ecdfbb
RW
16438 case $ac_tag in
16439 *:-:* | *:-) cat >"$tmp/stdin" \
16440 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16441 esac
16442 ;;
c906108c
SS
16443 esac
16444
81ecdfbb 16445 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16446$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16447 X"$ac_file" : 'X\(//\)[^/]' \| \
16448 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16449 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16450$as_echo X"$ac_file" |
16451 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16452 s//\1/
16453 q
16454 }
16455 /^X\(\/\/\)[^/].*/{
16456 s//\1/
16457 q
16458 }
16459 /^X\(\/\/\)$/{
16460 s//\1/
16461 q
16462 }
16463 /^X\(\/\).*/{
16464 s//\1/
16465 q
16466 }
16467 s/.*/./; q'`
16468 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16469 ac_builddir=.
16470
81ecdfbb
RW
16471case "$ac_dir" in
16472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16473*)
16474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16475 # A ".." for each directory in $ac_dir_suffix.
16476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16477 case $ac_top_builddir_sub in
16478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16480 esac ;;
16481esac
16482ac_abs_top_builddir=$ac_pwd
16483ac_abs_builddir=$ac_pwd$ac_dir_suffix
16484# for backward compatibility:
16485ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16486
16487case $srcdir in
81ecdfbb 16488 .) # We are building in place.
bec39cab 16489 ac_srcdir=.
81ecdfbb
RW
16490 ac_top_srcdir=$ac_top_builddir_sub
16491 ac_abs_top_srcdir=$ac_pwd ;;
16492 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16493 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16494 ac_top_srcdir=$srcdir
16495 ac_abs_top_srcdir=$srcdir ;;
16496 *) # Relative name.
16497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16498 ac_top_srcdir=$ac_top_build_prefix$srcdir
16499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16500esac
81ecdfbb 16501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16502
c906108c 16503
81ecdfbb
RW
16504 case $ac_mode in
16505 :F)
16506 #
16507 # CONFIG_FILE
16508 #
c906108c 16509
bec39cab
AC
16510 case $INSTALL in
16511 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16512 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16513 esac
81ecdfbb 16514_ACEOF
121ce6e5 16515
81ecdfbb
RW
16516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16517# If the template does not know about datarootdir, expand it.
16518# FIXME: This hack should be removed a few years after 2.60.
16519ac_datarootdir_hack=; ac_datarootdir_seen=
16520ac_sed_dataroot='
16521/datarootdir/ {
16522 p
16523 q
16524}
16525/@datadir@/p
16526/@docdir@/p
16527/@infodir@/p
16528/@localedir@/p
16529/@mandir@/p'
16530case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16531*datarootdir*) ac_datarootdir_seen=yes;;
16532*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16534$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16535_ACEOF
16536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16537 ac_datarootdir_hack='
16538 s&@datadir@&$datadir&g
16539 s&@docdir@&$docdir&g
16540 s&@infodir@&$infodir&g
16541 s&@localedir@&$localedir&g
16542 s&@mandir@&$mandir&g
16543 s&\\\${datarootdir}&$datarootdir&g' ;;
16544esac
4e8d927d 16545_ACEOF
81ecdfbb
RW
16546
16547# Neutralize VPATH when `$srcdir' = `.'.
16548# Shell code in configure.ac might set extrasub.
16549# FIXME: do we really want to maintain this feature?
16550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16551ac_sed_extra="$ac_vpsub
bec39cab
AC
16552$extrasub
16553_ACEOF
81ecdfbb 16554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16555:t
16556/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16557s|@configure_input@|$ac_sed_conf_input|;t t
16558s&@top_builddir@&$ac_top_builddir_sub&;t t
16559s&@top_build_prefix@&$ac_top_build_prefix&;t t
16560s&@srcdir@&$ac_srcdir&;t t
16561s&@abs_srcdir@&$ac_abs_srcdir&;t t
16562s&@top_srcdir@&$ac_top_srcdir&;t t
16563s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16564s&@builddir@&$ac_builddir&;t t
16565s&@abs_builddir@&$ac_abs_builddir&;t t
16566s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16567s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16568$ac_datarootdir_hack
16569"
16570eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16571if $ac_cs_awk_getline; then
16572 $AWK -f "$tmp/subs.awk"
16573else
16574 $AWK -f "$tmp/subs.awk" | $SHELL
16575fi >$tmp/out \
16576 || as_fn_error "could not create $ac_file" "$LINENO" 5
16577
16578test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16579 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16580 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16582which seems to be undefined. Please make sure it is defined." >&5
16583$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16584which seems to be undefined. Please make sure it is defined." >&2;}
16585
16586 rm -f "$tmp/stdin"
bec39cab 16587 case $ac_file in
81ecdfbb
RW
16588 -) cat "$tmp/out" && rm -f "$tmp/out";;
16589 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16590 esac \
16591 || as_fn_error "could not create $ac_file" "$LINENO" 5
16592 ;;
16593 :H)
16594 #
16595 # CONFIG_HEADER
16596 #
bec39cab 16597 if test x"$ac_file" != x-; then
81ecdfbb
RW
16598 {
16599 $as_echo "/* $configure_input */" \
16600 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16601 } >"$tmp/config.h" \
16602 || as_fn_error "could not create $ac_file" "$LINENO" 5
16603 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16604 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16605$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16606 else
81ecdfbb
RW
16607 rm -f "$ac_file"
16608 mv "$tmp/config.h" "$ac_file" \
16609 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16610 fi
16611 else
81ecdfbb
RW
16612 $as_echo "/* $configure_input */" \
16613 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16614 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16615 fi
81ecdfbb
RW
16616 ;;
16617 :L)
16618 #
16619 # CONFIG_LINK
16620 #
c906108c 16621
81ecdfbb
RW
16622 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16623 :
b4e70030 16624 else
81ecdfbb
RW
16625 # Prefer the file from the source tree if names are identical.
16626 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16627 ac_source=$srcdir/$ac_source
16628 fi
b4e70030 16629
81ecdfbb
RW
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16631$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16632
81ecdfbb
RW
16633 if test ! -r "$ac_source"; then
16634 as_fn_error "$ac_source: file not found" "$LINENO" 5
16635 fi
16636 rm -f "$ac_file"
bec39cab 16637
81ecdfbb
RW
16638 # Try a relative symlink, then a hard link, then a copy.
16639 case $srcdir in
16640 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16641 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16642 esac
16643 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16644 ln "$ac_source" "$ac_file" 2>/dev/null ||
16645 cp -p "$ac_source" "$ac_file" ||
16646 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16647 fi
16648 ;;
16649 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16650$as_echo "$as_me: executing $ac_file commands" >&6;}
16651 ;;
c906108c 16652 esac
b4e70030 16653
bec39cab 16654
81ecdfbb
RW
16655 case $ac_file$ac_mode in
16656 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16657 "gcore":F) chmod +x gcore ;;
81ecdfbb 16658 "default":C)
c906108c
SS
16659case x$CONFIG_HEADERS in
16660xconfig.h:config.in)
16661echo > stamp-h ;;
16662esac
bec39cab 16663 ;;
81ecdfbb 16664
bec39cab 16665 esac
81ecdfbb 16666done # for ac_tag
c906108c 16667
bec39cab 16668
81ecdfbb 16669as_fn_exit 0
bec39cab 16670_ACEOF
bec39cab
AC
16671ac_clean_files=$ac_clean_files_save
16672
81ecdfbb
RW
16673test $ac_write_fail = 0 ||
16674 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16675
bec39cab
AC
16676
16677# configure is writing to config.log, and then calls config.status.
16678# config.status does its own redirection, appending to config.log.
16679# Unfortunately, on DOS this fails, as config.log is still kept open
16680# by configure, so config.status won't be able to write to it; its
16681# output is simply discarded. So we exec the FD to /dev/null,
16682# effectively closing config.log, so it can be properly (re)opened and
16683# appended to by config.status. When coming back to configure, we
16684# need to make the FD available again.
16685if test "$no_create" != yes; then
16686 ac_cs_success=:
16687 ac_config_status_args=
16688 test "$silent" = yes &&
16689 ac_config_status_args="$ac_config_status_args --quiet"
16690 exec 5>/dev/null
16691 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16692 exec 5>>config.log
16693 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16694 # would make configure fail if this is the last instruction.
81ecdfbb 16695 $ac_cs_success || as_fn_exit $?
bec39cab 16696fi
c906108c 16697
bec39cab 16698#
81ecdfbb 16699# CONFIG_SUBDIRS section.
bec39cab 16700#
c906108c
SS
16701if test "$no_recursion" != yes; then
16702
81ecdfbb
RW
16703 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16704 # so they do not pile up.
c906108c
SS
16705 ac_sub_configure_args=
16706 ac_prev=
fdc59709
PB
16707 eval "set x $ac_configure_args"
16708 shift
16709 for ac_arg
16710 do
c906108c
SS
16711 if test -n "$ac_prev"; then
16712 ac_prev=
16713 continue
16714 fi
bec39cab 16715 case $ac_arg in
c906108c
SS
16716 -cache-file | --cache-file | --cache-fil | --cache-fi \
16717 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16718 ac_prev=cache_file ;;
16719 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16720 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16721 | --c=*)
16722 ;;
16723 --config-cache | -C)
c906108c
SS
16724 ;;
16725 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16726 ac_prev=srcdir ;;
16727 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16728 ;;
bec39cab
AC
16729 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16730 ac_prev=prefix ;;
16731 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16732 ;;
81ecdfbb
RW
16733 --disable-option-checking)
16734 ;;
fdc59709
PB
16735 *)
16736 case $ac_arg in
81ecdfbb 16737 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16738 esac
81ecdfbb 16739 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16740 esac
16741 done
16742
bec39cab
AC
16743 # Always prepend --prefix to ensure using the same prefix
16744 # in subdir configurations.
fdc59709
PB
16745 ac_arg="--prefix=$prefix"
16746 case $ac_arg in
81ecdfbb 16747 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16748 esac
81ecdfbb
RW
16749 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16750
16751 # Pass --silent
16752 if test "$silent" = yes; then
16753 ac_sub_configure_args="--silent $ac_sub_configure_args"
16754 fi
16755
16756 # Always prepend --disable-option-checking to silence warnings, since
16757 # different subdirs can have different --enable and --with options.
16758 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16759
b4e70030 16760 ac_popdir=`pwd`
bec39cab 16761 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16762
16763 # Do not complain, so a configure script can configure whichever
16764 # parts of a large source tree are present.
fdc59709 16765 test -d "$srcdir/$ac_dir" || continue
c906108c 16766
81ecdfbb
RW
16767 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16768 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16769 $as_echo "$ac_msg" >&6
16770 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16771 ac_builddir=.
16772
81ecdfbb
RW
16773case "$ac_dir" in
16774.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16775*)
16776 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16777 # A ".." for each directory in $ac_dir_suffix.
16778 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16779 case $ac_top_builddir_sub in
16780 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16781 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16782 esac ;;
16783esac
16784ac_abs_top_builddir=$ac_pwd
16785ac_abs_builddir=$ac_pwd$ac_dir_suffix
16786# for backward compatibility:
16787ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16788
16789case $srcdir in
81ecdfbb 16790 .) # We are building in place.
bec39cab 16791 ac_srcdir=.
81ecdfbb
RW
16792 ac_top_srcdir=$ac_top_builddir_sub
16793 ac_abs_top_srcdir=$ac_pwd ;;
16794 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16795 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16796 ac_top_srcdir=$srcdir
16797 ac_abs_top_srcdir=$srcdir ;;
16798 *) # Relative name.
16799 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16800 ac_top_srcdir=$ac_top_build_prefix$srcdir
16801 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16802esac
81ecdfbb 16803ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16804
c906108c 16805
fdc59709 16806 cd "$ac_dir"
c906108c
SS
16807
16808 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16809 if test -f "$ac_srcdir/configure.gnu"; then
16810 ac_sub_configure=$ac_srcdir/configure.gnu
16811 elif test -f "$ac_srcdir/configure"; then
16812 ac_sub_configure=$ac_srcdir/configure
16813 elif test -f "$ac_srcdir/configure.in"; then
16814 # This should be Cygnus configure.
16815 ac_sub_configure=$ac_aux_dir/configure
c906108c 16816 else
81ecdfbb
RW
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16818$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16819 ac_sub_configure=
16820 fi
16821
16822 # The recursion is here.
16823 if test -n "$ac_sub_configure"; then
c906108c 16824 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16825 case $cache_file in
16826 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16827 *) # Relative name.
16828 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16829 esac
c906108c 16830
81ecdfbb
RW
16831 { $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
16832$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16833 # The eval makes quoting arguments work.
fdc59709
PB
16834 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16835 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16836 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16837 fi
16838
fdc59709 16839 cd "$ac_popdir"
c906108c
SS
16840 done
16841fi
81ecdfbb
RW
16842if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16844$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16845fi
c906108c
SS
16846
16847
16848exit 0
This page took 2.594174 seconds and 4 git commands to generate.