Use kinfo_getvmmap on FreeBSD to enumerate memory regions.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
4df42755
DE
661HAVE_GUILE_FALSE
662HAVE_GUILE_TRUE
ed3ef339
DE
663GUILE_LIBS
664GUILE_CPPFLAGS
e76c5d17
DE
665GUILD_TARGET_FLAG
666GUILD
ed3ef339 667pkg_config_prog_path
4df42755
DE
668HAVE_PYTHON_FALSE
669HAVE_PYTHON_TRUE
ac534cba
JB
670PYTHON_LIBS
671PYTHON_CPPFLAGS
81ecdfbb 672PYTHON_CFLAGS
ec685c5e 673python_prog_path
81ecdfbb
RW
674LTLIBEXPAT
675LIBEXPAT
676HAVE_LIBEXPAT
b8e0a31c 677JIT_READER_DIR
f997c383 678TARGET_PTR
39037522 679READLINE_TEXI_INCFLAG
81ecdfbb
RW
680READLINE_CFLAGS
681READLINE_DEPS
682READLINE
683MIG
684WINDRES
685DLLTOOL
c971b7fa 686AR
81ecdfbb
RW
687YFLAGS
688YACC
c971b7fa 689RANLIB
81ecdfbb 690LN_S
c971b7fa
PA
691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
694AWK
81ecdfbb
RW
695REPORT_BUGS_TEXI
696REPORT_BUGS_TO
697PKGVERSION
b292c783 698HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
699TARGET_OBS
700subdirs
701GDB_DATADIR
702DEBUGDIR
5048e516
JK
703MAKEINFO_EXTRA_FLAGS
704MAKEINFOFLAGS
705MAKEINFO
81ecdfbb
RW
706PACKAGE
707GNULIB_STDINT_H
81ecdfbb
RW
708CATOBJEXT
709GENCAT
710INSTOBJEXT
711DATADIRNAME
712CATALOGS
713POSUB
714GMSGFMT
715XGETTEXT
716INCINTL
717LIBINTL_DEP
718LIBINTL
719USE_NLS
720SET_MAKE
721GMAKE_FALSE
722GMAKE_TRUE
723MAKE
724CCDEPMODE
725DEPDIR
726am__leading_dot
3bc3d82a 727COMPILER
4869db5e
RM
728INSTALL_STRIP_PROGRAM
729STRIP
730install_sh
81ecdfbb
RW
731target_os
732target_vendor
733target_cpu
734target
735host_os
736host_vendor
737host_cpu
738host
739build_os
740build_vendor
741build_cpu
742build
c971b7fa
PA
743EGREP
744GREP
745CPP
3bc3d82a
PA
746ac_ct_CXX
747CXXFLAGS
748CXX
81ecdfbb
RW
749OBJEXT
750EXEEXT
751ac_ct_CC
752CPPFLAGS
753LDFLAGS
754CFLAGS
755CC
756MAINT
757MAINTAINER_MODE_FALSE
758MAINTAINER_MODE_TRUE
759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
778localstatedir
779sharedstatedir
780sysconfdir
781datadir
782datarootdir
783libexecdir
784sbindir
785bindir
786program_transform_name
787prefix
788exec_prefix
789PACKAGE_URL
790PACKAGE_BUGREPORT
791PACKAGE_STRING
792PACKAGE_VERSION
793PACKAGE_TARNAME
794PACKAGE_NAME
795PATH_SEPARATOR
796SHELL'
a4ce5b0d 797ac_subst_files='host_makefile_frag'
81ecdfbb
RW
798ac_user_opts='
799enable_option_checking
800enable_maintainer_mode
da2f07f1
JK
801enable_plugins
802enable_largefile
3bc3d82a 803enable_build_with_cxx
81ecdfbb
RW
804with_separate_debug_dir
805with_gdb_datadir
806with_relocated_sources
7349ff92 807with_auto_load_dir
bccbefd2 808with_auto_load_safe_path
81ecdfbb
RW
809enable_targets
810enable_64_bit_bfd
811enable_gdbcli
812enable_gdbmi
813enable_tui
814enable_gdbtk
05e7c244 815with_libunwind_ia64
81ecdfbb
RW
816with_curses
817enable_profiling
818with_pkgversion
819with_bugurl
b040ad30 820with_zlib
81ecdfbb 821with_libiconv_prefix
478aac75 822with_iconv_bin
81ecdfbb 823with_system_readline
b8e0a31c 824with_jit_reader_dir
81ecdfbb
RW
825with_expat
826with_gnu_ld
827enable_rpath
828with_libexpat_prefix
829with_python
ed3ef339 830with_guile
a8db4212 831enable_libmcheck
81ecdfbb
RW
832with_included_regex
833with_sysroot
834with_system_gdbinit
835enable_werror
836enable_build_warnings
837enable_gdb_build_warnings
608e2dbb
TT
838with_lzma
839with_liblzma_prefix
81ecdfbb
RW
840with_tcl
841with_tk
842with_x
843enable_sim
844enable_multi_ice
496c0e1b 845enable_gdbserver
393fd4c3
YQ
846with_babeltrace
847with_libbabeltrace_prefix
81ecdfbb
RW
848'
849 ac_precious_vars='build_alias
850host_alias
851target_alias
852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
3bc3d82a
PA
857CXX
858CXXFLAGS
859CCC
81ecdfbb 860CPP
f06e05e0
JK
861MAKEINFO
862MAKEINFOFLAGS
81ecdfbb
RW
863YACC
864YFLAGS
865XMKMF'
5ae98d25 866ac_subdirs_all='testsuite
81ecdfbb
RW
867gdbtk
868multi-ice
869gdbserver'
c906108c
SS
870
871# Initialize some variables set by options.
bec39cab
AC
872ac_init_help=
873ac_init_version=false
81ecdfbb
RW
874ac_unrecognized_opts=
875ac_unrecognized_sep=
c906108c
SS
876# The variables have the same names as the options, with
877# dashes changed to underlines.
bec39cab 878cache_file=/dev/null
c906108c 879exec_prefix=NONE
c906108c 880no_create=
c906108c
SS
881no_recursion=
882prefix=NONE
883program_prefix=NONE
884program_suffix=NONE
885program_transform_name=s,x,x,
886silent=
887site=
888srcdir=
c906108c
SS
889verbose=
890x_includes=NONE
891x_libraries=NONE
bec39cab
AC
892
893# Installation directory options.
894# These are left unexpanded so users can "make install exec_prefix=/foo"
895# and all the variables that are supposed to be based on exec_prefix
896# by default will actually change.
897# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 898# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
899bindir='${exec_prefix}/bin'
900sbindir='${exec_prefix}/sbin'
901libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
902datarootdir='${prefix}/share'
903datadir='${datarootdir}'
c906108c
SS
904sysconfdir='${prefix}/etc'
905sharedstatedir='${prefix}/com'
906localstatedir='${prefix}/var'
c906108c
SS
907includedir='${prefix}/include'
908oldincludedir='/usr/include'
81ecdfbb
RW
909docdir='${datarootdir}/doc/${PACKAGE}'
910infodir='${datarootdir}/info'
911htmldir='${docdir}'
912dvidir='${docdir}'
913pdfdir='${docdir}'
914psdir='${docdir}'
915libdir='${exec_prefix}/lib'
916localedir='${datarootdir}/locale'
917mandir='${datarootdir}/man'
c906108c 918
c906108c 919ac_prev=
81ecdfbb 920ac_dashdash=
c906108c
SS
921for ac_option
922do
c906108c
SS
923 # If the previous option needs an argument, assign it.
924 if test -n "$ac_prev"; then
81ecdfbb 925 eval $ac_prev=\$ac_option
c906108c
SS
926 ac_prev=
927 continue
928 fi
929
81ecdfbb
RW
930 case $ac_option in
931 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
932 *) ac_optarg=yes ;;
933 esac
c906108c
SS
934
935 # Accept the important Cygnus configure options, so we can diagnose typos.
936
81ecdfbb
RW
937 case $ac_dashdash$ac_option in
938 --)
939 ac_dashdash=yes ;;
c906108c
SS
940
941 -bindir | --bindir | --bindi | --bind | --bin | --bi)
942 ac_prev=bindir ;;
943 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 944 bindir=$ac_optarg ;;
c906108c
SS
945
946 -build | --build | --buil | --bui | --bu)
bec39cab 947 ac_prev=build_alias ;;
c906108c 948 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 949 build_alias=$ac_optarg ;;
c906108c
SS
950
951 -cache-file | --cache-file | --cache-fil | --cache-fi \
952 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
953 ac_prev=cache_file ;;
954 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
955 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
956 cache_file=$ac_optarg ;;
957
958 --config-cache | -C)
959 cache_file=config.cache ;;
c906108c 960
81ecdfbb 961 -datadir | --datadir | --datadi | --datad)
c906108c 962 ac_prev=datadir ;;
81ecdfbb 963 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 964 datadir=$ac_optarg ;;
c906108c 965
81ecdfbb
RW
966 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
967 | --dataroo | --dataro | --datar)
968 ac_prev=datarootdir ;;
969 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
970 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
971 datarootdir=$ac_optarg ;;
972
c906108c 973 -disable-* | --disable-*)
81ecdfbb 974 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 975 # Reject names that are not valid shell variable names.
81ecdfbb
RW
976 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
977 as_fn_error "invalid feature name: $ac_useropt"
978 ac_useropt_orig=$ac_useropt
979 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
980 case $ac_user_opts in
981 *"
982"enable_$ac_useropt"
983"*) ;;
984 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
985 ac_unrecognized_sep=', ';;
986 esac
987 eval enable_$ac_useropt=no ;;
988
989 -docdir | --docdir | --docdi | --doc | --do)
990 ac_prev=docdir ;;
991 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
992 docdir=$ac_optarg ;;
993
994 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
995 ac_prev=dvidir ;;
996 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
997 dvidir=$ac_optarg ;;
c906108c
SS
998
999 -enable-* | --enable-*)
81ecdfbb 1000 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1001 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1002 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1003 as_fn_error "invalid feature name: $ac_useropt"
1004 ac_useropt_orig=$ac_useropt
1005 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1006 case $ac_user_opts in
1007 *"
1008"enable_$ac_useropt"
1009"*) ;;
1010 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1011 ac_unrecognized_sep=', ';;
b4e70030 1012 esac
81ecdfbb 1013 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1014
1015 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1016 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1017 | --exec | --exe | --ex)
1018 ac_prev=exec_prefix ;;
1019 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1020 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1021 | --exec=* | --exe=* | --ex=*)
bec39cab 1022 exec_prefix=$ac_optarg ;;
c906108c
SS
1023
1024 -gas | --gas | --ga | --g)
1025 # Obsolete; use --with-gas.
1026 with_gas=yes ;;
1027
bec39cab
AC
1028 -help | --help | --hel | --he | -h)
1029 ac_init_help=long ;;
1030 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1031 ac_init_help=recursive ;;
1032 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1033 ac_init_help=short ;;
c906108c
SS
1034
1035 -host | --host | --hos | --ho)
bec39cab 1036 ac_prev=host_alias ;;
c906108c 1037 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1038 host_alias=$ac_optarg ;;
c906108c 1039
81ecdfbb
RW
1040 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1041 ac_prev=htmldir ;;
1042 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1043 | --ht=*)
1044 htmldir=$ac_optarg ;;
1045
c906108c
SS
1046 -includedir | --includedir | --includedi | --included | --include \
1047 | --includ | --inclu | --incl | --inc)
1048 ac_prev=includedir ;;
1049 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1050 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1051 includedir=$ac_optarg ;;
c906108c
SS
1052
1053 -infodir | --infodir | --infodi | --infod | --info | --inf)
1054 ac_prev=infodir ;;
1055 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1056 infodir=$ac_optarg ;;
c906108c
SS
1057
1058 -libdir | --libdir | --libdi | --libd)
1059 ac_prev=libdir ;;
1060 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1061 libdir=$ac_optarg ;;
c906108c
SS
1062
1063 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1064 | --libexe | --libex | --libe)
1065 ac_prev=libexecdir ;;
1066 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1067 | --libexe=* | --libex=* | --libe=*)
bec39cab 1068 libexecdir=$ac_optarg ;;
c906108c 1069
81ecdfbb
RW
1070 -localedir | --localedir | --localedi | --localed | --locale)
1071 ac_prev=localedir ;;
1072 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1073 localedir=$ac_optarg ;;
1074
c906108c 1075 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1076 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1077 ac_prev=localstatedir ;;
1078 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1079 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1080 localstatedir=$ac_optarg ;;
c906108c
SS
1081
1082 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1083 ac_prev=mandir ;;
1084 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1085 mandir=$ac_optarg ;;
c906108c
SS
1086
1087 -nfp | --nfp | --nf)
1088 # Obsolete; use --without-fp.
1089 with_fp=no ;;
1090
1091 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1092 | --no-cr | --no-c | -n)
c906108c
SS
1093 no_create=yes ;;
1094
1095 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1096 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1097 no_recursion=yes ;;
1098
1099 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1100 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1101 | --oldin | --oldi | --old | --ol | --o)
1102 ac_prev=oldincludedir ;;
1103 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1104 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1105 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1106 oldincludedir=$ac_optarg ;;
c906108c
SS
1107
1108 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1109 ac_prev=prefix ;;
1110 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1111 prefix=$ac_optarg ;;
c906108c
SS
1112
1113 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1114 | --program-pre | --program-pr | --program-p)
1115 ac_prev=program_prefix ;;
1116 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1117 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1118 program_prefix=$ac_optarg ;;
c906108c
SS
1119
1120 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1121 | --program-suf | --program-su | --program-s)
1122 ac_prev=program_suffix ;;
1123 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1124 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1125 program_suffix=$ac_optarg ;;
c906108c
SS
1126
1127 -program-transform-name | --program-transform-name \
1128 | --program-transform-nam | --program-transform-na \
1129 | --program-transform-n | --program-transform- \
1130 | --program-transform | --program-transfor \
1131 | --program-transfo | --program-transf \
1132 | --program-trans | --program-tran \
1133 | --progr-tra | --program-tr | --program-t)
1134 ac_prev=program_transform_name ;;
1135 -program-transform-name=* | --program-transform-name=* \
1136 | --program-transform-nam=* | --program-transform-na=* \
1137 | --program-transform-n=* | --program-transform-=* \
1138 | --program-transform=* | --program-transfor=* \
1139 | --program-transfo=* | --program-transf=* \
1140 | --program-trans=* | --program-tran=* \
1141 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1142 program_transform_name=$ac_optarg ;;
c906108c 1143
81ecdfbb
RW
1144 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1145 ac_prev=pdfdir ;;
1146 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1147 pdfdir=$ac_optarg ;;
1148
1149 -psdir | --psdir | --psdi | --psd | --ps)
1150 ac_prev=psdir ;;
1151 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1152 psdir=$ac_optarg ;;
1153
c906108c
SS
1154 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1155 | -silent | --silent | --silen | --sile | --sil)
1156 silent=yes ;;
1157
1158 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1159 ac_prev=sbindir ;;
1160 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1161 | --sbi=* | --sb=*)
bec39cab 1162 sbindir=$ac_optarg ;;
c906108c
SS
1163
1164 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1165 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1166 | --sharedst | --shareds | --shared | --share | --shar \
1167 | --sha | --sh)
1168 ac_prev=sharedstatedir ;;
1169 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1170 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1171 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1172 | --sha=* | --sh=*)
bec39cab 1173 sharedstatedir=$ac_optarg ;;
c906108c
SS
1174
1175 -site | --site | --sit)
1176 ac_prev=site ;;
1177 -site=* | --site=* | --sit=*)
bec39cab 1178 site=$ac_optarg ;;
3ace7edb 1179
c906108c
SS
1180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1181 ac_prev=srcdir ;;
1182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1183 srcdir=$ac_optarg ;;
c906108c
SS
1184
1185 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1186 | --syscon | --sysco | --sysc | --sys | --sy)
1187 ac_prev=sysconfdir ;;
1188 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1189 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1190 sysconfdir=$ac_optarg ;;
c906108c
SS
1191
1192 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1193 ac_prev=target_alias ;;
c906108c 1194 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1195 target_alias=$ac_optarg ;;
c906108c
SS
1196
1197 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1198 verbose=yes ;;
1199
bec39cab
AC
1200 -version | --version | --versio | --versi | --vers | -V)
1201 ac_init_version=: ;;
c906108c
SS
1202
1203 -with-* | --with-*)
81ecdfbb 1204 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1205 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1206 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1207 as_fn_error "invalid package name: $ac_useropt"
1208 ac_useropt_orig=$ac_useropt
1209 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210 case $ac_user_opts in
1211 *"
1212"with_$ac_useropt"
1213"*) ;;
1214 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215 ac_unrecognized_sep=', ';;
b4e70030 1216 esac
81ecdfbb 1217 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1218
1219 -without-* | --without-*)
81ecdfbb 1220 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1221 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1222 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1223 as_fn_error "invalid package name: $ac_useropt"
1224 ac_useropt_orig=$ac_useropt
1225 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226 case $ac_user_opts in
1227 *"
1228"with_$ac_useropt"
1229"*) ;;
1230 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1231 ac_unrecognized_sep=', ';;
1232 esac
1233 eval with_$ac_useropt=no ;;
c906108c
SS
1234
1235 --x)
1236 # Obsolete; use --with-x.
1237 with_x=yes ;;
1238
1239 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1240 | --x-incl | --x-inc | --x-in | --x-i)
1241 ac_prev=x_includes ;;
1242 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1243 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1244 x_includes=$ac_optarg ;;
c906108c
SS
1245
1246 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1247 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1248 ac_prev=x_libraries ;;
1249 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1250 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1251 x_libraries=$ac_optarg ;;
c906108c 1252
81ecdfbb
RW
1253 -*) as_fn_error "unrecognized option: \`$ac_option'
1254Try \`$0 --help' for more information."
c906108c
SS
1255 ;;
1256
bec39cab
AC
1257 *=*)
1258 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1259 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1260 case $ac_envvar in #(
1261 '' | [0-9]* | *[!_$as_cr_alnum]* )
1262 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1263 esac
1264 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1265 export $ac_envvar ;;
1266
c906108c 1267 *)
bec39cab 1268 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1269 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1270 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1271 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1272 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1273 ;;
1274
1275 esac
1276done
1277
1278if test -n "$ac_prev"; then
bec39cab 1279 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1280 as_fn_error "missing argument to $ac_option"
c906108c 1281fi
c906108c 1282
81ecdfbb
RW
1283if test -n "$ac_unrecognized_opts"; then
1284 case $enable_option_checking in
1285 no) ;;
1286 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1287 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1288 esac
81ecdfbb 1289fi
b4e70030 1290
81ecdfbb
RW
1291# Check all directory arguments for consistency.
1292for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293 datadir sysconfdir sharedstatedir localstatedir includedir \
1294 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1295 libdir localedir mandir
b4e70030 1296do
81ecdfbb
RW
1297 eval ac_val=\$$ac_var
1298 # Remove trailing slashes.
1299 case $ac_val in
1300 */ )
1301 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302 eval $ac_var=\$ac_val;;
1303 esac
1304 # Be sure to have absolute directory names.
b4e70030 1305 case $ac_val in
81ecdfbb
RW
1306 [\\/$]* | ?:[\\/]* ) continue;;
1307 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1308 esac
81ecdfbb 1309 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1310done
1311
bec39cab
AC
1312# There might be people who depend on the old broken behavior: `$host'
1313# used to hold the argument of --host etc.
1314# FIXME: To remove some day.
1315build=$build_alias
1316host=$host_alias
1317target=$target_alias
1318
1319# FIXME: To remove some day.
1320if test "x$host_alias" != x; then
1321 if test "x$build_alias" = x; then
1322 cross_compiling=maybe
81ecdfbb 1323 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1324 If a cross compiler is detected then cross compile mode will be used." >&2
1325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
c906108c 1329
bec39cab
AC
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
c906108c 1334
c906108c 1335
81ecdfbb
RW
1336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1339 as_fn_error "working directory cannot be determined"
1340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1341 as_fn_error "pwd does not report name of working directory"
1342
1343
c906108c
SS
1344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
1346 ac_srcdir_defaulted=yes
81ecdfbb
RW
1347 # Try the directory containing this script, then the parent directory.
1348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
1354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
c906108c 1371 srcdir=$ac_confdir
81ecdfbb 1372 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1373 srcdir=..
1374 fi
1375else
1376 ac_srcdir_defaulted=no
1377fi
81ecdfbb
RW
1378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1380 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1381fi
1382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
1384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
c906108c 1402
bec39cab
AC
1403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
1410\`configure' configures this package to adapt to many kinds of systems.
1411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
1424 -q, --quiet, --silent do not print \`checking...' messages
1425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
bec39cab
AC
1430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1432 [$ac_default_prefix]
bec39cab 1433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1434 [PREFIX]
bec39cab
AC
1435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
81ecdfbb
RW
1444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1463_ACEOF
1464
1465 cat <<\_ACEOF
1466
9009e1ae
MR
1467Program names:
1468 --program-prefix=PREFIX prepend PREFIX to installed program names
1469 --program-suffix=SUFFIX append SUFFIX to installed program names
1470 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1471
bec39cab
AC
1472X features:
1473 --x-includes=DIR X include files are in DIR
1474 --x-libraries=DIR X library files are in DIR
1475
1476System types:
1477 --build=BUILD configure for building on BUILD [guessed]
1478 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1479 --target=TARGET configure for building compilers for TARGET [HOST]
1480_ACEOF
1481fi
1482
1483if test -n "$ac_init_help"; then
1484
1485 cat <<\_ACEOF
1486
1487Optional Features:
81ecdfbb 1488 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1489 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1490 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1491 --enable-maintainer-mode enable make rules and dependencies not useful
1492 (and sometimes confusing) to the casual installer
2974be62 1493 --enable-plugins Enable support for plugins
da2f07f1 1494 --disable-largefile omit support for large files
3bc3d82a 1495 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1496 --enable-targets=TARGETS
1497 alternative target configurations
c0993dbe 1498 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1499 --disable-gdbcli disable command-line interface (CLI)
1500 --disable-gdbmi disable machine-interface (MI)
1501 --enable-tui enable full-screen terminal user interface (TUI)
1502 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1503 --enable-profiling enable profiling of GDB
3841debe 1504 --disable-rpath do not hardcode runtime library paths
17ef446e 1505 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1506 --enable-werror treat compile warnings as errors
32c1c914 1507 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1508 --enable-gdb-build-warnings
32c1c914 1509 enable GDB specific build-time compiler warnings if
a1220294 1510 gcc is used
32c1c914 1511 --enable-sim link gdb with simulator
bec39cab 1512 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1513 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1514 is auto)
bec39cab
AC
1515
1516Optional Packages:
1517 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1518 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1519 --with-separate-debug-dir=PATH
32c1c914 1520 look for global separate debug info in this path
62e4f60c 1521 [LIBDIR/debug]
b14b1491
TT
1522 --with-gdb-datadir=PATH look for global separate data files in this path
1523 [DATADIR/gdb]
29b0e8a2 1524 --with-relocated-sources=PATH
32c1c914 1525 automatically relocate this path for source files
7349ff92 1526 --with-auto-load-dir=PATH
aff139ff 1527 directories from which to load auto-loaded scripts
1564a261 1528 [$debugdir:$datadir/auto-load]
bccbefd2 1529 --with-auto-load-safe-path=PATH
aff139ff 1530 directories safe to hold auto-loaded files
7349ff92 1531 [--with-auto-load-dir]
bccbefd2
JK
1532 --without-auto-load-safe-path
1533 do not restrict auto-loaded files locations
05e7c244 1534 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1535 --with-curses use the curses library instead of the termcap
1536 library
c16158bc
JM
1537 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1538 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1539 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1540 --with-libiconv-prefix=DIR
1541 search for libiconv in DIR/include and DIR/lib
478aac75 1542 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1543 --with-system-readline use installed readline library
b8e0a31c
SD
1544 --with-jit-reader-dir=PATH
1545 directory to load the JIT readers from
5c39566f 1546 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1547 --with-gnu-ld assume the C compiler uses GNU ld default=no
1548 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1549 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1550 --with-python[=PYTHON] include python support
1551 (auto/yes/no/<python-program>)
ed3ef339
DE
1552 --with-guile[=GUILE] include guile support
1553 (auto/yes/no/<guile-version>/<pkg-config-program>)
a1220294
TT
1554 --without-included-regex
1555 don't use included regex; this is the default on
1556 systems with version 2 of the GNU C library (use
1557 with caution on other system)
81ecdfbb 1558 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1559 --with-system-gdbinit=PATH
32c1c914 1560 automatically load a system-wide gdbinit file
608e2dbb
TT
1561 --with-lzma support lzma compression (auto/yes/no)
1562 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1563 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1564 --with-tcl directory containing tcl configuration (tclConfig.sh)
1565 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1566 --with-x use the X Window System
393fd4c3
YQ
1567 --with-babeltrace include babeltrace support (auto/yes/no)
1568 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1569 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1570
1571Some influential environment variables:
1572 CC C compiler command
1573 CFLAGS C compiler flags
1574 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1575 nonstandard directory <lib dir>
81ecdfbb
RW
1576 LIBS libraries to pass to the linker, e.g. -l<library>
1577 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1578 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1579 CXX C++ compiler command
1580 CXXFLAGS C++ compiler flags
bec39cab 1581 CPP C preprocessor
f06e05e0
JK
1582 MAKEINFO Parent configure detects if it is of sufficient version.
1583 MAKEINFOFLAGS
1584 Parameters for MAKEINFO.
81ecdfbb
RW
1585 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1586 the first program found out of: `bison -y', `byacc', `yacc'.
1587 YFLAGS The list of arguments that will be passed by default to $YACC.
1588 This script will default YFLAGS to the empty string to avoid a
1589 default value of `-d' given by some make applications.
1590 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1591
1592Use these variables to override the choices made by `configure' or to help
1593it to find libraries and programs with nonstandard names/locations.
1594
81ecdfbb 1595Report bugs to the package provider.
bec39cab 1596_ACEOF
81ecdfbb 1597ac_status=$?
bec39cab
AC
1598fi
1599
1600if test "$ac_init_help" = "recursive"; then
1601 # If there are subdirs, report their specific --help.
bec39cab 1602 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1603 test -d "$ac_dir" ||
1604 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1605 continue
bec39cab
AC
1606 ac_builddir=.
1607
81ecdfbb
RW
1608case "$ac_dir" in
1609.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1610*)
1611 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1612 # A ".." for each directory in $ac_dir_suffix.
1613 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1614 case $ac_top_builddir_sub in
1615 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1616 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1617 esac ;;
1618esac
1619ac_abs_top_builddir=$ac_pwd
1620ac_abs_builddir=$ac_pwd$ac_dir_suffix
1621# for backward compatibility:
1622ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1623
1624case $srcdir in
81ecdfbb 1625 .) # We are building in place.
bec39cab 1626 ac_srcdir=.
81ecdfbb
RW
1627 ac_top_srcdir=$ac_top_builddir_sub
1628 ac_abs_top_srcdir=$ac_pwd ;;
1629 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1630 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1631 ac_top_srcdir=$srcdir
1632 ac_abs_top_srcdir=$srcdir ;;
1633 *) # Relative name.
1634 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1635 ac_top_srcdir=$ac_top_build_prefix$srcdir
1636 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1637esac
81ecdfbb 1638ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1639
81ecdfbb
RW
1640 cd "$ac_dir" || { ac_status=$?; continue; }
1641 # Check for guested configure.
1642 if test -f "$ac_srcdir/configure.gnu"; then
1643 echo &&
1644 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1645 elif test -f "$ac_srcdir/configure"; then
1646 echo &&
1647 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1648 else
81ecdfbb
RW
1649 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1650 fi || ac_status=$?
1651 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1652 done
1653fi
1654
81ecdfbb 1655test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1656if $ac_init_version; then
1657 cat <<\_ACEOF
81ecdfbb
RW
1658configure
1659generated by GNU Autoconf 2.64
bec39cab 1660
81ecdfbb 1661Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1662This configure script is free software; the Free Software Foundation
1663gives unlimited permission to copy, distribute and modify it.
1664_ACEOF
81ecdfbb 1665 exit
bec39cab 1666fi
bec39cab 1667
81ecdfbb
RW
1668## ------------------------ ##
1669## Autoconf initialization. ##
1670## ------------------------ ##
bec39cab 1671
81ecdfbb
RW
1672# ac_fn_c_try_compile LINENO
1673# --------------------------
1674# Try to compile conftest.$ac_ext, and return whether this succeeded.
1675ac_fn_c_try_compile ()
1676{
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678 rm -f conftest.$ac_objext
1679 if { { ac_try="$ac_compile"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_compile") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694 test $ac_status = 0; } && {
1695 test -z "$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 } && test -s conftest.$ac_objext; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1702
81ecdfbb
RW
1703 ac_retval=1
1704fi
1705 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1706 return $ac_retval
1707
1708} # ac_fn_c_try_compile
1709
3bc3d82a
PA
1710# ac_fn_cxx_try_compile LINENO
1711# ----------------------------
1712# Try to compile conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_cxx_try_compile ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_cxx_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737else
1738 $as_echo "$as_me: failed program was:" >&5
1739sed 's/^/| /' conftest.$ac_ext >&5
1740
1741 ac_retval=1
1742fi
1743 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1744 return $ac_retval
1745
1746} # ac_fn_cxx_try_compile
1747
81ecdfbb
RW
1748# ac_fn_c_try_cpp LINENO
1749# ----------------------
1750# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_cpp ()
bec39cab 1752{
81ecdfbb
RW
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_cpp conftest.$ac_ext"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1767 fi
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } >/dev/null && {
1770 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1771 test ! -s conftest.err
1772 }; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1777
81ecdfbb
RW
1778 ac_retval=1
1779fi
1780 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1781 return $ac_retval
bec39cab 1782
81ecdfbb 1783} # ac_fn_c_try_cpp
bec39cab 1784
81ecdfbb
RW
1785# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1786# -------------------------------------------------------
1787# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1788# the include files in INCLUDES and setting the cache variable VAR
1789# accordingly.
1790ac_fn_c_check_header_mongrel ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1793 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
1796if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1797 $as_echo_n "(cached) " >&6
1798fi
1799eval ac_res=\$$3
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1801$as_echo "$ac_res" >&6; }
1802else
1803 # Is the header compilable?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1805$as_echo_n "checking $2 usability... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_compile "$LINENO"; then :
1812 ac_header_compiler=yes
1813else
1814 ac_header_compiler=no
1815fi
1816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1818$as_echo "$ac_header_compiler" >&6; }
bec39cab 1819
81ecdfbb
RW
1820# Is the header present?
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1822$as_echo_n "checking $2 presence... " >&6; }
1823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_cpp "$LINENO"; then :
1828 ac_header_preproc=yes
1829else
1830 ac_header_preproc=no
1831fi
1832rm -f conftest.err conftest.$ac_ext
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1834$as_echo "$ac_header_preproc" >&6; }
bec39cab 1835
81ecdfbb
RW
1836# So? What about this header?
1837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1838 yes:no: )
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1840$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1843 ;;
1844 no:yes:* )
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1846$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1848$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1850$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1852$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855 ;;
1856esac
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 eval "$3=\$ac_header_compiler"
1863fi
1864eval ac_res=\$$3
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866$as_echo "$ac_res" >&6; }
1867fi
1868 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1869
81ecdfbb 1870} # ac_fn_c_check_header_mongrel
bec39cab 1871
81ecdfbb
RW
1872# ac_fn_c_try_run LINENO
1873# ----------------------
1874# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1875# that executables *can* be run.
1876ac_fn_c_try_run ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 if { { ac_try="$ac_link"
1880case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883esac
1884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885$as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_link") 2>&5
1887 ac_status=$?
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1890 { { case "(($ac_try" in
1891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892 *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896 (eval "$ac_try") 2>&5
1897 ac_status=$?
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; }; }; then :
1900 ac_retval=0
1901else
1902 $as_echo "$as_me: program exited with status $ac_status" >&5
1903 $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1905
81ecdfbb
RW
1906 ac_retval=$ac_status
1907fi
1908 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910 return $ac_retval
bec39cab 1911
81ecdfbb 1912} # ac_fn_c_try_run
bec39cab 1913
81ecdfbb
RW
1914# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1915# -------------------------------------------------------
1916# Tests whether HEADER exists and can be compiled using the include files in
1917# INCLUDES, setting the cache variable VAR accordingly.
1918ac_fn_c_check_header_compile ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922$as_echo_n "checking for $2... " >&6; }
1923if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1924 $as_echo_n "(cached) " >&6
1925else
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h. */
1928$4
1929#include <$2>
bec39cab 1930_ACEOF
81ecdfbb
RW
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 eval "$3=yes"
1933else
1934 eval "$3=no"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938eval ac_res=\$$3
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940$as_echo "$ac_res" >&6; }
1941 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1942
81ecdfbb 1943} # ac_fn_c_check_header_compile
bec39cab 1944
2974be62
AM
1945# ac_fn_c_try_link LINENO
1946# -----------------------
1947# Try to link conftest.$ac_ext, and return whether this succeeded.
1948ac_fn_c_try_link ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 rm -f conftest.$ac_objext conftest$ac_exeext
1952 if { { ac_try="$ac_link"
1953case "(($ac_try" in
1954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955 *) ac_try_echo=$ac_try;;
1956esac
1957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958$as_echo "$ac_try_echo"; } >&5
1959 (eval "$ac_link") 2>conftest.err
1960 ac_status=$?
1961 if test -s conftest.err; then
1962 grep -v '^ *+' conftest.err >conftest.er1
1963 cat conftest.er1 >&5
1964 mv -f conftest.er1 conftest.err
1965 fi
1966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967 test $ac_status = 0; } && {
1968 test -z "$ac_c_werror_flag" ||
1969 test ! -s conftest.err
1970 } && test -s conftest$ac_exeext && {
1971 test "$cross_compiling" = yes ||
1972 $as_test_x conftest$ac_exeext
1973 }; then :
1974 ac_retval=0
1975else
1976 $as_echo "$as_me: failed program was:" >&5
1977sed 's/^/| /' conftest.$ac_ext >&5
1978
1979 ac_retval=1
1980fi
1981 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1982 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1983 # interfere with the next link command; also delete a directory that is
1984 # left behind by Apple's compiler. We do this before executing the actions.
1985 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1987 return $ac_retval
1988
1989} # ac_fn_c_try_link
1990
81ecdfbb
RW
1991# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1992# --------------------------------------------
1993# Tries to find the compile-time value of EXPR in a program that includes
1994# INCLUDES, setting VAR accordingly. Returns whether the value could be
1995# computed
1996ac_fn_c_compute_int ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if test "$cross_compiling" = yes; then
2000 # Depending upon the size, compute the lo and hi bounds.
2001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007static int test_array [1 - 2 * !(($2) >= 0)];
2008test_array [0] = 0
bec39cab 2009
81ecdfbb
RW
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 ac_lo=0 ac_mid=0
2016 while :; do
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
2021main ()
2022{
2023static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2024test_array [0] = 0
bec39cab 2025
81ecdfbb
RW
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_hi=$ac_mid; break
2032else
2033 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2034 if test $ac_lo -le $ac_mid; then
2035 ac_lo= ac_hi=
2036 break
2037 fi
2038 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2039fi
81ecdfbb
RW
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 done
c906108c 2042else
81ecdfbb
RW
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) < 0)];
2050test_array [0] = 0
bec39cab 2051
81ecdfbb
RW
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2066test_array [0] = 0
bec39cab 2067
81ecdfbb
RW
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2100test_array [0] = 0
bec39cab 2101
81ecdfbb
RW
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
bec39cab 2128
81ecdfbb
RW
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
bec39cab 2149
81ecdfbb
RW
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
bec39cab 2162
81ecdfbb
RW
2163 fi
2164 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2165 return $ac_retval
bec39cab 2166
81ecdfbb 2167} # ac_fn_c_compute_int
bec39cab 2168
55a8c076
YQ
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
81ecdfbb
RW
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
2177if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2178 $as_echo_n "(cached) " >&6
2179else
81ecdfbb
RW
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
55a8c076
YQ
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
2232 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2233
2234} # ac_fn_c_check_func
2235
07697489
PA
2236# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2237# -------------------------------------------
2238# Tests whether TYPE exists after having included INCLUDES, setting cache
2239# variable VAR accordingly.
2240ac_fn_c_check_type ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2244$as_echo_n "checking for $2... " >&6; }
2245if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 eval "$3=no"
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$4
2252int
2253main ()
2254{
2255if (sizeof ($2))
2256 return 0;
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"; then :
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268if (sizeof (($2)))
2269 return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275
2276else
2277 eval "$3=yes"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$3
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2287
2288} # ac_fn_c_check_type
2289
770d76d7
PA
2290# ac_fn_c_check_decl LINENO SYMBOL VAR
2291# ------------------------------------
2292# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 as_decl_name=`echo $2|sed 's/ *(.*//'`
2297 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2299$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2300if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
2309#ifndef $as_decl_name
2310#ifdef __cplusplus
2311 (void) $as_decl_use;
2312#else
2313 (void) $as_decl_name;
2314#endif
2315#endif
2316
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$3=yes"
2323else
2324 eval "$3=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2332
2333} # ac_fn_c_check_decl
2334
55a8c076
YQ
2335# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2336# ----------------------------------------------------
2337# Tries to find if the field MEMBER exists in type AGGR, after including
2338# INCLUDES, setting cache variable VAR accordingly.
2339ac_fn_c_check_member ()
2340{
2341 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2343$as_echo_n "checking for $2.$3... " >&6; }
2344if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$5
2350int
2351main ()
2352{
2353static $2 ac_aggr;
2354if (ac_aggr.$3)
2355return 0;
2356 ;
2357 return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_compile "$LINENO"; then :
2361 eval "$4=yes"
2362else
2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h. */
2365$5
2366int
2367main ()
2368{
2369static $2 ac_aggr;
2370if (sizeof ac_aggr.$3)
2371return 0;
2372 ;
2373 return 0;
2374}
2375_ACEOF
2376if ac_fn_c_try_compile "$LINENO"; then :
2377 eval "$4=yes"
2378else
2379 eval "$4=no"
2380fi
2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$4
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2389
2390} # ac_fn_c_check_member
81ecdfbb
RW
2391cat >config.log <<_ACEOF
2392This file contains any messages produced by compilers while
2393running configure, to aid debugging if configure makes a mistake.
d5af19ba 2394
81ecdfbb
RW
2395It was created by $as_me, which was
2396generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2397
81ecdfbb 2398 $ $0 $@
413ccac7 2399
81ecdfbb
RW
2400_ACEOF
2401exec 5>>config.log
2402{
2403cat <<_ASUNAME
2404## --------- ##
2405## Platform. ##
2406## --------- ##
413ccac7 2407
81ecdfbb
RW
2408hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2409uname -m = `(uname -m) 2>/dev/null || echo unknown`
2410uname -r = `(uname -r) 2>/dev/null || echo unknown`
2411uname -s = `(uname -s) 2>/dev/null || echo unknown`
2412uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2413
81ecdfbb
RW
2414/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2415/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2416
81ecdfbb
RW
2417/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2418/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2419/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2420/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2421/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2422/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2423/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2424
81ecdfbb 2425_ASUNAME
bec39cab 2426
bec39cab
AC
2427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2428for as_dir in $PATH
2429do
2430 IFS=$as_save_IFS
2431 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2432 $as_echo "PATH: $as_dir"
2433 done
2434IFS=$as_save_IFS
bec39cab 2435
81ecdfbb 2436} >&5
bec39cab 2437
81ecdfbb 2438cat >&5 <<_ACEOF
bec39cab 2439
bec39cab 2440
81ecdfbb
RW
2441## ----------- ##
2442## Core tests. ##
2443## ----------- ##
2444
2445_ACEOF
2446
2447
2448# Keep a trace of the command line.
2449# Strip out --no-create and --no-recursion so they do not pile up.
2450# Strip out --silent because we don't want to record it for future runs.
2451# Also quote any args containing shell meta-characters.
2452# Make two passes to allow for proper duplicate-argument suppression.
2453ac_configure_args=
2454ac_configure_args0=
2455ac_configure_args1=
2456ac_must_keep_next=false
2457for ac_pass in 1 2
2458do
2459 for ac_arg
2460 do
2461 case $ac_arg in
2462 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2463 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2464 | -silent | --silent | --silen | --sile | --sil)
2465 continue ;;
2466 *\'*)
2467 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2468 esac
2469 case $ac_pass in
2470 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2471 2)
2472 as_fn_append ac_configure_args1 " '$ac_arg'"
2473 if test $ac_must_keep_next = true; then
2474 ac_must_keep_next=false # Got value, back to normal.
2475 else
2476 case $ac_arg in
2477 *=* | --config-cache | -C | -disable-* | --disable-* \
2478 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2479 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2480 | -with-* | --with-* | -without-* | --without-* | --x)
2481 case "$ac_configure_args0 " in
2482 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2483 esac
2484 ;;
2485 -* ) ac_must_keep_next=true ;;
2486 esac
2487 fi
2488 as_fn_append ac_configure_args " '$ac_arg'"
2489 ;;
2490 esac
2491 done
2492done
2493{ ac_configure_args0=; unset ac_configure_args0;}
2494{ ac_configure_args1=; unset ac_configure_args1;}
2495
2496# When interrupted or exit'd, cleanup temporary files, and complete
2497# config.log. We remove comments because anyway the quotes in there
2498# would cause problems or look ugly.
2499# WARNING: Use '\'' to represent an apostrophe within the trap.
2500# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2501trap 'exit_status=$?
2502 # Save into config.log some information that might help in debugging.
2503 {
2504 echo
2505
2506 cat <<\_ASBOX
2507## ---------------- ##
2508## Cache variables. ##
2509## ---------------- ##
2510_ASBOX
2511 echo
2512 # The following way of writing the cache mishandles newlines in values,
2513(
2514 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2515 eval ac_val=\$$ac_var
2516 case $ac_val in #(
2517 *${as_nl}*)
2518 case $ac_var in #(
2519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2520$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2521 esac
2522 case $ac_var in #(
2523 _ | IFS | as_nl) ;; #(
2524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2525 *) { eval $ac_var=; unset $ac_var;} ;;
2526 esac ;;
2527 esac
2528 done
2529 (set) 2>&1 |
2530 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2531 *${as_nl}ac_space=\ *)
2532 sed -n \
2533 "s/'\''/'\''\\\\'\'''\''/g;
2534 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2535 ;; #(
2536 *)
2537 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2538 ;;
2539 esac |
2540 sort
2541)
2542 echo
2543
2544 cat <<\_ASBOX
2545## ----------------- ##
2546## Output variables. ##
2547## ----------------- ##
2548_ASBOX
2549 echo
2550 for ac_var in $ac_subst_vars
2551 do
2552 eval ac_val=\$$ac_var
2553 case $ac_val in
2554 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2555 esac
2556 $as_echo "$ac_var='\''$ac_val'\''"
2557 done | sort
2558 echo
2559
2560 if test -n "$ac_subst_files"; then
2561 cat <<\_ASBOX
2562## ------------------- ##
2563## File substitutions. ##
2564## ------------------- ##
2565_ASBOX
2566 echo
2567 for ac_var in $ac_subst_files
2568 do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in
2571 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2572 esac
2573 $as_echo "$ac_var='\''$ac_val'\''"
2574 done | sort
2575 echo
2576 fi
2577
2578 if test -s confdefs.h; then
2579 cat <<\_ASBOX
2580## ----------- ##
2581## confdefs.h. ##
2582## ----------- ##
2583_ASBOX
2584 echo
2585 cat confdefs.h
2586 echo
2587 fi
2588 test "$ac_signal" != 0 &&
2589 $as_echo "$as_me: caught signal $ac_signal"
2590 $as_echo "$as_me: exit $exit_status"
2591 } >&5
2592 rm -f core *.core core.conftest.* &&
2593 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2594 exit $exit_status
2595' 0
2596for ac_signal in 1 2 13 15; do
2597 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2598done
2599ac_signal=0
2600
2601# confdefs.h avoids OS command line length limits that DEFS can exceed.
2602rm -f -r conftest* confdefs.h
2603
2604$as_echo "/* confdefs.h */" > confdefs.h
2605
2606# Predefined preprocessor variables.
2607
2608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_NAME "$PACKAGE_NAME"
2610_ACEOF
2611
2612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2614_ACEOF
2615
2616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_VERSION "$PACKAGE_VERSION"
2618_ACEOF
2619
2620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_STRING "$PACKAGE_STRING"
2622_ACEOF
2623
2624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2626_ACEOF
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_URL "$PACKAGE_URL"
2630_ACEOF
2631
2632
2633# Let the site file select an alternate cache file if it wants to.
2634# Prefer an explicitly selected file to automatically selected ones.
2635ac_site_file1=NONE
2636ac_site_file2=NONE
2637if test -n "$CONFIG_SITE"; then
2638 ac_site_file1=$CONFIG_SITE
2639elif test "x$prefix" != xNONE; then
2640 ac_site_file1=$prefix/share/config.site
2641 ac_site_file2=$prefix/etc/config.site
2642else
2643 ac_site_file1=$ac_default_prefix/share/config.site
2644 ac_site_file2=$ac_default_prefix/etc/config.site
2645fi
2646for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2647do
2648 test "x$ac_site_file" = xNONE && continue
2649 if test -r "$ac_site_file"; then
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2651$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2652 sed 's/^/| /' "$ac_site_file" >&5
2653 . "$ac_site_file"
2654 fi
2655done
2656
2657if test -r "$cache_file"; then
2658 # Some versions of bash will fail to source /dev/null (special
2659 # files actually), so we avoid doing that.
2660 if test -f "$cache_file"; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2662$as_echo "$as_me: loading cache $cache_file" >&6;}
2663 case $cache_file in
2664 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2665 *) . "./$cache_file";;
2666 esac
2667 fi
2668else
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2670$as_echo "$as_me: creating cache $cache_file" >&6;}
2671 >$cache_file
bec39cab
AC
2672fi
2673
81ecdfbb
RW
2674# Check that the precious variables saved in the cache have kept the same
2675# value.
2676ac_cache_corrupted=false
2677for ac_var in $ac_precious_vars; do
2678 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2679 eval ac_new_set=\$ac_env_${ac_var}_set
2680 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2681 eval ac_new_val=\$ac_env_${ac_var}_value
2682 case $ac_old_set,$ac_new_set in
2683 set,)
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2685$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2686 ac_cache_corrupted=: ;;
2687 ,set)
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2689$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2690 ac_cache_corrupted=: ;;
2691 ,);;
2692 *)
2693 if test "x$ac_old_val" != "x$ac_new_val"; then
2694 # differences in whitespace do not lead to failure.
2695 ac_old_val_w=`echo x $ac_old_val`
2696 ac_new_val_w=`echo x $ac_new_val`
2697 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2699$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2700 ac_cache_corrupted=:
2701 else
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2703$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2704 eval $ac_var=\$ac_old_val
2705 fi
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2707$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2709$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2710 fi;;
2711 esac
2712 # Pass precious variables to config.status.
2713 if test "$ac_new_set" = set; then
2714 case $ac_new_val in
2715 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2716 *) ac_arg=$ac_var=$ac_new_val ;;
2717 esac
2718 case " $ac_configure_args " in
2719 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2720 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2721 esac
2722 fi
2723done
2724if $ac_cache_corrupted; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2728$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2729 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2730fi
2731## -------------------- ##
2732## Main body of script. ##
2733## -------------------- ##
2734
2735ac_ext=c
2736ac_cpp='$CPP $CPPFLAGS'
2737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2739ac_compiler_gnu=$ac_cv_c_compiler_gnu
2740
2741
2742
2743
2744
2745ac_config_headers="$ac_config_headers config.h:config.in"
2746
2747
2748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2749$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2750 # Check whether --enable-maintainer-mode was given.
2751if test "${enable_maintainer_mode+set}" = set; then :
2752 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2753else
2754 USE_MAINTAINER_MODE=no
2755fi
2756
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2758$as_echo "$USE_MAINTAINER_MODE" >&6; }
2759 if test $USE_MAINTAINER_MODE = yes; then
2760 MAINTAINER_MODE_TRUE=
2761 MAINTAINER_MODE_FALSE='#'
2762else
2763 MAINTAINER_MODE_TRUE='#'
2764 MAINTAINER_MODE_FALSE=
2765fi
2766
2767 MAINT=$MAINTAINER_MODE_TRUE
2768
2769
2770
17ef446e 2771# Set the 'development' global.
270c9937 2772. $srcdir/../bfd/development.sh
f5f1cdb6 2773
81ecdfbb
RW
2774ac_ext=c
2775ac_cpp='$CPP $CPPFLAGS'
2776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778ac_compiler_gnu=$ac_cv_c_compiler_gnu
2779if test -n "$ac_tool_prefix"; then
2780 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2781set dummy ${ac_tool_prefix}gcc; ac_word=$2
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2783$as_echo_n "checking for $ac_word... " >&6; }
2784if test "${ac_cv_prog_CC+set}" = set; then :
2785 $as_echo_n "(cached) " >&6
c906108c
SS
2786else
2787 if test -n "$CC"; then
2788 ac_cv_prog_CC="$CC" # Let the user override the test.
2789else
bec39cab
AC
2790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2791for as_dir in $PATH
2792do
2793 IFS=$as_save_IFS
2794 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2795 for ac_exec_ext in '' $ac_executable_extensions; do
2796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2797 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2799 break 2
2800 fi
2801done
81ecdfbb
RW
2802 done
2803IFS=$as_save_IFS
bec39cab 2804
c906108c
SS
2805fi
2806fi
bec39cab 2807CC=$ac_cv_prog_CC
c906108c 2808if test -n "$CC"; then
81ecdfbb
RW
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2810$as_echo "$CC" >&6; }
c906108c 2811else
81ecdfbb
RW
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2813$as_echo "no" >&6; }
c906108c
SS
2814fi
2815
81ecdfbb 2816
b4e70030
JB
2817fi
2818if test -z "$ac_cv_prog_CC"; then
2819 ac_ct_CC=$CC
81ecdfbb
RW
2820 # Extract the first word of "gcc", so it can be a program name with args.
2821set dummy gcc; ac_word=$2
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2823$as_echo_n "checking for $ac_word... " >&6; }
2824if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2825 $as_echo_n "(cached) " >&6
b4e70030
JB
2826else
2827 if test -n "$ac_ct_CC"; then
2828 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2829else
2830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2831for as_dir in $PATH
2832do
2833 IFS=$as_save_IFS
2834 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2835 for ac_exec_ext in '' $ac_executable_extensions; do
2836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2837 ac_cv_prog_ac_ct_CC="gcc"
2838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2839 break 2
4e8d927d 2840 fi
b4e70030 2841done
81ecdfbb
RW
2842 done
2843IFS=$as_save_IFS
b4e70030
JB
2844
2845fi
2846fi
2847ac_ct_CC=$ac_cv_prog_ac_ct_CC
2848if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2850$as_echo "$ac_ct_CC" >&6; }
b4e70030 2851else
81ecdfbb
RW
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2853$as_echo "no" >&6; }
b4e70030
JB
2854fi
2855
81ecdfbb
RW
2856 if test "x$ac_ct_CC" = x; then
2857 CC=""
2858 else
2859 case $cross_compiling:$ac_tool_warned in
2860yes:)
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2863ac_tool_warned=yes ;;
2864esac
2865 CC=$ac_ct_CC
2866 fi
b4e70030
JB
2867else
2868 CC="$ac_cv_prog_CC"
2869fi
2870
c906108c 2871if test -z "$CC"; then
81ecdfbb
RW
2872 if test -n "$ac_tool_prefix"; then
2873 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2874set dummy ${ac_tool_prefix}cc; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
2877if test "${ac_cv_prog_CC+set}" = set; then :
2878 $as_echo_n "(cached) " >&6
c906108c
SS
2879else
2880 if test -n "$CC"; then
2881 ac_cv_prog_CC="$CC" # Let the user override the test.
2882else
bec39cab
AC
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2890 ac_cv_prog_CC="${ac_tool_prefix}cc"
2891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2892 break 2
2893 fi
2894done
81ecdfbb
RW
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
2900CC=$ac_cv_prog_CC
2901if test -n "$CC"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2903$as_echo "$CC" >&6; }
2904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
2910 fi
2911fi
2912if test -z "$CC"; then
2913 # Extract the first word of "cc", so it can be a program name with args.
2914set dummy cc; ac_word=$2
2915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2916$as_echo_n "checking for $ac_word... " >&6; }
2917if test "${ac_cv_prog_CC+set}" = set; then :
2918 $as_echo_n "(cached) " >&6
2919else
2920 if test -n "$CC"; then
2921 ac_cv_prog_CC="$CC" # Let the user override the test.
2922else
2923 ac_prog_rejected=no
2924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2925for as_dir in $PATH
2926do
2927 IFS=$as_save_IFS
2928 test -z "$as_dir" && as_dir=.
2929 for ac_exec_ext in '' $ac_executable_extensions; do
2930 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2931 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2932 ac_prog_rejected=yes
2933 continue
2934 fi
2935 ac_cv_prog_CC="cc"
2936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2937 break 2
2938 fi
2939done
2940 done
2941IFS=$as_save_IFS
bec39cab 2942
c906108c
SS
2943if test $ac_prog_rejected = yes; then
2944 # We found a bogon in the path, so make sure we never use it.
2945 set dummy $ac_cv_prog_CC
2946 shift
bec39cab 2947 if test $# != 0; then
c906108c
SS
2948 # We chose a different compiler from the bogus one.
2949 # However, it has the same basename, so the bogon will be chosen
2950 # first if we set CC to just the basename; use the full file name.
2951 shift
bec39cab 2952 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2953 fi
2954fi
2955fi
2956fi
bec39cab 2957CC=$ac_cv_prog_CC
c906108c 2958if test -n "$CC"; then
81ecdfbb
RW
2959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2960$as_echo "$CC" >&6; }
c906108c 2961else
81ecdfbb
RW
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963$as_echo "no" >&6; }
c906108c
SS
2964fi
2965
81ecdfbb 2966
bec39cab
AC
2967fi
2968if test -z "$CC"; then
2969 if test -n "$ac_tool_prefix"; then
81ecdfbb 2970 for ac_prog in cl.exe
bec39cab
AC
2971 do
2972 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2973set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2975$as_echo_n "checking for $ac_word... " >&6; }
2976if test "${ac_cv_prog_CC+set}" = set; then :
2977 $as_echo_n "(cached) " >&6
c906108c
SS
2978else
2979 if test -n "$CC"; then
2980 ac_cv_prog_CC="$CC" # Let the user override the test.
2981else
bec39cab
AC
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2989 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2991 break 2
2992 fi
2993done
81ecdfbb
RW
2994 done
2995IFS=$as_save_IFS
bec39cab 2996
c906108c
SS
2997fi
2998fi
bec39cab 2999CC=$ac_cv_prog_CC
c906108c 3000if test -n "$CC"; then
81ecdfbb
RW
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3002$as_echo "$CC" >&6; }
c906108c 3003else
81ecdfbb
RW
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3005$as_echo "no" >&6; }
c906108c 3006fi
bec39cab 3007
81ecdfbb 3008
bec39cab
AC
3009 test -n "$CC" && break
3010 done
3011fi
3012if test -z "$CC"; then
3013 ac_ct_CC=$CC
81ecdfbb 3014 for ac_prog in cl.exe
bec39cab
AC
3015do
3016 # Extract the first word of "$ac_prog", so it can be a program name with args.
3017set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3019$as_echo_n "checking for $ac_word... " >&6; }
3020if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3021 $as_echo_n "(cached) " >&6
bec39cab
AC
3022else
3023 if test -n "$ac_ct_CC"; then
3024 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3025else
3026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3027for as_dir in $PATH
3028do
3029 IFS=$as_save_IFS
3030 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3031 for ac_exec_ext in '' $ac_executable_extensions; do
3032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3033 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3035 break 2
c906108c 3036 fi
bec39cab 3037done
81ecdfbb
RW
3038 done
3039IFS=$as_save_IFS
bec39cab
AC
3040
3041fi
3042fi
3043ac_ct_CC=$ac_cv_prog_ac_ct_CC
3044if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3046$as_echo "$ac_ct_CC" >&6; }
bec39cab 3047else
81ecdfbb
RW
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
c906108c
SS
3050fi
3051
81ecdfbb 3052
bec39cab
AC
3053 test -n "$ac_ct_CC" && break
3054done
c906108c 3055
81ecdfbb
RW
3056 if test "x$ac_ct_CC" = x; then
3057 CC=""
3058 else
3059 case $cross_compiling:$ac_tool_warned in
3060yes:)
3061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3063ac_tool_warned=yes ;;
3064esac
3065 CC=$ac_ct_CC
3066 fi
bec39cab
AC
3067fi
3068
3069fi
3070
3071
81ecdfbb
RW
3072test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3074as_fn_error "no acceptable C compiler found in \$PATH
3075See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3076
3077# Provide some information about the compiler.
81ecdfbb
RW
3078$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3079set X $ac_compile
3080ac_compiler=$2
3081for ac_option in --version -v -V -qversion; do
3082 { { ac_try="$ac_compiler $ac_option >&5"
3083case "(($ac_try" in
3084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085 *) ac_try_echo=$ac_try;;
3086esac
3087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3088$as_echo "$ac_try_echo"; } >&5
3089 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3090 ac_status=$?
81ecdfbb
RW
3091 if test -s conftest.err; then
3092 sed '10a\
3093... rest of stderr output deleted ...
3094 10q' conftest.err >conftest.er1
3095 cat conftest.er1 >&5
3096 rm -f conftest.er1 conftest.err
3097 fi
3098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3099 test $ac_status = 0; }
3100done
bec39cab 3101
81ecdfbb 3102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3103/* end confdefs.h. */
3104
3105int
3106main ()
3107{
3108
3109 ;
3110 return 0;
3111}
3112_ACEOF
3113ac_clean_files_save=$ac_clean_files
81ecdfbb 3114ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3115# Try to create an executable without -o first, disregard a.out.
3116# It will help us diagnose broken compilers, and finding out an intuition
3117# of exeext.
81ecdfbb
RW
3118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3119$as_echo_n "checking for C compiler default output file name... " >&6; }
3120ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3121
3122# The possible output files:
3123ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3124
3125ac_rmfiles=
3126for ac_file in $ac_files
3127do
3128 case $ac_file in
3129 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3130 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3131 esac
3132done
3133rm -f $ac_rmfiles
3134
3135if { { ac_try="$ac_link_default"
3136case "(($ac_try" in
3137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3138 *) ac_try_echo=$ac_try;;
3139esac
3140eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3141$as_echo "$ac_try_echo"; } >&5
3142 (eval "$ac_link_default") 2>&5
3143 ac_status=$?
3144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3145 test $ac_status = 0; }; then :
3146 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3147# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3148# in a Makefile. We should not override ac_cv_exeext if it was cached,
3149# so that the user can short-circuit this test for compilers unknown to
3150# Autoconf.
3151for ac_file in $ac_files ''
bec39cab
AC
3152do
3153 test -f "$ac_file" || continue
3154 case $ac_file in
81ecdfbb 3155 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3156 ;;
3157 [ab].out )
3158 # We found the default executable, but exeext='' is most
3159 # certainly right.
3160 break;;
3161 *.* )
81ecdfbb
RW
3162 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3163 then :; else
3164 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3165 fi
3166 # We set ac_cv_exeext here because the later test for it is not
3167 # safe: cross compilers may not add the suffix if given an `-o'
3168 # argument, so we may need to know it at that point already.
3169 # Even if this section looks crufty: it has the advantage of
3170 # actually working.
b4e70030
JB
3171 break;;
3172 * )
3173 break;;
bec39cab
AC
3174 esac
3175done
81ecdfbb
RW
3176test "$ac_cv_exeext" = no && ac_cv_exeext=
3177
bec39cab 3178else
81ecdfbb
RW
3179 ac_file=''
3180fi
3181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3182$as_echo "$ac_file" >&6; }
3183if test -z "$ac_file"; then :
3184 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3185sed 's/^/| /' conftest.$ac_ext >&5
3186
81ecdfbb
RW
3187{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3189{ as_fn_set_status 77
3190as_fn_error "C compiler cannot create executables
3191See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3192fi
b4e70030 3193ac_exeext=$ac_cv_exeext
b4e70030 3194
81ecdfbb 3195# Check that the compiler produces executables we can run. If not, either
bec39cab 3196# the compiler is broken, or we cross compile.
81ecdfbb
RW
3197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3198$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3199# If not cross compiling, check that we can run a simple program.
3200if test "$cross_compiling" != yes; then
3201 if { ac_try='./$ac_file'
81ecdfbb
RW
3202 { { case "(($ac_try" in
3203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3204 *) ac_try_echo=$ac_try;;
3205esac
3206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3207$as_echo "$ac_try_echo"; } >&5
3208 (eval "$ac_try") 2>&5
bec39cab 3209 ac_status=$?
81ecdfbb
RW
3210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; }; }; then
bec39cab 3212 cross_compiling=no
c906108c 3213 else
bec39cab
AC
3214 if test "$cross_compiling" = maybe; then
3215 cross_compiling=yes
3216 else
81ecdfbb
RW
3217 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3219as_fn_error "cannot run C compiled programs.
bec39cab 3220If you meant to cross compile, use \`--host'.
81ecdfbb 3221See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3222 fi
c906108c 3223 fi
bec39cab 3224fi
81ecdfbb
RW
3225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3226$as_echo "yes" >&6; }
bec39cab 3227
81ecdfbb 3228rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3229ac_clean_files=$ac_clean_files_save
81ecdfbb 3230# Check that the compiler produces executables we can run. If not, either
b4e70030 3231# the compiler is broken, or we cross compile.
81ecdfbb
RW
3232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3233$as_echo_n "checking whether we are cross compiling... " >&6; }
3234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3235$as_echo "$cross_compiling" >&6; }
3236
3237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3238$as_echo_n "checking for suffix of executables... " >&6; }
3239if { { ac_try="$ac_link"
3240case "(($ac_try" in
3241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3242 *) ac_try_echo=$ac_try;;
3243esac
3244eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3245$as_echo "$ac_try_echo"; } >&5
3246 (eval "$ac_link") 2>&5
bec39cab 3247 ac_status=$?
81ecdfbb
RW
3248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3249 test $ac_status = 0; }; then :
b4e70030
JB
3250 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3251# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3252# work properly (i.e., refer to `conftest.exe'), while it won't with
3253# `rm'.
3254for ac_file in conftest.exe conftest conftest.*; do
3255 test -f "$ac_file" || continue
3256 case $ac_file in
81ecdfbb 3257 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3258 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3259 break;;
3260 * ) break;;
3261 esac
3262done
c906108c 3263else
81ecdfbb
RW
3264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3266as_fn_error "cannot compute suffix of executables: cannot compile and link
3267See \`config.log' for more details." "$LINENO" 5; }
c906108c 3268fi
b4e70030 3269rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3271$as_echo "$ac_cv_exeext" >&6; }
c906108c 3272
b4e70030 3273rm -f conftest.$ac_ext
bec39cab
AC
3274EXEEXT=$ac_cv_exeext
3275ac_exeext=$EXEEXT
81ecdfbb
RW
3276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3277$as_echo_n "checking for suffix of object files... " >&6; }
3278if test "${ac_cv_objext+set}" = set; then :
3279 $as_echo_n "(cached) " >&6
bec39cab 3280else
81ecdfbb 3281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3282/* end confdefs.h. */
3283
3284int
3285main ()
3286{
3287
3288 ;
3289 return 0;
3290}
3291_ACEOF
3292rm -f conftest.o conftest.obj
81ecdfbb
RW
3293if { { ac_try="$ac_compile"
3294case "(($ac_try" in
3295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3296 *) ac_try_echo=$ac_try;;
3297esac
3298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3299$as_echo "$ac_try_echo"; } >&5
3300 (eval "$ac_compile") 2>&5
3301 ac_status=$?
3302 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3303 test $ac_status = 0; }; then :
3304 for ac_file in conftest.o conftest.obj conftest.*; do
3305 test -f "$ac_file" || continue;
bec39cab 3306 case $ac_file in
81ecdfbb 3307 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3308 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3309 break;;
3310 esac
3311done
c906108c 3312else
81ecdfbb 3313 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3314sed 's/^/| /' conftest.$ac_ext >&5
3315
81ecdfbb
RW
3316{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3318as_fn_error "cannot compute suffix of object files: cannot compile
3319See \`config.log' for more details." "$LINENO" 5; }
c906108c 3320fi
b4e70030 3321rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3322fi
81ecdfbb
RW
3323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3324$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3325OBJEXT=$ac_cv_objext
3326ac_objext=$OBJEXT
81ecdfbb
RW
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3328$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3329if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3330 $as_echo_n "(cached) " >&6
c906108c 3331else
81ecdfbb 3332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3333/* end confdefs.h. */
3334
3335int
3336main ()
3337{
3338#ifndef __GNUC__
3339 choke me
3340#endif
3341
3342 ;
3343 return 0;
3344}
3345_ACEOF
81ecdfbb 3346if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3347 ac_compiler_gnu=yes
3348else
81ecdfbb 3349 ac_compiler_gnu=no
bec39cab 3350fi
81ecdfbb 3351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3352ac_cv_c_compiler_gnu=$ac_compiler_gnu
3353
3354fi
81ecdfbb
RW
3355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3356$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3357if test $ac_compiler_gnu = yes; then
3358 GCC=yes
3359else
3360 GCC=
3361fi
bec39cab
AC
3362ac_test_CFLAGS=${CFLAGS+set}
3363ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3365$as_echo_n "checking whether $CC accepts -g... " >&6; }
3366if test "${ac_cv_prog_cc_g+set}" = set; then :
3367 $as_echo_n "(cached) " >&6
bec39cab 3368else
81ecdfbb
RW
3369 ac_save_c_werror_flag=$ac_c_werror_flag
3370 ac_c_werror_flag=yes
3371 ac_cv_prog_cc_g=no
3372 CFLAGS="-g"
3373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3374/* end confdefs.h. */
3375
3376int
3377main ()
3378{
3379
3380 ;
3381 return 0;
3382}
3383_ACEOF
81ecdfbb 3384if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3385 ac_cv_prog_cc_g=yes
3386else
81ecdfbb
RW
3387 CFLAGS=""
3388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3389/* end confdefs.h. */
3390
3391int
3392main ()
3393{
3394
3395 ;
3396 return 0;
3397}
3398_ACEOF
3399if ac_fn_c_try_compile "$LINENO"; then :
3400
3401else
3402 ac_c_werror_flag=$ac_save_c_werror_flag
3403 CFLAGS="-g"
3404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3405/* end confdefs.h. */
3406
3407int
3408main ()
3409{
c906108c 3410
81ecdfbb
RW
3411 ;
3412 return 0;
3413}
3414_ACEOF
3415if ac_fn_c_try_compile "$LINENO"; then :
3416 ac_cv_prog_cc_g=yes
3417fi
3418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419fi
3420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3421fi
81ecdfbb
RW
3422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3423 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3424fi
81ecdfbb
RW
3425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3426$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3427if test "$ac_test_CFLAGS" = set; then
bec39cab 3428 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3429elif test $ac_cv_prog_cc_g = yes; then
3430 if test "$GCC" = yes; then
3431 CFLAGS="-g -O2"
3432 else
3433 CFLAGS="-g"
3434 fi
3435else
3436 if test "$GCC" = yes; then
3437 CFLAGS="-O2"
3438 else
3439 CFLAGS=
3440 fi
3441fi
81ecdfbb
RW
3442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3443$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3444if test "${ac_cv_prog_cc_c89+set}" = set; then :
3445 $as_echo_n "(cached) " >&6
bec39cab 3446else
81ecdfbb 3447 ac_cv_prog_cc_c89=no
bec39cab 3448ac_save_CC=$CC
81ecdfbb 3449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3450/* end confdefs.h. */
c906108c
SS
3451#include <stdarg.h>
3452#include <stdio.h>
3453#include <sys/types.h>
3454#include <sys/stat.h>
3455/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3456struct buf { int x; };
3457FILE * (*rcsopen) (struct buf *, struct stat *, int);
3458static char *e (p, i)
3459 char **p;
3460 int i;
3461{
3462 return p[i];
3463}
3464static char *f (char * (*g) (char **, int), char **p, ...)
3465{
3466 char *s;
3467 va_list v;
3468 va_start (v,p);
3469 s = g (p, va_arg (v,int));
3470 va_end (v);
3471 return s;
3472}
bec39cab
AC
3473
3474/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3475 function prototypes and stuff, but not '\xHH' hex character constants.
3476 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3477 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3478 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3479 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3480 that's true only with -std. */
bec39cab
AC
3481int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3482
81ecdfbb
RW
3483/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3484 inside strings and character constants. */
3485#define FOO(x) 'x'
3486int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3487
c906108c
SS
3488int test (int i, double x);
3489struct s1 {int (*f) (int a);};
3490struct s2 {int (*f) (double a);};
3491int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3492int argc;
3493char **argv;
bec39cab
AC
3494int
3495main ()
3496{
c906108c 3497return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3498 ;
3499 return 0;
3500}
3501_ACEOF
81ecdfbb
RW
3502for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3503 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3504do
3505 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3506 if ac_fn_c_try_compile "$LINENO"; then :
3507 ac_cv_prog_cc_c89=$ac_arg
c906108c 3508fi
81ecdfbb
RW
3509rm -f core conftest.err conftest.$ac_objext
3510 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3511done
81ecdfbb 3512rm -f conftest.$ac_ext
bec39cab 3513CC=$ac_save_CC
c906108c
SS
3514
3515fi
81ecdfbb
RW
3516# AC_CACHE_VAL
3517case "x$ac_cv_prog_cc_c89" in
3518 x)
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3520$as_echo "none needed" >&6; } ;;
3521 xno)
3522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3523$as_echo "unsupported" >&6; } ;;
bec39cab 3524 *)
81ecdfbb
RW
3525 CC="$CC $ac_cv_prog_cc_c89"
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3527$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3528esac
81ecdfbb 3529if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3530
b4e70030
JB
3531fi
3532
bec39cab
AC
3533ac_ext=c
3534ac_cpp='$CPP $CPPFLAGS'
3535ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3536ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3537ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3538
3bc3d82a
PA
3539ac_ext=cpp
3540ac_cpp='$CXXCPP $CPPFLAGS'
3541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3544if test -z "$CXX"; then
3545 if test -n "$CCC"; then
3546 CXX=$CCC
3547 else
3548 if test -n "$ac_tool_prefix"; then
3549 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3550 do
3551 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3552set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3554$as_echo_n "checking for $ac_word... " >&6; }
3555if test "${ac_cv_prog_CXX+set}" = set; then :
3556 $as_echo_n "(cached) " >&6
3557else
3558 if test -n "$CXX"; then
3559 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3560else
3561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3562for as_dir in $PATH
3563do
3564 IFS=$as_save_IFS
3565 test -z "$as_dir" && as_dir=.
3566 for ac_exec_ext in '' $ac_executable_extensions; do
3567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3568 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3570 break 2
3571 fi
3572done
3573 done
3574IFS=$as_save_IFS
3575
3576fi
3577fi
3578CXX=$ac_cv_prog_CXX
3579if test -n "$CXX"; then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3581$as_echo "$CXX" >&6; }
3582else
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584$as_echo "no" >&6; }
3585fi
3586
3587
3588 test -n "$CXX" && break
3589 done
3590fi
3591if test -z "$CXX"; then
3592 ac_ct_CXX=$CXX
3593 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3594do
3595 # Extract the first word of "$ac_prog", so it can be a program name with args.
3596set dummy $ac_prog; ac_word=$2
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3598$as_echo_n "checking for $ac_word... " >&6; }
3599if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3600 $as_echo_n "(cached) " >&6
3601else
3602 if test -n "$ac_ct_CXX"; then
3603 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3604else
3605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH
3607do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
3610 for ac_exec_ext in '' $ac_executable_extensions; do
3611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3612 ac_cv_prog_ac_ct_CXX="$ac_prog"
3613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3614 break 2
3615 fi
3616done
3617 done
3618IFS=$as_save_IFS
3619
3620fi
3621fi
3622ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3623if test -n "$ac_ct_CXX"; then
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3625$as_echo "$ac_ct_CXX" >&6; }
3626else
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628$as_echo "no" >&6; }
3629fi
3630
3631
3632 test -n "$ac_ct_CXX" && break
3633done
3634
3635 if test "x$ac_ct_CXX" = x; then
3636 CXX="g++"
3637 else
3638 case $cross_compiling:$ac_tool_warned in
3639yes:)
3640{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3641$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3642ac_tool_warned=yes ;;
3643esac
3644 CXX=$ac_ct_CXX
3645 fi
3646fi
3647
3648 fi
3649fi
3650# Provide some information about the compiler.
3651$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3652set X $ac_compile
3653ac_compiler=$2
3654for ac_option in --version -v -V -qversion; do
3655 { { ac_try="$ac_compiler $ac_option >&5"
3656case "(($ac_try" in
3657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3658 *) ac_try_echo=$ac_try;;
3659esac
3660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3661$as_echo "$ac_try_echo"; } >&5
3662 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3663 ac_status=$?
3664 if test -s conftest.err; then
3665 sed '10a\
3666... rest of stderr output deleted ...
3667 10q' conftest.err >conftest.er1
3668 cat conftest.er1 >&5
3669 rm -f conftest.er1 conftest.err
3670 fi
3671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3672 test $ac_status = 0; }
3673done
3674
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3676$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3677if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3678 $as_echo_n "(cached) " >&6
3679else
3680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3681/* end confdefs.h. */
3682
3683int
3684main ()
3685{
3686#ifndef __GNUC__
3687 choke me
3688#endif
3689
3690 ;
3691 return 0;
3692}
3693_ACEOF
3694if ac_fn_cxx_try_compile "$LINENO"; then :
3695 ac_compiler_gnu=yes
3696else
3697 ac_compiler_gnu=no
3698fi
3699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3700ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3701
3702fi
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3704$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3705if test $ac_compiler_gnu = yes; then
3706 GXX=yes
3707else
3708 GXX=
3709fi
3710ac_test_CXXFLAGS=${CXXFLAGS+set}
3711ac_save_CXXFLAGS=$CXXFLAGS
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3713$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3714if test "${ac_cv_prog_cxx_g+set}" = set; then :
3715 $as_echo_n "(cached) " >&6
3716else
3717 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3718 ac_cxx_werror_flag=yes
3719 ac_cv_prog_cxx_g=no
3720 CXXFLAGS="-g"
3721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3722/* end confdefs.h. */
3723
3724int
3725main ()
3726{
3727
3728 ;
3729 return 0;
3730}
3731_ACEOF
3732if ac_fn_cxx_try_compile "$LINENO"; then :
3733 ac_cv_prog_cxx_g=yes
3734else
3735 CXXFLAGS=""
3736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3737/* end confdefs.h. */
3738
3739int
3740main ()
3741{
3742
3743 ;
3744 return 0;
3745}
3746_ACEOF
3747if ac_fn_cxx_try_compile "$LINENO"; then :
3748
3749else
3750 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3751 CXXFLAGS="-g"
3752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3753/* end confdefs.h. */
3754
3755int
3756main ()
3757{
3758
3759 ;
3760 return 0;
3761}
3762_ACEOF
3763if ac_fn_cxx_try_compile "$LINENO"; then :
3764 ac_cv_prog_cxx_g=yes
3765fi
3766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3767fi
3768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769fi
3770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3771 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3772fi
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3774$as_echo "$ac_cv_prog_cxx_g" >&6; }
3775if test "$ac_test_CXXFLAGS" = set; then
3776 CXXFLAGS=$ac_save_CXXFLAGS
3777elif test $ac_cv_prog_cxx_g = yes; then
3778 if test "$GXX" = yes; then
3779 CXXFLAGS="-g -O2"
3780 else
3781 CXXFLAGS="-g"
3782 fi
3783else
3784 if test "$GXX" = yes; then
3785 CXXFLAGS="-O2"
3786 else
3787 CXXFLAGS=
3788 fi
3789fi
3790ac_ext=c
3791ac_cpp='$CPP $CPPFLAGS'
3792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3794ac_compiler_gnu=$ac_cv_c_compiler_gnu
3795
3796
60ca704f 3797
bec39cab
AC
3798ac_ext=c
3799ac_cpp='$CPP $CPPFLAGS'
3800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3804$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3805# On Suns, sometimes $CPP names a directory.
3806if test -n "$CPP" && test -d "$CPP"; then
3807 CPP=
8bb2c122 3808fi
bec39cab 3809if test -z "$CPP"; then
81ecdfbb
RW
3810 if test "${ac_cv_prog_CPP+set}" = set; then :
3811 $as_echo_n "(cached) " >&6
bec39cab
AC
3812else
3813 # Double quotes because CPP needs to be expanded
3814 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3815 do
3816 ac_preproc_ok=false
3817for ac_c_preproc_warn_flag in '' yes
3818do
3819 # Use a header file that comes with gcc, so configuring glibc
3820 # with a fresh cross-compiler works.
3821 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3822 # <limits.h> exists even on freestanding compilers.
3823 # On the NeXT, cc -E runs the code through the compiler's parser,
3824 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3826/* end confdefs.h. */
3827#ifdef __STDC__
3828# include <limits.h>
3829#else
3830# include <assert.h>
3831#endif
3832 Syntax error
3833_ACEOF
81ecdfbb 3834if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3835
81ecdfbb 3836else
bec39cab
AC
3837 # Broken: fails on valid input.
3838continue
3839fi
3840rm -f conftest.err conftest.$ac_ext
3841
81ecdfbb 3842 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3843 # can be detected and how.
81ecdfbb 3844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3845/* end confdefs.h. */
3846#include <ac_nonexistent.h>
3847_ACEOF
81ecdfbb 3848if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3849 # Broken: success on invalid input.
3850continue
8bb2c122 3851else
bec39cab
AC
3852 # Passes both tests.
3853ac_preproc_ok=:
3854break
8bb2c122 3855fi
bec39cab 3856rm -f conftest.err conftest.$ac_ext
8bb2c122 3857
bec39cab
AC
3858done
3859# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3860rm -f conftest.err conftest.$ac_ext
81ecdfbb 3861if $ac_preproc_ok; then :
bec39cab
AC
3862 break
3863fi
8bb2c122 3864
bec39cab
AC
3865 done
3866 ac_cv_prog_CPP=$CPP
ddc9cd0f 3867
c906108c 3868fi
bec39cab
AC
3869 CPP=$ac_cv_prog_CPP
3870else
3871 ac_cv_prog_CPP=$CPP
c906108c 3872fi
81ecdfbb
RW
3873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3874$as_echo "$CPP" >&6; }
bec39cab
AC
3875ac_preproc_ok=false
3876for ac_c_preproc_warn_flag in '' yes
3877do
3878 # Use a header file that comes with gcc, so configuring glibc
3879 # with a fresh cross-compiler works.
3880 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3881 # <limits.h> exists even on freestanding compilers.
3882 # On the NeXT, cc -E runs the code through the compiler's parser,
3883 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3885/* end confdefs.h. */
3886#ifdef __STDC__
3887# include <limits.h>
3888#else
3889# include <assert.h>
3890#endif
3891 Syntax error
3892_ACEOF
81ecdfbb 3893if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3894
81ecdfbb 3895else
bec39cab
AC
3896 # Broken: fails on valid input.
3897continue
3898fi
3899rm -f conftest.err conftest.$ac_ext
3900
81ecdfbb 3901 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3902 # can be detected and how.
81ecdfbb 3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3904/* end confdefs.h. */
3905#include <ac_nonexistent.h>
3906_ACEOF
81ecdfbb 3907if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3908 # Broken: success on invalid input.
3909continue
c906108c 3910else
bec39cab
AC
3911 # Passes both tests.
3912ac_preproc_ok=:
3913break
c906108c 3914fi
bec39cab 3915rm -f conftest.err conftest.$ac_ext
c906108c 3916
bec39cab
AC
3917done
3918# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3919rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3920if $ac_preproc_ok; then :
3921
c906108c 3922else
81ecdfbb
RW
3923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3925as_fn_error "C preprocessor \"$CPP\" fails sanity check
3926See \`config.log' for more details." "$LINENO" 5; }
c906108c 3927fi
c906108c 3928
bec39cab
AC
3929ac_ext=c
3930ac_cpp='$CPP $CPPFLAGS'
3931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3933ac_compiler_gnu=$ac_cv_c_compiler_gnu
3934
3935
81ecdfbb
RW
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3937$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3938if test "${ac_cv_path_GREP+set}" = set; then :
3939 $as_echo_n "(cached) " >&6
4e8d927d 3940else
81ecdfbb
RW
3941 if test -z "$GREP"; then
3942 ac_path_GREP_found=false
3943 # Loop through the user's path and test for each of PROGNAME-LIST
3944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3945for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3946do
3947 IFS=$as_save_IFS
3948 test -z "$as_dir" && as_dir=.
3949 for ac_prog in grep ggrep; do
3950 for ac_exec_ext in '' $ac_executable_extensions; do
3951 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3952 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3953# Check for GNU ac_path_GREP and select it if it is found.
3954 # Check for GNU $ac_path_GREP
3955case `"$ac_path_GREP" --version 2>&1` in
3956*GNU*)
3957 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3958*)
3959 ac_count=0
3960 $as_echo_n 0123456789 >"conftest.in"
3961 while :
3962 do
3963 cat "conftest.in" "conftest.in" >"conftest.tmp"
3964 mv "conftest.tmp" "conftest.in"
3965 cp "conftest.in" "conftest.nl"
3966 $as_echo 'GREP' >> "conftest.nl"
3967 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3968 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3969 as_fn_arith $ac_count + 1 && ac_count=$as_val
3970 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3971 # Best one so far, save it but keep looking for a better one
3972 ac_cv_path_GREP="$ac_path_GREP"
3973 ac_path_GREP_max=$ac_count
bec39cab 3974 fi
81ecdfbb
RW
3975 # 10*(2^10) chars as input seems more than enough
3976 test $ac_count -gt 10 && break
3977 done
3978 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3979esac
bec39cab 3980
81ecdfbb
RW
3981 $ac_path_GREP_found && break 3
3982 done
3983 done
3984 done
3985IFS=$as_save_IFS
3986 if test -z "$ac_cv_path_GREP"; then
3987 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3988 fi
c906108c 3989else
81ecdfbb 3990 ac_cv_path_GREP=$GREP
c906108c 3991fi
c906108c 3992
81ecdfbb
RW
3993fi
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3995$as_echo "$ac_cv_path_GREP" >&6; }
3996 GREP="$ac_cv_path_GREP"
c906108c 3997
c906108c 3998
81ecdfbb
RW
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4000$as_echo_n "checking for egrep... " >&6; }
4001if test "${ac_cv_path_EGREP+set}" = set; then :
4002 $as_echo_n "(cached) " >&6
783e057b 4003else
81ecdfbb
RW
4004 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4005 then ac_cv_path_EGREP="$GREP -E"
4006 else
4007 if test -z "$EGREP"; then
4008 ac_path_EGREP_found=false
4009 # Loop through the user's path and test for each of PROGNAME-LIST
4010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4011for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4012do
4013 IFS=$as_save_IFS
4014 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4015 for ac_prog in egrep; do
4016 for ac_exec_ext in '' $ac_executable_extensions; do
4017 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4018 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4019# Check for GNU ac_path_EGREP and select it if it is found.
4020 # Check for GNU $ac_path_EGREP
4021case `"$ac_path_EGREP" --version 2>&1` in
4022*GNU*)
4023 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4024*)
4025 ac_count=0
4026 $as_echo_n 0123456789 >"conftest.in"
4027 while :
4028 do
4029 cat "conftest.in" "conftest.in" >"conftest.tmp"
4030 mv "conftest.tmp" "conftest.in"
4031 cp "conftest.in" "conftest.nl"
4032 $as_echo 'EGREP' >> "conftest.nl"
4033 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4034 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4035 as_fn_arith $ac_count + 1 && ac_count=$as_val
4036 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4037 # Best one so far, save it but keep looking for a better one
4038 ac_cv_path_EGREP="$ac_path_EGREP"
4039 ac_path_EGREP_max=$ac_count
4040 fi
4041 # 10*(2^10) chars as input seems more than enough
4042 test $ac_count -gt 10 && break
4043 done
4044 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4045esac
bec39cab 4046
81ecdfbb
RW
4047 $ac_path_EGREP_found && break 3
4048 done
4049 done
4050 done
4051IFS=$as_save_IFS
4052 if test -z "$ac_cv_path_EGREP"; then
4053 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4054 fi
783e057b 4055else
81ecdfbb 4056 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4057fi
4058
81ecdfbb 4059 fi
783e057b 4060fi
81ecdfbb
RW
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4062$as_echo "$ac_cv_path_EGREP" >&6; }
4063 EGREP="$ac_cv_path_EGREP"
4064
783e057b 4065
81ecdfbb
RW
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4067$as_echo_n "checking for ANSI C header files... " >&6; }
4068if test "${ac_cv_header_stdc+set}" = set; then :
4069 $as_echo_n "(cached) " >&6
783e057b 4070else
81ecdfbb 4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4072/* end confdefs.h. */
783e057b 4073#include <stdlib.h>
bec39cab 4074#include <stdarg.h>
783e057b
DJ
4075#include <string.h>
4076#include <float.h>
c906108c 4077
bec39cab
AC
4078int
4079main ()
4080{
c906108c 4081
bec39cab
AC
4082 ;
4083 return 0;
4084}
4085_ACEOF
81ecdfbb 4086if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4087 ac_cv_header_stdc=yes
c906108c 4088else
81ecdfbb 4089 ac_cv_header_stdc=no
c906108c 4090fi
81ecdfbb 4091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4092
783e057b
DJ
4093if test $ac_cv_header_stdc = yes; then
4094 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4096/* end confdefs.h. */
4097#include <string.h>
c906108c 4098
783e057b
DJ
4099_ACEOF
4100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4101 $EGREP "memchr" >/dev/null 2>&1; then :
4102
c906108c 4103else
783e057b 4104 ac_cv_header_stdc=no
c906108c 4105fi
783e057b 4106rm -f conftest*
c906108c
SS
4107
4108fi
4109
783e057b
DJ
4110if test $ac_cv_header_stdc = yes; then
4111 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4113/* end confdefs.h. */
4114#include <stdlib.h>
bec39cab 4115
783e057b
DJ
4116_ACEOF
4117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4118 $EGREP "free" >/dev/null 2>&1; then :
4119
bec39cab 4120else
783e057b 4121 ac_cv_header_stdc=no
bec39cab 4122fi
783e057b 4123rm -f conftest*
bec39cab
AC
4124
4125fi
bec39cab 4126
783e057b
DJ
4127if test $ac_cv_header_stdc = yes; then
4128 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4129 if test "$cross_compiling" = yes; then :
783e057b 4130 :
bec39cab 4131else
81ecdfbb 4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4133/* end confdefs.h. */
4134#include <ctype.h>
81ecdfbb 4135#include <stdlib.h>
783e057b
DJ
4136#if ((' ' & 0x0FF) == 0x020)
4137# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4138# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4139#else
4140# define ISLOWER(c) \
4141 (('a' <= (c) && (c) <= 'i') \
4142 || ('j' <= (c) && (c) <= 'r') \
4143 || ('s' <= (c) && (c) <= 'z'))
4144# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4145#endif
4146
4147#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4148int
4149main ()
4150{
4151 int i;
4152 for (i = 0; i < 256; i++)
4153 if (XOR (islower (i), ISLOWER (i))
4154 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4155 return 2;
4156 return 0;
783e057b
DJ
4157}
4158_ACEOF
81ecdfbb 4159if ac_fn_c_try_run "$LINENO"; then :
783e057b 4160
81ecdfbb
RW
4161else
4162 ac_cv_header_stdc=no
783e057b 4163fi
81ecdfbb
RW
4164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4165 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4166fi
81ecdfbb 4167
783e057b
DJ
4168fi
4169fi
81ecdfbb
RW
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4171$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4172if test $ac_cv_header_stdc = yes; then
4173
81ecdfbb 4174$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4175
4176fi
4177
4178# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4179for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4180 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4181do :
4182 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4183ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4184"
4185eval as_val=\$$as_ac_Header
4186 if test "x$as_val" = x""yes; then :
783e057b 4187 cat >>confdefs.h <<_ACEOF
81ecdfbb 4188#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4189_ACEOF
4190
4191fi
4192
4193done
4194
4195
4196
81ecdfbb
RW
4197 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4198if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4199 MINIX=yes
4200else
4201 MINIX=
4202fi
4203
4204
4205 if test "$MINIX" = yes; then
4206
81ecdfbb 4207$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4208
4209
81ecdfbb 4210$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4211
4212
81ecdfbb 4213$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4214
4215 fi
4216
4217
81ecdfbb
RW
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4219$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4220if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4221 $as_echo_n "(cached) " >&6
783e057b 4222else
81ecdfbb 4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4224/* end confdefs.h. */
4225
c971b7fa
PA
4226# define __EXTENSIONS__ 1
4227 $ac_includes_default
783e057b
DJ
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
81ecdfbb 4236if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4237 ac_cv_safe_to_define___extensions__=yes
4238else
81ecdfbb 4239 ac_cv_safe_to_define___extensions__=no
783e057b 4240fi
81ecdfbb 4241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4242fi
81ecdfbb
RW
4243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4244$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4245 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4246 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4247
81ecdfbb 4248 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4249
81ecdfbb 4250 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4251
81ecdfbb 4252 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4253
81ecdfbb 4254 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4255
4256
c971b7fa
PA
4257ac_aux_dir=
4258for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4259 for ac_t in install-sh install.sh shtool; do
4260 if test -f "$ac_dir/$ac_t"; then
4261 ac_aux_dir=$ac_dir
4262 ac_install_sh="$ac_aux_dir/$ac_t -c"
4263 break 2
4264 fi
4265 done
4266done
4267if test -z "$ac_aux_dir"; then
4268 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4269fi
770d76d7 4270
c971b7fa
PA
4271# These three variables are undocumented and unsupported,
4272# and are intended to be withdrawn in a future Autoconf release.
4273# They can cause serious problems if a builder's source tree is in a directory
4274# whose full name contains unusual characters.
4275ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4276ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4277ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4278
770d76d7 4279
c971b7fa
PA
4280# Make sure we can run config.sub.
4281$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4282 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4283
c971b7fa
PA
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4285$as_echo_n "checking build system type... " >&6; }
4286if test "${ac_cv_build+set}" = set; then :
4287 $as_echo_n "(cached) " >&6
770d76d7 4288else
c971b7fa
PA
4289 ac_build_alias=$build_alias
4290test "x$ac_build_alias" = x &&
4291 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4292test "x$ac_build_alias" = x &&
4293 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4294ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4295 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4296
770d76d7 4297fi
c971b7fa
PA
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4299$as_echo "$ac_cv_build" >&6; }
4300case $ac_cv_build in
4301*-*-*) ;;
4302*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4303esac
c971b7fa
PA
4304build=$ac_cv_build
4305ac_save_IFS=$IFS; IFS='-'
4306set x $ac_cv_build
4307shift
4308build_cpu=$1
4309build_vendor=$2
4310shift; shift
4311# Remember, the first character of IFS is used to create $*,
4312# except with old shells:
4313build_os=$*
4314IFS=$ac_save_IFS
4315case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4316
4317
c971b7fa
PA
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4319$as_echo_n "checking host system type... " >&6; }
4320if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4321 $as_echo_n "(cached) " >&6
4322else
c971b7fa
PA
4323 if test "x$host_alias" = x; then
4324 ac_cv_host=$ac_cv_build
81ecdfbb 4325else
c971b7fa
PA
4326 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4327 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4328fi
81ecdfbb
RW
4329
4330fi
c971b7fa
PA
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4332$as_echo "$ac_cv_host" >&6; }
4333case $ac_cv_host in
4334*-*-*) ;;
4335*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4336esac
c971b7fa
PA
4337host=$ac_cv_host
4338ac_save_IFS=$IFS; IFS='-'
4339set x $ac_cv_host
4340shift
4341host_cpu=$1
4342host_vendor=$2
4343shift; shift
4344# Remember, the first character of IFS is used to create $*,
4345# except with old shells:
4346host_os=$*
4347IFS=$ac_save_IFS
4348case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4349
4350
4351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4352$as_echo_n "checking target system type... " >&6; }
4353if test "${ac_cv_target+set}" = set; then :
4354 $as_echo_n "(cached) " >&6
4355else
4356 if test "x$target_alias" = x; then
4357 ac_cv_target=$ac_cv_host
4358else
4359 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4360 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4361fi
4362
4363fi
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4365$as_echo "$ac_cv_target" >&6; }
4366case $ac_cv_target in
4367*-*-*) ;;
4368*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4369esac
4370target=$ac_cv_target
4371ac_save_IFS=$IFS; IFS='-'
4372set x $ac_cv_target
4373shift
4374target_cpu=$1
4375target_vendor=$2
4376shift; shift
4377# Remember, the first character of IFS is used to create $*,
4378# except with old shells:
4379target_os=$*
4380IFS=$ac_save_IFS
4381case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4382
4383
4384# The aliases save the names the user supplied, while $host etc.
4385# will get canonicalized.
4386test -n "$target_alias" &&
4387 test "$program_prefix$program_suffix$program_transform_name" = \
4388 NONENONEs,x,x, &&
4389 program_prefix=${target_alias}-
4390
4391# The tests for host and target for $enable_largefile require
4392# canonical names.
4393
4394
81ecdfbb 4395
da2f07f1
JK
4396# As the $enable_largefile decision depends on --enable-plugins we must set it
4397# even in directories otherwise not depending on the $plugins option.
4398
4399
2974be62
AM
4400 maybe_plugins=no
4401 for ac_header in dlfcn.h
4402do :
4403 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4404"
4405if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4406 cat >>confdefs.h <<_ACEOF
4407#define HAVE_DLFCN_H 1
4408_ACEOF
4409 maybe_plugins=yes
4410fi
4411
4412done
4413
4414 for ac_header in windows.h
4415do :
4416 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4417"
4418if test "x$ac_cv_header_windows_h" = x""yes; then :
4419 cat >>confdefs.h <<_ACEOF
4420#define HAVE_WINDOWS_H 1
4421_ACEOF
4422 maybe_plugins=yes
4423fi
4424
4425done
4426
4427
4428 # Check whether --enable-plugins was given.
da2f07f1
JK
4429if test "${enable_plugins+set}" = set; then :
4430 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4431 no) plugins=no ;;
4432 *) plugins=yes
4433 if test "$maybe_plugins" != "yes" ; then
4434 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4435 fi ;;
4436 esac
da2f07f1 4437else
2974be62
AM
4438 plugins=$maybe_plugins
4439
da2f07f1
JK
4440fi
4441
2974be62
AM
4442 if test "$plugins" = "yes"; then
4443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4444$as_echo_n "checking for library containing dlopen... " >&6; }
4445if test "${ac_cv_search_dlopen+set}" = set; then :
4446 $as_echo_n "(cached) " >&6
4447else
4448 ac_func_search_save_LIBS=$LIBS
4449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h. */
4451
4452/* Override any GCC internal prototype to avoid an error.
4453 Use char because int might match the return type of a GCC
4454 builtin and then its argument prototype would still apply. */
4455#ifdef __cplusplus
4456extern "C"
4457#endif
4458char dlopen ();
4459int
4460main ()
4461{
4462return dlopen ();
4463 ;
4464 return 0;
4465}
4466_ACEOF
4467for ac_lib in '' dl; do
4468 if test -z "$ac_lib"; then
4469 ac_res="none required"
4470 else
4471 ac_res=-l$ac_lib
4472 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4473 fi
4474 if ac_fn_c_try_link "$LINENO"; then :
4475 ac_cv_search_dlopen=$ac_res
4476fi
4477rm -f core conftest.err conftest.$ac_objext \
4478 conftest$ac_exeext
4479 if test "${ac_cv_search_dlopen+set}" = set; then :
4480 break
4481fi
4482done
4483if test "${ac_cv_search_dlopen+set}" = set; then :
4484
4485else
4486 ac_cv_search_dlopen=no
4487fi
4488rm conftest.$ac_ext
4489LIBS=$ac_func_search_save_LIBS
4490fi
4491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4492$as_echo "$ac_cv_search_dlopen" >&6; }
4493ac_res=$ac_cv_search_dlopen
4494if test "$ac_res" != no; then :
4495 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4496
4497fi
4498
4499 fi
da2f07f1
JK
4500
4501
4502case "${host}" in
4503 sparc-*-solaris*|i[3-7]86-*-solaris*)
4504 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4505 # are mutually exclusive; and without procfs support, the bfd/ elf module
4506 # cannot provide certain routines such as elfcore_write_prpsinfo
4507 # or elfcore_write_prstatus. So unless the user explicitly requested
4508 # large-file support through the --enable-largefile switch, disable
4509 # large-file support in favor of procfs support.
4510 test "${target}" = "${host}" -a "x$plugins" = xno \
4511 && : ${enable_largefile="no"}
4512 ;;
4513esac
4514
4515# Check whether --enable-largefile was given.
4516if test "${enable_largefile+set}" = set; then :
4517 enableval=$enable_largefile;
4518fi
4519
4520if test "$enable_largefile" != no; then
4521
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4523$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4524if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 ac_cv_sys_largefile_CC=no
4528 if test "$GCC" != yes; then
4529 ac_save_CC=$CC
4530 while :; do
4531 # IRIX 6.2 and later do not support large files by default,
4532 # so use the C compiler's -n32 option if that helps.
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#include <sys/types.h>
4536 /* Check that off_t can represent 2**63 - 1 correctly.
4537 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4538 since some C++ compilers masquerading as C compilers
4539 incorrectly reject 9223372036854775807. */
4540#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4541 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4542 && LARGE_OFF_T % 2147483647 == 1)
4543 ? 1 : -1];
4544int
4545main ()
4546{
4547
4548 ;
4549 return 0;
4550}
4551_ACEOF
4552 if ac_fn_c_try_compile "$LINENO"; then :
4553 break
4554fi
4555rm -f core conftest.err conftest.$ac_objext
4556 CC="$CC -n32"
4557 if ac_fn_c_try_compile "$LINENO"; then :
4558 ac_cv_sys_largefile_CC=' -n32'; break
4559fi
4560rm -f core conftest.err conftest.$ac_objext
4561 break
4562 done
4563 CC=$ac_save_CC
4564 rm -f conftest.$ac_ext
4565 fi
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4568$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4569 if test "$ac_cv_sys_largefile_CC" != no; then
4570 CC=$CC$ac_cv_sys_largefile_CC
4571 fi
4572
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4574$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4575if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 while :; do
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581#include <sys/types.h>
4582 /* Check that off_t can represent 2**63 - 1 correctly.
4583 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4584 since some C++ compilers masquerading as C compilers
4585 incorrectly reject 9223372036854775807. */
4586#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4587 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4588 && LARGE_OFF_T % 2147483647 == 1)
4589 ? 1 : -1];
4590int
4591main ()
4592{
4593
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598if ac_fn_c_try_compile "$LINENO"; then :
4599 ac_cv_sys_file_offset_bits=no; break
4600fi
4601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4603/* end confdefs.h. */
4604#define _FILE_OFFSET_BITS 64
4605#include <sys/types.h>
4606 /* Check that off_t can represent 2**63 - 1 correctly.
4607 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4608 since some C++ compilers masquerading as C compilers
4609 incorrectly reject 9223372036854775807. */
4610#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4611 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4612 && LARGE_OFF_T % 2147483647 == 1)
4613 ? 1 : -1];
4614int
4615main ()
4616{
4617
4618 ;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_compile "$LINENO"; then :
4623 ac_cv_sys_file_offset_bits=64; break
4624fi
4625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4626 ac_cv_sys_file_offset_bits=unknown
4627 break
4628done
4629fi
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4631$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4632case $ac_cv_sys_file_offset_bits in #(
4633 no | unknown) ;;
4634 *)
4635cat >>confdefs.h <<_ACEOF
4636#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4637_ACEOF
4638;;
4639esac
4640rm -rf conftest*
4641 if test $ac_cv_sys_file_offset_bits = unknown; then
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4643$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4644if test "${ac_cv_sys_large_files+set}" = set; then :
4645 $as_echo_n "(cached) " >&6
4646else
4647 while :; do
4648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649/* end confdefs.h. */
4650#include <sys/types.h>
4651 /* Check that off_t can represent 2**63 - 1 correctly.
4652 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4653 since some C++ compilers masquerading as C compilers
4654 incorrectly reject 9223372036854775807. */
4655#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4656 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4657 && LARGE_OFF_T % 2147483647 == 1)
4658 ? 1 : -1];
4659int
4660main ()
4661{
4662
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667if ac_fn_c_try_compile "$LINENO"; then :
4668 ac_cv_sys_large_files=no; break
4669fi
4670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672/* end confdefs.h. */
4673#define _LARGE_FILES 1
4674#include <sys/types.h>
4675 /* Check that off_t can represent 2**63 - 1 correctly.
4676 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4677 since some C++ compilers masquerading as C compilers
4678 incorrectly reject 9223372036854775807. */
4679#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4680 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4681 && LARGE_OFF_T % 2147483647 == 1)
4682 ? 1 : -1];
4683int
4684main ()
4685{
4686
4687 ;
4688 return 0;
4689}
4690_ACEOF
4691if ac_fn_c_try_compile "$LINENO"; then :
4692 ac_cv_sys_large_files=1; break
4693fi
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4695 ac_cv_sys_large_files=unknown
4696 break
4697done
4698fi
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4700$as_echo "$ac_cv_sys_large_files" >&6; }
4701case $ac_cv_sys_large_files in #(
4702 no | unknown) ;;
4703 *)
4704cat >>confdefs.h <<_ACEOF
4705#define _LARGE_FILES $ac_cv_sys_large_files
4706_ACEOF
4707;;
4708esac
4709rm -rf conftest*
4710 fi
4711fi
4712
4713
4714
81ecdfbb
RW
4715
4716
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4718$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4719if test "${am_cv_prog_cc_stdc+set}" = set; then :
4720 $as_echo_n "(cached) " >&6
4721else
4722 am_cv_prog_cc_stdc=no
4723ac_save_CC="$CC"
4724# Don't try gcc -ansi; that turns off useful extensions and
4725# breaks some systems' header files.
4726# AIX -qlanglvl=ansi
4727# Ultrix and OSF/1 -std1
4728# HP-UX 10.20 and later -Ae
4729# HP-UX older versions -Aa -D_HPUX_SOURCE
4730# SVR4 -Xc -D__EXTENSIONS__
4731for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4732do
783e057b 4733 CC="$ac_save_CC $ac_arg"
81ecdfbb 4734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4735/* end confdefs.h. */
4736#include <stdarg.h>
4737#include <stdio.h>
4738#include <sys/types.h>
4739#include <sys/stat.h>
4740/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4741struct buf { int x; };
4742FILE * (*rcsopen) (struct buf *, struct stat *, int);
4743static char *e (p, i)
4744 char **p;
4745 int i;
4746{
4747 return p[i];
4748}
4749static char *f (char * (*g) (char **, int), char **p, ...)
4750{
4751 char *s;
4752 va_list v;
4753 va_start (v,p);
4754 s = g (p, va_arg (v,int));
4755 va_end (v);
4756 return s;
4757}
4758int test (int i, double x);
4759struct s1 {int (*f) (int a);};
4760struct s2 {int (*f) (double a);};
4761int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4762int argc;
4763char **argv;
4764
4765int
4766main ()
4767{
4768
4769return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4770
4771 ;
4772 return 0;
4773}
4774_ACEOF
81ecdfbb 4775if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4776 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4777fi
81ecdfbb 4778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4779done
4780CC="$ac_save_CC"
4781
4782fi
4783
4784if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4786$as_echo "none needed" >&6; }
783e057b 4787else
81ecdfbb
RW
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4789$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4790fi
4791case "x$am_cv_prog_cc_stdc" in
4792 x|xno) ;;
4793 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4794esac
4795
4869db5e
RM
4796# expand $ac_aux_dir to an absolute path
4797am_aux_dir=`cd $ac_aux_dir && pwd`
4798
4799if test x"${install_sh}" != xset; then
4800 case $am_aux_dir in
4801 *\ * | *\ *)
4802 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4803 *)
4804 install_sh="\${SHELL} $am_aux_dir/install-sh"
4805 esac
4806fi
4807
4808# Installed binaries are usually stripped using `strip' when the user
4809# run `make install-strip'. However `strip' might not be the right
4810# tool to use in cross-compilation environments, therefore Automake
4811# will honor the `STRIP' environment variable to overrule this program.
4812if test "$cross_compiling" != no; then
4813 if test -n "$ac_tool_prefix"; then
4814 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4815set dummy ${ac_tool_prefix}strip; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if test "${ac_cv_prog_STRIP+set}" = set; then :
4819 $as_echo_n "(cached) " >&6
4820else
4821 if test -n "$STRIP"; then
4822 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4823else
4824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
4839fi
4840fi
4841STRIP=$ac_cv_prog_STRIP
4842if test -n "$STRIP"; then
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4844$as_echo "$STRIP" >&6; }
4845else
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851fi
4852if test -z "$ac_cv_prog_STRIP"; then
4853 ac_ct_STRIP=$STRIP
4854 # Extract the first word of "strip", so it can be a program name with args.
4855set dummy strip; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
4858if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4859 $as_echo_n "(cached) " >&6
4860else
4861 if test -n "$ac_ct_STRIP"; then
4862 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4863else
4864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865for as_dir in $PATH
4866do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
4869 for ac_exec_ext in '' $ac_executable_extensions; do
4870 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871 ac_cv_prog_ac_ct_STRIP="strip"
4872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4873 break 2
4874 fi
4875done
4876 done
4877IFS=$as_save_IFS
4878
4879fi
4880fi
4881ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4882if test -n "$ac_ct_STRIP"; then
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4884$as_echo "$ac_ct_STRIP" >&6; }
4885else
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889
4890 if test "x$ac_ct_STRIP" = x; then
4891 STRIP=":"
4892 else
4893 case $cross_compiling:$ac_tool_warned in
4894yes:)
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4896$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4897ac_tool_warned=yes ;;
4898esac
4899 STRIP=$ac_ct_STRIP
4900 fi
4901else
4902 STRIP="$ac_cv_prog_STRIP"
4903fi
4904
4905fi
4906INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4907
783e057b
DJ
4908
4909ac_aux_dir=
81ecdfbb
RW
4910for ac_dir in .. "$srcdir"/..; do
4911 for ac_t in install-sh install.sh shtool; do
4912 if test -f "$ac_dir/$ac_t"; then
4913 ac_aux_dir=$ac_dir
4914 ac_install_sh="$ac_aux_dir/$ac_t -c"
4915 break 2
4916 fi
4917 done
783e057b
DJ
4918done
4919if test -z "$ac_aux_dir"; then
81ecdfbb 4920 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4921fi
81ecdfbb
RW
4922
4923# These three variables are undocumented and unsupported,
4924# and are intended to be withdrawn in a future Autoconf release.
4925# They can cause serious problems if a builder's source tree is in a directory
4926# whose full name contains unusual characters.
4927ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4928ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4929ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4930
783e057b 4931
783e057b 4932
9009e1ae
MR
4933test "$program_prefix" != NONE &&
4934 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4935# Use a double $ so make ignores it.
4936test "$program_suffix" != NONE &&
4937 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4938# Double any \ or $.
4939# By default was `s,x,x', remove it if useless.
4940ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4941program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4942
81ecdfbb 4943
3bc3d82a
PA
4944# See if we are building with C++, and substitute COMPILER.
4945
4946 # Check whether --enable-build-with-cxx was given.
4947if test "${enable_build_with_cxx+set}" = set; then :
4948 enableval=$enable_build_with_cxx; case $enableval in
4949 yes | no)
4950 ;;
4951 *)
4952 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4953 esac
4954else
4955 enable_build_with_cxx=no
4956fi
4957
4958
4959 if test "$enable_build_with_cxx" = "yes"; then
4960 # We're using -fpermissive as shortcut for now.
4961 COMPILER='$(CXX) -fpermissive'
4962 else
4963 COMPILER='$(CC)'
4964 fi
4965
4966
4967
a417dc56
RW
4968# Dependency checking.
4969rm -rf .tst 2>/dev/null
4970mkdir .tst 2>/dev/null
4971if test -d .tst; then
4972 am__leading_dot=.
4973else
4974 am__leading_dot=_
4975fi
4976rmdir .tst 2>/dev/null
4977
4978DEPDIR="${am__leading_dot}deps"
4979
81ecdfbb 4980ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4981
4982
4983depcc="$CC" am_compiler_list=
4984
4985am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4987$as_echo_n "checking dependency style of $depcc... " >&6; }
4988if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4989 $as_echo_n "(cached) " >&6
a417dc56
RW
4990else
4991 if test -f "$am_depcomp"; then
4992 # We make a subdir and do the tests there. Otherwise we can end up
4993 # making bogus files that we don't know about and never remove. For
4994 # instance it was reported that on HP-UX the gcc test will end up
4995 # making a dummy file named `D' -- because `-MD' means `put the output
4996 # in D'.
4997 mkdir conftest.dir
4998 # Copy depcomp to subdir because otherwise we won't find it if we're
4999 # using a relative directory.
5000 cp "$am_depcomp" conftest.dir
5001 cd conftest.dir
5002 # We will build objects and dependencies in a subdirectory because
5003 # it helps to detect inapplicable dependency modes. For instance
5004 # both Tru64's cc and ICC support -MD to output dependencies as a
5005 # side effect of compilation, but ICC will put the dependencies in
5006 # the current directory while Tru64 will put them in the object
5007 # directory.
5008 mkdir sub
5009
5010 am_cv_CC_dependencies_compiler_type=none
5011 if test "$am_compiler_list" = ""; then
5012 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5013 fi
5014 for depmode in $am_compiler_list; do
5015 if test $depmode = none; then break; fi
5016
81ecdfbb 5017 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5018 # Setup a source with many dependencies, because some compilers
5019 # like to wrap large dependency lists on column 80 (with \), and
5020 # we should not choose a depcomp mode which is confused by this.
5021 #
5022 # We need to recreate these files for each test, as the compiler may
5023 # overwrite some of them when testing with obscure command lines.
5024 # This happens at least with the AIX C compiler.
5025 : > sub/conftest.c
5026 for i in 1 2 3 4 5 6; do
5027 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5028 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5029 # Solaris 8's {/usr,}/bin/sh.
5030 touch sub/conftst$i.h
5031 done
5032 echo "include sub/conftest.Po" > confmf
5033
5034 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5035 # mode. It turns out that the SunPro C++ compiler does not properly
5036 # handle `-M -o', and we need to detect this.
5037 depcmd="depmode=$depmode \
5038 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5039 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5040 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5041 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5042 if env $depcmd > conftest.err 2>&1 &&
5043 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5044 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5045 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5046 # icc doesn't choke on unknown options, it will just issue warnings
5047 # or remarks (even with -Werror). So we grep stderr for any message
5048 # that says an option was ignored or not supported.
5049 # When given -MP, icc 7.0 and 7.1 complain thusly:
5050 # icc: Command line warning: ignoring option '-M'; no argument required
5051 # The diagnosis changed in icc 8.0:
5052 # icc: Command line remark: option '-MP' not supported
5053 if (grep 'ignoring option' conftest.err ||
5054 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5055 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5056 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5057 break
5058 fi
5059 fi
81ecdfbb 5060 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5061 sed -e 's/^/| /' < conftest.err >&5
5062 done
5063
5064 cd ..
5065 rm -rf conftest.dir
5066else
5067 am_cv_CC_dependencies_compiler_type=none
5068fi
5069
5070fi
81ecdfbb
RW
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5072$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5073if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5074then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5075else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5076
5077fi
5078
5079
5080# Check for the 'make' the user wants to use.
5081for ac_prog in make
5082do
5083 # Extract the first word of "$ac_prog", so it can be a program name with args.
5084set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if test "${ac_cv_prog_MAKE+set}" = set; then :
5088 $as_echo_n "(cached) " >&6
a417dc56
RW
5089else
5090 if test -n "$MAKE"; then
5091 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5092else
5093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5098 for ac_exec_ext in '' $ac_executable_extensions; do
5099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5100 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5102 break 2
5103 fi
5104done
81ecdfbb
RW
5105 done
5106IFS=$as_save_IFS
a417dc56
RW
5107
5108fi
5109fi
5110MAKE=$ac_cv_prog_MAKE
5111if test -n "$MAKE"; then
81ecdfbb
RW
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5113$as_echo "$MAKE" >&6; }
a417dc56 5114else
81ecdfbb
RW
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
a417dc56
RW
5117fi
5118
81ecdfbb 5119
a417dc56
RW
5120 test -n "$MAKE" && break
5121done
5122
5123MAKE_IS_GNU=
5124case "`$MAKE --version 2>&1 | sed 1q`" in
5125 *GNU*)
5126 MAKE_IS_GNU=yes
5127 ;;
5128esac
81ecdfbb 5129 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5130 GMAKE_TRUE=
5131 GMAKE_FALSE='#'
5132else
5133 GMAKE_TRUE='#'
5134 GMAKE_FALSE=
5135fi
5136
81ecdfbb
RW
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5138$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5139set x ${MAKE-make}
5140ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5141if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5142 $as_echo_n "(cached) " >&6
a417dc56
RW
5143else
5144 cat >conftest.make <<\_ACEOF
81ecdfbb 5145SHELL = /bin/sh
a417dc56 5146all:
81ecdfbb 5147 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5148_ACEOF
5149# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5150case `${MAKE-make} -f conftest.make 2>/dev/null` in
5151 *@@@%%%=?*=@@@%%%*)
5152 eval ac_cv_prog_make_${ac_make}_set=yes;;
5153 *)
5154 eval ac_cv_prog_make_${ac_make}_set=no;;
5155esac
a417dc56
RW
5156rm -f conftest.make
5157fi
81ecdfbb
RW
5158if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5160$as_echo "yes" >&6; }
a417dc56
RW
5161 SET_MAKE=
5162else
81ecdfbb
RW
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
a417dc56
RW
5165 SET_MAKE="MAKE=${MAKE-make}"
5166fi
5167
5168
648d586d
JB
5169gnulib_extra_configure_args=
5170# If large-file support is disabled, make sure gnulib does the same.
5171if test "$enable_largefile" = no; then
5172gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5173fi
5174
c971b7fa
PA
5175# Configure gnulib. We need to build gnulib under some other
5176# directory not "gnulib", to avoid the problem of both GDB and
5177# GDBserver wanting to build it in the same directory, when building
5178# in the source dir.
783e057b 5179
c971b7fa
PA
5180 in_src="gnulib"
5181 in_build="build-gnulib"
648d586d 5182 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5183
5184 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5185 # so they do not pile up.
5186 ac_sub_configure_args=
5187 ac_prev=
5188 eval "set x $ac_configure_args"
5189 shift
5190 for ac_arg
5191 do
5192 if test -n "$ac_prev"; then
5193 ac_prev=
5194 continue
5195 fi
5196 case $ac_arg in
5197 -cache-file | --cache-file | --cache-fil | --cache-fi \
5198 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5199 ac_prev=cache_file ;;
5200 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5201 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5202 | --c=*)
5203 ;;
5204 --config-cache | -C)
5205 ;;
5206 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5207 ac_prev=srcdir ;;
5208 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5209 ;;
5210 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5211 ac_prev=prefix ;;
5212 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5213 ;;
5214 --disable-option-checking)
5215 ;;
5216 *)
5217 case $ac_arg in
5218 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5219 esac
5220 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5221 esac
5222 done
5223
5224 # Always prepend --prefix to ensure using the same prefix
5225 # in subdir configurations.
5226 ac_arg="--prefix=$prefix"
5227 case $ac_arg in
5228 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5229 esac
5230 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5231
5232 # Pass --silent
5233 if test "$silent" = yes; then
5234 ac_sub_configure_args="--silent $ac_sub_configure_args"
5235 fi
5236
5237 # Always prepend --disable-option-checking to silence warnings, since
5238 # different subdirs can have different --enable and --with options.
5239 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5240
5241 ac_popdir=`pwd`
5242 ac_dir=$in_build
5243
5244 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5245 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5246 $as_echo "$ac_msg" >&6
5247 as_dir="$ac_dir"; as_fn_mkdir_p
5248
38ea300a
PA
5249 case $srcdir in
5250 [\\/]* | ?:[\\/]* )
5251 ac_srcdir=$srcdir/$in_src ;;
5252 *) # Relative name.
5253 ac_srcdir=../$srcdir/$in_src ;;
5254 esac
c971b7fa
PA
5255
5256 cd "$ac_dir"
5257
5258 ac_sub_configure=$ac_srcdir/configure
5259
5260 # Make the cache file name correct relative to the subdirectory.
5261 case $cache_file in
5262 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5263 *) # Relative name.
5264 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5265 esac
5266
648d586d
JB
5267 if test -n "$in_extra_args"; then
5268 # Add the extra args at the end.
5269 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5270 fi
5271
c971b7fa
PA
5272 { $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
5273$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5274 # The eval makes quoting arguments work.
5275 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5276 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5277 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5278
5279 cd "$ac_popdir"
783e057b 5280
c971b7fa
PA
5281
5282
5283CONFIG_OBS=
5284CONFIG_DEPS=
5285CONFIG_SRCS=
5286ENABLE_CFLAGS=
5287
5288CONFIG_ALL=
5289CONFIG_CLEAN=
5290CONFIG_INSTALL=
5291CONFIG_UNINSTALL=
5292
5293# If we haven't got the data from the intl directory,
5294# assume NLS is disabled.
5295USE_NLS=no
5296LIBINTL=
5297LIBINTL_DEP=
5298INCINTL=
5299XGETTEXT=
5300GMSGFMT=
5301POSUB=
783e057b
DJ
5302
5303if test -f ../intl/config.intl; then
5304 . ../intl/config.intl
5305fi
81ecdfbb
RW
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5307$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5308if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
783e057b 5311else
81ecdfbb
RW
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5313$as_echo "yes" >&6; }
783e057b 5314
81ecdfbb 5315$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5316
5317
81ecdfbb
RW
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5319$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5320 # Look for .po and .gmo files in the source directory.
5321 CATALOGS=
5322 XLINGUAS=
5323 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5324 # If there aren't any .gmo files the shell will give us the
5325 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5326 # weeded out.
5327 case "$cat" in *\**)
5328 continue;;
5329 esac
5330 # The quadruple backslash is collapsed to a double backslash
5331 # by the backticks, then collapsed again by the double quotes,
5332 # leaving us with one backslash in the sed expression (right
5333 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5334 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5335 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5336 # The user is allowed to set LINGUAS to a list of languages to
5337 # install catalogs for. If it's empty that means "all of them."
5338 if test "x$LINGUAS" = x; then
5339 CATALOGS="$CATALOGS $cat"
5340 XLINGUAS="$XLINGUAS $lang"
5341 else
5342 case "$LINGUAS" in *$lang*)
5343 CATALOGS="$CATALOGS $cat"
5344 XLINGUAS="$XLINGUAS $lang"
5345 ;;
5346 esac
e28b3332
DJ
5347 fi
5348 done
c971b7fa
PA
5349 LINGUAS="$XLINGUAS"
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5351$as_echo "$LINGUAS" >&6; }
5352
5353
5354 DATADIRNAME=share
5355
5356 INSTOBJEXT=.mo
5357
5358 GENCAT=gencat
5359
5360 CATOBJEXT=.gmo
e28b3332 5361
e28b3332
DJ
5362fi
5363
c971b7fa
PA
5364localedir='${datadir}/locale'
5365
5366
5367if test x"$USE_NLS" = xyes; then
5368 CONFIG_ALL="$CONFIG_ALL all-po"
5369 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5370 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5371 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5372fi
e28b3332 5373
c971b7fa
PA
5374GNULIB=build-gnulib/import
5375
5376# For Makefile dependencies.
5377GNULIB_STDINT_H=
5378if test x"$STDINT_H" != x; then
5379 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5380fi
5381
5382
c971b7fa
PA
5383PACKAGE=gdb
5384
5385cat >>confdefs.h <<_ACEOF
5386#define PACKAGE "$PACKAGE"
5387_ACEOF
5388
5389
5390
5391# We never need to detect it in this sub-configure.
5392# But preserve it for config.status --recheck.
5393
5394
5395
5396MAKEINFO_EXTRA_FLAGS=""
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5398$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5399if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5400 $as_echo_n "(cached) " >&6
5401else
5402 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5403 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5404 gdb_cv_have_makeinfo_click=yes
5405 else
5406 gdb_cv_have_makeinfo_click=no
5407 fi
5408fi
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5410$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5411if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5412 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5413fi
e28b3332
DJ
5414
5415
bec39cab
AC
5416
5417
81ecdfbb
RW
5418# Check whether --with-separate-debug-dir was given.
5419if test "${with_separate_debug_dir+set}" = set; then :
5420 withval=$with_separate_debug_dir;
b14b1491
TT
5421 DEBUGDIR=$withval
5422else
5423 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5424fi
5425
20e95c23 5426
783e057b
DJ
5427 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5429 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5430 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5431
783e057b
DJ
5432cat >>confdefs.h <<_ACEOF
5433#define DEBUGDIR "$ac_define_dir"
20e95c23 5434_ACEOF
20e95c23 5435
20e95c23 5436
20e95c23 5437
0c4a4063 5438
b14b1491
TT
5439 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5440 if test "x$prefix" = xNONE; then
5441 test_prefix=/usr/local
5442 else
5443 test_prefix=$prefix
5444 fi
783e057b 5445 else
b14b1491 5446 test_prefix=$exec_prefix
783e057b 5447 fi
b14b1491
TT
5448 value=0
5449 case ${ac_define_dir} in
5450 "${test_prefix}"|"${test_prefix}/"*|\
5451 '${exec_prefix}'|'${exec_prefix}/'*)
5452 value=1
5453 ;;
5454 esac
5455
5456cat >>confdefs.h <<_ACEOF
5457#define DEBUGDIR_RELOCATABLE $value
5458_ACEOF
5459
5460
5461
0c4a4063 5462
f83d8a90
DE
5463# We can't pass paths as command line arguments.
5464# Mingw32 tries to be clever and will convert the paths for us.
5465# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5466# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5467# This breaks GDB's relocatable path conversions since paths passed in
5468# config.h would not get so translated, the path prefixes no longer match.
5469
5470 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5471 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5472 ac_define_dir=`eval echo $bindir`
5473 ac_define_dir=`eval echo $ac_define_dir`
5474
5475cat >>confdefs.h <<_ACEOF
5476#define BINDIR "$ac_define_dir"
5477_ACEOF
5478
5479
5480
b14b1491
TT
5481# GDB's datadir relocation
5482
5483
5484
81ecdfbb
RW
5485# Check whether --with-gdb-datadir was given.
5486if test "${with_gdb_datadir+set}" = set; then :
5487 withval=$with_gdb_datadir;
b14b1491 5488 GDB_DATADIR=$withval
20e95c23 5489else
b14b1491 5490 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5491fi
5492
20e95c23 5493
b14b1491
TT
5494 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5495 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5496 ac_define_dir=`eval echo $GDB_DATADIR`
5497 ac_define_dir=`eval echo $ac_define_dir`
5498
5499cat >>confdefs.h <<_ACEOF
5500#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5501_ACEOF
5502
b14b1491
TT
5503
5504
0c4a4063 5505
b14b1491
TT
5506 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5507 if test "x$prefix" = xNONE; then
5508 test_prefix=/usr/local
5509 else
5510 test_prefix=$prefix
5511 fi
5512 else
5513 test_prefix=$exec_prefix
5514 fi
5515 value=0
5516 case ${ac_define_dir} in
5517 "${test_prefix}"|"${test_prefix}/"*|\
5518 '${exec_prefix}'|'${exec_prefix}/'*)
5519 value=1
5520 ;;
5521 esac
5522
5523cat >>confdefs.h <<_ACEOF
5524#define GDB_DATADIR_RELOCATABLE $value
5525_ACEOF
5526
5527
783e057b 5528
20e95c23 5529
0c4a4063 5530
81ecdfbb
RW
5531# Check whether --with-relocated-sources was given.
5532if test "${with_relocated_sources+set}" = set; then :
5533 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5534
5535 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5536 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5537 ac_define_dir=`eval echo $reloc_srcdir`
5538 ac_define_dir=`eval echo $ac_define_dir`
5539
5540cat >>confdefs.h <<_ACEOF
5541#define RELOC_SRCDIR "$ac_define_dir"
5542_ACEOF
5543
5544
5545
81ecdfbb
RW
5546fi
5547
29b0e8a2 5548
7349ff92
JK
5549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5550$as_echo_n "checking for default auto-load directory... " >&6; }
5551
5552# Check whether --with-auto-load-dir was given.
5553if test "${with_auto_load_dir+set}" = set; then :
5554 withval=$with_auto_load_dir;
5555else
1564a261 5556 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5557fi
5558
1564a261 5559escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5560
5561 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5562 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5563 ac_define_dir=`eval echo $escape_dir`
5564 ac_define_dir=`eval echo $ac_define_dir`
5565
5566cat >>confdefs.h <<_ACEOF
5567#define AUTO_LOAD_DIR "$ac_define_dir"
5568_ACEOF
5569
5570
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5572$as_echo "$with_auto_load_dir" >&6; }
5573
bccbefd2
JK
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5575$as_echo_n "checking for default auto-load safe-path... " >&6; }
5576
5577# Check whether --with-auto-load-safe-path was given.
5578if test "${with_auto_load_safe_path+set}" = set; then :
5579 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5580 with_auto_load_safe_path="/"
5581 fi
bccbefd2 5582else
7349ff92 5583 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5584fi
5585
1564a261 5586escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5587
5588 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5589 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5590 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5591 ac_define_dir=`eval echo $ac_define_dir`
5592
5593cat >>confdefs.h <<_ACEOF
6dea1fbd 5594#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5595_ACEOF
5596
5597
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5599$as_echo "$with_auto_load_safe_path" >&6; }
5600
29b0e8a2 5601
20e95c23 5602
5ae98d25 5603subdirs="$subdirs testsuite"
20e95c23
DJ
5604
5605
783e057b 5606# Check whether to support alternative target configurations
81ecdfbb
RW
5607# Check whether --enable-targets was given.
5608if test "${enable_targets+set}" = set; then :
5609 enableval=$enable_targets; case "${enableval}" in
5610 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5611 ;;
5612 no) enable_targets= ;;
5613 *) enable_targets=$enableval ;;
5614esac
81ecdfbb
RW
5615fi
5616
20e95c23 5617
783e057b 5618# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5619# Check whether --enable-64-bit-bfd was given.
5620if test "${enable_64_bit_bfd+set}" = set; then :
5621 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5622 yes) want64=true ;;
5623 no) want64=false ;;
81ecdfbb 5624 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5625esac
5626else
5627 want64=false
81ecdfbb
RW
5628fi
5629
783e057b
DJ
5630# Provide defaults for some variables set by the per-host and per-target
5631# configuration.
5632gdb_host_obs=posix-hdep.o
20e95c23 5633
783e057b
DJ
5634if test "${target}" = "${host}"; then
5635 gdb_native=yes
5636else
5637 gdb_native=no
5638fi
20e95c23 5639
783e057b 5640. $srcdir/configure.host
20e95c23 5641
fb23d554
SDJ
5642# Add in the common host objects.
5643. $srcdir/common/common.host
5644gdb_host_obs="$gdb_host_obs $common_host_obs"
5645
783e057b 5646# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5647
783e057b
DJ
5648TARGET_OBS=
5649all_targets=
b292c783 5650HAVE_NATIVE_GCORE_TARGET=
20e95c23 5651
783e057b 5652for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5653do
783e057b
DJ
5654 if test "$targ_alias" = "all"; then
5655 all_targets=true
5656 else
5657 # Canonicalize the secondary target names.
5658 result=`$ac_config_sub $targ_alias 2>/dev/null`
5659 if test -n "$result"; then
5660 targ=$result
5661 else
5662 targ=$targ_alias
5663 fi
20e95c23 5664
783e057b 5665 . ${srcdir}/configure.tgt
20e95c23 5666
bf307134
JB
5667 if test -z "${gdb_target_obs}"; then :
5668 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5669fi
5670
783e057b
DJ
5671 # Target-specific object files
5672 for i in ${gdb_target_obs}; do
5673 case " $TARGET_OBS " in
5674 *" ${i} "*) ;;
5675 *)
5676 TARGET_OBS="$TARGET_OBS ${i}"
5677 ;;
5678 esac
5679 done
20e95c23 5680
783e057b
DJ
5681 # Check whether this target needs 64-bit CORE_ADDR
5682 if test x${want64} = xfalse; then
5683 . ${srcdir}/../bfd/config.bfd
5684 fi
b292c783
JK
5685
5686 # Check whether this target is native and supports gcore.
5687 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5688 && $gdb_have_gcore; then
5689 HAVE_NATIVE_GCORE_TARGET=1
5690 fi
783e057b 5691 fi
20e95c23
DJ
5692done
5693
783e057b
DJ
5694if test x${all_targets} = xtrue; then
5695
5696 # We want all 64-bit targets if we either:
5697 # - run on a 64-bit host or
5698 # - already require 64-bit support for some other target or
5699 # - the --enable-64-bit-bfd option was supplied
5700 # Otherwise we only support all 32-bit targets.
5701 #
5702 # NOTE: This test must be in sync with the corresponding
5703 # tests in BFD!
20e95c23 5704
783e057b 5705 if test x${want64} = xfalse; then
81ecdfbb
RW
5706 # The cast to long int works around a bug in the HP C Compiler
5707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5709# This bug is HP SR number 8606223364.
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5711$as_echo_n "checking size of long... " >&6; }
5712if test "${ac_cv_sizeof_long+set}" = set; then :
5713 $as_echo_n "(cached) " >&6
c0993dbe 5714else
81ecdfbb 5715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5716
81ecdfbb
RW
5717else
5718 if test "$ac_cv_type_long" = yes; then
5719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5721{ as_fn_set_status 77
5722as_fn_error "cannot compute sizeof (long)
5723See \`config.log' for more details." "$LINENO" 5; }; }
5724 else
5725 ac_cv_sizeof_long=0
5726 fi
c0993dbe 5727fi
81ecdfbb 5728
c0993dbe 5729fi
81ecdfbb
RW
5730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5731$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5732
c0993dbe 5733
c0993dbe 5734
c0993dbe
UW
5735cat >>confdefs.h <<_ACEOF
5736#define SIZEOF_LONG $ac_cv_sizeof_long
5737_ACEOF
5738
5739
5740 if test "x${ac_cv_sizeof_long}" = "x8"; then
5741 want64=true
5742 fi
5743 fi
5744 if test x${want64} = xtrue; then
5745 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5746 else
5747 TARGET_OBS='$(ALL_TARGET_OBS)'
5748 fi
5749fi
5750
5751
5752
b292c783 5753
c0993dbe
UW
5754# For other settings, only the main target counts.
5755gdb_sim=
5756gdb_osabi=
5757build_gdbserver=
5758targ=$target; . ${srcdir}/configure.tgt
5759
5760# Fetch the default architecture and default target vector from BFD.
5761targ=$target; . $srcdir/../bfd/config.bfd
5762
5763# We only want the first architecture, so strip off the others if
5764# there is more than one.
5765targ_archs=`echo $targ_archs | sed 's/ .*//'`
5766
5767if test "x$targ_archs" != x; then
5768
5769cat >>confdefs.h <<_ACEOF
5770#define DEFAULT_BFD_ARCH $targ_archs
5771_ACEOF
5772
5773fi
5774if test "x$targ_defvec" != x; then
5775
5776cat >>confdefs.h <<_ACEOF
5777#define DEFAULT_BFD_VEC $targ_defvec
5778_ACEOF
5779
5780fi
5781
c0993dbe
UW
5782# The CLI cannot be disabled yet, but may be in the future.
5783
5784# Enable CLI.
81ecdfbb
RW
5785# Check whether --enable-gdbcli was given.
5786if test "${enable_gdbcli+set}" = set; then :
5787 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5788 yes)
5789 ;;
5790 no)
81ecdfbb 5791 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5792 *)
81ecdfbb 5793 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5794 esac
5795else
5796 enable_gdbcli=yes
81ecdfbb
RW
5797fi
5798
c0993dbe
UW
5799if test x"$enable_gdbcli" = xyes; then
5800 if test -d $srcdir/cli; then
5801 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5802 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5803 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5804 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5805 fi
5806fi
5807
5808# Enable MI.
81ecdfbb
RW
5809# Check whether --enable-gdbmi was given.
5810if test "${enable_gdbmi+set}" = set; then :
5811 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5812 yes | no)
5813 ;;
5814 *)
81ecdfbb 5815 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5816 esac
5817else
5818 enable_gdbmi=yes
81ecdfbb
RW
5819fi
5820
c0993dbe
UW
5821if test x"$enable_gdbmi" = xyes; then
5822 if test -d $srcdir/mi; then
5823 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5824 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5825 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5826 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5827 fi
5828fi
5829
5830# Enable TUI.
81ecdfbb
RW
5831# Check whether --enable-tui was given.
5832if test "${enable_tui+set}" = set; then :
5833 enableval=$enable_tui; case $enableval in
3ca64bd3 5834 yes | no | auto)
c0993dbe
UW
5835 ;;
5836 *)
81ecdfbb 5837 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5838 esac
5839else
3ca64bd3 5840 enable_tui=auto
81ecdfbb
RW
5841fi
5842
c0993dbe
UW
5843
5844# Enable gdbtk.
81ecdfbb
RW
5845# Check whether --enable-gdbtk was given.
5846if test "${enable_gdbtk+set}" = set; then :
5847 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5848 yes | no)
5849 ;;
5850 *)
81ecdfbb 5851 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5852 esac
5853else
5062cc19 5854 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5855 enable_gdbtk=yes
5856 else
5857 enable_gdbtk=no
5858 fi
81ecdfbb
RW
5859fi
5860
c0993dbe
UW
5861# We unconditionally disable gdbtk tests on selected platforms.
5862case $host_os in
5863 go32* | windows*)
81ecdfbb
RW
5864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5865$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5866 enable_gdbtk=no ;;
5867esac
5868
05e7c244 5869# Libunwind support for ia64.
bec39cab 5870
05e7c244
JK
5871
5872# Check whether --with-libunwind-ia64 was given.
5873if test "${with_libunwind_ia64+set}" = set; then :
5874 withval=$with_libunwind_ia64;
bec39cab 5875else
05e7c244
JK
5876 with_libunwind_ia64=auto
5877fi
bec39cab 5878
05e7c244
JK
5879
5880# Backward compatibility option.
5881if test "${with_libunwind+set}" = set; then
5882 if test x"$with_libunwind_ia64" != xauto; then
5883 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5884 fi
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5886$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5887 with_libunwind_ia64="$with_libunwind"
5888fi
5889
5890case "$with_libunwind_ia64" in
5891 yes | no)
5892 ;;
5893 auto)
5894 for ac_header in libunwind-ia64.h
81ecdfbb 5895do :
b54a8fd7
PA
5896 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5897if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5898 cat >>confdefs.h <<_ACEOF
b54a8fd7 5899#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5900_ACEOF
5901
5902fi
5903
5904done
5905
05e7c244
JK
5906 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5907 ;;
5908 *)
5909 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5910 ;;
5911esac
bec39cab 5912
05e7c244 5913if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5914 for ac_header in libunwind-ia64.h
81ecdfbb 5915do :
b54a8fd7
PA
5916 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5917if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5918 cat >>confdefs.h <<_ACEOF
b54a8fd7 5919#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5920_ACEOF
5921
5922fi
5923
5924done
5925
05e7c244
JK
5926 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5927 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5928 fi
5929 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5930 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5931 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5932fi
5933
cb01cfba
JB
5934opt_curses=no
5935
81ecdfbb
RW
5936# Check whether --with-curses was given.
5937if test "${with_curses+set}" = set; then :
5938 withval=$with_curses; opt_curses=$withval
5939fi
5940
cb01cfba 5941
76a39ba7 5942prefer_curses=no
cb01cfba 5943if test "$opt_curses" = "yes"; then
76a39ba7 5944 prefer_curses=yes
cb01cfba
JB
5945fi
5946
a9322a30 5947# Profiling support.
81ecdfbb
RW
5948# Check whether --enable-profiling was given.
5949if test "${enable_profiling+set}" = set; then :
5950 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5951 yes | no)
5952 ;;
5953 *)
81ecdfbb 5954 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5955 esac
5956else
5957 enable_profiling=no
81ecdfbb 5958fi
bec39cab 5959
a9322a30
TT
5960
5961for ac_func in monstartup _mcleanup
81ecdfbb
RW
5962do :
5963 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5964ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5965eval as_val=\$$as_ac_var
5966 if test "x$as_val" = x""yes; then :
5967 cat >>confdefs.h <<_ACEOF
5968#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5969_ACEOF
a9322a30 5970
81ecdfbb
RW
5971fi
5972done
a9322a30 5973
81ecdfbb
RW
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5975$as_echo_n "checking for _etext... " >&6; }
5976if test "${ac_cv_var__etext+set}" = set; then :
5977 $as_echo_n "(cached) " >&6
5978else
5979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980/* end confdefs.h. */
5981#include <stdlib.h>
5982extern char _etext;
a9322a30
TT
5983
5984int
5985main ()
5986{
5987free (&_etext);
5988 ;
5989 return 0;
5990}
bec39cab 5991_ACEOF
81ecdfbb 5992if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5993 ac_cv_var__etext=yes
bec39cab 5994else
81ecdfbb 5995 ac_cv_var__etext=no
bec39cab 5996fi
81ecdfbb
RW
5997rm -f core conftest.err conftest.$ac_objext \
5998 conftest$ac_exeext conftest.$ac_ext
bec39cab 5999fi
81ecdfbb
RW
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6001$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6002if test $ac_cv_var__etext = yes; then
60ca704f 6003
81ecdfbb 6004$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6005
bec39cab 6006fi
81ecdfbb
RW
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6008$as_echo_n "checking for etext... " >&6; }
6009if test "${ac_cv_var_etext+set}" = set; then :
6010 $as_echo_n "(cached) " >&6
bec39cab 6011else
81ecdfbb 6012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6013/* end confdefs.h. */
a9322a30
TT
6014#include <stdlib.h>
6015extern char etext;
bec39cab
AC
6016
6017int
6018main ()
6019{
a9322a30 6020free (&etext);
bec39cab
AC
6021 ;
6022 return 0;
6023}
6024_ACEOF
81ecdfbb 6025if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6026 ac_cv_var_etext=yes
bec39cab 6027else
81ecdfbb 6028 ac_cv_var_etext=no
bec39cab 6029fi
81ecdfbb
RW
6030rm -f core conftest.err conftest.$ac_objext \
6031 conftest$ac_exeext conftest.$ac_ext
bec39cab 6032fi
81ecdfbb
RW
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6034$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6035if test $ac_cv_var_etext = yes; then
6036
81ecdfbb 6037$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6038
6039fi
a9322a30
TT
6040if test "$enable_profiling" = yes ; then
6041 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6042 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6043 fi
6044 PROFILE_CFLAGS=-pg
6045 OLD_CFLAGS="$CFLAGS"
6046 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6047
81ecdfbb
RW
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6049$as_echo_n "checking whether $CC supports -pg... " >&6; }
6050if test "${ac_cv_cc_supports_pg+set}" = set; then :
6051 $as_echo_n "(cached) " >&6
bec39cab 6052else
81ecdfbb 6053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6054/* end confdefs.h. */
bec39cab
AC
6055
6056int
6057main ()
6058{
a9322a30 6059int x;
bec39cab
AC
6060 ;
6061 return 0;
6062}
6063_ACEOF
81ecdfbb 6064if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6065 ac_cv_cc_supports_pg=yes
bec39cab 6066else
81ecdfbb 6067 ac_cv_cc_supports_pg=no
bec39cab 6068fi
81ecdfbb 6069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6070fi
81ecdfbb
RW
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6072$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6073
a9322a30 6074 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6075 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6076 fi
bec39cab 6077
a9322a30 6078 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6079fi
6080
c16158bc
JM
6081
6082
81ecdfbb
RW
6083# Check whether --with-pkgversion was given.
6084if test "${with_pkgversion+set}" = set; then :
6085 withval=$with_pkgversion; case "$withval" in
6086 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6087 no) PKGVERSION= ;;
6088 *) PKGVERSION="($withval) " ;;
6089 esac
6090else
6091 PKGVERSION="(GDB) "
6092
81ecdfbb 6093fi
c16158bc
JM
6094
6095
6096
6097
81ecdfbb
RW
6098
6099# Check whether --with-bugurl was given.
6100if test "${with_bugurl+set}" = set; then :
6101 withval=$with_bugurl; case "$withval" in
6102 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6103 no) BUGURL=
6104 ;;
6105 *) BUGURL="$withval"
6106 ;;
6107 esac
6108else
6109 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6110
81ecdfbb
RW
6111fi
6112
c16158bc
JM
6113 case ${BUGURL} in
6114 "")
6115 REPORT_BUGS_TO=
6116 REPORT_BUGS_TEXI=
6117 ;;
6118 *)
6119 REPORT_BUGS_TO="<$BUGURL>"
6120 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6121 ;;
6122 esac;
6123
6124
6125
6126
6127cat >>confdefs.h <<_ACEOF
6128#define PKGVERSION "$PKGVERSION"
6129_ACEOF
6130
6131
6132cat >>confdefs.h <<_ACEOF
6133#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6134_ACEOF
6135
6136
bec39cab
AC
6137# --------------------- #
6138# Checks for programs. #
6139# --------------------- #
6140
6141for ac_prog in gawk mawk nawk awk
6142do
6143 # Extract the first word of "$ac_prog", so it can be a program name with args.
6144set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6146$as_echo_n "checking for $ac_word... " >&6; }
6147if test "${ac_cv_prog_AWK+set}" = set; then :
6148 $as_echo_n "(cached) " >&6
bec39cab
AC
6149else
6150 if test -n "$AWK"; then
6151 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6152else
6153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6154for as_dir in $PATH
6155do
6156 IFS=$as_save_IFS
6157 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6158 for ac_exec_ext in '' $ac_executable_extensions; do
6159 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6160 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6162 break 2
6163 fi
6164done
81ecdfbb
RW
6165 done
6166IFS=$as_save_IFS
bec39cab
AC
6167
6168fi
6169fi
6170AWK=$ac_cv_prog_AWK
6171if test -n "$AWK"; then
81ecdfbb
RW
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6173$as_echo "$AWK" >&6; }
bec39cab 6174else
81ecdfbb
RW
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176$as_echo "no" >&6; }
bec39cab
AC
6177fi
6178
bec39cab 6179
81ecdfbb 6180 test -n "$AWK" && break
bec39cab
AC
6181done
6182
c971b7fa
PA
6183# Find a good install program. We prefer a C program (faster),
6184# so one script is as good as another. But avoid the broken or
6185# incompatible versions:
6186# SysV /etc/install, /usr/sbin/install
6187# SunOS /usr/etc/install
6188# IRIX /sbin/install
6189# AIX /bin/install
6190# AmigaOS /C/install, which installs bootblocks on floppy discs
6191# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6192# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6193# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6194# OS/2's system install, which has a completely different semantic
6195# ./install, which can be erroneously created by make from ./install.sh.
6196# Reject install programs that cannot install multiple files.
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6198$as_echo_n "checking for a BSD-compatible install... " >&6; }
6199if test -z "$INSTALL"; then
6200if test "${ac_cv_path_install+set}" = set; then :
6201 $as_echo_n "(cached) " >&6
6202else
6203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204for as_dir in $PATH
6205do
6206 IFS=$as_save_IFS
6207 test -z "$as_dir" && as_dir=.
6208 # Account for people who put trailing slashes in PATH elements.
6209case $as_dir/ in #((
6210 ./ | .// | /[cC]/* | \
6211 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6212 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6213 /usr/ucb/* ) ;;
6214 *)
6215 # OSF1 and SCO ODT 3.0 have their own names for install.
6216 # Don't use installbsd from OSF since it installs stuff as root
6217 # by default.
6218 for ac_prog in ginstall scoinst install; do
6219 for ac_exec_ext in '' $ac_executable_extensions; do
6220 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6221 if test $ac_prog = install &&
6222 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6223 # AIX install. It has an incompatible calling convention.
6224 :
6225 elif test $ac_prog = install &&
6226 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6227 # program-specific install script used by HP pwplus--don't use.
6228 :
6229 else
6230 rm -rf conftest.one conftest.two conftest.dir
6231 echo one > conftest.one
6232 echo two > conftest.two
6233 mkdir conftest.dir
6234 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6235 test -s conftest.one && test -s conftest.two &&
6236 test -s conftest.dir/conftest.one &&
6237 test -s conftest.dir/conftest.two
6238 then
6239 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6240 break 3
6241 fi
6242 fi
6243 fi
6244 done
6245 done
6246 ;;
6247esac
6248
6249 done
6250IFS=$as_save_IFS
6251
6252rm -rf conftest.one conftest.two conftest.dir
6253
6254fi
6255 if test "${ac_cv_path_install+set}" = set; then
6256 INSTALL=$ac_cv_path_install
6257 else
6258 # As a last resort, use the slow shell script. Don't cache a
6259 # value for INSTALL within a source directory, because that will
6260 # break other packages using the cache if that directory is
6261 # removed, or if the value is a relative name.
6262 INSTALL=$ac_install_sh
6263 fi
6264fi
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6266$as_echo "$INSTALL" >&6; }
6267
6268# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6269# It thinks the first close brace ends the variable substitution.
6270test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6271
6272test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6273
6274test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6275
81ecdfbb
RW
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6277$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6278LN_S=$as_ln_s
6279if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6281$as_echo "yes" >&6; }
bec39cab 6282else
81ecdfbb
RW
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6284$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6285fi
6286
6287if test -n "$ac_tool_prefix"; then
6288 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6289set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
6292if test "${ac_cv_prog_RANLIB+set}" = set; then :
6293 $as_echo_n "(cached) " >&6
bec39cab
AC
6294else
6295 if test -n "$RANLIB"; then
6296 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6297else
6298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301 IFS=$as_save_IFS
6302 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6303 for ac_exec_ext in '' $ac_executable_extensions; do
6304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6305 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6307 break 2
6308 fi
6309done
81ecdfbb
RW
6310 done
6311IFS=$as_save_IFS
bec39cab
AC
6312
6313fi
6314fi
6315RANLIB=$ac_cv_prog_RANLIB
6316if test -n "$RANLIB"; then
81ecdfbb
RW
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6318$as_echo "$RANLIB" >&6; }
bec39cab 6319else
81ecdfbb
RW
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321$as_echo "no" >&6; }
bec39cab
AC
6322fi
6323
81ecdfbb 6324
bec39cab
AC
6325fi
6326if test -z "$ac_cv_prog_RANLIB"; then
6327 ac_ct_RANLIB=$RANLIB
6328 # Extract the first word of "ranlib", so it can be a program name with args.
6329set dummy ranlib; ac_word=$2
81ecdfbb
RW
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331$as_echo_n "checking for $ac_word... " >&6; }
6332if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6333 $as_echo_n "(cached) " >&6
bec39cab
AC
6334else
6335 if test -n "$ac_ct_RANLIB"; then
6336 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6337else
6338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341 IFS=$as_save_IFS
6342 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6343 for ac_exec_ext in '' $ac_executable_extensions; do
6344 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6345 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6346 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6347 break 2
6348 fi
6349done
81ecdfbb
RW
6350 done
6351IFS=$as_save_IFS
bec39cab 6352
bec39cab
AC
6353fi
6354fi
6355ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6356if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6358$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6359else
81ecdfbb
RW
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361$as_echo "no" >&6; }
bec39cab
AC
6362fi
6363
81ecdfbb
RW
6364 if test "x$ac_ct_RANLIB" = x; then
6365 RANLIB=":"
6366 else
6367 case $cross_compiling:$ac_tool_warned in
6368yes:)
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6371ac_tool_warned=yes ;;
6372esac
6373 RANLIB=$ac_ct_RANLIB
6374 fi
bec39cab
AC
6375else
6376 RANLIB="$ac_cv_prog_RANLIB"
6377fi
6378
6379for ac_prog in 'bison -y' byacc
6380do
6381 # Extract the first word of "$ac_prog", so it can be a program name with args.
6382set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if test "${ac_cv_prog_YACC+set}" = set; then :
6386 $as_echo_n "(cached) " >&6
bec39cab
AC
6387else
6388 if test -n "$YACC"; then
6389 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6390else
6391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH
6393do
6394 IFS=$as_save_IFS
6395 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6396 for ac_exec_ext in '' $ac_executable_extensions; do
6397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6398 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6400 break 2
6401 fi
6402done
81ecdfbb
RW
6403 done
6404IFS=$as_save_IFS
bec39cab
AC
6405
6406fi
6407fi
6408YACC=$ac_cv_prog_YACC
6409if test -n "$YACC"; then
81ecdfbb
RW
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6411$as_echo "$YACC" >&6; }
bec39cab 6412else
81ecdfbb
RW
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
bec39cab
AC
6415fi
6416
81ecdfbb 6417
bec39cab
AC
6418 test -n "$YACC" && break
6419done
6420test -n "$YACC" || YACC="yacc"
6421
6422
6423if test -n "$ac_tool_prefix"; then
6424 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6425set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6427$as_echo_n "checking for $ac_word... " >&6; }
6428if test "${ac_cv_prog_AR+set}" = set; then :
6429 $as_echo_n "(cached) " >&6
bec39cab
AC
6430else
6431 if test -n "$AR"; then
6432 ac_cv_prog_AR="$AR" # Let the user override the test.
6433else
6434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH
6436do
6437 IFS=$as_save_IFS
6438 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6439 for ac_exec_ext in '' $ac_executable_extensions; do
6440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6441 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6443 break 2
6444 fi
6445done
81ecdfbb
RW
6446 done
6447IFS=$as_save_IFS
bec39cab
AC
6448
6449fi
6450fi
6451AR=$ac_cv_prog_AR
6452if test -n "$AR"; then
81ecdfbb
RW
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6454$as_echo "$AR" >&6; }
bec39cab 6455else
81ecdfbb
RW
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
bec39cab
AC
6458fi
6459
81ecdfbb 6460
bec39cab
AC
6461fi
6462if test -z "$ac_cv_prog_AR"; then
6463 ac_ct_AR=$AR
6464 # Extract the first word of "ar", so it can be a program name with args.
6465set dummy ar; ac_word=$2
81ecdfbb
RW
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6467$as_echo_n "checking for $ac_word... " >&6; }
6468if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6469 $as_echo_n "(cached) " >&6
bec39cab
AC
6470else
6471 if test -n "$ac_ct_AR"; then
6472 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6473else
6474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477 IFS=$as_save_IFS
6478 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6479 for ac_exec_ext in '' $ac_executable_extensions; do
6480 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6481 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6483 break 2
6484 fi
6485done
81ecdfbb
RW
6486 done
6487IFS=$as_save_IFS
bec39cab
AC
6488
6489fi
6490fi
6491ac_ct_AR=$ac_cv_prog_ac_ct_AR
6492if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6494$as_echo "$ac_ct_AR" >&6; }
bec39cab 6495else
81ecdfbb
RW
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
bec39cab
AC
6498fi
6499
81ecdfbb
RW
6500 if test "x$ac_ct_AR" = x; then
6501 AR=""
6502 else
6503 case $cross_compiling:$ac_tool_warned in
6504yes:)
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6506$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6507ac_tool_warned=yes ;;
6508esac
6509 AR=$ac_ct_AR
6510 fi
bec39cab
AC
6511else
6512 AR="$ac_cv_prog_AR"
6513fi
6514
6515if test -n "$ac_tool_prefix"; then
6516 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6517set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6519$as_echo_n "checking for $ac_word... " >&6; }
6520if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6521 $as_echo_n "(cached) " >&6
bec39cab
AC
6522else
6523 if test -n "$DLLTOOL"; then
6524 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6525else
6526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6533 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6535 break 2
6536 fi
6537done
81ecdfbb
RW
6538 done
6539IFS=$as_save_IFS
bec39cab
AC
6540
6541fi
6542fi
6543DLLTOOL=$ac_cv_prog_DLLTOOL
6544if test -n "$DLLTOOL"; then
81ecdfbb
RW
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6546$as_echo "$DLLTOOL" >&6; }
bec39cab 6547else
81ecdfbb
RW
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
bec39cab
AC
6550fi
6551
81ecdfbb 6552
bec39cab
AC
6553fi
6554if test -z "$ac_cv_prog_DLLTOOL"; then
6555 ac_ct_DLLTOOL=$DLLTOOL
6556 # Extract the first word of "dlltool", so it can be a program name with args.
6557set dummy dlltool; ac_word=$2
81ecdfbb
RW
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6561 $as_echo_n "(cached) " >&6
bec39cab
AC
6562else
6563 if test -n "$ac_ct_DLLTOOL"; then
6564 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6565else
6566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6567for as_dir in $PATH
6568do
6569 IFS=$as_save_IFS
6570 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6571 for ac_exec_ext in '' $ac_executable_extensions; do
6572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6573 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6575 break 2
6576 fi
6577done
81ecdfbb
RW
6578 done
6579IFS=$as_save_IFS
bec39cab
AC
6580
6581fi
6582fi
6583ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6584if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6586$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6587else
81ecdfbb
RW
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
bec39cab
AC
6590fi
6591
81ecdfbb
RW
6592 if test "x$ac_ct_DLLTOOL" = x; then
6593 DLLTOOL=""
6594 else
6595 case $cross_compiling:$ac_tool_warned in
6596yes:)
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6599ac_tool_warned=yes ;;
6600esac
6601 DLLTOOL=$ac_ct_DLLTOOL
6602 fi
bec39cab
AC
6603else
6604 DLLTOOL="$ac_cv_prog_DLLTOOL"
6605fi
6606
6607if test -n "$ac_tool_prefix"; then
6608 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6609set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if test "${ac_cv_prog_WINDRES+set}" = set; then :
6613 $as_echo_n "(cached) " >&6
bec39cab
AC
6614else
6615 if test -n "$WINDRES"; then
6616 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6617else
6618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619for as_dir in $PATH
6620do
6621 IFS=$as_save_IFS
6622 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6623 for ac_exec_ext in '' $ac_executable_extensions; do
6624 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6625 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6627 break 2
6628 fi
6629done
81ecdfbb
RW
6630 done
6631IFS=$as_save_IFS
bec39cab
AC
6632
6633fi
6634fi
6635WINDRES=$ac_cv_prog_WINDRES
6636if test -n "$WINDRES"; then
81ecdfbb
RW
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6638$as_echo "$WINDRES" >&6; }
bec39cab 6639else
81ecdfbb
RW
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6641$as_echo "no" >&6; }
bec39cab
AC
6642fi
6643
81ecdfbb 6644
bec39cab
AC
6645fi
6646if test -z "$ac_cv_prog_WINDRES"; then
6647 ac_ct_WINDRES=$WINDRES
6648 # Extract the first word of "windres", so it can be a program name with args.
6649set dummy windres; ac_word=$2
81ecdfbb
RW
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6651$as_echo_n "checking for $ac_word... " >&6; }
6652if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6653 $as_echo_n "(cached) " >&6
bec39cab
AC
6654else
6655 if test -n "$ac_ct_WINDRES"; then
6656 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6657else
6658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659for as_dir in $PATH
6660do
6661 IFS=$as_save_IFS
6662 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6663 for ac_exec_ext in '' $ac_executable_extensions; do
6664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6665 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6667 break 2
6668 fi
6669done
81ecdfbb
RW
6670 done
6671IFS=$as_save_IFS
bec39cab
AC
6672
6673fi
6674fi
6675ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6676if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6678$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6679else
81ecdfbb
RW
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6681$as_echo "no" >&6; }
c906108c 6682fi
bec39cab 6683
81ecdfbb
RW
6684 if test "x$ac_ct_WINDRES" = x; then
6685 WINDRES=""
6686 else
6687 case $cross_compiling:$ac_tool_warned in
6688yes:)
6689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6691ac_tool_warned=yes ;;
6692esac
6693 WINDRES=$ac_ct_WINDRES
6694 fi
c906108c 6695else
bec39cab 6696 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6697fi
6698
bec39cab 6699
036c3acb
TS
6700case $host_os in
6701 gnu*)
6702 # Needed for GNU Hurd hosts.
6703 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6704 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6705set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if test "${ac_cv_prog_MIG+set}" = set; then :
6709 $as_echo_n "(cached) " >&6
c906108c 6710else
bec39cab
AC
6711 if test -n "$MIG"; then
6712 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6713else
6714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6715for as_dir in $PATH
6716do
6717 IFS=$as_save_IFS
6718 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6719 for ac_exec_ext in '' $ac_executable_extensions; do
6720 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6721 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6723 break 2
6724 fi
6725done
81ecdfbb
RW
6726 done
6727IFS=$as_save_IFS
bec39cab 6728
c906108c 6729fi
bec39cab
AC
6730fi
6731MIG=$ac_cv_prog_MIG
6732if test -n "$MIG"; then
81ecdfbb
RW
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6734$as_echo "$MIG" >&6; }
c906108c 6735else
81ecdfbb
RW
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6737$as_echo "no" >&6; }
c906108c
SS
6738fi
6739
81ecdfbb 6740
bec39cab
AC
6741fi
6742if test -z "$ac_cv_prog_MIG"; then
6743 ac_ct_MIG=$MIG
6744 # Extract the first word of "mig", so it can be a program name with args.
6745set dummy mig; ac_word=$2
81ecdfbb
RW
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6747$as_echo_n "checking for $ac_word... " >&6; }
6748if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6749 $as_echo_n "(cached) " >&6
bec39cab
AC
6750else
6751 if test -n "$ac_ct_MIG"; then
6752 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6753else
6754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in $PATH
6756do
6757 IFS=$as_save_IFS
6758 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6759 for ac_exec_ext in '' $ac_executable_extensions; do
6760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6761 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6763 break 2
6764 fi
6765done
81ecdfbb
RW
6766 done
6767IFS=$as_save_IFS
c906108c 6768
bec39cab
AC
6769fi
6770fi
6771ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6772if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6774$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6775else
81ecdfbb
RW
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
bec39cab 6778fi
c906108c 6779
81ecdfbb
RW
6780 if test "x$ac_ct_MIG" = x; then
6781 MIG=""
6782 else
6783 case $cross_compiling:$ac_tool_warned in
6784yes:)
6785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6787ac_tool_warned=yes ;;
6788esac
6789 MIG=$ac_ct_MIG
6790 fi
bec39cab
AC
6791else
6792 MIG="$ac_cv_prog_MIG"
6793fi
c906108c 6794
036c3acb
TS
6795 if test x"$MIG" = x; then
6796 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6797 fi
6798 ;;
6799esac
c906108c 6800
bec39cab
AC
6801# ---------------------- #
6802# Checks for libraries. #
6803# ---------------------- #
c906108c 6804
bec39cab 6805# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6807$as_echo_n "checking for main in -lm... " >&6; }
6808if test "${ac_cv_lib_m_main+set}" = set; then :
6809 $as_echo_n "(cached) " >&6
bec39cab
AC
6810else
6811 ac_check_lib_save_LIBS=$LIBS
6812LIBS="-lm $LIBS"
81ecdfbb 6813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6814/* end confdefs.h. */
c906108c 6815
c906108c 6816
bec39cab
AC
6817int
6818main ()
6819{
81ecdfbb 6820return main ();
bec39cab
AC
6821 ;
6822 return 0;
6823}
6824_ACEOF
81ecdfbb 6825if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6826 ac_cv_lib_m_main=yes
6827else
81ecdfbb 6828 ac_cv_lib_m_main=no
bec39cab 6829fi
81ecdfbb
RW
6830rm -f core conftest.err conftest.$ac_objext \
6831 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6832LIBS=$ac_check_lib_save_LIBS
6833fi
81ecdfbb
RW
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6835$as_echo "$ac_cv_lib_m_main" >&6; }
6836if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6837 cat >>confdefs.h <<_ACEOF
6838#define HAVE_LIBM 1
6839_ACEOF
6840
6841 LIBS="-lm $LIBS"
c906108c 6842
c906108c 6843fi
bec39cab
AC
6844
6845
6846# We need to link with -lw to get `wctype' on Solaris before Solaris
6847# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6848# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6849# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6850ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6851if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6852
c906108c 6853else
81ecdfbb
RW
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6855$as_echo_n "checking for wctype in -lw... " >&6; }
6856if test "${ac_cv_lib_w_wctype+set}" = set; then :
6857 $as_echo_n "(cached) " >&6
bec39cab
AC
6858else
6859 ac_check_lib_save_LIBS=$LIBS
6860LIBS="-lw $LIBS"
81ecdfbb 6861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6862/* end confdefs.h. */
c906108c 6863
81ecdfbb
RW
6864/* Override any GCC internal prototype to avoid an error.
6865 Use char because int might match the return type of a GCC
6866 builtin and then its argument prototype would still apply. */
bec39cab
AC
6867#ifdef __cplusplus
6868extern "C"
6869#endif
bec39cab
AC
6870char wctype ();
6871int
6872main ()
6873{
81ecdfbb 6874return wctype ();
bec39cab
AC
6875 ;
6876 return 0;
6877}
6878_ACEOF
81ecdfbb 6879if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6880 ac_cv_lib_w_wctype=yes
6881else
81ecdfbb 6882 ac_cv_lib_w_wctype=no
bec39cab 6883fi
81ecdfbb
RW
6884rm -f core conftest.err conftest.$ac_objext \
6885 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6886LIBS=$ac_check_lib_save_LIBS
6887fi
81ecdfbb
RW
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6889$as_echo "$ac_cv_lib_w_wctype" >&6; }
6890if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6891 cat >>confdefs.h <<_ACEOF
6892#define HAVE_LIBW 1
6893_ACEOF
c906108c 6894
bec39cab 6895 LIBS="-lw $LIBS"
c906108c 6896
bec39cab 6897fi
c906108c 6898
bec39cab 6899fi
c906108c 6900
ddc9cd0f 6901
bec39cab 6902# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6904$as_echo_n "checking for library containing gethostbyname... " >&6; }
6905if test "${ac_cv_search_gethostbyname+set}" = set; then :
6906 $as_echo_n "(cached) " >&6
bec39cab
AC
6907else
6908 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6910/* end confdefs.h. */
ddc9cd0f 6911
81ecdfbb
RW
6912/* Override any GCC internal prototype to avoid an error.
6913 Use char because int might match the return type of a GCC
6914 builtin and then its argument prototype would still apply. */
bec39cab
AC
6915#ifdef __cplusplus
6916extern "C"
6917#endif
bec39cab
AC
6918char gethostbyname ();
6919int
6920main ()
6921{
81ecdfbb 6922return gethostbyname ();
bec39cab
AC
6923 ;
6924 return 0;
6925}
6926_ACEOF
81ecdfbb
RW
6927for ac_lib in '' nsl; do
6928 if test -z "$ac_lib"; then
6929 ac_res="none required"
6930 else
6931 ac_res=-l$ac_lib
b4e70030 6932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6933 fi
6934 if ac_fn_c_try_link "$LINENO"; then :
6935 ac_cv_search_gethostbyname=$ac_res
6936fi
6937rm -f core conftest.err conftest.$ac_objext \
6938 conftest$ac_exeext
6939 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6940 break
6941fi
6942done
6943if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6944
bec39cab 6945else
81ecdfbb 6946 ac_cv_search_gethostbyname=no
bec39cab 6947fi
81ecdfbb 6948rm conftest.$ac_ext
bec39cab
AC
6949LIBS=$ac_func_search_save_LIBS
6950fi
81ecdfbb
RW
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6952$as_echo "$ac_cv_search_gethostbyname" >&6; }
6953ac_res=$ac_cv_search_gethostbyname
6954if test "$ac_res" != no; then :
6955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6956
bec39cab 6957fi
96baa820 6958
c906108c 6959
b4e70030 6960# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6962$as_echo_n "checking for library containing socketpair... " >&6; }
6963if test "${ac_cv_search_socketpair+set}" = set; then :
6964 $as_echo_n "(cached) " >&6
b4e70030
JB
6965else
6966 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6968/* end confdefs.h. */
6969
81ecdfbb
RW
6970/* Override any GCC internal prototype to avoid an error.
6971 Use char because int might match the return type of a GCC
6972 builtin and then its argument prototype would still apply. */
b4e70030
JB
6973#ifdef __cplusplus
6974extern "C"
6975#endif
b4e70030
JB
6976char socketpair ();
6977int
6978main ()
6979{
81ecdfbb 6980return socketpair ();
b4e70030
JB
6981 ;
6982 return 0;
6983}
6984_ACEOF
81ecdfbb
RW
6985for ac_lib in '' socket; do
6986 if test -z "$ac_lib"; then
6987 ac_res="none required"
6988 else
6989 ac_res=-l$ac_lib
b4e70030 6990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6991 fi
6992 if ac_fn_c_try_link "$LINENO"; then :
6993 ac_cv_search_socketpair=$ac_res
6994fi
6995rm -f core conftest.err conftest.$ac_objext \
6996 conftest$ac_exeext
6997 if test "${ac_cv_search_socketpair+set}" = set; then :
6998 break
6999fi
7000done
7001if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7002
b4e70030 7003else
81ecdfbb 7004 ac_cv_search_socketpair=no
b4e70030 7005fi
81ecdfbb 7006rm conftest.$ac_ext
b4e70030
JB
7007LIBS=$ac_func_search_save_LIBS
7008fi
81ecdfbb
RW
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7010$as_echo "$ac_cv_search_socketpair" >&6; }
7011ac_res=$ac_cv_search_socketpair
7012if test "$ac_res" != no; then :
7013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7014
7015fi
7016
7017
233a11ab 7018# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
7019
7020 # See if the user specified whether he wants zlib support or not.
7021
7022# Check whether --with-zlib was given.
7023if test "${with_zlib+set}" = set; then :
7024 withval=$with_zlib;
7025else
7026 with_zlib=auto
7027fi
7028
7029
7030 if test "$with_zlib" != "no"; then
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
7032$as_echo_n "checking for library containing zlibVersion... " >&6; }
7033if test "${ac_cv_search_zlibVersion+set}" = set; then :
7034 $as_echo_n "(cached) " >&6
233a11ab
CS
7035else
7036 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
7038/* end confdefs.h. */
7039
81ecdfbb
RW
7040/* Override any GCC internal prototype to avoid an error.
7041 Use char because int might match the return type of a GCC
233a11ab 7042 builtin and then its argument prototype would still apply. */
233a11ab
CS
7043#ifdef __cplusplus
7044extern "C"
7045#endif
233a11ab
CS
7046char zlibVersion ();
7047int
7048main ()
7049{
81ecdfbb 7050return zlibVersion ();
233a11ab
CS
7051 ;
7052 return 0;
7053}
7054_ACEOF
81ecdfbb
RW
7055for ac_lib in '' z; do
7056 if test -z "$ac_lib"; then
7057 ac_res="none required"
233a11ab 7058 else
81ecdfbb
RW
7059 ac_res=-l$ac_lib
7060 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 7061 fi
81ecdfbb
RW
7062 if ac_fn_c_try_link "$LINENO"; then :
7063 ac_cv_search_zlibVersion=$ac_res
233a11ab 7064fi
81ecdfbb
RW
7065rm -f core conftest.err conftest.$ac_objext \
7066 conftest$ac_exeext
7067 if test "${ac_cv_search_zlibVersion+set}" = set; then :
7068 break
233a11ab 7069fi
81ecdfbb
RW
7070done
7071if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 7072
233a11ab 7073else
81ecdfbb 7074 ac_cv_search_zlibVersion=no
233a11ab 7075fi
81ecdfbb
RW
7076rm conftest.$ac_ext
7077LIBS=$ac_func_search_save_LIBS
233a11ab 7078fi
81ecdfbb
RW
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
7080$as_echo "$ac_cv_search_zlibVersion" >&6; }
7081ac_res=$ac_cv_search_zlibVersion
7082if test "$ac_res" != no; then :
7083 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7084 for ac_header in zlib.h
7085do :
7086 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
7087if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 7088 cat >>confdefs.h <<_ACEOF
81ecdfbb 7089#define HAVE_ZLIB_H 1
233a11ab
CS
7090_ACEOF
7091
7092fi
7093
7094done
7095
7096fi
7097
b040ad30
JB
7098 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
7099 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
7100 fi
7101 fi
7102
233a11ab 7103
77f120bf 7104# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
7106$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
7107if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
7108 $as_echo_n "(cached) " >&6
bec39cab
AC
7109else
7110 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7112/* end confdefs.h. */
c906108c 7113
81ecdfbb
RW
7114/* Override any GCC internal prototype to avoid an error.
7115 Use char because int might match the return type of a GCC
7116 builtin and then its argument prototype would still apply. */
bec39cab
AC
7117#ifdef __cplusplus
7118extern "C"
7119#endif
77f120bf 7120char dlgetmodinfo ();
bec39cab
AC
7121int
7122main ()
7123{
81ecdfbb 7124return dlgetmodinfo ();
bec39cab
AC
7125 ;
7126 return 0;
7127}
7128_ACEOF
81ecdfbb
RW
7129for ac_lib in '' dl xpdl; do
7130 if test -z "$ac_lib"; then
7131 ac_res="none required"
7132 else
7133 ac_res=-l$ac_lib
b4e70030 7134 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7135 fi
7136 if ac_fn_c_try_link "$LINENO"; then :
7137 ac_cv_search_dlgetmodinfo=$ac_res
7138fi
7139rm -f core conftest.err conftest.$ac_objext \
7140 conftest$ac_exeext
7141 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
7142 break
7143fi
7144done
7145if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 7146
4e8d927d 7147else
81ecdfbb 7148 ac_cv_search_dlgetmodinfo=no
1ba607ad 7149fi
81ecdfbb 7150rm conftest.$ac_ext
bec39cab
AC
7151LIBS=$ac_func_search_save_LIBS
7152fi
81ecdfbb
RW
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
7154$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
7155ac_res=$ac_cv_search_dlgetmodinfo
7156if test "$ac_res" != no; then :
7157 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 7158
8bb2c122 7159fi
8bb2c122 7160
8bb2c122 7161
25268153
JB
7162# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7164$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7165if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7166 $as_echo_n "(cached) " >&6
7167else
7168 ac_func_search_save_LIBS=$LIBS
7169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170/* end confdefs.h. */
7171
7172/* Override any GCC internal prototype to avoid an error.
7173 Use char because int might match the return type of a GCC
7174 builtin and then its argument prototype would still apply. */
7175#ifdef __cplusplus
7176extern "C"
7177#endif
7178char kinfo_getvmmap ();
7179int
7180main ()
7181{
7182return kinfo_getvmmap ();
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187for ac_lib in '' util; do
7188 if test -z "$ac_lib"; then
7189 ac_res="none required"
7190 else
7191 ac_res=-l$ac_lib
7192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7193 fi
7194 if ac_fn_c_try_link "$LINENO"; then :
7195 ac_cv_search_kinfo_getvmmap=$ac_res
7196fi
7197rm -f core conftest.err conftest.$ac_objext \
7198 conftest$ac_exeext
7199 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7200 break
7201fi
7202done
7203if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7204
7205else
7206 ac_cv_search_kinfo_getvmmap=no
7207fi
7208rm conftest.$ac_ext
7209LIBS=$ac_func_search_save_LIBS
7210fi
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7212$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7213ac_res=$ac_cv_search_kinfo_getvmmap
7214if test "$ac_res" != no; then :
7215 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7216
7217$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7218
7219fi
7220
7221
77f120bf 7222
77f120bf 7223
6c7a06a3 7224
81ecdfbb
RW
7225# Check whether --with-libiconv-prefix was given.
7226if test "${with_libiconv_prefix+set}" = set; then :
7227 withval=$with_libiconv_prefix;
6c7a06a3 7228 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
7229 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
7230 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
7231 done
7232
81ecdfbb
RW
7233fi
7234
6c7a06a3 7235
f18c4681 7236 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
7237 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
7238
81ecdfbb
RW
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7240$as_echo_n "checking for iconv... " >&6; }
7241if test "${am_cv_func_iconv+set}" = set; then :
7242 $as_echo_n "(cached) " >&6
d542061a 7243else
6c7a06a3
TT
7244
7245 am_cv_func_iconv="no, consider installing GNU libiconv"
7246 am_cv_lib_iconv=no
7247 am_cv_use_build_libiconv=no
f0f20949 7248 am_cv_build_libiconv_path=
4edb1e84
JB
7249
7250 # If libiconv is part of the build tree, then try using it over
7251 # any system iconv.
7252 if test -d ../libiconv; then
f18c4681
JB
7253 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
7254 am_save_LIBS="$LIBS"
7255 am_save_CPPFLAGS="$CPPFLAGS"
7256 LIBS="$LIBS $lib_dir/libiconv.a"
7257 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
7258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7259/* end confdefs.h. */
6c7a06a3
TT
7260#include <stdlib.h>
7261#include <iconv.h>
d542061a
UW
7262int
7263main ()
7264{
6c7a06a3 7265iconv_t cd = iconv_open("","");
f18c4681
JB
7266 iconv(cd,NULL,NULL,NULL,NULL);
7267 iconv_close(cd);
d542061a
UW
7268 ;
7269 return 0;
7270}
7271_ACEOF
81ecdfbb 7272if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7273 am_cv_use_build_libiconv=yes
f0f20949 7274 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
7275 am_cv_lib_iconv=yes
7276 am_cv_func_iconv=yes
d542061a 7277fi
81ecdfbb
RW
7278rm -f core conftest.err conftest.$ac_objext \
7279 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
7280 LIBS="$am_save_LIBS"
7281 CPPFLAGS="$am_save_CPPFLAGS"
7282 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
7283 break
7284 fi
7285 done
4edb1e84 7286 fi
94ae1714 7287
4edb1e84 7288 # Next, try to find iconv in libc.
6c7a06a3 7289 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7291/* end confdefs.h. */
6c7a06a3
TT
7292#include <stdlib.h>
7293#include <iconv.h>
d542061a
UW
7294int
7295main ()
7296{
6c7a06a3
TT
7297iconv_t cd = iconv_open("","");
7298 iconv(cd,NULL,NULL,NULL,NULL);
7299 iconv_close(cd);
d542061a
UW
7300 ;
7301 return 0;
7302}
7303_ACEOF
81ecdfbb 7304if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7305 am_cv_func_iconv=yes
d542061a 7306fi
81ecdfbb
RW
7307rm -f core conftest.err conftest.$ac_objext \
7308 conftest$ac_exeext conftest.$ac_ext
77f120bf 7309 fi
94ae1714 7310
4edb1e84
JB
7311 # If iconv was not in libc, try -liconv. In this case, arrange to
7312 # look in the libiconv prefix, if it was specified by the user.
7313 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7314 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
7315 am_save_LIBS="$LIBS"
7316 if test -n "$LIBICONV_INCLUDE"; then
7317 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
7318 LIBS="$LIBS $LIBICONV_LIBDIR"
7319 fi
7320 LIBS="$LIBS -liconv"
81ecdfbb 7321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7322/* end confdefs.h. */
6c7a06a3
TT
7323#include <stdlib.h>
7324#include <iconv.h>
bec39cab
AC
7325int
7326main ()
7327{
6c7a06a3
TT
7328iconv_t cd = iconv_open("","");
7329 iconv(cd,NULL,NULL,NULL,NULL);
7330 iconv_close(cd);
bec39cab
AC
7331 ;
7332 return 0;
7333}
7334_ACEOF
81ecdfbb 7335if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7336 am_cv_lib_iconv=yes
6c7a06a3 7337 am_cv_func_iconv=yes
627af7ea 7338fi
81ecdfbb
RW
7339rm -f core conftest.err conftest.$ac_objext \
7340 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 7341 LIBS="$am_save_LIBS"
fc3b640d 7342 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
7343 fi
7344
7345fi
81ecdfbb
RW
7346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7347$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
7348
7349 # Set the various flags based on the cache variables. We can't rely
7350 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
7351 LIBICONV=
7352 if test "$am_cv_lib_iconv" = yes; then
7353 LIBICONV="-liconv"
94ae1714
TT
7354 else
7355 LIBICONV_LIBDIR=
7356 LIBICONV_INCLUDE=
fc3b640d
TT
7357 fi
7358 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 7359 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 7360 LIBICONV_LIBDIR=""
fc3b640d
TT
7361 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
7362 fi
7363 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
7364 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 7365
6c7a06a3
TT
7366 if test "$am_cv_func_iconv" = yes; then
7367
81ecdfbb 7368$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 7369
81ecdfbb
RW
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7371$as_echo_n "checking for iconv declaration... " >&6; }
7372 if test "${am_cv_proto_iconv+set}" = set; then :
7373 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7374else
7375
81ecdfbb 7376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7377/* end confdefs.h. */
7378
6c7a06a3
TT
7379#include <stdlib.h>
7380#include <iconv.h>
7381extern
b4e70030 7382#ifdef __cplusplus
6c7a06a3 7383"C"
b4e70030 7384#endif
6c7a06a3
TT
7385#if defined(__STDC__) || defined(__cplusplus)
7386size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7387#else
7388size_t iconv();
7389#endif
7390
b4e70030
JB
7391int
7392main ()
7393{
6c7a06a3 7394
b4e70030
JB
7395 ;
7396 return 0;
7397}
7398_ACEOF
81ecdfbb 7399if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7400 am_cv_proto_iconv_arg1=""
4e8d927d 7401else
81ecdfbb 7402 am_cv_proto_iconv_arg1="const"
b4e70030 7403fi
81ecdfbb 7404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7405 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);"
7406fi
7407
7408 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7410 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7411$as_echo "${ac_t:-
7412 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7413
7414cat >>confdefs.h <<_ACEOF
7415#define ICONV_CONST $am_cv_proto_iconv_arg1
7416_ACEOF
7417
7418 fi
6c7a06a3
TT
7419
7420
478aac75
DE
7421# GDB may fork/exec the iconv program to get the list of supported character
7422# sets. Allow the user to specify where to find it.
7423# There are several factors affecting the choice of option name:
7424# - There is already --with-libiconv-prefix but we can't use it, it specifies
7425# the build-time location of libiconv files.
7426# - The program we need to find is iconv, which comes with glibc. The user
7427# doesn't necessarily have libiconv installed. Therefore naming this
7428# --with-libiconv-foo feels wrong.
7429# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7430# defined to work on directories not files (though it really doesn't know
7431# the difference).
7432# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7433# with --with-libiconv-prefix.
7434# Putting these together is why the option name is --with-iconv-bin.
7435
7436
7437# Check whether --with-iconv-bin was given.
7438if test "${with_iconv_bin+set}" = set; then :
7439 withval=$with_iconv_bin; iconv_bin="${withval}"
7440
7441cat >>confdefs.h <<_ACEOF
7442#define ICONV_BIN "${iconv_bin}"
7443_ACEOF
7444
7445
7446 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7447 if test "x$prefix" = xNONE; then
7448 test_prefix=/usr/local
7449 else
7450 test_prefix=$prefix
7451 fi
7452 else
7453 test_prefix=$exec_prefix
7454 fi
7455 value=0
7456 case ${iconv_bin} in
7457 "${test_prefix}"|"${test_prefix}/"*|\
7458 '${exec_prefix}'|'${exec_prefix}/'*)
7459 value=1
7460 ;;
7461 esac
7462
7463cat >>confdefs.h <<_ACEOF
7464#define ICONV_BIN_RELOCATABLE $value
7465_ACEOF
7466
7467
7468
7469fi
7470
7471
cb01cfba 7472# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7473if test x"$enable_tui" != xno; then
cb01cfba
JB
7474 prefer_curses=yes
7475fi
7476
7477curses_found=no
7478if test x"$prefer_curses" = xyes; then
7479 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7480 # curses library because the latter might not provide all the
7481 # functionality we need. However, this leads to problems on systems
7482 # where the linker searches /usr/local/lib, but the compiler doesn't
7483 # search /usr/local/include, if ncurses is installed in /usr/local. A
7484 # default installation of ncurses on alpha*-dec-osf* will lead to such
7485 # a situation.
81ecdfbb
RW
7486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7487$as_echo_n "checking for library containing waddstr... " >&6; }
7488if test "${ac_cv_search_waddstr+set}" = set; then :
7489 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7490else
7491 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7493/* end confdefs.h. */
7494
81ecdfbb
RW
7495/* Override any GCC internal prototype to avoid an error.
7496 Use char because int might match the return type of a GCC
7497 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7498#ifdef __cplusplus
7499extern "C"
7500#endif
6c7a06a3
TT
7501char waddstr ();
7502int
7503main ()
7504{
81ecdfbb 7505return waddstr ();
6c7a06a3
TT
7506 ;
7507 return 0;
7508}
7509_ACEOF
81ecdfbb
RW
7510for ac_lib in '' ncurses cursesX curses; do
7511 if test -z "$ac_lib"; then
7512 ac_res="none required"
7513 else
7514 ac_res=-l$ac_lib
7515 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7516 fi
7517 if ac_fn_c_try_link "$LINENO"; then :
7518 ac_cv_search_waddstr=$ac_res
7519fi
7520rm -f core conftest.err conftest.$ac_objext \
7521 conftest$ac_exeext
7522 if test "${ac_cv_search_waddstr+set}" = set; then :
7523 break
7524fi
7525done
7526if test "${ac_cv_search_waddstr+set}" = set; then :
7527
6c7a06a3 7528else
81ecdfbb
RW
7529 ac_cv_search_waddstr=no
7530fi
7531rm conftest.$ac_ext
7532LIBS=$ac_func_search_save_LIBS
7533fi
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7535$as_echo "$ac_cv_search_waddstr" >&6; }
7536ac_res=$ac_cv_search_waddstr
7537if test "$ac_res" != no; then :
7538 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7539
7540fi
7541
7542
cb01cfba
JB
7543 if test "$ac_cv_search_waddstr" != no; then
7544 curses_found=yes
7545 fi
7546fi
7547
7548# Check whether we should enable the TUI, but only do so if we really
7549# can.
7550if test x"$enable_tui" != xno; then
7551 if test -d $srcdir/tui; then
7552 if test "$curses_found" != no; then
6c7a06a3
TT
7553 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7554 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7555 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7556 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7557 else
7558 if test x"$enable_tui" = xyes; then
81ecdfbb 7559 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7560 else
81ecdfbb
RW
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7562$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7563 fi
7564 fi
7565 fi
7566fi
7567
7568# Since GDB uses Readline, we need termcap functionality. In many
7569# cases this will be provided by the curses library, but some systems
7570# have a seperate termcap library, or no curses library at all.
7571
7572case $host_os in
7573 cygwin*)
7574 if test -d $srcdir/libtermcap; then
7575 LIBS="../libtermcap/libtermcap.a $LIBS"
7576 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7577 fi ;;
7578 go32* | *djgpp*)
7579 ac_cv_search_tgetent="none required"
7580 ;;
7581 *mingw32*)
03b79603 7582 if test x"$curses_found" != xyes; then
63413d85 7583 ac_cv_search_tgetent="none required"
532f44ed 7584 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
63413d85 7585 fi ;;
6c7a06a3
TT
7586esac
7587
7588# These are the libraries checked by Readline.
81ecdfbb
RW
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7590$as_echo_n "checking for library containing tgetent... " >&6; }
7591if test "${ac_cv_search_tgetent+set}" = set; then :
7592 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7593else
7594 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7596/* end confdefs.h. */
7597
81ecdfbb
RW
7598/* Override any GCC internal prototype to avoid an error.
7599 Use char because int might match the return type of a GCC
7600 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7601#ifdef __cplusplus
7602extern "C"
7603#endif
6c7a06a3
TT
7604char tgetent ();
7605int
7606main ()
7607{
81ecdfbb 7608return tgetent ();
6c7a06a3
TT
7609 ;
7610 return 0;
7611}
7612_ACEOF
81ecdfbb
RW
7613for ac_lib in '' termcap tinfo curses ncurses; do
7614 if test -z "$ac_lib"; then
7615 ac_res="none required"
7616 else
7617 ac_res=-l$ac_lib
6c7a06a3 7618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7619 fi
7620 if ac_fn_c_try_link "$LINENO"; then :
7621 ac_cv_search_tgetent=$ac_res
7622fi
7623rm -f core conftest.err conftest.$ac_objext \
7624 conftest$ac_exeext
7625 if test "${ac_cv_search_tgetent+set}" = set; then :
7626 break
7627fi
7628done
7629if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7630
6c7a06a3 7631else
81ecdfbb 7632 ac_cv_search_tgetent=no
6c7a06a3 7633fi
81ecdfbb 7634rm conftest.$ac_ext
6c7a06a3
TT
7635LIBS=$ac_func_search_save_LIBS
7636fi
81ecdfbb
RW
7637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7638$as_echo "$ac_cv_search_tgetent" >&6; }
7639ac_res=$ac_cv_search_tgetent
7640if test "$ac_res" != no; then :
7641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7642
06825bd1
MK
7643fi
7644
06825bd1 7645
bec39cab 7646if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7647 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7648fi
7649
3841debe 7650
81ecdfbb
RW
7651# Check whether --with-system-readline was given.
7652if test "${with_system_readline+set}" = set; then :
7653 withval=$with_system_readline;
7654fi
6a30b0a5 7655
6a30b0a5
AS
7656
7657if test "$with_system_readline" = yes; then
7658 READLINE=-lreadline
7659 READLINE_DEPS=
7660 READLINE_CFLAGS=
39037522 7661 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7662else
7663 READLINE='$(READLINE_DIR)/libreadline.a'
7664 READLINE_DEPS='$(READLINE)'
7665 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7666 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7667fi
7668
7669
7670
7671
7672
f997c383
SD
7673# Generate jit-reader.h
7674
7675# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7676TARGET_PTR=
7677
7678# The cast to long int works around a bug in the HP C Compiler
7679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7681# This bug is HP SR number 8606223364.
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7683$as_echo_n "checking size of unsigned long long... " >&6; }
7684if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7685 $as_echo_n "(cached) " >&6
7686else
7687 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7688
7689else
7690 if test "$ac_cv_type_unsigned_long_long" = yes; then
7691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7693{ as_fn_set_status 77
7694as_fn_error "cannot compute sizeof (unsigned long long)
7695See \`config.log' for more details." "$LINENO" 5; }; }
7696 else
7697 ac_cv_sizeof_unsigned_long_long=0
7698 fi
7699fi
7700
7701fi
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7703$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7704
7705
7706
7707cat >>confdefs.h <<_ACEOF
7708#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7709_ACEOF
7710
7711
7712# The cast to long int works around a bug in the HP C Compiler
7713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7715# This bug is HP SR number 8606223364.
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7717$as_echo_n "checking size of unsigned long... " >&6; }
7718if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7719 $as_echo_n "(cached) " >&6
7720else
7721 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7722
7723else
7724 if test "$ac_cv_type_unsigned_long" = yes; then
7725 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7727{ as_fn_set_status 77
7728as_fn_error "cannot compute sizeof (unsigned long)
7729See \`config.log' for more details." "$LINENO" 5; }; }
7730 else
7731 ac_cv_sizeof_unsigned_long=0
7732 fi
7733fi
7734
7735fi
7736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7737$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7738
7739
7740
7741cat >>confdefs.h <<_ACEOF
7742#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7743_ACEOF
7744
7745
7746# The cast to long int works around a bug in the HP C Compiler
7747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7749# This bug is HP SR number 8606223364.
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7751$as_echo_n "checking size of unsigned __int128... " >&6; }
7752if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7753 $as_echo_n "(cached) " >&6
7754else
7755 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7756
7757else
7758 if test "$ac_cv_type_unsigned___int128" = yes; then
7759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7761{ as_fn_set_status 77
7762as_fn_error "cannot compute sizeof (unsigned __int128)
7763See \`config.log' for more details." "$LINENO" 5; }; }
7764 else
7765 ac_cv_sizeof_unsigned___int128=0
7766 fi
7767fi
7768
7769fi
7770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7771$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7772
7773
7774
7775cat >>confdefs.h <<_ACEOF
7776#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7777_ACEOF
7778
7779
7780
7781if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7782 TARGET_PTR="unsigned long"
7783elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7784 TARGET_PTR="unsigned long long"
7785elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7786 TARGET_PTR="unsigned __int128"
7787else
7788 TARGET_PTR="unsigned long"
7789fi
7790
7791
7792ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7793
7794
a2d08b9e
SD
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7796$as_echo_n "checking for library containing dlopen... " >&6; }
7797if test "${ac_cv_search_dlopen+set}" = set; then :
7798 $as_echo_n "(cached) " >&6
7799else
7800 ac_func_search_save_LIBS=$LIBS
7801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7802/* end confdefs.h. */
7803
7804/* Override any GCC internal prototype to avoid an error.
7805 Use char because int might match the return type of a GCC
7806 builtin and then its argument prototype would still apply. */
7807#ifdef __cplusplus
7808extern "C"
7809#endif
7810char dlopen ();
7811int
7812main ()
7813{
7814return dlopen ();
7815 ;
7816 return 0;
7817}
7818_ACEOF
7819for ac_lib in '' dl; do
7820 if test -z "$ac_lib"; then
7821 ac_res="none required"
7822 else
7823 ac_res=-l$ac_lib
7824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7825 fi
7826 if ac_fn_c_try_link "$LINENO"; then :
7827 ac_cv_search_dlopen=$ac_res
7828fi
7829rm -f core conftest.err conftest.$ac_objext \
7830 conftest$ac_exeext
7831 if test "${ac_cv_search_dlopen+set}" = set; then :
7832 break
7833fi
7834done
7835if test "${ac_cv_search_dlopen+set}" = set; then :
7836
7837else
7838 ac_cv_search_dlopen=no
7839fi
7840rm conftest.$ac_ext
7841LIBS=$ac_func_search_save_LIBS
7842fi
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7844$as_echo "$ac_cv_search_dlopen" >&6; }
7845ac_res=$ac_cv_search_dlopen
7846if test "$ac_res" != no; then :
7847 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7848
7849fi
7850
7851
39037522 7852
b8e0a31c
SD
7853
7854# Check whether --with-jit-reader-dir was given.
7855if test "${with_jit_reader_dir+set}" = set; then :
7856 withval=$with_jit_reader_dir;
7857 JIT_READER_DIR=$withval
7858else
7859 JIT_READER_DIR=${libdir}/gdb
7860fi
7861
7862
7863 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7864 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7865 ac_define_dir=`eval echo $JIT_READER_DIR`
7866 ac_define_dir=`eval echo $ac_define_dir`
7867
7868cat >>confdefs.h <<_ACEOF
7869#define JIT_READER_DIR "$ac_define_dir"
7870_ACEOF
7871
7872
7873
7874
7875 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7876 if test "x$prefix" = xNONE; then
7877 test_prefix=/usr/local
7878 else
7879 test_prefix=$prefix
7880 fi
7881 else
7882 test_prefix=$exec_prefix
7883 fi
7884 value=0
7885 case ${ac_define_dir} in
7886 "${test_prefix}"|"${test_prefix}/"*|\
7887 '${exec_prefix}'|'${exec_prefix}/'*)
7888 value=1
7889 ;;
7890 esac
7891
7892cat >>confdefs.h <<_ACEOF
7893#define JIT_READER_DIR_RELOCATABLE $value
7894_ACEOF
7895
7896
7897
7898
7899
81ecdfbb
RW
7900# Check whether --with-expat was given.
7901if test "${with_expat+set}" = set; then :
7902 withval=$with_expat;
5c39566f
DJ
7903else
7904 with_expat=auto
81ecdfbb
RW
7905fi
7906
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7908$as_echo_n "checking whether to use expat... " >&6; }
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7910$as_echo "$with_expat" >&6; }
5c39566f
DJ
7911
7912if test "${with_expat}" = no; then
81ecdfbb
RW
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7914$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7915 HAVE_LIBEXPAT=no
7916else
7917
3841debe
DJ
7918 if test "X$prefix" = "XNONE"; then
7919 acl_final_prefix="$ac_default_prefix"
7920 else
7921 acl_final_prefix="$prefix"
7922 fi
7923 if test "X$exec_prefix" = "XNONE"; then
7924 acl_final_exec_prefix='${prefix}'
7925 else
7926 acl_final_exec_prefix="$exec_prefix"
7927 fi
7928 acl_save_prefix="$prefix"
7929 prefix="$acl_final_prefix"
7930 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7931 prefix="$acl_save_prefix"
7932
7933
81ecdfbb
RW
7934# Check whether --with-gnu-ld was given.
7935if test "${with_gnu_ld+set}" = set; then :
7936 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7937else
7938 with_gnu_ld=no
81ecdfbb
RW
7939fi
7940
3841debe
DJ
7941# Prepare PATH_SEPARATOR.
7942# The user is always right.
7943if test "${PATH_SEPARATOR+set}" != set; then
7944 echo "#! /bin/sh" >conf$$.sh
7945 echo "exit 0" >>conf$$.sh
7946 chmod +x conf$$.sh
7947 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7948 PATH_SEPARATOR=';'
7949 else
7950 PATH_SEPARATOR=:
7951 fi
7952 rm -f conf$$.sh
7953fi
7954ac_prog=ld
7955if test "$GCC" = yes; then
7956 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7958$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7959 case $host in
7960 *-*-mingw*)
7961 # gcc leaves a trailing carriage return which upsets mingw
7962 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7963 *)
7964 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7965 esac
7966 case $ac_prog in
7967 # Accept absolute paths.
7968 [\\/]* | [A-Za-z]:[\\/]*)
7969 re_direlt='/[^/][^/]*/\.\./'
7970 # Canonicalize the path of ld
7971 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7972 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7973 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7974 done
7975 test -z "$LD" && LD="$ac_prog"
7976 ;;
7977 "")
7978 # If it fails, then pretend we aren't using GCC.
7979 ac_prog=ld
7980 ;;
7981 *)
7982 # If it is relative, then search for the first ld in PATH.
7983 with_gnu_ld=unknown
7984 ;;
7985 esac
7986elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7988$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7989else
81ecdfbb
RW
7990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7991$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7992fi
81ecdfbb
RW
7993if test "${acl_cv_path_LD+set}" = set; then :
7994 $as_echo_n "(cached) " >&6
3841debe
DJ
7995else
7996 if test -z "$LD"; then
7997 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7998 for ac_dir in $PATH; do
7999 test -z "$ac_dir" && ac_dir=.
8000 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8001 acl_cv_path_LD="$ac_dir/$ac_prog"
8002 # Check to see if the program is GNU ld. I'd rather use --version,
8003 # but apparently some GNU ld's only accept -v.
8004 # Break only if it was the GNU/non-GNU ld that we prefer.
8005 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8006 test "$with_gnu_ld" != no && break
8007 else
8008 test "$with_gnu_ld" != yes && break
8009 fi
8010 fi
8011 done
8012 IFS="$ac_save_ifs"
8013else
8014 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8015fi
8016fi
8017
8018LD="$acl_cv_path_LD"
8019if test -n "$LD"; then
81ecdfbb
RW
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8021$as_echo "$LD" >&6; }
3841debe 8022else
81ecdfbb
RW
8023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8024$as_echo "no" >&6; }
3841debe 8025fi
81ecdfbb
RW
8026test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8028$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8029if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8030 $as_echo_n "(cached) " >&6
3841debe
DJ
8031else
8032 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8033if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8034 acl_cv_prog_gnu_ld=yes
8035else
8036 acl_cv_prog_gnu_ld=no
8037fi
8038fi
81ecdfbb
RW
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8040$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
8041with_gnu_ld=$acl_cv_prog_gnu_ld
8042
8043
8044
81ecdfbb
RW
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8046$as_echo_n "checking for shared library run path origin... " >&6; }
8047if test "${acl_cv_rpath+set}" = set; then :
8048 $as_echo_n "(cached) " >&6
3841debe
DJ
8049else
8050
8051 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8052 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8053 . ./conftest.sh
8054 rm -f ./conftest.sh
8055 acl_cv_rpath=done
8056
8057fi
81ecdfbb
RW
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8059$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
8060 wl="$acl_cv_wl"
8061 libext="$acl_cv_libext"
8062 shlibext="$acl_cv_shlibext"
8063 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8064 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8065 hardcode_direct="$acl_cv_hardcode_direct"
8066 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
8067 # Check whether --enable-rpath was given.
8068if test "${enable_rpath+set}" = set; then :
8069 enableval=$enable_rpath; :
3841debe
DJ
8070else
8071 enable_rpath=yes
81ecdfbb
RW
8072fi
8073
3841debe
DJ
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083 use_additional=yes
8084
8085 acl_save_prefix="$prefix"
8086 prefix="$acl_final_prefix"
8087 acl_save_exec_prefix="$exec_prefix"
8088 exec_prefix="$acl_final_exec_prefix"
8089
8090 eval additional_includedir=\"$includedir\"
8091 eval additional_libdir=\"$libdir\"
8092
8093 exec_prefix="$acl_save_exec_prefix"
8094 prefix="$acl_save_prefix"
8095
8096
81ecdfbb
RW
8097# Check whether --with-libexpat-prefix was given.
8098if test "${with_libexpat_prefix+set}" = set; then :
8099 withval=$with_libexpat_prefix;
3841debe
DJ
8100 if test "X$withval" = "Xno"; then
8101 use_additional=no
8102 else
8103 if test "X$withval" = "X"; then
8104
8105 acl_save_prefix="$prefix"
8106 prefix="$acl_final_prefix"
8107 acl_save_exec_prefix="$exec_prefix"
8108 exec_prefix="$acl_final_exec_prefix"
8109
8110 eval additional_includedir=\"$includedir\"
8111 eval additional_libdir=\"$libdir\"
8112
8113 exec_prefix="$acl_save_exec_prefix"
8114 prefix="$acl_save_prefix"
8115
8116 else
8117 additional_includedir="$withval/include"
8118 additional_libdir="$withval/lib"
8119 fi
8120 fi
8121
81ecdfbb
RW
8122fi
8123
3841debe
DJ
8124 LIBEXPAT=
8125 LTLIBEXPAT=
8126 INCEXPAT=
8127 rpathdirs=
8128 ltrpathdirs=
8129 names_already_handled=
8130 names_next_round='expat '
8131 while test -n "$names_next_round"; do
8132 names_this_round="$names_next_round"
8133 names_next_round=
8134 for name in $names_this_round; do
8135 already_handled=
8136 for n in $names_already_handled; do
8137 if test "$n" = "$name"; then
8138 already_handled=yes
8139 break
8140 fi
8141 done
8142 if test -z "$already_handled"; then
8143 names_already_handled="$names_already_handled $name"
8144 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8145 eval value=\"\$HAVE_LIB$uppername\"
8146 if test -n "$value"; then
8147 if test "$value" = yes; then
8148 eval value=\"\$LIB$uppername\"
8149 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8150 eval value=\"\$LTLIB$uppername\"
8151 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8152 else
8153 :
8154 fi
8155 else
8156 found_dir=
8157 found_la=
8158 found_so=
8159 found_a=
8160 if test $use_additional = yes; then
8161 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8162 found_dir="$additional_libdir"
8163 found_so="$additional_libdir/lib$name.$shlibext"
8164 if test -f "$additional_libdir/lib$name.la"; then
8165 found_la="$additional_libdir/lib$name.la"
8166 fi
8167 else
8168 if test -f "$additional_libdir/lib$name.$libext"; then
8169 found_dir="$additional_libdir"
8170 found_a="$additional_libdir/lib$name.$libext"
8171 if test -f "$additional_libdir/lib$name.la"; then
8172 found_la="$additional_libdir/lib$name.la"
8173 fi
8174 fi
8175 fi
8176 fi
8177 if test "X$found_dir" = "X"; then
8178 for x in $LDFLAGS $LTLIBEXPAT; do
8179
8180 acl_save_prefix="$prefix"
8181 prefix="$acl_final_prefix"
8182 acl_save_exec_prefix="$exec_prefix"
8183 exec_prefix="$acl_final_exec_prefix"
8184 eval x=\"$x\"
8185 exec_prefix="$acl_save_exec_prefix"
8186 prefix="$acl_save_prefix"
8187
8188 case "$x" in
8189 -L*)
8190 dir=`echo "X$x" | sed -e 's/^X-L//'`
8191 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8192 found_dir="$dir"
8193 found_so="$dir/lib$name.$shlibext"
8194 if test -f "$dir/lib$name.la"; then
8195 found_la="$dir/lib$name.la"
8196 fi
8197 else
8198 if test -f "$dir/lib$name.$libext"; then
8199 found_dir="$dir"
8200 found_a="$dir/lib$name.$libext"
8201 if test -f "$dir/lib$name.la"; then
8202 found_la="$dir/lib$name.la"
8203 fi
8204 fi
8205 fi
8206 ;;
8207 esac
8208 if test "X$found_dir" != "X"; then
8209 break
8210 fi
8211 done
8212 fi
8213 if test "X$found_dir" != "X"; then
8214 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8215 if test "X$found_so" != "X"; then
8216 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8217 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8218 else
8219 haveit=
8220 for x in $ltrpathdirs; do
8221 if test "X$x" = "X$found_dir"; then
8222 haveit=yes
8223 break
8224 fi
8225 done
8226 if test -z "$haveit"; then
8227 ltrpathdirs="$ltrpathdirs $found_dir"
8228 fi
8229 if test "$hardcode_direct" = yes; then
8230 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8231 else
8232 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8233 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8234 haveit=
8235 for x in $rpathdirs; do
8236 if test "X$x" = "X$found_dir"; then
8237 haveit=yes
8238 break
8239 fi
8240 done
8241 if test -z "$haveit"; then
8242 rpathdirs="$rpathdirs $found_dir"
8243 fi
8244 else
8245 haveit=
8246 for x in $LDFLAGS $LIBEXPAT; do
8247
8248 acl_save_prefix="$prefix"
8249 prefix="$acl_final_prefix"
8250 acl_save_exec_prefix="$exec_prefix"
8251 exec_prefix="$acl_final_exec_prefix"
8252 eval x=\"$x\"
8253 exec_prefix="$acl_save_exec_prefix"
8254 prefix="$acl_save_prefix"
8255
8256 if test "X$x" = "X-L$found_dir"; then
8257 haveit=yes
8258 break
8259 fi
8260 done
8261 if test -z "$haveit"; then
8262 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8263 fi
8264 if test "$hardcode_minus_L" != no; then
8265 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8266 else
8267 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8268 fi
8269 fi
8270 fi
8271 fi
8272 else
8273 if test "X$found_a" != "X"; then
8274 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8275 else
8276 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8277 fi
8278 fi
8279 additional_includedir=
8280 case "$found_dir" in
8281 */lib | */lib/)
8282 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8283 additional_includedir="$basedir/include"
8284 ;;
8285 esac
8286 if test "X$additional_includedir" != "X"; then
8287 if test "X$additional_includedir" != "X/usr/include"; then
8288 haveit=
8289 if test "X$additional_includedir" = "X/usr/local/include"; then
8290 if test -n "$GCC"; then
8291 case $host_os in
8292 linux*) haveit=yes;;
8293 esac
8294 fi
8295 fi
8296 if test -z "$haveit"; then
8297 for x in $CPPFLAGS $INCEXPAT; do
8298
8299 acl_save_prefix="$prefix"
8300 prefix="$acl_final_prefix"
8301 acl_save_exec_prefix="$exec_prefix"
8302 exec_prefix="$acl_final_exec_prefix"
8303 eval x=\"$x\"
8304 exec_prefix="$acl_save_exec_prefix"
8305 prefix="$acl_save_prefix"
8306
8307 if test "X$x" = "X-I$additional_includedir"; then
8308 haveit=yes
8309 break
8310 fi
8311 done
8312 if test -z "$haveit"; then
8313 if test -d "$additional_includedir"; then
8314 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8315 fi
8316 fi
8317 fi
8318 fi
8319 fi
8320 if test -n "$found_la"; then
8321 save_libdir="$libdir"
8322 case "$found_la" in
8323 */* | *\\*) . "$found_la" ;;
8324 *) . "./$found_la" ;;
8325 esac
8326 libdir="$save_libdir"
8327 for dep in $dependency_libs; do
8328 case "$dep" in
8329 -L*)
8330 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8331 if test "X$additional_libdir" != "X/usr/lib"; then
8332 haveit=
8333 if test "X$additional_libdir" = "X/usr/local/lib"; then
8334 if test -n "$GCC"; then
8335 case $host_os in
8336 linux*) haveit=yes;;
8337 esac
8338 fi
8339 fi
8340 if test -z "$haveit"; then
8341 haveit=
8342 for x in $LDFLAGS $LIBEXPAT; do
8343
8344 acl_save_prefix="$prefix"
8345 prefix="$acl_final_prefix"
8346 acl_save_exec_prefix="$exec_prefix"
8347 exec_prefix="$acl_final_exec_prefix"
8348 eval x=\"$x\"
8349 exec_prefix="$acl_save_exec_prefix"
8350 prefix="$acl_save_prefix"
8351
8352 if test "X$x" = "X-L$additional_libdir"; then
8353 haveit=yes
8354 break
8355 fi
8356 done
8357 if test -z "$haveit"; then
8358 if test -d "$additional_libdir"; then
8359 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8360 fi
8361 fi
8362 haveit=
8363 for x in $LDFLAGS $LTLIBEXPAT; do
8364
8365 acl_save_prefix="$prefix"
8366 prefix="$acl_final_prefix"
8367 acl_save_exec_prefix="$exec_prefix"
8368 exec_prefix="$acl_final_exec_prefix"
8369 eval x=\"$x\"
8370 exec_prefix="$acl_save_exec_prefix"
8371 prefix="$acl_save_prefix"
8372
8373 if test "X$x" = "X-L$additional_libdir"; then
8374 haveit=yes
8375 break
8376 fi
8377 done
8378 if test -z "$haveit"; then
8379 if test -d "$additional_libdir"; then
8380 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8381 fi
8382 fi
8383 fi
8384 fi
8385 ;;
8386 -R*)
8387 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8388 if test "$enable_rpath" != no; then
8389 haveit=
8390 for x in $rpathdirs; do
8391 if test "X$x" = "X$dir"; then
8392 haveit=yes
8393 break
8394 fi
8395 done
8396 if test -z "$haveit"; then
8397 rpathdirs="$rpathdirs $dir"
8398 fi
8399 haveit=
8400 for x in $ltrpathdirs; do
8401 if test "X$x" = "X$dir"; then
8402 haveit=yes
8403 break
8404 fi
8405 done
8406 if test -z "$haveit"; then
8407 ltrpathdirs="$ltrpathdirs $dir"
8408 fi
8409 fi
8410 ;;
8411 -l*)
8412 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8413 ;;
8414 *.la)
8415 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8416 ;;
8417 *)
8418 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8419 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8420 ;;
81ecdfbb
RW
8421 esac
8422 done
8423 fi
8424 else
8425 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8426 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8427 fi
8428 fi
8429 fi
8430 done
8431 done
8432 if test "X$rpathdirs" != "X"; then
8433 if test -n "$hardcode_libdir_separator"; then
8434 alldirs=
8435 for found_dir in $rpathdirs; do
8436 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8437 done
8438 acl_save_libdir="$libdir"
8439 libdir="$alldirs"
8440 eval flag=\"$hardcode_libdir_flag_spec\"
8441 libdir="$acl_save_libdir"
8442 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8443 else
8444 for found_dir in $rpathdirs; do
8445 acl_save_libdir="$libdir"
8446 libdir="$found_dir"
8447 eval flag=\"$hardcode_libdir_flag_spec\"
8448 libdir="$acl_save_libdir"
8449 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8450 done
8451 fi
8452 fi
8453 if test "X$ltrpathdirs" != "X"; then
8454 for found_dir in $ltrpathdirs; do
8455 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8456 done
8457 fi
a9322a30
TT
8458
8459
81ecdfbb 8460 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8461
81ecdfbb
RW
8462 for element in $INCEXPAT; do
8463 haveit=
8464 for x in $CPPFLAGS; do
a9322a30 8465
81ecdfbb
RW
8466 acl_save_prefix="$prefix"
8467 prefix="$acl_final_prefix"
8468 acl_save_exec_prefix="$exec_prefix"
8469 exec_prefix="$acl_final_exec_prefix"
8470 eval x=\"$x\"
8471 exec_prefix="$acl_save_exec_prefix"
8472 prefix="$acl_save_prefix"
a8111142 8473
81ecdfbb
RW
8474 if test "X$x" = "X$element"; then
8475 haveit=yes
8476 break
8477 fi
8478 done
8479 if test -z "$haveit"; then
8480 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8481 fi
8482 done
a9322a30
TT
8483
8484
81ecdfbb
RW
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8486$as_echo_n "checking for libexpat... " >&6; }
8487if test "${ac_cv_libexpat+set}" = set; then :
8488 $as_echo_n "(cached) " >&6
bec39cab 8489else
bec39cab 8490
81ecdfbb
RW
8491 ac_save_LIBS="$LIBS"
8492 LIBS="$LIBS $LIBEXPAT"
8493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8494/* end confdefs.h. */
81ecdfbb
RW
8495#include "expat.h"
8496int
8497main ()
8498{
8499XML_Parser p = XML_ParserCreate (0);
8500 ;
8501 return 0;
8502}
bec39cab 8503_ACEOF
81ecdfbb
RW
8504if ac_fn_c_try_link "$LINENO"; then :
8505 ac_cv_libexpat=yes
c906108c 8506else
81ecdfbb 8507 ac_cv_libexpat=no
bec39cab 8508fi
81ecdfbb
RW
8509rm -f core conftest.err conftest.$ac_objext \
8510 conftest$ac_exeext conftest.$ac_ext
8511 LIBS="$ac_save_LIBS"
c906108c 8512
95ca63c4 8513fi
81ecdfbb
RW
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8515$as_echo "$ac_cv_libexpat" >&6; }
8516 if test "$ac_cv_libexpat" = yes; then
8517 HAVE_LIBEXPAT=yes
bec39cab 8518
81ecdfbb 8519$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8520
81ecdfbb
RW
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8522$as_echo_n "checking how to link with libexpat... " >&6; }
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8524$as_echo "$LIBEXPAT" >&6; }
8525 else
8526 HAVE_LIBEXPAT=no
8527 CPPFLAGS="$ac_save_CPPFLAGS"
8528 LIBEXPAT=
8529 LTLIBEXPAT=
8530 fi
95ca63c4
CF
8531
8532
8533
7cb9022a
MK
8534
8535
bec39cab 8536
81ecdfbb
RW
8537 if test "$HAVE_LIBEXPAT" != yes; then
8538 if test "$with_expat" = yes; then
8539 as_fn_error "expat is missing or unusable" "$LINENO" 5
8540 else
8541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8542$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8543 fi
8544 else
8545 save_LIBS=$LIBS
8546 LIBS="$LIBS $LIBEXPAT"
8547 for ac_func in XML_StopParser
8548do :
8549 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8550if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8551 cat >>confdefs.h <<_ACEOF
81ecdfbb 8552#define HAVE_XML_STOPPARSER 1
bec39cab 8553_ACEOF
95ca63c4 8554
bec39cab 8555fi
bec39cab 8556done
95ca63c4 8557
81ecdfbb
RW
8558 LIBS=$save_LIBS
8559 fi
a9322a30
TT
8560fi
8561
d344e670
DE
8562# --------------------- #
8563# Check for libpython. #
8564# --------------------- #
8565
a9322a30 8566
a9322a30
TT
8567
8568
ec685c5e 8569
0c4a4063 8570
81ecdfbb
RW
8571# Check whether --with-python was given.
8572if test "${with_python+set}" = set; then :
8573 withval=$with_python;
bec39cab 8574else
81ecdfbb 8575 with_python=auto
bec39cab 8576fi
bec39cab 8577
81ecdfbb
RW
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8579$as_echo_n "checking whether to use python... " >&6; }
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8581$as_echo "$with_python" >&6; }
9a156167 8582
81ecdfbb
RW
8583if test "${with_python}" = no; then
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8585$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8586 have_libpython=no
bec39cab 8587else
81ecdfbb 8588 case "${with_python}" in
8c85a4e2 8589 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8590 if test -d ${with_python}; then
8591 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8592 python_prog="${with_python}/bin/python"
0c4a4063 8593 python_prefix=
9c4ea6c5
JB
8594 # If python does not exit ${with_python}/bin, then try in
8595 # ${with_python}. On Windows/MinGW, this is where the Python
8596 # executable is.
8597 if test ! -x "${python_prog}"; then
8598 python_prog="${with_python}/python"
8599 python_prefix=
8600 fi
e7a30f46 8601 if test ! -x "${python_prog}"; then
ec685c5e
DE
8602 # Fall back to gdb 7.0/7.1 behaviour.
8603 python_prog=missing
0c4a4063 8604 python_prefix=${with_python}
ec685c5e 8605 fi
e7a30f46 8606 elif test -x "${with_python}"; then
ec685c5e
DE
8607 # While we can't run python compiled for $host (unless host == build),
8608 # the user could write a script that provides the needed information,
8609 # so we support that.
ec685c5e 8610 python_prog=${with_python}
0c4a4063 8611 python_prefix=
ec685c5e
DE
8612 else
8613 as_fn_error "invalid value for --with-python" "$LINENO" 5
8614 fi
81ecdfbb 8615 ;;
ec685c5e
DE
8616 */*)
8617 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8618 as_fn_error "invalid value for --with-python" "$LINENO" 5
8619 ;;
ec685c5e
DE
8620 *)
8621 # The user has either specified auto, yes, or the name of the python
8622 # program assumed to be in $PATH.
8623 python_prefix=
8624 case "${with_python}" in
8625 yes | auto)
8626 if test ${build} = ${host}; then
8627 # Extract the first word of "python", so it can be a program name with args.
8628set dummy python; ac_word=$2
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630$as_echo_n "checking for $ac_word... " >&6; }
8631if test "${ac_cv_path_python_prog_path+set}" = set; then :
8632 $as_echo_n "(cached) " >&6
8633else
8634 case $python_prog_path in
8635 [\\/]* | ?:[\\/]*)
8636 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8637 ;;
8638 *)
8639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640for as_dir in $PATH
8641do
8642 IFS=$as_save_IFS
8643 test -z "$as_dir" && as_dir=.
8644 for ac_exec_ext in '' $ac_executable_extensions; do
8645 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8646 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648 break 2
8649 fi
8650done
8651 done
8652IFS=$as_save_IFS
8653
8654 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8655 ;;
8656esac
8657fi
8658python_prog_path=$ac_cv_path_python_prog_path
8659if test -n "$python_prog_path"; then
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8661$as_echo "$python_prog_path" >&6; }
8662else
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668 if test "${python_prog_path}" = missing; then
8669 python_prog=missing
8670 else
8671 python_prog=${python_prog_path}
8672 fi
8673 else
8674 # Not much we can do except assume the cross-compiler will find the
8675 # right files.
8676 python_prog=missing
8677 fi
8678 ;;
8679 *)
8680 # While we can't run python compiled for $host (unless host == build),
8681 # the user could write a script that provides the needed information,
8682 # so we support that.
8683 python_prog="${with_python}"
8684 # Extract the first word of "${python_prog}", so it can be a program name with args.
8685set dummy ${python_prog}; ac_word=$2
8686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8687$as_echo_n "checking for $ac_word... " >&6; }
8688if test "${ac_cv_path_python_prog_path+set}" = set; then :
8689 $as_echo_n "(cached) " >&6
8690else
8691 case $python_prog_path in
8692 [\\/]* | ?:[\\/]*)
8693 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8694 ;;
8695 *)
8696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8697for as_dir in $PATH
8698do
8699 IFS=$as_save_IFS
8700 test -z "$as_dir" && as_dir=.
8701 for ac_exec_ext in '' $ac_executable_extensions; do
8702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8703 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8705 break 2
8706 fi
8707done
8708 done
8709IFS=$as_save_IFS
8710
8711 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8712 ;;
8713esac
8714fi
8715python_prog_path=$ac_cv_path_python_prog_path
8716if test -n "$python_prog_path"; then
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8718$as_echo "$python_prog_path" >&6; }
8719else
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721$as_echo "no" >&6; }
8722fi
8723
8724
8725 if test "${python_prog_path}" = missing; then
8726 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8727 fi
8728 ;;
8729 esac
81ecdfbb
RW
8730 esac
8731
ec685c5e 8732 if test "${python_prog}" != missing; then
e7a30f46
DE
8733 # We have a python program to use, but it may be too old.
8734 # Don't flag an error for --with-python=auto (the default).
8735 have_python_config=yes
ec685c5e
DE
8736 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8737 if test $? != 0; then
e7a30f46
DE
8738 have_python_config=failed
8739 if test "${with_python}" != auto; then
8740 as_fn_error "failure running python-config --includes" "$LINENO" 5
8741 fi
ec685c5e
DE
8742 fi
8743 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8744 if test $? != 0; then
e7a30f46
DE
8745 have_python_config=failed
8746 if test "${with_python}" != auto; then
8747 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8748 fi
ec685c5e 8749 fi
0c4a4063
DE
8750 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8751 if test $? != 0; then
e7a30f46
DE
8752 have_python_config=failed
8753 if test "${with_python}" != auto; then
8754 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8755 fi
0c4a4063 8756 fi
ec685c5e 8757 else
ac534cba
JB
8758 # We do not have a python executable we can use to determine where
8759 # to find the Python headers and libs. We cannot guess the include
8760 # path from the python_prefix either, because that include path
8761 # depends on the Python version. So, there is nothing much we can
8762 # do except assume that the compiler will be able to find those files.
8763 python_includes=
8764 python_libs=
0c4a4063 8765 have_python_config=no
ec685c5e 8766 fi
bec39cab 8767
ec685c5e
DE
8768 # If we have python-config, only try the configuration it provides.
8769 # Otherwise fallback on the old way of trying different versions of
8770 # python in turn.
81ecdfbb 8771
ec685c5e
DE
8772 have_libpython=no
8773 if test "${have_python_config}" = yes; then
c1039e3c
JB
8774 # Determine the Python version by extracting "-lpython<version>"
8775 # part of the python_libs. <version> is usually X.Y with X and Y
8776 # being decimal numbers, but can also be XY (seen on Windows).
8777 #
8778 # The extraction is performed using sed with a regular expression.
8779 # Initially, the regexp used was using the '?' quantifier to make
8780 # the dot in the version number optional. Unfortunately, this
8781 # does not work with non-GNU versions of sed because, because of
8782 # what looks like a limitation (the '?' quantifier does not work
8783 # with back-references). We work around this limitation by using
8784 # the '*' quantifier instead. It means that, in theory, we might
8785 # match unexpected version strings such as "-lpython2..7", but
8786 # this seems unlikely in practice. And even if that happens,
8787 # an error will be triggered later on, when checking that version
8788 # number.
ec685c5e 8789 python_version=`echo " ${python_libs} " \
c1039e3c 8790 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8791 case "${python_version}" in
8792 python*)
ec685c5e
DE
8793
8794 version=${python_version}
8795
8796 new_CPPFLAGS=${python_includes}
8797 new_LIBS=${python_libs}
81ecdfbb
RW
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8799$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8800 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8801 save_LIBS=$LIBS
ec685c5e
DE
8802 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8803 LIBS="$LIBS $new_LIBS"
8804 found_usable_python=no
81ecdfbb 8805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8806/* end confdefs.h. */
ac534cba 8807#include "Python.h"
81ecdfbb
RW
8808int
8809main ()
8810{
8811Py_Initialize ();
8812 ;
8813 return 0;
8814}
bec39cab 8815_ACEOF
81ecdfbb 8816if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8817 have_libpython=${version}
8818 found_usable_python=yes
ac534cba
JB
8819 PYTHON_CPPFLAGS=$new_CPPFLAGS
8820 PYTHON_LIBS=$new_LIBS
9a156167 8821fi
81ecdfbb
RW
8822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8824 CPPFLAGS=$save_CPPFLAGS
8825 LIBS=$save_LIBS
ec685c5e
DE
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8827$as_echo "${found_usable_python}" >&6; }
9a156167 8828
0c4a4063
DE
8829 ;;
8830 *)
ec685c5e 8831 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8832 ;;
8833 esac
e7a30f46 8834 elif test "${have_python_config}" != failed; then
ec685c5e 8835 if test "${have_libpython}" = no; then
9a156167 8836
420697bb
TT
8837 version=python2.7
8838
8839 new_CPPFLAGS=${python_includes}
8840 new_LIBS="${python_libs} -lpython2.7"
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8842$as_echo_n "checking for ${version}... " >&6; }
8843 save_CPPFLAGS=$CPPFLAGS
8844 save_LIBS=$LIBS
8845 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8846 LIBS="$LIBS $new_LIBS"
8847 found_usable_python=no
8848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8849/* end confdefs.h. */
ac534cba 8850#include "Python.h"
420697bb
TT
8851int
8852main ()
8853{
8854Py_Initialize ();
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859if ac_fn_c_try_link "$LINENO"; then :
8860 have_libpython=${version}
8861 found_usable_python=yes
ac534cba
JB
8862 PYTHON_CPPFLAGS=$new_CPPFLAGS
8863 PYTHON_LIBS=$new_LIBS
420697bb
TT
8864fi
8865rm -f core conftest.err conftest.$ac_objext \
8866 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8867 CPPFLAGS=$save_CPPFLAGS
8868 LIBS=$save_LIBS
420697bb
TT
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8870$as_echo "${found_usable_python}" >&6; }
8871
8872 fi
8873 if test "${have_libpython}" = no; then
8874
ec685c5e
DE
8875 version=python2.6
8876
8877 new_CPPFLAGS=${python_includes}
8878 new_LIBS="${python_libs} -lpython2.6"
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8880$as_echo_n "checking for ${version}... " >&6; }
8881 save_CPPFLAGS=$CPPFLAGS
8882 save_LIBS=$LIBS
8883 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8884 LIBS="$LIBS $new_LIBS"
8885 found_usable_python=no
8886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8887/* end confdefs.h. */
ac534cba 8888#include "Python.h"
ec685c5e
DE
8889int
8890main ()
8891{
8892Py_Initialize ();
8893 ;
8894 return 0;
8895}
8896_ACEOF
8897if ac_fn_c_try_link "$LINENO"; then :
8898 have_libpython=${version}
8899 found_usable_python=yes
ac534cba
JB
8900 PYTHON_CPPFLAGS=$new_CPPFLAGS
8901 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8902fi
8903rm -f core conftest.err conftest.$ac_objext \
8904 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8905 CPPFLAGS=$save_CPPFLAGS
8906 LIBS=$save_LIBS
ec685c5e
DE
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8908$as_echo "${found_usable_python}" >&6; }
9a156167 8909
81ecdfbb 8910 fi
ec685c5e 8911 if test ${have_libpython} = no; then
9a156167 8912
81ecdfbb 8913 version=python2.5
9a156167 8914
ec685c5e
DE
8915 new_CPPFLAGS=${python_includes}
8916 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8918$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8919 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8920 save_LIBS=$LIBS
ec685c5e
DE
8921 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8922 LIBS="$LIBS $new_LIBS"
8923 found_usable_python=no
81ecdfbb 8924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8925/* end confdefs.h. */
ac534cba 8926#include "Python.h"
81ecdfbb
RW
8927int
8928main ()
8929{
8930Py_Initialize ();
8931 ;
8932 return 0;
8933}
436868fb 8934_ACEOF
81ecdfbb 8935if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8936 have_libpython=${version}
8937 found_usable_python=yes
ac534cba
JB
8938 PYTHON_CPPFLAGS=$new_CPPFLAGS
8939 PYTHON_LIBS=$new_LIBS
436868fb 8940fi
81ecdfbb
RW
8941rm -f core conftest.err conftest.$ac_objext \
8942 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8943 CPPFLAGS=$save_CPPFLAGS
8944 LIBS=$save_LIBS
ec685c5e
DE
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8946$as_echo "${found_usable_python}" >&6; }
a9322a30 8947
81ecdfbb 8948 fi
ec685c5e 8949 if test ${have_libpython} = no; then
a9322a30 8950
81ecdfbb 8951 version=python2.4
a9322a30 8952
ec685c5e
DE
8953 new_CPPFLAGS=${python_includes}
8954 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8956$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8957 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8958 save_LIBS=$LIBS
ec685c5e
DE
8959 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8960 LIBS="$LIBS $new_LIBS"
8961 found_usable_python=no
81ecdfbb 8962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8963/* end confdefs.h. */
ac534cba 8964#include "Python.h"
a9322a30
TT
8965int
8966main ()
8967{
81ecdfbb 8968Py_Initialize ();
a9322a30
TT
8969 ;
8970 return 0;
8971}
436868fb 8972_ACEOF
81ecdfbb 8973if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8974 have_libpython=${version}
8975 found_usable_python=yes
ac534cba
JB
8976 PYTHON_CPPFLAGS=$new_CPPFLAGS
8977 PYTHON_LIBS=$new_LIBS
436868fb 8978fi
81ecdfbb
RW
8979rm -f core conftest.err conftest.$ac_objext \
8980 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8981 CPPFLAGS=$save_CPPFLAGS
8982 LIBS=$save_LIBS
ec685c5e
DE
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8984$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8985
ec685c5e
DE
8986 fi
8987 fi
9c4ea6c5 8988 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8989
8990$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8991
9c4ea6c5 8992 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8993
8994$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8995
9c4ea6c5 8996 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8997
8998$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8999
9c4ea6c5 9000 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9001
9002$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9003
81ecdfbb 9004 fi
ec685c5e
DE
9005
9006 if test "${have_libpython}" = no; then
81ecdfbb
RW
9007 case "${with_python}" in
9008 yes)
9009 as_fn_error "python is missing or unusable" "$LINENO" 5
9010 ;;
9011 auto)
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9013$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9014 ;;
9015 *)
9016 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9017 ;;
9018 esac
0c4a4063
DE
9019 else
9020 if test -n "${python_prefix}"; then
9021
9022cat >>confdefs.h <<_ACEOF
9023#define WITH_PYTHON_PATH "${python_prefix}"
9024_ACEOF
9025
9026
9027 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9028 if test "x$prefix" = xNONE; then
9029 test_prefix=/usr/local
9030 else
9031 test_prefix=$prefix
9032 fi
9033 else
9034 test_prefix=$exec_prefix
9035 fi
9036 value=0
9037 case ${python_prefix} in
9038 "${test_prefix}"|"${test_prefix}/"*|\
9039 '${exec_prefix}'|'${exec_prefix}/'*)
9040 value=1
9041 ;;
9042 esac
9043
9044cat >>confdefs.h <<_ACEOF
9045#define PYTHON_PATH_RELOCATABLE $value
9046_ACEOF
9047
9048
9049 fi
81ecdfbb 9050 fi
436868fb 9051fi
436868fb 9052
ec685c5e 9053if test "${have_libpython}" != no; then
436868fb 9054
81ecdfbb 9055$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9056
81ecdfbb
RW
9057 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9058 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9059 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9060 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9061 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9062
81ecdfbb
RW
9063 # Flags needed to compile Python code (taken from python-config --cflags).
9064 # We cannot call python-config directly because it will output whatever was
9065 # used when compiling the Python interpreter itself, including flags which
9066 # would make the python-related objects be compiled differently from the
9067 # rest of GDB (e.g., -O2 and -fPIC).
9068 if test "${GCC}" = yes; then
9069 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9070 fi
436868fb 9071
81ecdfbb
RW
9072 if test "x${tentative_python_cflags}" != x; then
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9074$as_echo_n "checking compiler flags for python code... " >&6; }
9075 for flag in ${tentative_python_cflags}; do
9076 # Check that the compiler accepts it
9077 saved_CFLAGS="$CFLAGS"
9078 CFLAGS="$CFLAGS $flag"
9079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9080/* end confdefs.h. */
81ecdfbb 9081
a9322a30
TT
9082int
9083main ()
9084{
a9322a30
TT
9085
9086 ;
9087 return 0;
9088}
bec39cab 9089_ACEOF
81ecdfbb
RW
9090if ac_fn_c_try_compile "$LINENO"; then :
9091 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9092fi
81ecdfbb
RW
9093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9094 CFLAGS="$saved_CFLAGS"
9095 done
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9097$as_echo "${PYTHON_CFLAGS}" >&6; }
9098 fi
043b6510 9099
c83393b9
JB
9100 # On x64 Windows, Python's include headers, and pyconfig.h in
9101 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9102 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9103 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9104 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9105 # The issue was reported to the Python community, but still isn't
9106 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9107
043b6510 9108 case "$gdb_host" in
c83393b9
JB
9109 mingw64)
9110 if test "${GCC}" = yes; then
9111 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9112 fi
9113 ;;
043b6510 9114 esac
a8db4212
YPK
9115
9116 # Note that "python -m threading" cannot be used to check for
9117 # threading support due to a bug in Python 2.7.3
9118 # (http://bugs.python.org/issue15567).
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9120$as_echo_n "checking whether python supports threads... " >&6; }
9121 saved_CPPFLAGS="${CPPFLAGS}"
9122 CPPFLAGS="${PYTHON_CPPFLAGS}"
9123 # Note that the test is reversed so that python_has_threads=yes on
9124 # unexpected failures.
9125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9126/* end confdefs.h. */
9127
9128#include <Python.h>
9129#ifdef WITH_THREAD
9130# error
9131#endif
9132
9133_ACEOF
9134if ac_fn_c_try_cpp "$LINENO"; then :
9135 python_has_threads=no
9136else
9137 python_has_threads=yes
9138fi
9139rm -f conftest.err conftest.$ac_ext
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9141$as_echo "${python_has_threads}" >&6; }
9142 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9143else
6dddc817
DE
9144 # Even if Python support is not compiled in, we need to have this file
9145 # included so that the "python" command, et.al., still exists.
9146 CONFIG_OBS="$CONFIG_OBS python.o"
9147 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9148fi
9a156167 9149
ed3ef339
DE
9150
9151
4df42755
DE
9152 if test "${have_libpython}" != no; then
9153 HAVE_PYTHON_TRUE=
9154 HAVE_PYTHON_FALSE='#'
9155else
9156 HAVE_PYTHON_TRUE='#'
9157 HAVE_PYTHON_FALSE=
9158fi
9159
ed3ef339
DE
9160
9161# -------------------- #
9162# Check for libguile. #
9163# -------------------- #
9164
9165
e1402065
DE
9166
9167
9168
9169
9170# Check whether --with-guile was given.
9171if test "${with_guile+set}" = set; then :
9172 withval=$with_guile;
9173else
9174 with_guile=auto
9175fi
9176
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9178$as_echo_n "checking whether to use guile... " >&6; }
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9180$as_echo "$with_guile" >&6; }
9181
ed3ef339
DE
9182# Extract the first word of "pkg-config", so it can be a program name with args.
9183set dummy pkg-config; ac_word=$2
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9185$as_echo_n "checking for $ac_word... " >&6; }
9186if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9187 $as_echo_n "(cached) " >&6
9188else
9189 case $pkg_config_prog_path in
9190 [\\/]* | ?:[\\/]*)
9191 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9192 ;;
9193 *)
9194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9195for as_dir in $PATH
9196do
9197 IFS=$as_save_IFS
9198 test -z "$as_dir" && as_dir=.
9199 for ac_exec_ext in '' $ac_executable_extensions; do
9200 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9201 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9203 break 2
9204 fi
9205done
9206 done
9207IFS=$as_save_IFS
9208
9209 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9210 ;;
9211esac
9212fi
9213pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9214if test -n "$pkg_config_prog_path"; then
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9216$as_echo "$pkg_config_prog_path" >&6; }
9217else
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9219$as_echo "no" >&6; }
9220fi
9221
9222
9223
214ab2da 9224try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9225have_libguile=no
9226case "${with_guile}" in
9227no)
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9229$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9230 ;;
9231auto)
e1402065
DE
9232 if test "${pkg_config_prog_path}" = "missing"; then
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9234$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9235 else
ed3ef339
DE
9236
9237 pkg_config=${pkg_config_prog_path}
9238 guile_version_list=${try_guile_versions}
9239 flag_errors=no
9240
ed3ef339
DE
9241 found_usable_guile=checking
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9243$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9244 for guile_version in ${guile_version_list}; do
9245 ${pkg_config} --exists ${guile_version} 2>/dev/null
9246 if test $? != 0; then
9247 continue
9248 fi
9249 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9250 if test $? != 0; then
9251 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9252 fi
9253 new_LIBS=`${pkg_config} --libs ${guile_version}`
9254 if test $? != 0; then
9255 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9256 fi
9257 found_usable_guile=${guile_version}
9258 break
9259 done
9260 if test "${found_usable_guile}" = "checking"; then
9261 if test "${flag_errors}" = "yes"; then
9262 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9263 else
9264 found_usable_guile=no
9265 fi
9266 fi
9267 if test "${found_usable_guile}" != no; then
9268 save_CPPFLAGS=$CPPFLAGS
9269 save_LIBS=$LIBS
9270 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9271 LIBS="$LIBS $new_LIBS"
9272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9273/* end confdefs.h. */
9274#include "libguile.h"
9275int
9276main ()
9277{
9278scm_init_guile ();
9279 ;
9280 return 0;
9281}
9282_ACEOF
9283if ac_fn_c_try_link "$LINENO"; then :
9284 have_libguile=yes
9285 GUILE_CPPFLAGS=$new_CPPFLAGS
9286 GUILE_LIBS=$new_LIBS
9287else
9288 found_usable_guile=no
9289fi
9290rm -f core conftest.err conftest.$ac_objext \
9291 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9292 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9293if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9294
9295$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9296
9297
9298fi
9299
ed3ef339
DE
9300 CPPFLAGS=$save_CPPFLAGS
9301 LIBS=$save_LIBS
9302 if test "${found_usable_guile}" = no; then
9303 if test "${flag_errors}" = yes; then
9304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9306as_fn_error "linking guile version ${guile_version} test program failed
9307See \`config.log' for more details." "$LINENO" 5; }
9308 fi
9309 fi
9310 fi
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9312$as_echo "${found_usable_guile}" >&6; }
9313
e1402065 9314 fi
ed3ef339
DE
9315 ;;
9316yes)
e1402065
DE
9317 if test "${pkg_config_prog_path}" = "missing"; then
9318 as_fn_error "pkg-config not found" "$LINENO" 5
9319 fi
ed3ef339
DE
9320
9321 pkg_config=${pkg_config_prog_path}
9322 guile_version_list=${try_guile_versions}
9323 flag_errors=yes
9324
ed3ef339
DE
9325 found_usable_guile=checking
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9327$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9328 for guile_version in ${guile_version_list}; do
9329 ${pkg_config} --exists ${guile_version} 2>/dev/null
9330 if test $? != 0; then
9331 continue
9332 fi
9333 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9334 if test $? != 0; then
9335 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9336 fi
9337 new_LIBS=`${pkg_config} --libs ${guile_version}`
9338 if test $? != 0; then
9339 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9340 fi
9341 found_usable_guile=${guile_version}
9342 break
9343 done
9344 if test "${found_usable_guile}" = "checking"; then
9345 if test "${flag_errors}" = "yes"; then
9346 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9347 else
9348 found_usable_guile=no
9349 fi
9350 fi
9351 if test "${found_usable_guile}" != no; then
9352 save_CPPFLAGS=$CPPFLAGS
9353 save_LIBS=$LIBS
9354 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9355 LIBS="$LIBS $new_LIBS"
9356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357/* end confdefs.h. */
9358#include "libguile.h"
9359int
9360main ()
9361{
9362scm_init_guile ();
9363 ;
9364 return 0;
9365}
9366_ACEOF
9367if ac_fn_c_try_link "$LINENO"; then :
9368 have_libguile=yes
9369 GUILE_CPPFLAGS=$new_CPPFLAGS
9370 GUILE_LIBS=$new_LIBS
9371else
9372 found_usable_guile=no
9373fi
9374rm -f core conftest.err conftest.$ac_objext \
9375 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9376 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9377if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9378
9379$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9380
9381
9382fi
9383
ed3ef339
DE
9384 CPPFLAGS=$save_CPPFLAGS
9385 LIBS=$save_LIBS
9386 if test "${found_usable_guile}" = no; then
9387 if test "${flag_errors}" = yes; then
9388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9390as_fn_error "linking guile version ${guile_version} test program failed
9391See \`config.log' for more details." "$LINENO" 5; }
9392 fi
9393 fi
9394 fi
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9396$as_echo "${found_usable_guile}" >&6; }
9397
9398 ;;
9399[\\/]* | ?:[\\/]*)
e1402065 9400 if test -x "${with_guile}"; then
ed3ef339
DE
9401
9402 pkg_config=${with_guile}
9403 guile_version_list=${try_guile_versions}
9404 flag_errors=yes
9405
ed3ef339
DE
9406 found_usable_guile=checking
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9408$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9409 for guile_version in ${guile_version_list}; do
9410 ${pkg_config} --exists ${guile_version} 2>/dev/null
9411 if test $? != 0; then
9412 continue
9413 fi
9414 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9415 if test $? != 0; then
9416 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9417 fi
9418 new_LIBS=`${pkg_config} --libs ${guile_version}`
9419 if test $? != 0; then
9420 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9421 fi
9422 found_usable_guile=${guile_version}
9423 break
9424 done
9425 if test "${found_usable_guile}" = "checking"; then
9426 if test "${flag_errors}" = "yes"; then
9427 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9428 else
9429 found_usable_guile=no
9430 fi
9431 fi
9432 if test "${found_usable_guile}" != no; then
9433 save_CPPFLAGS=$CPPFLAGS
9434 save_LIBS=$LIBS
9435 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9436 LIBS="$LIBS $new_LIBS"
9437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9438/* end confdefs.h. */
9439#include "libguile.h"
9440int
9441main ()
9442{
9443scm_init_guile ();
9444 ;
9445 return 0;
9446}
9447_ACEOF
9448if ac_fn_c_try_link "$LINENO"; then :
9449 have_libguile=yes
9450 GUILE_CPPFLAGS=$new_CPPFLAGS
9451 GUILE_LIBS=$new_LIBS
9452else
9453 found_usable_guile=no
9454fi
9455rm -f core conftest.err conftest.$ac_objext \
9456 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9457 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9458if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9459
9460$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9461
9462
9463fi
9464
ed3ef339
DE
9465 CPPFLAGS=$save_CPPFLAGS
9466 LIBS=$save_LIBS
9467 if test "${found_usable_guile}" = no; then
9468 if test "${flag_errors}" = yes; then
9469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9471as_fn_error "linking guile version ${guile_version} test program failed
9472See \`config.log' for more details." "$LINENO" 5; }
9473 fi
9474 fi
9475 fi
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9477$as_echo "${found_usable_guile}" >&6; }
9478
e1402065
DE
9479 else
9480 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9481 fi
ed3ef339
DE
9482 ;;
9483"" | */*)
9484 # Disallow --with=guile="" and --with-guile=foo/bar.
9485 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9486 ;;
9487*)
9488 # A space separate list of guile versions to try, in order.
e1402065
DE
9489 if test "${pkg_config_prog_path}" = "missing"; then
9490 as_fn_error "pkg-config not found" "$LINENO" 5
9491 fi
ed3ef339
DE
9492
9493 pkg_config=${pkg_config_prog_path}
9494 guile_version_list=${with_guile}
9495 flag_errors=yes
9496
ed3ef339
DE
9497 found_usable_guile=checking
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9499$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9500 for guile_version in ${guile_version_list}; do
9501 ${pkg_config} --exists ${guile_version} 2>/dev/null
9502 if test $? != 0; then
9503 continue
9504 fi
9505 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9506 if test $? != 0; then
9507 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9508 fi
9509 new_LIBS=`${pkg_config} --libs ${guile_version}`
9510 if test $? != 0; then
9511 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9512 fi
9513 found_usable_guile=${guile_version}
9514 break
9515 done
9516 if test "${found_usable_guile}" = "checking"; then
9517 if test "${flag_errors}" = "yes"; then
9518 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9519 else
9520 found_usable_guile=no
9521 fi
9522 fi
9523 if test "${found_usable_guile}" != no; then
9524 save_CPPFLAGS=$CPPFLAGS
9525 save_LIBS=$LIBS
9526 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9527 LIBS="$LIBS $new_LIBS"
9528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529/* end confdefs.h. */
9530#include "libguile.h"
9531int
9532main ()
9533{
9534scm_init_guile ();
9535 ;
9536 return 0;
9537}
9538_ACEOF
9539if ac_fn_c_try_link "$LINENO"; then :
9540 have_libguile=yes
9541 GUILE_CPPFLAGS=$new_CPPFLAGS
9542 GUILE_LIBS=$new_LIBS
9543else
9544 found_usable_guile=no
9545fi
9546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9548 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9549if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9550
9551$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9552
9553
9554fi
9555
ed3ef339
DE
9556 CPPFLAGS=$save_CPPFLAGS
9557 LIBS=$save_LIBS
9558 if test "${found_usable_guile}" = no; then
9559 if test "${flag_errors}" = yes; then
9560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9562as_fn_error "linking guile version ${guile_version} test program failed
9563See \`config.log' for more details." "$LINENO" 5; }
9564 fi
9565 fi
9566 fi
9567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9568$as_echo "${found_usable_guile}" >&6; }
9569
9570 ;;
9571esac
9572
e76c5d17 9573if test "${have_libguile}" != no; then
d342a0da
DE
9574 case "${with_guile}" in
9575 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9576
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9578$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9579if test "${ac_cv_guild_program_name+set}" = set; then :
9580 $as_echo_n "(cached) " >&6
9581else
d342a0da 9582 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9583
9584 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9585 # the 'guild' and 'bindir' variables. In that case, try to guess
9586 # what the program name is, at the risk of getting it wrong if
9587 # Guile was configured with '--program-suffix' or similar.
9588 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9589 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9590 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9591 fi
9592
9593fi
9594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9595$as_echo "$ac_cv_guild_program_name" >&6; }
9596
9597 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9598 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9599 fi
9600
9601 GUILD="$ac_cv_guild_program_name"
9602
9603
d342a0da
DE
9604 ;;
9605 *)
9606
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9608$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9609if test "${ac_cv_guild_program_name+set}" = set; then :
9610 $as_echo_n "(cached) " >&6
9611else
9612 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9613
9614 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9615 # the 'guild' and 'bindir' variables. In that case, try to guess
9616 # what the program name is, at the risk of getting it wrong if
9617 # Guile was configured with '--program-suffix' or similar.
9618 if test "x$ac_cv_guild_program_name" = "x"; then
9619 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9620 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9621 fi
9622
9623fi
9624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9625$as_echo "$ac_cv_guild_program_name" >&6; }
9626
9627 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9628 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9629 fi
9630
9631 GUILD="$ac_cv_guild_program_name"
9632
9633
9634 ;;
9635 esac
e76c5d17
DE
9636
9637
9638 if test "$cross_compiling" = no; then
9639 GUILD_TARGET_FLAG=
9640 else
9641 GUILD_TARGET_FLAG="--target=$host"
9642 fi
9643
9644
9645
9646
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9648$as_echo_n "checking whether guild supports this host... " >&6; }
9649if test "${ac_cv_guild_ok+set}" = set; then :
9650 $as_echo_n "(cached) " >&6
9651else
9652 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9653 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9654 ac_cv_guild_ok=yes
9655 else
9656 ac_cv_guild_ok=no
9657 fi
9658fi
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9660$as_echo "$ac_cv_guild_ok" >&6; }
9661
9662 if test "$ac_cv_guild_ok" = no; then
9663 have_libguile=no
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9665$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9666 fi
9667fi
9668
ed3ef339
DE
9669if test "${have_libguile}" != no; then
9670
9671$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9672
9673 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9674 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9675 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9676 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9677 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9678
9679 save_LIBS="$LIBS"
9680 save_CPPFLAGS="$CPPFLAGS"
9681 LIBS="$GUILE_LIBS"
9682 CPPFLAGS="$GUILE_CPPFLAGS"
9683 for ac_func in scm_new_smob
9684do :
9685 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9686if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_SCM_NEW_SMOB 1
9689_ACEOF
9690
9691fi
9692done
9693
9694 LIBS="$save_LIBS"
9695 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9696else
9697 # Even if Guile support is not compiled in, we need to have these files
9698 # included.
9699 CONFIG_OBS="$CONFIG_OBS guile.o"
9700 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9701fi
9a156167 9702
ac534cba 9703
4df42755
DE
9704 if test "${have_libguile}" != no; then
9705 HAVE_GUILE_TRUE=
9706 HAVE_GUILE_FALSE='#'
9707else
9708 HAVE_GUILE_TRUE='#'
9709 HAVE_GUILE_FALSE=
9710fi
9711
ac534cba 9712
d344e670
DE
9713# --------------------- #
9714# Check for libmcheck. #
9715# --------------------- #
9716
a8db4212
YPK
9717# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9718# but turn it off if Python is enabled with threads, since -lmcheck is
9719# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9720# and for releases.
17ef446e
PA
9721if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9722 && $development; then
9723 libmcheck_default=yes
9724else
9725 libmcheck_default=no
a8db4212
YPK
9726fi
9727
17ef446e
PA
9728 # Check whether --enable-libmcheck was given.
9729if test "${enable_libmcheck+set}" = set; then :
9730 enableval=$enable_libmcheck; case "${enableval}" in
9731 yes | y) ENABLE_LIBMCHECK="yes" ;;
9732 no | n) ENABLE_LIBMCHECK="no" ;;
9733 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9734 esac
9735fi
9736
9737
9738 if test -z "${ENABLE_LIBMCHECK}"; then
9739 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9740 fi
17ef446e
PA
9741
9742 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9744$as_echo_n "checking for main in -lmcheck... " >&6; }
9745if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9746 $as_echo_n "(cached) " >&6
9747else
9748 ac_check_lib_save_LIBS=$LIBS
9749LIBS="-lmcheck $LIBS"
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751/* end confdefs.h. */
9752
9753
9754int
9755main ()
9756{
9757return main ();
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762if ac_fn_c_try_link "$LINENO"; then :
9763 ac_cv_lib_mcheck_main=yes
9764else
9765 ac_cv_lib_mcheck_main=no
9766fi
9767rm -f core conftest.err conftest.$ac_objext \
9768 conftest$ac_exeext conftest.$ac_ext
9769LIBS=$ac_check_lib_save_LIBS
9770fi
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9772$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9773if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9774 cat >>confdefs.h <<_ACEOF
9775#define HAVE_LIBMCHECK 1
9776_ACEOF
9777
9778 LIBS="-lmcheck $LIBS"
9779
9780fi
9781
17ef446e
PA
9782 fi
9783
9784
9785if test "$ENABLE_LIBMCHECK" = "yes" \
9786 -a "${have_libpython}" != "no" \
9787 -a "${python_has_threads}" = "yes" ; then
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9789$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9790fi
9791
81ecdfbb
RW
9792# ------------------------- #
9793# Checks for header files. #
9794# ------------------------- #
c890192f 9795
81ecdfbb
RW
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9797$as_echo_n "checking for ANSI C header files... " >&6; }
9798if test "${ac_cv_header_stdc+set}" = set; then :
9799 $as_echo_n "(cached) " >&6
bec39cab 9800else
81ecdfbb 9801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9802/* end confdefs.h. */
81ecdfbb
RW
9803#include <stdlib.h>
9804#include <stdarg.h>
9805#include <string.h>
9806#include <float.h>
9807
a9322a30
TT
9808int
9809main ()
9810{
a9322a30
TT
9811
9812 ;
9813 return 0;
9814}
bec39cab 9815_ACEOF
81ecdfbb
RW
9816if ac_fn_c_try_compile "$LINENO"; then :
9817 ac_cv_header_stdc=yes
bec39cab 9818else
81ecdfbb 9819 ac_cv_header_stdc=no
a9322a30 9820fi
81ecdfbb 9821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9822
81ecdfbb
RW
9823if test $ac_cv_header_stdc = yes; then
9824 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826/* end confdefs.h. */
9827#include <string.h>
bec39cab 9828
81ecdfbb
RW
9829_ACEOF
9830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9831 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9832
bec39cab 9833else
81ecdfbb
RW
9834 ac_cv_header_stdc=no
9835fi
9836rm -f conftest*
9837
9838fi
9839
9840if test $ac_cv_header_stdc = yes; then
9841 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9843/* end confdefs.h. */
9844#include <stdlib.h>
9845
bec39cab 9846_ACEOF
81ecdfbb
RW
9847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9848 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9849
81ecdfbb
RW
9850else
9851 ac_cv_header_stdc=no
9852fi
9853rm -f conftest*
bec39cab 9854
bec39cab 9855fi
81ecdfbb
RW
9856
9857if test $ac_cv_header_stdc = yes; then
9858 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9859 if test "$cross_compiling" = yes; then :
9860 :
bec39cab 9861else
81ecdfbb 9862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9863/* end confdefs.h. */
81ecdfbb
RW
9864#include <ctype.h>
9865#include <stdlib.h>
9866#if ((' ' & 0x0FF) == 0x020)
9867# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9868# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9869#else
9870# define ISLOWER(c) \
9871 (('a' <= (c) && (c) <= 'i') \
9872 || ('j' <= (c) && (c) <= 'r') \
9873 || ('s' <= (c) && (c) <= 'z'))
9874# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9875#endif
9876
9877#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9878int
9879main ()
9880{
81ecdfbb
RW
9881 int i;
9882 for (i = 0; i < 256; i++)
9883 if (XOR (islower (i), ISLOWER (i))
9884 || toupper (i) != TOUPPER (i))
9885 return 2;
a9322a30
TT
9886 return 0;
9887}
bec39cab 9888_ACEOF
81ecdfbb
RW
9889if ac_fn_c_try_run "$LINENO"; then :
9890
bec39cab 9891else
81ecdfbb
RW
9892 ac_cv_header_stdc=no
9893fi
9894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9895 conftest.$ac_objext conftest.beam conftest.$ac_ext
9896fi
bec39cab 9897
bec39cab 9898fi
a9322a30 9899fi
81ecdfbb
RW
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9901$as_echo "$ac_cv_header_stdc" >&6; }
9902if test $ac_cv_header_stdc = yes; then
bec39cab 9903
81ecdfbb 9904$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9905
81ecdfbb 9906fi
bec39cab 9907
81ecdfbb 9908# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9909for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9910 thread_db.h \
0080a2f6 9911 sys/fault.h \
81ecdfbb
RW
9912 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9913 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9914 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9915 termios.h termio.h \
3447c057 9916 sgtty.h elf_hp.h \
9467110b 9917 dlfcn.h
81ecdfbb
RW
9918do :
9919 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9920ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9921eval as_val=\$$as_ac_Header
9922 if test "x$as_val" = x""yes; then :
bec39cab 9923 cat >>confdefs.h <<_ACEOF
81ecdfbb 9924#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9925_ACEOF
c906108c 9926
bec39cab 9927fi
81ecdfbb
RW
9928
9929done
9930
81ecdfbb
RW
9931for ac_header in sys/proc.h
9932do :
9933 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9934# include <sys/param.h>
9935#endif
c906108c 9936
81ecdfbb
RW
9937"
9938if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9939 cat >>confdefs.h <<_ACEOF
81ecdfbb 9940#define HAVE_SYS_PROC_H 1
bec39cab 9941_ACEOF
5ee754fc 9942
bec39cab 9943fi
81ecdfbb
RW
9944
9945done
9946
9947for ac_header in sys/user.h
9948do :
9949 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9950# include <sys/param.h>
a9322a30
TT
9951#endif
9952
81ecdfbb
RW
9953"
9954if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9955 cat >>confdefs.h <<_ACEOF
9956#define HAVE_SYS_USER_H 1
bec39cab 9957_ACEOF
bec39cab 9958
a9322a30 9959fi
bec39cab 9960
81ecdfbb 9961done
5ee754fc 9962
5ee754fc 9963
81ecdfbb
RW
9964# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9965# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9966# think that we don't have <curses.h> if we're using GCC.
9967case $host_os in
9968 solaris2.[789])
9969 if test "$GCC" = yes; then
9970
9971$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9972
9973 fi ;;
9974esac
9975for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9976do :
9977 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9978ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9979eval as_val=\$$as_ac_Header
9980 if test "x$as_val" = x""yes; then :
bec39cab 9981 cat >>confdefs.h <<_ACEOF
81ecdfbb 9982#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9983_ACEOF
5ee754fc
MK
9984
9985fi
9986
81ecdfbb 9987done
bec39cab 9988
81ecdfbb
RW
9989for ac_header in term.h
9990do :
9991 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9992# include <curses.h>
9993#endif
bec39cab 9994
81ecdfbb
RW
9995"
9996if test "x$ac_cv_header_term_h" = x""yes; then :
9997 cat >>confdefs.h <<_ACEOF
9998#define HAVE_TERM_H 1
a8111142 9999_ACEOF
a8111142 10000
a8111142 10001fi
a8111142 10002
81ecdfbb 10003done
a8111142
TT
10004
10005
81ecdfbb
RW
10006# ------------------------- #
10007# Checks for declarations. #
10008# ------------------------- #
a9322a30 10009
07697489
PA
10010
10011 # Check for presence and size of long long.
10012 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10013if test "x$ac_cv_type_long_long" = x""yes; then :
10014
10015cat >>confdefs.h <<_ACEOF
10016#define HAVE_LONG_LONG 1
10017_ACEOF
10018
10019# The cast to long int works around a bug in the HP C Compiler
10020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10022# This bug is HP SR number 8606223364.
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10024$as_echo_n "checking size of long long... " >&6; }
10025if test "${ac_cv_sizeof_long_long+set}" = set; then :
10026 $as_echo_n "(cached) " >&6
10027else
10028 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10029
10030else
10031 if test "$ac_cv_type_long_long" = yes; then
10032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10034{ as_fn_set_status 77
10035as_fn_error "cannot compute sizeof (long long)
10036See \`config.log' for more details." "$LINENO" 5; }; }
10037 else
10038 ac_cv_sizeof_long_long=0
10039 fi
10040fi
10041
10042fi
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10044$as_echo "$ac_cv_sizeof_long_long" >&6; }
10045
10046
10047
10048cat >>confdefs.h <<_ACEOF
10049#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10050_ACEOF
10051
10052
10053fi
10054
10055
10056 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10057if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10058 ac_have_decl=1
10059else
10060 ac_have_decl=0
10061fi
10062
10063cat >>confdefs.h <<_ACEOF
10064#define HAVE_DECL_BASENAME $ac_have_decl
10065_ACEOF
10066ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10067if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10068 ac_have_decl=1
10069else
10070 ac_have_decl=0
10071fi
10072
10073cat >>confdefs.h <<_ACEOF
10074#define HAVE_DECL_FFS $ac_have_decl
10075_ACEOF
10076ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10077if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10078 ac_have_decl=1
10079else
10080 ac_have_decl=0
10081fi
10082
10083cat >>confdefs.h <<_ACEOF
10084#define HAVE_DECL_ASPRINTF $ac_have_decl
10085_ACEOF
10086ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10087if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10088 ac_have_decl=1
10089else
10090 ac_have_decl=0
10091fi
10092
10093cat >>confdefs.h <<_ACEOF
10094#define HAVE_DECL_VASPRINTF $ac_have_decl
10095_ACEOF
10096ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10097if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10098 ac_have_decl=1
10099else
10100 ac_have_decl=0
10101fi
10102
10103cat >>confdefs.h <<_ACEOF
10104#define HAVE_DECL_SNPRINTF $ac_have_decl
10105_ACEOF
10106ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10107if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10108 ac_have_decl=1
10109else
10110 ac_have_decl=0
10111fi
10112
10113cat >>confdefs.h <<_ACEOF
10114#define HAVE_DECL_VSNPRINTF $ac_have_decl
10115_ACEOF
10116
10117 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10118if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10119 ac_have_decl=1
10120else
10121 ac_have_decl=0
10122fi
10123
10124cat >>confdefs.h <<_ACEOF
10125#define HAVE_DECL_STRTOL $ac_have_decl
10126_ACEOF
10127ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10128if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10129 ac_have_decl=1
10130else
10131 ac_have_decl=0
10132fi
10133
10134cat >>confdefs.h <<_ACEOF
10135#define HAVE_DECL_STRTOUL $ac_have_decl
10136_ACEOF
10137ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10138if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10139 ac_have_decl=1
10140else
10141 ac_have_decl=0
10142fi
10143
10144cat >>confdefs.h <<_ACEOF
10145#define HAVE_DECL_STRTOLL $ac_have_decl
10146_ACEOF
10147ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10148if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10149 ac_have_decl=1
10150else
10151 ac_have_decl=0
10152fi
10153
10154cat >>confdefs.h <<_ACEOF
10155#define HAVE_DECL_STRTOULL $ac_have_decl
10156_ACEOF
10157
10158 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10159if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10160 ac_have_decl=1
10161else
10162 ac_have_decl=0
10163fi
10164
10165cat >>confdefs.h <<_ACEOF
10166#define HAVE_DECL_STRVERSCMP $ac_have_decl
10167_ACEOF
10168
10169
10170
81ecdfbb
RW
10171ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10172if test "x$ac_cv_have_decl_free" = x""yes; then :
10173 ac_have_decl=1
bec39cab 10174else
81ecdfbb
RW
10175 ac_have_decl=0
10176fi
10177
10178cat >>confdefs.h <<_ACEOF
10179#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10180_ACEOF
81ecdfbb
RW
10181ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10182if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10183 ac_have_decl=1
10184else
10185 ac_have_decl=0
10186fi
10187
10188cat >>confdefs.h <<_ACEOF
10189#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10190_ACEOF
81ecdfbb
RW
10191ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10192if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10193 ac_have_decl=1
bec39cab 10194else
81ecdfbb
RW
10195 ac_have_decl=0
10196fi
bec39cab 10197
81ecdfbb
RW
10198cat >>confdefs.h <<_ACEOF
10199#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10200_ACEOF
81ecdfbb
RW
10201ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10202if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10203 ac_have_decl=1
10204else
10205 ac_have_decl=0
5ee754fc 10206fi
81ecdfbb
RW
10207
10208cat >>confdefs.h <<_ACEOF
10209#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 10210_ACEOF
5ee754fc 10211
5ee754fc 10212
81ecdfbb
RW
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10214$as_echo_n "checking for LC_MESSAGES... " >&6; }
10215if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10216 $as_echo_n "(cached) " >&6
bec39cab 10217else
81ecdfbb 10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10219/* end confdefs.h. */
81ecdfbb 10220#include <locale.h>
a9322a30
TT
10221int
10222main ()
10223{
81ecdfbb 10224return LC_MESSAGES
a9322a30
TT
10225 ;
10226 return 0;
10227}
bec39cab 10228_ACEOF
81ecdfbb
RW
10229if ac_fn_c_try_link "$LINENO"; then :
10230 am_cv_val_LC_MESSAGES=yes
bec39cab 10231else
81ecdfbb
RW
10232 am_cv_val_LC_MESSAGES=no
10233fi
10234rm -f core conftest.err conftest.$ac_objext \
10235 conftest$ac_exeext conftest.$ac_ext
10236fi
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10238$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10239 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 10240
81ecdfbb
RW
10241$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
10242
10243 fi
10244
10245
10246# ----------------------- #
10247# Checks for structures. #
10248# ----------------------- #
10249
10250ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10251if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
10252
10253cat >>confdefs.h <<_ACEOF
10254#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 10255_ACEOF
7eb368b3 10256
81ecdfbb 10257
7eb368b3 10258fi
81ecdfbb
RW
10259ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10260if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 10261
a9322a30
TT
10262cat >>confdefs.h <<_ACEOF
10263#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
10264_ACEOF
10265
a9322a30 10266
7eb368b3
NR
10267fi
10268
7eb368b3 10269
a9322a30
TT
10270# ------------------ #
10271# Checks for types. #
10272# ------------------ #
7eb368b3 10273
81ecdfbb
RW
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10275$as_echo_n "checking return type of signal handlers... " >&6; }
10276if test "${ac_cv_type_signal+set}" = set; then :
10277 $as_echo_n "(cached) " >&6
bec39cab 10278else
81ecdfbb 10279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10280/* end confdefs.h. */
a9322a30
TT
10281#include <sys/types.h>
10282#include <signal.h>
7cb9022a 10283
a9322a30
TT
10284int
10285main ()
10286{
81ecdfbb 10287return *(signal (0, 0)) (0) == 1;
a9322a30
TT
10288 ;
10289 return 0;
10290}
bec39cab 10291_ACEOF
81ecdfbb
RW
10292if ac_fn_c_try_compile "$LINENO"; then :
10293 ac_cv_type_signal=int
bec39cab 10294else
81ecdfbb 10295 ac_cv_type_signal=void
bec39cab 10296fi
81ecdfbb 10297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10298fi
81ecdfbb
RW
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10300$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 10301
a9322a30
TT
10302cat >>confdefs.h <<_ACEOF
10303#define RETSIGTYPE $ac_cv_type_signal
10304_ACEOF
5ee754fc 10305
bec39cab 10306
81ecdfbb 10307ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
10308#include <sys/socket.h>
10309
81ecdfbb
RW
10310"
10311if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 10312
a9322a30
TT
10313cat >>confdefs.h <<_ACEOF
10314#define HAVE_SOCKLEN_T 1
10315_ACEOF
10316
10317
10318fi
10319
10320
10321# ------------------------------------- #
10322# Checks for compiler characteristics. #
10323# ------------------------------------- #
10324
81ecdfbb
RW
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10326$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10327if test "${ac_cv_c_const+set}" = set; then :
10328 $as_echo_n "(cached) " >&6
a9322a30 10329else
81ecdfbb 10330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10331/* end confdefs.h. */
a9322a30
TT
10332
10333int
10334main ()
10335{
10336/* FIXME: Include the comments suggested by Paul. */
10337#ifndef __cplusplus
10338 /* Ultrix mips cc rejects this. */
10339 typedef int charset[2];
81ecdfbb 10340 const charset cs;
a9322a30 10341 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
10342 char const *const *pcpcc;
10343 char **ppc;
a9322a30
TT
10344 /* NEC SVR4.0.2 mips cc rejects this. */
10345 struct point {int x, y;};
10346 static struct point const zero = {0,0};
10347 /* AIX XL C 1.02.0.0 rejects this.
10348 It does not let you subtract one const X* pointer from another in
10349 an arm of an if-expression whose if-part is not a constant
10350 expression */
10351 const char *g = "string";
81ecdfbb 10352 pcpcc = &g + (g ? g-g : 0);
a9322a30 10353 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
10354 ++pcpcc;
10355 ppc = (char**) pcpcc;
10356 pcpcc = (char const *const *) ppc;
a9322a30
TT
10357 { /* SCO 3.2v4 cc rejects this. */
10358 char *t;
10359 char const *s = 0 ? (char *) 0 : (char const *) 0;
10360
10361 *t++ = 0;
81ecdfbb 10362 if (s) return 0;
a9322a30
TT
10363 }
10364 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10365 int x[] = {25, 17};
10366 const int *foo = &x[0];
10367 ++foo;
10368 }
10369 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10370 typedef const int *iptr;
10371 iptr p = 0;
10372 ++p;
10373 }
10374 { /* AIX XL C 1.02.0.0 rejects this saying
10375 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10376 struct s { int j; const int *ap[3]; };
10377 struct s *b; b->j = 5;
10378 }
10379 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10380 const int foo = 10;
81ecdfbb 10381 if (!foo) return 0;
a9322a30 10382 }
81ecdfbb 10383 return !cs[0] && !zero.x;
a9322a30
TT
10384#endif
10385
10386 ;
10387 return 0;
10388}
bec39cab 10389_ACEOF
81ecdfbb 10390if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10391 ac_cv_c_const=yes
5ee754fc 10392else
81ecdfbb 10393 ac_cv_c_const=no
5ee754fc 10394fi
81ecdfbb 10395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10396fi
81ecdfbb
RW
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10398$as_echo "$ac_cv_c_const" >&6; }
a9322a30 10399if test $ac_cv_c_const = no; then
bec39cab 10400
81ecdfbb 10401$as_echo "#define const /**/" >>confdefs.h
bec39cab 10402
5ee754fc 10403fi
bec39cab 10404
81ecdfbb
RW
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10406$as_echo_n "checking for inline... " >&6; }
10407if test "${ac_cv_c_inline+set}" = set; then :
10408 $as_echo_n "(cached) " >&6
bec39cab 10409else
a9322a30
TT
10410 ac_cv_c_inline=no
10411for ac_kw in inline __inline__ __inline; do
81ecdfbb 10412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10413/* end confdefs.h. */
a9322a30
TT
10414#ifndef __cplusplus
10415typedef int foo_t;
10416static $ac_kw foo_t static_foo () {return 0; }
10417$ac_kw foo_t foo () {return 0; }
10418#endif
10419
bec39cab 10420_ACEOF
81ecdfbb
RW
10421if ac_fn_c_try_compile "$LINENO"; then :
10422 ac_cv_c_inline=$ac_kw
bec39cab 10423fi
81ecdfbb
RW
10424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10425 test "$ac_cv_c_inline" != no && break
a9322a30 10426done
bec39cab 10427
5ee754fc 10428fi
81ecdfbb
RW
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10430$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10431
a9322a30
TT
10432case $ac_cv_c_inline in
10433 inline | yes) ;;
10434 *)
10435 case $ac_cv_c_inline in
10436 no) ac_val=;;
10437 *) ac_val=$ac_cv_c_inline;;
10438 esac
10439 cat >>confdefs.h <<_ACEOF
10440#ifndef __cplusplus
10441#define inline $ac_val
10442#endif
10443_ACEOF
bec39cab
AC
10444 ;;
10445esac
bec39cab 10446
81ecdfbb
RW
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10448$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10449if test "${ac_cv_c_bigendian+set}" = set; then :
10450 $as_echo_n "(cached) " >&6
bec39cab 10451else
81ecdfbb
RW
10452 ac_cv_c_bigendian=unknown
10453 # See if we're dealing with a universal compiler.
10454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10455/* end confdefs.h. */
10456#ifndef __APPLE_CC__
10457 not a universal capable compiler
10458 #endif
10459 typedef int dummy;
10460
10461_ACEOF
10462if ac_fn_c_try_compile "$LINENO"; then :
10463
10464 # Check for potential -arch flags. It is not universal unless
10465 # there are at least two -arch flags with different values.
10466 ac_arch=
10467 ac_prev=
10468 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10469 if test -n "$ac_prev"; then
10470 case $ac_word in
10471 i?86 | x86_64 | ppc | ppc64)
10472 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10473 ac_arch=$ac_word
10474 else
10475 ac_cv_c_bigendian=universal
10476 break
10477 fi
10478 ;;
10479 esac
10480 ac_prev=
10481 elif test "x$ac_word" = "x-arch"; then
10482 ac_prev=arch
10483 fi
10484 done
10485fi
10486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10487 if test $ac_cv_c_bigendian = unknown; then
10488 # See if sys/param.h defines the BYTE_ORDER macro.
10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10490/* end confdefs.h. */
a9322a30 10491#include <sys/types.h>
81ecdfbb 10492 #include <sys/param.h>
a9322a30
TT
10493
10494int
10495main ()
10496{
81ecdfbb
RW
10497#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10498 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10499 && LITTLE_ENDIAN)
10500 bogus endian macros
10501 #endif
a9322a30
TT
10502
10503 ;
10504 return 0;
10505}
bec39cab 10506_ACEOF
81ecdfbb 10507if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10508 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10510/* end confdefs.h. */
a9322a30 10511#include <sys/types.h>
81ecdfbb 10512 #include <sys/param.h>
a9322a30
TT
10513
10514int
10515main ()
10516{
10517#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10518 not big endian
10519 #endif
a9322a30
TT
10520
10521 ;
10522 return 0;
10523}
bec39cab 10524_ACEOF
81ecdfbb 10525if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10526 ac_cv_c_bigendian=yes
5ee754fc 10527else
81ecdfbb 10528 ac_cv_c_bigendian=no
5ee754fc 10529fi
81ecdfbb
RW
10530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10531fi
10532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10533 fi
10534 if test $ac_cv_c_bigendian = unknown; then
10535 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537/* end confdefs.h. */
10538#include <limits.h>
bec39cab 10539
81ecdfbb
RW
10540int
10541main ()
10542{
10543#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10544 bogus endian macros
10545 #endif
10546
10547 ;
10548 return 0;
10549}
7eb368b3 10550_ACEOF
81ecdfbb
RW
10551if ac_fn_c_try_compile "$LINENO"; then :
10552 # It does; now see whether it defined to _BIG_ENDIAN or not.
10553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10554/* end confdefs.h. */
81ecdfbb
RW
10555#include <limits.h>
10556
7eb368b3
NR
10557int
10558main ()
10559{
81ecdfbb
RW
10560#ifndef _BIG_ENDIAN
10561 not big endian
10562 #endif
10563
7eb368b3
NR
10564 ;
10565 return 0;
10566}
10567_ACEOF
81ecdfbb 10568if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10569 ac_cv_c_bigendian=yes
81ecdfbb
RW
10570else
10571 ac_cv_c_bigendian=no
a9322a30 10572fi
81ecdfbb 10573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10574fi
81ecdfbb
RW
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10576 fi
10577 if test $ac_cv_c_bigendian = unknown; then
10578 # Compile a test program.
10579 if test "$cross_compiling" = yes; then :
10580 # Try to guess by grepping values from an object file.
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
10583short int ascii_mm[] =
10584 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10585 short int ascii_ii[] =
10586 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10587 int use_ascii (int i) {
10588 return ascii_mm[i] + ascii_ii[i];
10589 }
10590 short int ebcdic_ii[] =
10591 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10592 short int ebcdic_mm[] =
10593 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10594 int use_ebcdic (int i) {
10595 return ebcdic_mm[i] + ebcdic_ii[i];
10596 }
10597 extern int foo;
7eb368b3 10598
81ecdfbb
RW
10599int
10600main ()
10601{
10602return use_ascii (foo) == use_ebcdic (foo);
10603 ;
10604 return 0;
10605}
10606_ACEOF
10607if ac_fn_c_try_compile "$LINENO"; then :
10608 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10609 ac_cv_c_bigendian=yes
10610 fi
10611 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10612 if test "$ac_cv_c_bigendian" = unknown; then
10613 ac_cv_c_bigendian=no
10614 else
10615 # finding both strings is unlikely to happen, but who knows?
10616 ac_cv_c_bigendian=unknown
10617 fi
10618 fi
7eb368b3 10619fi
81ecdfbb 10620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10621else
81ecdfbb 10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10623/* end confdefs.h. */
81ecdfbb 10624$ac_includes_default
d3ea6809
MM
10625int
10626main ()
10627{
81ecdfbb
RW
10628
10629 /* Are we little or big endian? From Harbison&Steele. */
10630 union
10631 {
10632 long int l;
10633 char c[sizeof (long int)];
10634 } u;
10635 u.l = 1;
10636 return u.c[sizeof (long int) - 1] == 1;
10637
10638 ;
10639 return 0;
d3ea6809
MM
10640}
10641_ACEOF
81ecdfbb 10642if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10643 ac_cv_c_bigendian=no
d3ea6809 10644else
81ecdfbb 10645 ac_cv_c_bigendian=yes
d3ea6809 10646fi
81ecdfbb
RW
10647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10648 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10649fi
a9322a30 10650
81ecdfbb
RW
10651 fi
10652fi
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10654$as_echo "$ac_cv_c_bigendian" >&6; }
10655 case $ac_cv_c_bigendian in #(
10656 yes)
10657 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10658;; #(
10659 no)
10660 ;; #(
10661 universal)
10662
10663$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10664
10665 ;; #(
10666 *)
10667 as_fn_error "unknown endianness
10668 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10669 esac
d3ea6809
MM
10670
10671
a9322a30
TT
10672# ------------------------------ #
10673# Checks for library functions. #
10674# ------------------------------ #
d3ea6809 10675
a9322a30 10676for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10677do :
10678 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10679ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10680eval as_val=\$$as_ac_Header
10681 if test "x$as_val" = x""yes; then :
bec39cab 10682 cat >>confdefs.h <<_ACEOF
81ecdfbb 10683#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10684_ACEOF
b757528f 10685
b757528f 10686fi
bec39cab 10687
a9322a30 10688done
a3828db0 10689
a9322a30 10690for ac_func in getpagesize
81ecdfbb
RW
10691do :
10692 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10693if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10694 cat >>confdefs.h <<_ACEOF
81ecdfbb 10695#define HAVE_GETPAGESIZE 1
bec39cab 10696_ACEOF
bcb3dc3d 10697
bcb3dc3d
MK
10698fi
10699done
10700
81ecdfbb
RW
10701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10702$as_echo_n "checking for working mmap... " >&6; }
10703if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10704 $as_echo_n "(cached) " >&6
a9322a30 10705else
81ecdfbb 10706 if test "$cross_compiling" = yes; then :
a9322a30 10707 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10708else
81ecdfbb 10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10710/* end confdefs.h. */
a9322a30
TT
10711$ac_includes_default
10712/* malloc might have been renamed as rpl_malloc. */
10713#undef malloc
bec39cab 10714
a9322a30
TT
10715/* Thanks to Mike Haertel and Jim Avera for this test.
10716 Here is a matrix of mmap possibilities:
10717 mmap private not fixed
10718 mmap private fixed at somewhere currently unmapped
10719 mmap private fixed at somewhere already mapped
10720 mmap shared not fixed
10721 mmap shared fixed at somewhere currently unmapped
10722 mmap shared fixed at somewhere already mapped
10723 For private mappings, we should verify that changes cannot be read()
10724 back from the file, nor mmap's back from the file at a different
10725 address. (There have been systems where private was not correctly
10726 implemented like the infamous i386 svr4.0, and systems where the
10727 VM page cache was not coherent with the file system buffer cache
10728 like early versions of FreeBSD and possibly contemporary NetBSD.)
10729 For shared mappings, we should conversely verify that changes get
10730 propagated back to all the places they're supposed to be.
bec39cab 10731
a9322a30
TT
10732 Grep wants private fixed already mapped.
10733 The main things grep needs to know about mmap are:
10734 * does it exist and is it safe to write into the mmap'd area
10735 * how to use it (BSD variants) */
8b9cf735 10736
a9322a30
TT
10737#include <fcntl.h>
10738#include <sys/mman.h>
8b9cf735 10739
81ecdfbb 10740#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10741char *malloc ();
a3828db0
MK
10742#endif
10743
a9322a30 10744/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10745#ifndef HAVE_GETPAGESIZE
a9322a30 10746/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10747# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10748# define HAVE_SYS_PARAM_H 1
10749# endif
10750
10751# ifdef _SC_PAGESIZE
10752# define getpagesize() sysconf(_SC_PAGESIZE)
10753# else /* no _SC_PAGESIZE */
81ecdfbb 10754# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10755# include <sys/param.h>
10756# ifdef EXEC_PAGESIZE
10757# define getpagesize() EXEC_PAGESIZE
10758# else /* no EXEC_PAGESIZE */
10759# ifdef NBPG
10760# define getpagesize() NBPG * CLSIZE
10761# ifndef CLSIZE
10762# define CLSIZE 1
10763# endif /* no CLSIZE */
10764# else /* no NBPG */
10765# ifdef NBPC
10766# define getpagesize() NBPC
10767# else /* no NBPC */
10768# ifdef PAGESIZE
10769# define getpagesize() PAGESIZE
10770# endif /* PAGESIZE */
10771# endif /* no NBPC */
10772# endif /* no NBPG */
10773# endif /* no EXEC_PAGESIZE */
10774# else /* no HAVE_SYS_PARAM_H */
10775# define getpagesize() 8192 /* punt totally */
10776# endif /* no HAVE_SYS_PARAM_H */
10777# endif /* no _SC_PAGESIZE */
10778
10779#endif /* no HAVE_GETPAGESIZE */
10780
bec39cab
AC
10781int
10782main ()
10783{
a9322a30
TT
10784 char *data, *data2, *data3;
10785 int i, pagesize;
10786 int fd;
10787
10788 pagesize = getpagesize ();
10789
10790 /* First, make a file with some known garbage in it. */
10791 data = (char *) malloc (pagesize);
10792 if (!data)
81ecdfbb 10793 return 1;
a9322a30
TT
10794 for (i = 0; i < pagesize; ++i)
10795 *(data + i) = rand ();
10796 umask (0);
10797 fd = creat ("conftest.mmap", 0600);
10798 if (fd < 0)
81ecdfbb 10799 return 1;
a9322a30 10800 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10801 return 1;
a9322a30
TT
10802 close (fd);
10803
10804 /* Next, try to mmap the file at a fixed address which already has
10805 something else allocated at it. If we can, also make sure that
10806 we see the same garbage. */
10807 fd = open ("conftest.mmap", O_RDWR);
10808 if (fd < 0)
81ecdfbb 10809 return 1;
a9322a30
TT
10810 data2 = (char *) malloc (2 * pagesize);
10811 if (!data2)
81ecdfbb
RW
10812 return 1;
10813 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10814 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10815 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10816 return 1;
a9322a30
TT
10817 for (i = 0; i < pagesize; ++i)
10818 if (*(data + i) != *(data2 + i))
81ecdfbb 10819 return 1;
a9322a30
TT
10820
10821 /* Finally, make sure that changes to the mapped area do not
10822 percolate back to the file as seen by read(). (This is a bug on
10823 some variants of i386 svr4.0.) */
10824 for (i = 0; i < pagesize; ++i)
10825 *(data2 + i) = *(data2 + i) + 1;
10826 data3 = (char *) malloc (pagesize);
10827 if (!data3)
81ecdfbb 10828 return 1;
a9322a30 10829 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10830 return 1;
a9322a30
TT
10831 for (i = 0; i < pagesize; ++i)
10832 if (*(data + i) != *(data3 + i))
81ecdfbb 10833 return 1;
a9322a30 10834 close (fd);
81ecdfbb 10835 return 0;
bec39cab
AC
10836}
10837_ACEOF
81ecdfbb 10838if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10839 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10840else
81ecdfbb 10841 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10842fi
81ecdfbb
RW
10843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10844 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10845fi
81ecdfbb 10846
a9322a30 10847fi
81ecdfbb
RW
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10849$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10850if test $ac_cv_func_mmap_fixed_mapped = yes; then
10851
81ecdfbb 10852$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10853
086ec9eb 10854fi
a9322a30 10855rm -f conftest.mmap
a3828db0 10856
81ecdfbb
RW
10857ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10858if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10859
a9322a30
TT
10860else
10861
10862cat >>confdefs.h <<_ACEOF
10863#define pid_t int
bec39cab 10864_ACEOF
086ec9eb
MK
10865
10866fi
10867
81ecdfbb
RW
10868for ac_header in vfork.h
10869do :
10870 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10871if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10872 cat >>confdefs.h <<_ACEOF
81ecdfbb 10873#define HAVE_VFORK_H 1
bec39cab 10874_ACEOF
c906108c
SS
10875
10876fi
a9322a30 10877
a3828db0 10878done
c906108c 10879
a9322a30 10880for ac_func in fork vfork
81ecdfbb
RW
10881do :
10882 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10883ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10884eval as_val=\$$as_ac_var
10885 if test "x$as_val" = x""yes; then :
a3828db0 10886 cat >>confdefs.h <<_ACEOF
81ecdfbb 10887#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10888_ACEOF
b83266a0 10889
97bf5e38 10890fi
a3828db0 10891done
b83266a0 10892
a9322a30 10893if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10895$as_echo_n "checking for working fork... " >&6; }
10896if test "${ac_cv_func_fork_works+set}" = set; then :
10897 $as_echo_n "(cached) " >&6
a9322a30 10898else
81ecdfbb 10899 if test "$cross_compiling" = yes; then :
a9322a30
TT
10900 ac_cv_func_fork_works=cross
10901else
81ecdfbb
RW
10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903/* end confdefs.h. */
10904$ac_includes_default
10905int
10906main ()
10907{
10908
10909 /* By Ruediger Kuhlmann. */
10910 return fork () < 0;
10911
10912 ;
10913 return 0;
10914}
a9322a30 10915_ACEOF
81ecdfbb 10916if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10917 ac_cv_func_fork_works=yes
10918else
81ecdfbb 10919 ac_cv_func_fork_works=no
a9322a30 10920fi
81ecdfbb
RW
10921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10922 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10923fi
81ecdfbb 10924
a9322a30 10925fi
81ecdfbb
RW
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10927$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10928
10929else
10930 ac_cv_func_fork_works=$ac_cv_func_fork
10931fi
10932if test "x$ac_cv_func_fork_works" = xcross; then
10933 case $host in
10934 *-*-amigaos* | *-*-msdosdjgpp*)
10935 # Override, as these systems have only a dummy fork() stub
10936 ac_cv_func_fork_works=no
10937 ;;
10938 *)
10939 ac_cv_func_fork_works=yes
10940 ;;
10941 esac
81ecdfbb
RW
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10943$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10944fi
10945ac_cv_func_vfork_works=$ac_cv_func_vfork
10946if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10948$as_echo_n "checking for working vfork... " >&6; }
10949if test "${ac_cv_func_vfork_works+set}" = set; then :
10950 $as_echo_n "(cached) " >&6
a9322a30 10951else
81ecdfbb 10952 if test "$cross_compiling" = yes; then :
a9322a30
TT
10953 ac_cv_func_vfork_works=cross
10954else
81ecdfbb 10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10956/* end confdefs.h. */
10957/* Thanks to Paul Eggert for this test. */
81ecdfbb 10958$ac_includes_default
a9322a30 10959#include <sys/wait.h>
81ecdfbb 10960#ifdef HAVE_VFORK_H
a9322a30
TT
10961# include <vfork.h>
10962#endif
10963/* On some sparc systems, changes by the child to local and incoming
10964 argument registers are propagated back to the parent. The compiler
10965 is told about this with #include <vfork.h>, but some compilers
10966 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10967 static variable whose address is put into a register that is
10968 clobbered by the vfork. */
10969static void
10970#ifdef __cplusplus
10971sparc_address_test (int arg)
10972# else
10973sparc_address_test (arg) int arg;
10974#endif
10975{
10976 static pid_t child;
10977 if (!child) {
10978 child = vfork ();
10979 if (child < 0) {
10980 perror ("vfork");
10981 _exit(2);
10982 }
10983 if (!child) {
10984 arg = getpid();
10985 write(-1, "", 0);
10986 _exit (arg);
10987 }
10988 }
10989}
10990
10991int
10992main ()
10993{
10994 pid_t parent = getpid ();
10995 pid_t child;
10996
10997 sparc_address_test (0);
10998
10999 child = vfork ();
11000
11001 if (child == 0) {
11002 /* Here is another test for sparc vfork register problems. This
11003 test uses lots of local variables, at least as many local
11004 variables as main has allocated so far including compiler
11005 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11006 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11007 reuse the register of parent for one of the local variables,
11008 since it will think that parent can't possibly be used any more
11009 in this routine. Assigning to the local variable will thus
11010 munge parent in the parent process. */
11011 pid_t
11012 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11013 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11014 /* Convince the compiler that p..p7 are live; otherwise, it might
11015 use the same hardware register for all 8 local variables. */
11016 if (p != p1 || p != p2 || p != p3 || p != p4
11017 || p != p5 || p != p6 || p != p7)
11018 _exit(1);
11019
11020 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11021 from child file descriptors. If the child closes a descriptor
11022 before it execs or exits, this munges the parent's descriptor
11023 as well. Test for this by closing stdout in the child. */
11024 _exit(close(fileno(stdout)) != 0);
11025 } else {
11026 int status;
11027 struct stat st;
11028
11029 while (wait(&status) != child)
11030 ;
81ecdfbb 11031 return (
a9322a30
TT
11032 /* Was there some problem with vforking? */
11033 child < 0
11034
11035 /* Did the child fail? (This shouldn't happen.) */
11036 || status
11037
11038 /* Did the vfork/compiler bug occur? */
11039 || parent != getpid()
11040
11041 /* Did the file descriptor bug occur? */
11042 || fstat(fileno(stdout), &st) != 0
11043 );
11044 }
11045}
11046_ACEOF
81ecdfbb 11047if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11048 ac_cv_func_vfork_works=yes
11049else
81ecdfbb 11050 ac_cv_func_vfork_works=no
a9322a30 11051fi
81ecdfbb
RW
11052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11053 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11054fi
81ecdfbb 11055
a9322a30 11056fi
81ecdfbb
RW
11057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11058$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11059
11060fi;
11061if test "x$ac_cv_func_fork_works" = xcross; then
11062 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11064$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11065fi
11066
11067if test "x$ac_cv_func_vfork_works" = xyes; then
11068
81ecdfbb 11069$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11070
11071else
11072
81ecdfbb 11073$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11074
11075fi
11076if test "x$ac_cv_func_fork_works" = xyes; then
11077
81ecdfbb 11078$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11079
11080fi
11081
cdf43629 11082for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11083 pipe poll pread pread64 pwrite resize_term \
7313baad 11084 sbrk setpgid setpgrp setsid \
9467110b 11085 sigaction sigprocmask sigsetmask socketpair \
110ed339 11086 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11087 setrlimit getrlimit posix_madvise waitpid \
1bc1068a 11088 ptrace64 sigaltstack mkdtemp
81ecdfbb
RW
11089do :
11090 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11091ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11092eval as_val=\$$as_ac_var
11093 if test "x$as_val" = x""yes; then :
6c7a06a3 11094 cat >>confdefs.h <<_ACEOF
81ecdfbb 11095#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11096_ACEOF
11097
11098fi
11099done
11100
11101
81ecdfbb
RW
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11103$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11104if test "${am_cv_langinfo_codeset+set}" = set; then :
11105 $as_echo_n "(cached) " >&6
6c7a06a3 11106else
81ecdfbb 11107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11108/* end confdefs.h. */
11109#include <langinfo.h>
11110int
11111main ()
11112{
11113char* cs = nl_langinfo(CODESET);
bec39cab
AC
11114 ;
11115 return 0;
11116}
11117_ACEOF
81ecdfbb 11118if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11119 am_cv_langinfo_codeset=yes
a4db0f07 11120else
81ecdfbb 11121 am_cv_langinfo_codeset=no
a4db0f07 11122fi
81ecdfbb
RW
11123rm -f core conftest.err conftest.$ac_objext \
11124 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11125
a4db0f07 11126fi
81ecdfbb
RW
11127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11128$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11129 if test $am_cv_langinfo_codeset = yes; then
11130
81ecdfbb 11131$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11132
6c7a06a3 11133 fi
c906108c 11134
06825bd1 11135
3266f10b
TT
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11137$as_echo_n "checking for ANSI C header files... " >&6; }
11138if test "${ac_cv_header_stdc+set}" = set; then :
11139 $as_echo_n "(cached) " >&6
11140else
11141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11142/* end confdefs.h. */
11143#include <stdlib.h>
11144#include <stdarg.h>
11145#include <string.h>
11146#include <float.h>
11147
11148int
11149main ()
11150{
11151
11152 ;
11153 return 0;
11154}
11155_ACEOF
11156if ac_fn_c_try_compile "$LINENO"; then :
11157 ac_cv_header_stdc=yes
11158else
11159 ac_cv_header_stdc=no
11160fi
11161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11162
11163if test $ac_cv_header_stdc = yes; then
11164 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11166/* end confdefs.h. */
11167#include <string.h>
11168
11169_ACEOF
11170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11171 $EGREP "memchr" >/dev/null 2>&1; then :
11172
11173else
11174 ac_cv_header_stdc=no
11175fi
11176rm -f conftest*
11177
11178fi
11179
11180if test $ac_cv_header_stdc = yes; then
11181 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183/* end confdefs.h. */
11184#include <stdlib.h>
11185
11186_ACEOF
11187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11188 $EGREP "free" >/dev/null 2>&1; then :
11189
11190else
11191 ac_cv_header_stdc=no
11192fi
11193rm -f conftest*
11194
11195fi
11196
11197if test $ac_cv_header_stdc = yes; then
11198 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11199 if test "$cross_compiling" = yes; then :
11200 :
11201else
11202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11203/* end confdefs.h. */
11204#include <ctype.h>
11205#include <stdlib.h>
11206#if ((' ' & 0x0FF) == 0x020)
11207# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11208# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11209#else
11210# define ISLOWER(c) \
11211 (('a' <= (c) && (c) <= 'i') \
11212 || ('j' <= (c) && (c) <= 'r') \
11213 || ('s' <= (c) && (c) <= 'z'))
11214# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11215#endif
11216
11217#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11218int
11219main ()
11220{
11221 int i;
11222 for (i = 0; i < 256; i++)
11223 if (XOR (islower (i), ISLOWER (i))
11224 || toupper (i) != TOUPPER (i))
11225 return 2;
11226 return 0;
11227}
11228_ACEOF
11229if ac_fn_c_try_run "$LINENO"; then :
11230
11231else
11232 ac_cv_header_stdc=no
11233fi
11234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11235 conftest.$ac_objext conftest.beam conftest.$ac_ext
11236fi
11237
11238fi
11239fi
11240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11241$as_echo "$ac_cv_header_stdc" >&6; }
11242if test $ac_cv_header_stdc = yes; then
11243
11244$as_echo "#define STDC_HEADERS 1" >>confdefs.h
11245
3266f10b
TT
11246fi
11247
11248 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11249# for constant arguments. Useless!
11250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11251$as_echo_n "checking for working alloca.h... " >&6; }
11252if test "${ac_cv_working_alloca_h+set}" = set; then :
11253 $as_echo_n "(cached) " >&6
11254else
11255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256/* end confdefs.h. */
11257#include <alloca.h>
11258int
11259main ()
11260{
11261char *p = (char *) alloca (2 * sizeof (int));
11262 if (p) return 0;
11263 ;
11264 return 0;
11265}
11266_ACEOF
11267if ac_fn_c_try_link "$LINENO"; then :
11268 ac_cv_working_alloca_h=yes
11269else
11270 ac_cv_working_alloca_h=no
11271fi
11272rm -f core conftest.err conftest.$ac_objext \
11273 conftest$ac_exeext conftest.$ac_ext
11274fi
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11276$as_echo "$ac_cv_working_alloca_h" >&6; }
11277if test $ac_cv_working_alloca_h = yes; then
11278
11279$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
11280
11281fi
11282
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11284$as_echo_n "checking for alloca... " >&6; }
11285if test "${ac_cv_func_alloca_works+set}" = set; then :
11286 $as_echo_n "(cached) " >&6
11287else
11288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289/* end confdefs.h. */
11290#ifdef __GNUC__
11291# define alloca __builtin_alloca
11292#else
11293# ifdef _MSC_VER
11294# include <malloc.h>
11295# define alloca _alloca
11296# else
11297# ifdef HAVE_ALLOCA_H
11298# include <alloca.h>
11299# else
11300# ifdef _AIX
11301 #pragma alloca
11302# else
11303# ifndef alloca /* predefined by HP cc +Olibcalls */
11304char *alloca ();
11305# endif
11306# endif
11307# endif
11308# endif
11309#endif
11310
11311int
11312main ()
11313{
11314char *p = (char *) alloca (1);
11315 if (p) return 0;
11316 ;
11317 return 0;
11318}
11319_ACEOF
11320if ac_fn_c_try_link "$LINENO"; then :
11321 ac_cv_func_alloca_works=yes
11322else
11323 ac_cv_func_alloca_works=no
11324fi
11325rm -f core conftest.err conftest.$ac_objext \
11326 conftest$ac_exeext conftest.$ac_ext
11327fi
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11329$as_echo "$ac_cv_func_alloca_works" >&6; }
11330
11331if test $ac_cv_func_alloca_works = yes; then
11332
11333$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
11334
11335else
11336 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11337# that cause trouble. Some versions do not even contain alloca or
11338# contain a buggy version. If you still want to use their alloca,
11339# use ar to extract alloca.o from them instead of compiling alloca.c.
11340
11341ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
11342
11343$as_echo "#define C_ALLOCA 1" >>confdefs.h
11344
11345
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11347$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11348if test "${ac_cv_os_cray+set}" = set; then :
11349 $as_echo_n "(cached) " >&6
11350else
11351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11352/* end confdefs.h. */
11353#if defined CRAY && ! defined CRAY2
11354webecray
11355#else
11356wenotbecray
11357#endif
11358
11359_ACEOF
11360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11361 $EGREP "webecray" >/dev/null 2>&1; then :
11362 ac_cv_os_cray=yes
11363else
11364 ac_cv_os_cray=no
11365fi
11366rm -f conftest*
11367
11368fi
11369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
11370$as_echo "$ac_cv_os_cray" >&6; }
11371if test $ac_cv_os_cray = yes; then
11372 for ac_func in _getb67 GETB67 getb67; do
11373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11374ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11375eval as_val=\$$as_ac_var
11376 if test "x$as_val" = x""yes; then :
11377
11378cat >>confdefs.h <<_ACEOF
11379#define CRAY_STACKSEG_END $ac_func
11380_ACEOF
11381
11382 break
11383fi
11384
11385 done
11386fi
11387
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11389$as_echo_n "checking stack direction for C alloca... " >&6; }
11390if test "${ac_cv_c_stack_direction+set}" = set; then :
11391 $as_echo_n "(cached) " >&6
11392else
11393 if test "$cross_compiling" = yes; then :
11394 ac_cv_c_stack_direction=0
11395else
11396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397/* end confdefs.h. */
11398$ac_includes_default
11399int
11400find_stack_direction ()
11401{
11402 static char *addr = 0;
11403 auto char dummy;
11404 if (addr == 0)
11405 {
11406 addr = &dummy;
11407 return find_stack_direction ();
11408 }
11409 else
11410 return (&dummy > addr) ? 1 : -1;
11411}
11412
11413int
11414main ()
11415{
11416 return find_stack_direction () < 0;
11417}
11418_ACEOF
11419if ac_fn_c_try_run "$LINENO"; then :
11420 ac_cv_c_stack_direction=1
11421else
11422 ac_cv_c_stack_direction=-1
11423fi
11424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11425 conftest.$ac_objext conftest.beam conftest.$ac_ext
11426fi
11427
11428fi
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11430$as_echo "$ac_cv_c_stack_direction" >&6; }
11431cat >>confdefs.h <<_ACEOF
11432#define STACK_DIRECTION $ac_cv_c_stack_direction
11433_ACEOF
11434
11435
11436fi
11437
11438
11439
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11441$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11442if test "${am_cv_langinfo_codeset+set}" = set; then :
11443 $as_echo_n "(cached) " >&6
11444else
11445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11446/* end confdefs.h. */
11447#include <langinfo.h>
11448int
11449main ()
11450{
11451char* cs = nl_langinfo(CODESET);
11452 ;
11453 return 0;
11454}
11455_ACEOF
11456if ac_fn_c_try_link "$LINENO"; then :
11457 am_cv_langinfo_codeset=yes
11458else
11459 am_cv_langinfo_codeset=no
11460fi
11461rm -f core conftest.err conftest.$ac_objext \
11462 conftest$ac_exeext conftest.$ac_ext
11463
11464fi
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11466$as_echo "$am_cv_langinfo_codeset" >&6; }
11467 if test $am_cv_langinfo_codeset = yes; then
11468
11469$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11470
11471 fi
11472
11473
a3d08894 11474 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
11475do :
11476 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11477ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11478eval as_val=\$$as_ac_Header
11479 if test "x$as_val" = x""yes; then :
11480 cat >>confdefs.h <<_ACEOF
11481#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11482_ACEOF
11483
11484fi
11485
11486done
11487
11488
11489 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11490do :
11491 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11492ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11493eval as_val=\$$as_ac_var
11494 if test "x$as_val" = x""yes; then :
11495 cat >>confdefs.h <<_ACEOF
11496#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11497_ACEOF
11498
11499fi
11500done
11501
11502
11503 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11504if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11505 ac_have_decl=1
11506else
11507 ac_have_decl=0
11508fi
11509
11510cat >>confdefs.h <<_ACEOF
11511#define HAVE_DECL_STRERROR $ac_have_decl
11512_ACEOF
11513ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11514if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11515 ac_have_decl=1
11516else
11517 ac_have_decl=0
11518fi
11519
11520cat >>confdefs.h <<_ACEOF
11521#define HAVE_DECL_STRSTR $ac_have_decl
11522_ACEOF
11523
11524
e9bcb658
GB
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11526$as_echo_n "checking for sigsetjmp... " >&6; }
11527if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11528 $as_echo_n "(cached) " >&6
11529else
11530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11531/* end confdefs.h. */
11532
11533#include <setjmp.h>
11534
11535int
11536main ()
11537{
11538sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11539 ;
11540 return 0;
11541}
11542_ACEOF
11543if ac_fn_c_try_compile "$LINENO"; then :
11544 gdb_cv_func_sigsetjmp=yes
11545else
11546 gdb_cv_func_sigsetjmp=no
11547fi
11548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11549fi
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11551$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11552if test $gdb_cv_func_sigsetjmp = yes; then
11553
11554$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11555
11556fi
11557
3266f10b 11558
a3828db0
MK
11559# Check the return and argument types of ptrace. No canned test for
11560# this, so roll our own.
11561gdb_ptrace_headers='
4ff70b84 11562#include <sys/types.h>
a3828db0
MK
11563#if HAVE_SYS_PTRACE_H
11564# include <sys/ptrace.h>
11565#endif
11566#if HAVE_UNISTD_H
11567# include <unistd.h>
11568#endif
11569'
11570# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11571ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11572"
11573if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11574 ac_have_decl=1
06825bd1 11575else
81ecdfbb 11576 ac_have_decl=0
06825bd1 11577fi
06825bd1 11578
a3828db0 11579cat >>confdefs.h <<_ACEOF
81ecdfbb 11580#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11581_ACEOF
81ecdfbb 11582if test $ac_have_decl = 1; then :
bec39cab 11583
a3828db0 11584else
a3828db0
MK
11585
11586 : ${gdb_cv_func_ptrace_ret='int'}
11587 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11588
06825bd1
MK
11589fi
11590
064ef605
DJ
11591# Check return type. Varargs (used on GNU/Linux) conflict with the
11592# empty argument list, so check for that explicitly.
81ecdfbb
RW
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11594$as_echo_n "checking return type of ptrace... " >&6; }
11595if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11596 $as_echo_n "(cached) " >&6
bec39cab 11597else
81ecdfbb 11598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11599/* end confdefs.h. */
a3828db0 11600$gdb_ptrace_headers
bec39cab
AC
11601int
11602main ()
11603{
064ef605
DJ
11604extern long ptrace (enum __ptrace_request, ...);
11605 ;
11606 return 0;
11607}
11608_ACEOF
81ecdfbb 11609if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11610 gdb_cv_func_ptrace_ret='long'
11611else
81ecdfbb 11612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11613/* end confdefs.h. */
11614$gdb_ptrace_headers
11615int
11616main ()
11617{
a3828db0 11618extern int ptrace ();
bec39cab
AC
11619 ;
11620 return 0;
11621}
11622_ACEOF
81ecdfbb 11623if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11624 gdb_cv_func_ptrace_ret='int'
70f9f479 11625else
81ecdfbb 11626 gdb_cv_func_ptrace_ret='long'
70f9f479 11627fi
81ecdfbb 11628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11629fi
81ecdfbb 11630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11631fi
81ecdfbb
RW
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11633$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11634
a3828db0
MK
11635cat >>confdefs.h <<_ACEOF
11636#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11637_ACEOF
70f9f479 11638
a3828db0 11639# Check argument types.
81ecdfbb
RW
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11641$as_echo_n "checking types of arguments for ptrace... " >&6; }
11642if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11643 $as_echo_n "(cached) " >&6
bec39cab 11644else
a3828db0 11645
81ecdfbb 11646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11647/* end confdefs.h. */
11648$gdb_ptrace_headers
11649int
11650main ()
11651{
11652extern long ptrace (enum __ptrace_request, ...);
11653 ;
11654 return 0;
11655}
11656_ACEOF
81ecdfbb 11657if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11658 gdb_cv_func_ptrace_args='int,int,long,long'
11659else
064ef605 11660
a3828db0
MK
11661for gdb_arg1 in 'int' 'long'; do
11662 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11663 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11664 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11666/* end confdefs.h. */
a3828db0 11667$gdb_ptrace_headers
bec39cab
AC
11668int
11669main ()
11670{
a3828db0
MK
11671
11672extern $gdb_cv_func_ptrace_ret
11673 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11674
bec39cab
AC
11675 ;
11676 return 0;
11677}
11678_ACEOF
81ecdfbb 11679if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11680 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11681 break 4;
5c7f2947 11682fi
81ecdfbb 11683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11684 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11686/* end confdefs.h. */
a3828db0 11687$gdb_ptrace_headers
bec39cab
AC
11688int
11689main ()
11690{
a3828db0
MK
11691
11692extern $gdb_cv_func_ptrace_ret
11693 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11694
bec39cab
AC
11695 ;
11696 return 0;
11697}
11698_ACEOF
81ecdfbb 11699if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11700
11701gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11702 break 5;
78434e59 11703fi
81ecdfbb 11704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11705 done
11706 done
11707 done
11708 done
11709done
11710# Provide a safe default value.
11711: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11712
064ef605 11713fi
81ecdfbb 11714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11715fi
81ecdfbb
RW
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11717$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11718ac_save_IFS=$IFS; IFS=','
11719set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11720IFS=$ac_save_IFS
11721shift
bec39cab 11722
a3828db0
MK
11723cat >>confdefs.h <<_ACEOF
11724#define PTRACE_TYPE_ARG3 $3
11725_ACEOF
11726
96d7229d
LM
11727
11728cat >>confdefs.h <<_ACEOF
11729#define PTRACE_TYPE_ARG4 $4
11730_ACEOF
11731
a3828db0
MK
11732if test -n "$5"; then
11733
11734cat >>confdefs.h <<_ACEOF
11735#define PTRACE_TYPE_ARG5 $5
bec39cab 11736_ACEOF
78434e59
MK
11737
11738fi
11739
a3828db0 11740if test "$cross_compiling" = no; then
81ecdfbb
RW
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11742$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11743if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11744 $as_echo_n "(cached) " >&6
a3828db0 11745else
81ecdfbb
RW
11746 if test "$cross_compiling" = yes; then :
11747 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11748else
81ecdfbb 11749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11750/* end confdefs.h. */
81ecdfbb 11751$ac_includes_default
bec39cab
AC
11752int
11753main ()
11754{
a3828db0
MK
11755/* If this system has a BSD-style setpgrp which takes arguments,
11756 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11757 exit successfully. */
81ecdfbb 11758 return setpgrp (1,1) != -1;
bec39cab
AC
11759 ;
11760 return 0;
11761}
11762_ACEOF
81ecdfbb 11763if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11764 ac_cv_func_setpgrp_void=no
c906108c 11765else
81ecdfbb 11766 ac_cv_func_setpgrp_void=yes
c906108c 11767fi
81ecdfbb
RW
11768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11769 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11770fi
81ecdfbb 11771
a3828db0 11772fi
81ecdfbb
RW
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11774$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11775if test $ac_cv_func_setpgrp_void = yes; then
11776
81ecdfbb 11777$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11778
11779fi
a3828db0
MK
11780
11781else
81ecdfbb
RW
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11783$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11784if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11785 $as_echo_n "(cached) " >&6
97bf5e38 11786else
81ecdfbb 11787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11788/* end confdefs.h. */
a3828db0
MK
11789
11790#include <unistd.h>
11791
bec39cab
AC
11792int
11793main ()
11794{
a3828db0
MK
11795
11796 if (setpgrp(1,1) == -1)
11797 exit (0);
11798 else
11799 exit (1);
11800
bec39cab
AC
11801 ;
11802 return 0;
11803}
11804_ACEOF
81ecdfbb 11805if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11806 ac_cv_func_setpgrp_void=no
c906108c 11807else
81ecdfbb 11808 ac_cv_func_setpgrp_void=yes
c906108c 11809fi
81ecdfbb 11810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11811fi
81ecdfbb
RW
11812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11813$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11814if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11815 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11816
a3828db0 11817fi
c906108c
SS
11818fi
11819
a3828db0
MK
11820# Assume we'll default to using the included libiberty regex.
11821gdb_use_included_regex=yes
11822
11823# However, if the system regex is GNU regex, then default to *not*
11824# using the included regex.
81ecdfbb
RW
11825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11826$as_echo_n "checking for GNU regex... " >&6; }
11827if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11828 $as_echo_n "(cached) " >&6
bec39cab 11829else
81ecdfbb 11830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11831/* end confdefs.h. */
a3828db0 11832#include <gnu-versions.h>
bec39cab
AC
11833int
11834main ()
11835{
81ecdfbb
RW
11836#define REGEX_INTERFACE_VERSION 1
11837#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11838# error "Version mismatch"
11839#endif
5c45e068
MK
11840 ;
11841 return 0;
11842}
11843_ACEOF
81ecdfbb
RW
11844if ac_fn_c_try_compile "$LINENO"; then :
11845 gdb_cv_have_gnu_regex=yes
5c45e068 11846else
81ecdfbb
RW
11847 gdb_cv_have_gnu_regex=no
11848fi
11849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11850fi
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11852$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11853if test $gdb_cv_have_gnu_regex = yes; then
11854 gdb_use_included_regex=no
5c45e068 11855fi
81ecdfbb
RW
11856
11857
11858# Check whether --with-included-regex was given.
11859if test "${with_included_regex+set}" = set; then :
11860 withval=$with_included_regex; gdb_with_regex=$withval
11861else
11862 gdb_with_regex=$gdb_use_included_regex
c906108c 11863fi
81ecdfbb
RW
11864
11865if test "$gdb_with_regex" = yes; then
11866
11867$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11868
c906108c 11869fi
81ecdfbb
RW
11870
11871# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11872ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11873#include <sys/proc.h>
11874
11875"
11876if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11877
5c45e068 11878cat >>confdefs.h <<_ACEOF
a3828db0 11879#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11880_ACEOF
c906108c 11881
5c45e068 11882
97bf5e38 11883fi
c906108c 11884
5c45e068 11885
a3828db0 11886# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11888$as_echo_n "checking for struct lwp... " >&6; }
11889if test "${gdb_cv_struct_lwp+set}" = set; then :
11890 $as_echo_n "(cached) " >&6
bec39cab 11891else
81ecdfbb 11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11893/* end confdefs.h. */
a3828db0
MK
11894#include <sys/param.h>
11895#include <sys/lwp.h>
bec39cab
AC
11896int
11897main ()
11898{
a3828db0 11899struct lwp l;
bec39cab
AC
11900 ;
11901 return 0;
11902}
11903_ACEOF
81ecdfbb 11904if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11905 gdb_cv_struct_lwp=yes
c906108c 11906else
81ecdfbb 11907 gdb_cv_struct_lwp=no
c906108c 11908fi
81ecdfbb 11909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11910fi
81ecdfbb
RW
11911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11912$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11913if test $gdb_cv_struct_lwp = yes; then
c906108c 11914
81ecdfbb 11915$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11916
97bf5e38 11917fi
c906108c 11918
a3828db0 11919# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11921$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11922if test "${gdb_cv_struct_reg+set}" = set; then :
11923 $as_echo_n "(cached) " >&6
bec39cab 11924else
81ecdfbb 11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11926/* end confdefs.h. */
a3828db0
MK
11927#include <sys/types.h>
11928#include <machine/reg.h>
bec39cab
AC
11929int
11930main ()
11931{
a3828db0 11932struct reg r;
bec39cab
AC
11933 ;
11934 return 0;
11935}
11936_ACEOF
81ecdfbb 11937if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11938 gdb_cv_struct_reg=yes
27ca5dad 11939else
81ecdfbb 11940 gdb_cv_struct_reg=no
27ca5dad 11941fi
81ecdfbb 11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11943fi
81ecdfbb
RW
11944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11945$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11946if test $gdb_cv_struct_reg = yes; then
bec39cab 11947
81ecdfbb 11948$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11949
11950fi
97bf5e38 11951
a3828db0
MK
11952# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11953# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11954ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11955"
11956if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11957
11958cat >>confdefs.h <<_ACEOF
a3828db0 11959#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11960_ACEOF
3862412b 11961
5c45e068 11962
97bf5e38 11963fi
81ecdfbb
RW
11964ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11965"
11966if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11967
11968cat >>confdefs.h <<_ACEOF
a3828db0 11969#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11970_ACEOF
3862412b 11971
5c45e068 11972
97bf5e38 11973fi
3862412b 11974
5c45e068 11975
6fea9e18
L
11976# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11977# Older amd64 Linux's don't have the fs_base and gs_base members of
11978# `struct user_regs_struct'.
11979ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11980"
11981if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11982
11983cat >>confdefs.h <<_ACEOF
11984#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11985_ACEOF
11986
11987
11988fi
11989ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11990"
11991if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11992
11993cat >>confdefs.h <<_ACEOF
11994#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11995_ACEOF
11996
11997
11998fi
11999
12000
a3828db0 12001# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12003$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12004if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12005 $as_echo_n "(cached) " >&6
451928c5 12006else
81ecdfbb 12007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12008/* end confdefs.h. */
a3828db0 12009#include <sys/ptrace.h>
bec39cab
AC
12010int
12011main ()
12012{
a3828db0 12013PTRACE_GETREGS;
bec39cab
AC
12014 ;
12015 return 0;
12016}
12017_ACEOF
81ecdfbb 12018if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12019 gdb_cv_have_ptrace_getregs=yes
451928c5 12020else
81ecdfbb 12021 gdb_cv_have_ptrace_getregs=no
451928c5 12022fi
81ecdfbb 12023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12024fi
12025
81ecdfbb
RW
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12027$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12028if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12029
81ecdfbb 12030$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12031
97bf5e38 12032fi
451928c5 12033
a3828db0 12034# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12036$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12037if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12038 $as_echo_n "(cached) " >&6
451928c5 12039else
81ecdfbb 12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12041/* end confdefs.h. */
a3828db0 12042#include <sys/ptrace.h>
bec39cab
AC
12043int
12044main ()
12045{
a3828db0 12046PTRACE_GETFPXREGS;
bec39cab
AC
12047 ;
12048 return 0;
12049}
12050_ACEOF
81ecdfbb 12051if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12052 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12053else
81ecdfbb 12054 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12055fi
81ecdfbb 12056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12057fi
12058
81ecdfbb
RW
12059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12060$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12061if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12062
81ecdfbb 12063$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12064
97bf5e38 12065fi
451928c5 12066
a3828db0 12067# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12069$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12070if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12071 $as_echo_n "(cached) " >&6
3862412b 12072else
81ecdfbb 12073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12074/* end confdefs.h. */
a3828db0
MK
12075#include <sys/types.h>
12076#include <sys/ptrace.h>
bec39cab
AC
12077int
12078main ()
12079{
a3828db0 12080PT_GETDBREGS;
bec39cab
AC
12081 ;
12082 return 0;
12083}
12084_ACEOF
81ecdfbb 12085if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12086 gdb_cv_have_pt_getdbregs=yes
3862412b 12087else
81ecdfbb 12088 gdb_cv_have_pt_getdbregs=no
3862412b 12089fi
81ecdfbb 12090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12091fi
12092
81ecdfbb
RW
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12094$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12095if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12096
81ecdfbb 12097$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12098
97bf5e38 12099fi
3862412b 12100
a3828db0 12101# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12103$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12104if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12105 $as_echo_n "(cached) " >&6
3862412b 12106else
81ecdfbb 12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12108/* end confdefs.h. */
a3828db0
MK
12109#include <sys/types.h>
12110#include <sys/ptrace.h>
bec39cab
AC
12111int
12112main ()
12113{
a3828db0 12114PT_GETXMMREGS;
bec39cab
AC
12115 ;
12116 return 0;
12117}
12118_ACEOF
81ecdfbb 12119if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12120 gdb_cv_have_pt_getxmmregs=yes
3862412b 12121else
81ecdfbb 12122 gdb_cv_have_pt_getxmmregs=no
3862412b 12123fi
81ecdfbb 12124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12125fi
12126
81ecdfbb
RW
12127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12128$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12129if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12130
81ecdfbb 12131$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12132
97bf5e38 12133fi
3862412b 12134
05b4bd79 12135# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12136
12137if test "${target}" = "${host}"; then
12138 case "${host}" in
7b00db47 12139 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12140
81ecdfbb 12141$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12142
12143 ;;
c162e8c9 12144 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12145
81ecdfbb 12146$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12147
12148 ;;
12149 mips-sgi-irix5*)
12150 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12151
81ecdfbb 12152$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12153
12154 ;;
12155 esac
12156fi
12157
12158if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12160$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12161 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12162 $as_echo_n "(cached) " >&6
596c9d4b 12163else
81ecdfbb 12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12165/* end confdefs.h. */
596c9d4b
KB
12166
12167#define _SYSCALL32
d30c5336
JK
12168/* Needed for new procfs interface on sparc-solaris. */
12169#define _STRUCTURED_PROC 1
596c9d4b 12170#include <sys/procfs.h>
bec39cab
AC
12171int
12172main ()
12173{
97bf5e38 12174gregset_t avar
bec39cab
AC
12175 ;
12176 return 0;
12177}
12178_ACEOF
81ecdfbb 12179if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12180 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12181else
81ecdfbb 12182 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12183
596c9d4b 12184fi
81ecdfbb 12185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12186fi
12187
97bf5e38 12188 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12189
81ecdfbb 12190$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12191
12192 fi
81ecdfbb
RW
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12194$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12195
81ecdfbb
RW
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12197$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12198 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12199 $as_echo_n "(cached) " >&6
d84dd0c5 12200else
81ecdfbb 12201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12202/* end confdefs.h. */
97bf5e38
MK
12203
12204#define _SYSCALL32
d30c5336
JK
12205/* Needed for new procfs interface on sparc-solaris. */
12206#define _STRUCTURED_PROC 1
d84dd0c5 12207#include <sys/procfs.h>
bec39cab
AC
12208int
12209main ()
12210{
97bf5e38 12211fpregset_t avar
bec39cab
AC
12212 ;
12213 return 0;
12214}
12215_ACEOF
81ecdfbb 12216if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12217 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 12218else
81ecdfbb 12219 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 12220
d84dd0c5 12221fi
81ecdfbb 12222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
12223fi
12224
97bf5e38 12225 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 12226
81ecdfbb 12227$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 12228
97bf5e38 12229 fi
81ecdfbb
RW
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
12231$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 12232
81ecdfbb
RW
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
12234$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
12235 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
12236 $as_echo_n "(cached) " >&6
c906108c 12237else
81ecdfbb 12238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12239/* end confdefs.h. */
c906108c 12240
97bf5e38 12241#define _SYSCALL32
d30c5336
JK
12242/* Needed for new procfs interface on sparc-solaris. */
12243#define _STRUCTURED_PROC 1
97bf5e38 12244#include <sys/procfs.h>
bec39cab
AC
12245int
12246main ()
12247{
97bf5e38 12248prgregset_t avar
bec39cab
AC
12249 ;
12250 return 0;
12251}
12252_ACEOF
81ecdfbb 12253if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12254 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 12255else
81ecdfbb 12256 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 12257
c906108c 12258fi
81ecdfbb 12259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12260fi
12261
97bf5e38 12262 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 12263
81ecdfbb 12264$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 12265
97bf5e38 12266 fi
81ecdfbb
RW
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
12268$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 12269
81ecdfbb
RW
12270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
12271$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
12272 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
12273 $as_echo_n "(cached) " >&6
d45fe813 12274else
81ecdfbb 12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12276/* end confdefs.h. */
97bf5e38
MK
12277
12278#define _SYSCALL32
d30c5336
JK
12279/* Needed for new procfs interface on sparc-solaris. */
12280#define _STRUCTURED_PROC 1
97bf5e38 12281#include <sys/procfs.h>
bec39cab
AC
12282int
12283main ()
12284{
97bf5e38 12285prfpregset_t avar
bec39cab
AC
12286 ;
12287 return 0;
12288}
12289_ACEOF
81ecdfbb 12290if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12291 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 12292else
81ecdfbb 12293 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 12294
d45fe813 12295fi
81ecdfbb 12296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12297fi
12298
97bf5e38 12299 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 12300
81ecdfbb 12301$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 12302
97bf5e38 12303 fi
81ecdfbb
RW
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
12305$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 12306
81ecdfbb
RW
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
12308$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
12309 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
12310 $as_echo_n "(cached) " >&6
d45fe813 12311else
81ecdfbb 12312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12313/* end confdefs.h. */
97bf5e38
MK
12314
12315#define _SYSCALL32
d30c5336
JK
12316/* Needed for new procfs interface on sparc-solaris. */
12317#define _STRUCTURED_PROC 1
97bf5e38 12318#include <sys/procfs.h>
bec39cab
AC
12319int
12320main ()
12321{
97bf5e38 12322prgregset32_t avar
bec39cab
AC
12323 ;
12324 return 0;
12325}
12326_ACEOF
81ecdfbb 12327if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12328 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 12329else
81ecdfbb 12330 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 12331
d45fe813 12332fi
81ecdfbb 12333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12334fi
12335
97bf5e38 12336 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 12337
81ecdfbb 12338$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 12339
97bf5e38 12340 fi
81ecdfbb
RW
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
12342$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 12343
81ecdfbb
RW
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
12345$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
12346 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
12347 $as_echo_n "(cached) " >&6
d45fe813 12348else
81ecdfbb 12349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12350/* end confdefs.h. */
97bf5e38 12351
d45fe813 12352#define _SYSCALL32
d30c5336
JK
12353/* Needed for new procfs interface on sparc-solaris. */
12354#define _STRUCTURED_PROC 1
97bf5e38 12355#include <sys/procfs.h>
bec39cab
AC
12356int
12357main ()
12358{
97bf5e38 12359lwpid_t avar
bec39cab
AC
12360 ;
12361 return 0;
12362}
12363_ACEOF
81ecdfbb 12364if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12365 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 12366else
81ecdfbb 12367 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 12368
d45fe813 12369fi
81ecdfbb 12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12371fi
12372
97bf5e38 12373 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12374
81ecdfbb 12375$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12376
97bf5e38 12377 fi
81ecdfbb
RW
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12379$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12380
81ecdfbb
RW
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12382$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12383 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12384 $as_echo_n "(cached) " >&6
c906108c 12385else
81ecdfbb 12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12387/* end confdefs.h. */
c906108c 12388
97bf5e38 12389#define _SYSCALL32
d30c5336
JK
12390/* Needed for new procfs interface on sparc-solaris. */
12391#define _STRUCTURED_PROC 1
97bf5e38 12392#include <sys/procfs.h>
bec39cab
AC
12393int
12394main ()
12395{
97bf5e38 12396psaddr_t avar
bec39cab
AC
12397 ;
12398 return 0;
12399}
12400_ACEOF
81ecdfbb 12401if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12402 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12403else
81ecdfbb 12404 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12405
c906108c 12406fi
81ecdfbb 12407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12408fi
12409
97bf5e38 12410 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12411
81ecdfbb 12412$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12413
97bf5e38 12414 fi
81ecdfbb
RW
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12416$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12417
81ecdfbb
RW
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12419$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12420 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12421 $as_echo_n "(cached) " >&6
c906108c 12422else
81ecdfbb 12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12424/* end confdefs.h. */
c906108c 12425
97bf5e38 12426#define _SYSCALL32
d30c5336
JK
12427/* Needed for new procfs interface on sparc-solaris. */
12428#define _STRUCTURED_PROC 1
97bf5e38 12429#include <sys/procfs.h>
bec39cab
AC
12430int
12431main ()
12432{
97bf5e38 12433prsysent_t avar
bec39cab
AC
12434 ;
12435 return 0;
12436}
12437_ACEOF
81ecdfbb 12438if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12439 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12440else
81ecdfbb 12441 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12442
c906108c 12443fi
81ecdfbb 12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12445fi
12446
97bf5e38 12447 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12448
81ecdfbb 12449$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12450
97bf5e38 12451 fi
81ecdfbb
RW
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12453$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12454
81ecdfbb
RW
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12456$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12457 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12458 $as_echo_n "(cached) " >&6
c906108c 12459else
81ecdfbb 12460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12461/* end confdefs.h. */
c906108c 12462
97bf5e38 12463#define _SYSCALL32
d30c5336
JK
12464/* Needed for new procfs interface on sparc-solaris. */
12465#define _STRUCTURED_PROC 1
97bf5e38 12466#include <sys/procfs.h>
bec39cab
AC
12467int
12468main ()
12469{
97bf5e38 12470pr_sigset_t avar
bec39cab
AC
12471 ;
12472 return 0;
12473}
12474_ACEOF
81ecdfbb 12475if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12476 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12477else
81ecdfbb 12478 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12479
c906108c 12480fi
81ecdfbb 12481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12482fi
12483
97bf5e38 12484 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12485
81ecdfbb 12486$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12487
97bf5e38 12488 fi
81ecdfbb
RW
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12490$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12491
81ecdfbb
RW
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12493$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12494 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12495 $as_echo_n "(cached) " >&6
c906108c 12496else
81ecdfbb 12497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12498/* end confdefs.h. */
c906108c 12499
97bf5e38 12500#define _SYSCALL32
d30c5336
JK
12501/* Needed for new procfs interface on sparc-solaris. */
12502#define _STRUCTURED_PROC 1
97bf5e38 12503#include <sys/procfs.h>
bec39cab
AC
12504int
12505main ()
12506{
97bf5e38 12507pr_sigaction64_t avar
bec39cab
AC
12508 ;
12509 return 0;
12510}
12511_ACEOF
81ecdfbb 12512if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12513 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12514else
81ecdfbb 12515 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12516
c906108c 12517fi
81ecdfbb 12518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12519fi
12520
97bf5e38 12521 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12522
81ecdfbb 12523$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12524
97bf5e38 12525 fi
81ecdfbb
RW
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12527$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12528
81ecdfbb
RW
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12530$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12531 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12532 $as_echo_n "(cached) " >&6
97bf5e38 12533else
81ecdfbb 12534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12535/* end confdefs.h. */
97bf5e38
MK
12536
12537#define _SYSCALL32
d30c5336
JK
12538/* Needed for new procfs interface on sparc-solaris. */
12539#define _STRUCTURED_PROC 1
97bf5e38 12540#include <sys/procfs.h>
bec39cab
AC
12541int
12542main ()
12543{
97bf5e38 12544pr_siginfo64_t avar
bec39cab
AC
12545 ;
12546 return 0;
12547}
12548_ACEOF
81ecdfbb 12549if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12550 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12551else
81ecdfbb 12552 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12553
97bf5e38 12554fi
81ecdfbb 12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12556fi
c906108c 12557
97bf5e38 12558 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12559
81ecdfbb 12560$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12561
97bf5e38 12562 fi
81ecdfbb
RW
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12564$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12565
12566
97bf5e38
MK
12567
12568
12569
97bf5e38 12570 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12572$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12573 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12574 $as_echo_n "(cached) " >&6
c906108c 12575else
81ecdfbb 12576 if test "$cross_compiling" = yes; then :
97bf5e38 12577 gdb_cv_prfpregset_t_broken=yes
c906108c 12578else
81ecdfbb 12579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12580/* end confdefs.h. */
97bf5e38
MK
12581#include <sys/procfs.h>
12582 int main ()
12583 {
12584 if (sizeof (prfpregset_t) == sizeof (void *))
12585 return 1;
12586 return 0;
12587 }
bec39cab 12588_ACEOF
81ecdfbb 12589if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12590 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12591else
12592 gdb_cv_prfpregset_t_broken=yes
c906108c 12593fi
81ecdfbb
RW
12594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12595 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12596fi
81ecdfbb 12597
c906108c
SS
12598fi
12599
81ecdfbb
RW
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12601$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12602 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12603
81ecdfbb 12604$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12605
97bf5e38
MK
12606 fi
12607 fi
c906108c 12608fi
c906108c 12609
bc8bcb4b 12610# Check if the compiler supports the `long long' type.
c906108c 12611
81ecdfbb
RW
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12613$as_echo_n "checking for long long support in compiler... " >&6; }
12614if test "${gdb_cv_c_long_long+set}" = set; then :
12615 $as_echo_n "(cached) " >&6
97bf5e38 12616else
81ecdfbb 12617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12618/* end confdefs.h. */
bc8bcb4b 12619extern long long foo;
bec39cab
AC
12620int
12621main ()
12622{
bc8bcb4b 12623switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12624 ;
12625 return 0;
12626}
12627_ACEOF
81ecdfbb 12628if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12629 gdb_cv_c_long_long=yes
12630else
81ecdfbb 12631 gdb_cv_c_long_long=no
97bf5e38 12632fi
81ecdfbb 12633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12634fi
81ecdfbb
RW
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12636$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12637if test $gdb_cv_c_long_long != yes; then
12638 # libdecnumber requires long long.
12639 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12640fi
12641
bc8bcb4b 12642# Check if the compiler and runtime support printing long longs.
97bf5e38 12643
81ecdfbb
RW
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12645$as_echo_n "checking for long long support in printf... " >&6; }
12646if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12647 $as_echo_n "(cached) " >&6
97bf5e38 12648else
81ecdfbb 12649 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12650 gdb_cv_printf_has_long_long=no
12651else
81ecdfbb 12652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12653/* end confdefs.h. */
bc8bcb4b
MK
12654$ac_includes_default
12655int
12656main ()
12657{
12658char buf[32];
97bf5e38
MK
12659 long long l = 0;
12660 l = (l << 16) + 0x0123;
12661 l = (l << 16) + 0x4567;
12662 l = (l << 16) + 0x89ab;
12663 l = (l << 16) + 0xcdef;
12664 sprintf (buf, "0x%016llx", l);
12665 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12666 ;
12667 return 0;
c906108c 12668}
bec39cab 12669_ACEOF
81ecdfbb 12670if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12671 gdb_cv_printf_has_long_long=yes
12672else
81ecdfbb 12673 gdb_cv_printf_has_long_long=no
97bf5e38 12674fi
81ecdfbb
RW
12675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12676 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12677fi
81ecdfbb 12678
97bf5e38 12679fi
81ecdfbb
RW
12680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12681$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12682if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12683
81ecdfbb 12684$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12685
12686fi
97bf5e38 12687
1a619819
LM
12688# Check if the compiler and runtime support printing decfloats.
12689
81ecdfbb
RW
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12691$as_echo_n "checking for decfloat support in printf... " >&6; }
12692if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12693 $as_echo_n "(cached) " >&6
1a619819 12694else
81ecdfbb 12695 if test "$cross_compiling" = yes; then :
1a619819
LM
12696 gdb_cv_printf_has_decfloat=no
12697else
81ecdfbb 12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12699/* end confdefs.h. */
12700$ac_includes_default
12701int
12702main ()
12703{
12704char buf[64];
12705 _Decimal32 d32 = 1.2345df;
12706 _Decimal64 d64 = 1.2345dd;
12707 _Decimal128 d128 = 1.2345dl;
12708 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12709 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12710 ;
12711 return 0;
12712}
12713_ACEOF
81ecdfbb 12714if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12715 gdb_cv_printf_has_decfloat=yes
12716else
81ecdfbb 12717 gdb_cv_printf_has_decfloat=no
1a619819 12718fi
81ecdfbb
RW
12719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12720 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12721fi
81ecdfbb 12722
1a619819 12723fi
81ecdfbb
RW
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12725$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12726if test $gdb_cv_printf_has_decfloat = yes; then
12727
81ecdfbb 12728$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12729
12730fi
12731
bc8bcb4b
MK
12732# Check if the compiler supports the `long double' type. We can't use
12733# AC_C_LONG_DOUBLE because that one does additional checks on the
12734# constants defined in <float.h> that fail on some systems,
12735# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12736
81ecdfbb
RW
12737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12738$as_echo_n "checking for long double support in compiler... " >&6; }
12739if test "${gdb_cv_c_long_double+set}" = set; then :
12740 $as_echo_n "(cached) " >&6
97bf5e38 12741else
81ecdfbb 12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12743/* end confdefs.h. */
97bf5e38 12744long double foo;
bec39cab 12745_ACEOF
81ecdfbb 12746if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12747 gdb_cv_c_long_double=yes
97bf5e38 12748else
81ecdfbb 12749 gdb_cv_c_long_double=no
97bf5e38 12750fi
81ecdfbb 12751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12752fi
81ecdfbb
RW
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12754$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12755if test $gdb_cv_c_long_double = yes; then
c906108c 12756
81ecdfbb 12757$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12758
12759fi
12760
bc8bcb4b 12761# Check if the compiler and runtime support printing long doubles.
97bf5e38 12762
81ecdfbb
RW
12763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12764$as_echo_n "checking for long double support in printf... " >&6; }
12765if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12766 $as_echo_n "(cached) " >&6
97bf5e38 12767else
81ecdfbb 12768 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12769 gdb_cv_printf_has_long_double=no
12770else
81ecdfbb 12771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12772/* end confdefs.h. */
bc8bcb4b
MK
12773$ac_includes_default
12774int
12775main ()
12776{
12777char buf[16];
97bf5e38
MK
12778 long double f = 3.141592653;
12779 sprintf (buf, "%Lg", f);
12780 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12781 ;
12782 return 0;
97bf5e38 12783}
bec39cab 12784_ACEOF
81ecdfbb 12785if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12786 gdb_cv_printf_has_long_double=yes
c906108c 12787else
81ecdfbb 12788 gdb_cv_printf_has_long_double=no
c906108c 12789fi
81ecdfbb
RW
12790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12791 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12792fi
81ecdfbb 12793
c906108c 12794fi
81ecdfbb
RW
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12796$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12797if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12798
81ecdfbb 12799$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12800
12801fi
97bf5e38 12802
bc8bcb4b 12803# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12804
81ecdfbb
RW
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12806$as_echo_n "checking for long double support in scanf... " >&6; }
12807if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12808 $as_echo_n "(cached) " >&6
97bf5e38 12809else
81ecdfbb 12810 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12811 gdb_cv_scanf_has_long_double=no
12812else
81ecdfbb 12813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12814/* end confdefs.h. */
bc8bcb4b
MK
12815#include <stdio.h>
12816int
12817main ()
12818{
12819char *buf = "3.141592653";
97bf5e38
MK
12820 long double f = 0;
12821 sscanf (buf, "%Lg", &f);
12822 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12823 ;
12824 return 0;
97bf5e38 12825}
bec39cab 12826_ACEOF
81ecdfbb 12827if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12828 gdb_cv_scanf_has_long_double=yes
12829else
81ecdfbb 12830 gdb_cv_scanf_has_long_double=no
97bf5e38 12831fi
81ecdfbb
RW
12832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12834fi
81ecdfbb 12835
c906108c 12836fi
81ecdfbb
RW
12837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12838$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12839if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12840
81ecdfbb 12841$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12842
12843fi
c906108c 12844
438013df
AO
12845case ${host_os} in
12846aix*)
81ecdfbb
RW
12847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12848$as_echo_n "checking for -bbigtoc option... " >&6; }
12849if test "${gdb_cv_bigtoc+set}" = set; then :
12850 $as_echo_n "(cached) " >&6
438013df 12851else
bec39cab 12852
438013df
AO
12853 SAVE_LDFLAGS=$LDFLAGS
12854
12855 case $GCC in
12856 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12857 *) gdb_cv_bigtoc=-bbigtoc ;;
12858 esac
12859
12860 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12862/* end confdefs.h. */
438013df 12863
bec39cab
AC
12864int
12865main ()
12866{
438013df 12867int i;
bec39cab
AC
12868 ;
12869 return 0;
12870}
12871_ACEOF
81ecdfbb 12872if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12873
81ecdfbb
RW
12874else
12875 gdb_cv_bigtoc=
438013df 12876fi
81ecdfbb
RW
12877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12879 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12880
bec39cab 12881fi
81ecdfbb
RW
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12883$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12884 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12885 ;;
12886esac
12887
38f6b338 12888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12889$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12890dynamic_list=false
12891if test "${gdb_native}" = yes; then
12892 # The dynamically loaded libthread_db needs access to symbols in the gdb
12893 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12894 # may not be supported there.
12895 old_LDFLAGS="$LDFLAGS"
12896 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12897 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12898 LDFLAGS="$LDFLAGS $RDYNAMIC"
12899 if test "${have_libpython}" = no; then
12900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12901/* end confdefs.h. */
12902
12903int
12904main ()
12905{
12906
12907 ;
12908 return 0;
12909}
12910_ACEOF
12911if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12912 dynamic_list=true
12913fi
12914rm -f core conftest.err conftest.$ac_objext \
12915 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12916 else
12917 # Workaround http://bugs.python.org/issue4434 where static
12918 # libpythonX.Y.a would get its symbols required for
12919 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12920 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12921 old_CFLAGS="$CFLAGS"
12922 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12923 old_LIBS="$LIBS"
12924 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12925 if test "$cross_compiling" = yes; then :
3bebe2f2 12926 true
f6528abd 12927else
3bebe2f2
JK
12928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12929/* end confdefs.h. */
12930#include "${have_libpython}/Python.h"
12931int
12932main ()
12933{
12934int err;
38f6b338
JK
12935 Py_Initialize ();
12936 err = PyRun_SimpleString ("import itertools\n");
12937 Py_Finalize ();
12938 return err == 0 ? 0 : 1;
3bebe2f2
JK
12939 ;
12940 return 0;
12941}
12942_ACEOF
12943if ac_fn_c_try_run "$LINENO"; then :
12944 dynamic_list=true
12945fi
12946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12947 conftest.$ac_objext conftest.beam conftest.$ac_ext
12948fi
12949
8c1fb155 12950 LIBS="$old_LIBS"
38f6b338
JK
12951 CFLAGS="$old_CFLAGS"
12952 fi
12953 LDFLAGS="$old_LDFLAGS"
12954fi
12955if $dynamic_list; then
12956 found="-Wl,--dynamic-list"
12957 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12958else
38f6b338
JK
12959 found="-rdynamic"
12960 RDYNAMIC="-rdynamic"
f6528abd 12961fi
f6528abd 12962
38f6b338 12963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12964$as_echo "$found" >&6; }
0407b3f1 12965
f6528abd 12966
0407b3f1 12967if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12968 case ${host_os} in
c906108c 12969 solaris*)
d92419e5
JB
12970 # See if thread_db library is around for Solaris thread debugging.
12971 # Note that we must explicitly test for version 1 of the library
12972 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12973 # the same API.
81ecdfbb
RW
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12975$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12976 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12978$as_echo "yes" >&6; }
60ca704f 12979
81ecdfbb 12980$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12981
3483b318 12982 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12983 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12985$as_echo_n "checking for dlopen in -ldl... " >&6; }
12986if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12987 $as_echo_n "(cached) " >&6
c906108c 12988else
bec39cab 12989 ac_check_lib_save_LIBS=$LIBS
c906108c 12990LIBS="-ldl $LIBS"
81ecdfbb 12991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12992/* end confdefs.h. */
12993
81ecdfbb
RW
12994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
bec39cab
AC
12997#ifdef __cplusplus
12998extern "C"
12999#endif
bec39cab
AC
13000char dlopen ();
13001int
13002main ()
13003{
81ecdfbb 13004return dlopen ();
bec39cab
AC
13005 ;
13006 return 0;
13007}
13008_ACEOF
81ecdfbb 13009if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13010 ac_cv_lib_dl_dlopen=yes
13011else
81ecdfbb 13012 ac_cv_lib_dl_dlopen=no
bec39cab 13013fi
81ecdfbb
RW
13014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13016LIBS=$ac_check_lib_save_LIBS
13017fi
81ecdfbb
RW
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13019$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13020if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13021 cat >>confdefs.h <<_ACEOF
13022#define HAVE_LIBDL 1
13023_ACEOF
c906108c
SS
13024
13025 LIBS="-ldl $LIBS"
13026
c906108c
SS
13027fi
13028
f6528abd 13029 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13030 # Sun randomly tweaked the prototypes in <proc_service.h>
13031 # at one point.
81ecdfbb
RW
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13033$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13034 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13035 $as_echo_n "(cached) " >&6
c906108c 13036else
bec39cab 13037
81ecdfbb 13038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13039/* end confdefs.h. */
c906108c
SS
13040
13041 #include <proc_service.h>
13042 ps_err_e ps_pdwrite
13043 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13044
bec39cab
AC
13045int
13046main ()
13047{
13048
13049 ;
13050 return 0;
13051}
13052_ACEOF
81ecdfbb 13053if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13054 gdb_cv_proc_service_is_old=no
13055else
81ecdfbb 13056 gdb_cv_proc_service_is_old=yes
c906108c 13057fi
81ecdfbb 13058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13059
c906108c
SS
13060fi
13061
81ecdfbb
RW
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13063$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13064 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13065
81ecdfbb 13066$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13067
13068 fi
13069 else
81ecdfbb
RW
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071$as_echo "no" >&6; }
c906108c
SS
13072 fi
13073 ;;
d92419e5 13074 aix*)
81ecdfbb
RW
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13076$as_echo_n "checking for AiX thread debugging library... " >&6; }
13077 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13078 $as_echo_n "(cached) " >&6
bec39cab 13079else
81ecdfbb 13080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13081/* end confdefs.h. */
d92419e5 13082#include <sys/pthdebug.h>
bec39cab
AC
13083int
13084main ()
13085{
d92419e5
JB
13086#ifndef PTHDB_VERSION_3
13087 #error
13088 #endif
bec39cab
AC
13089 ;
13090 return 0;
13091}
13092_ACEOF
81ecdfbb 13093if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13094 gdb_cv_have_aix_thread_debug=yes
13095else
81ecdfbb 13096 gdb_cv_have_aix_thread_debug=no
d92419e5 13097fi
81ecdfbb 13098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13099fi
13100
81ecdfbb
RW
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13102$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13103 if test $gdb_cv_have_aix_thread_debug = yes; then
13104 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13105 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13106 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13107
13108 # Older versions of AIX do not provide the declaration for
13109 # the getthrds function (it appears that it was introduced
13110 # with AIX 6.x).
13111 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13112"
13113if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13114 ac_have_decl=1
13115else
13116 ac_have_decl=0
13117fi
13118
13119cat >>confdefs.h <<_ACEOF
13120#define HAVE_DECL_GETTHRDS $ac_have_decl
13121_ACEOF
13122
d92419e5
JB
13123 fi
13124 ;;
c906108c 13125 esac
bec39cab 13126
c906108c
SS
13127fi
13128
3f47be5c 13129if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13131$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13132if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13133 $as_echo_n "(cached) " >&6
bec39cab 13134else
81ecdfbb 13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13136/* end confdefs.h. */
3f47be5c 13137#include <thread_db.h>
bec39cab
AC
13138int
13139main ()
13140{
3f47be5c 13141int i = TD_NOTALLOC;
bec39cab
AC
13142 ;
13143 return 0;
13144}
13145_ACEOF
81ecdfbb 13146if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13147 gdb_cv_thread_db_h_has_td_notalloc=yes
13148else
81ecdfbb 13149 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13150
3f47be5c 13151fi
81ecdfbb 13152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13153
bec39cab 13154fi
81ecdfbb
RW
13155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13156$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13158$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13159if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13160 $as_echo_n "(cached) " >&6
59f80f10 13161else
81ecdfbb 13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13163/* end confdefs.h. */
13164#include <thread_db.h>
13165int
13166main ()
13167{
13168int i = TD_VERSION;
13169 ;
13170 return 0;
13171}
13172_ACEOF
81ecdfbb 13173if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13174 gdb_cv_thread_db_h_has_td_version=yes
13175else
81ecdfbb 13176 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13177
13178fi
81ecdfbb 13179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13180
13181fi
81ecdfbb
RW
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13183$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13185$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13186if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13187 $as_echo_n "(cached) " >&6
59f80f10 13188else
81ecdfbb 13189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13190/* end confdefs.h. */
13191#include <thread_db.h>
13192int
13193main ()
13194{
13195int i = TD_NOTLS;
13196 ;
13197 return 0;
13198}
13199_ACEOF
81ecdfbb 13200if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13201 gdb_cv_thread_db_h_has_td_notls=yes
13202else
81ecdfbb 13203 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13204
13205fi
81ecdfbb 13206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13207
13208fi
81ecdfbb
RW
13209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13210$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13211fi
13212if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 13213
81ecdfbb 13214$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 13215
59f80f10
DJ
13216fi
13217if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
13218
81ecdfbb 13219$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
13220
13221fi
13222if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
13223
81ecdfbb 13224$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 13225
3f47be5c
EZ
13226fi
13227
b757528f 13228if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
13230$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
13231if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
13232 $as_echo_n "(cached) " >&6
bec39cab 13233else
81ecdfbb 13234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13235/* end confdefs.h. */
b757528f 13236#include <sys/syscall.h>
bec39cab
AC
13237int
13238main ()
13239{
b757528f 13240int i = __NR_tkill;
bec39cab
AC
13241 ;
13242 return 0;
13243}
13244_ACEOF
81ecdfbb 13245if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
13246 gdb_cv_sys_syscall_h_has_tkill=yes
13247else
81ecdfbb 13248 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 13249
b757528f 13250fi
81ecdfbb 13251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 13252
bec39cab 13253fi
81ecdfbb
RW
13254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
13255$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 13256fi
99c1d451
TT
13257if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
13258 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
13259if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 13260
81ecdfbb 13261$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 13262
99c1d451
TT
13263
13264fi
13265
b757528f
JJ
13266fi
13267
81ecdfbb
RW
13268ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13269"
13270if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
13271 ac_have_decl=1
10568435 13272else
81ecdfbb 13273 ac_have_decl=0
10568435 13274fi
10568435
JK
13275
13276cat >>confdefs.h <<_ACEOF
81ecdfbb 13277#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
13278_ACEOF
13279
13280
81ecdfbb
RW
13281if test "$cross_compiling" = yes; then :
13282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13283/* end confdefs.h. */
13284#include <sys/personality.h>
13285int
13286main ()
13287{
13288
13289# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13290# define ADDR_NO_RANDOMIZE 0x0040000
13291# endif
13292 /* Test the flag could be set and stays set. */
13293 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13294 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13295 return 1
13296 ;
13297 return 0;
13298}
13299_ACEOF
81ecdfbb 13300if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
13301 have_personality=true
13302else
81ecdfbb 13303 have_personality=false
10568435 13304fi
81ecdfbb
RW
13305rm -f core conftest.err conftest.$ac_objext \
13306 conftest$ac_exeext conftest.$ac_ext
10568435 13307else
81ecdfbb 13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13309/* end confdefs.h. */
13310#include <sys/personality.h>
13311int
13312main ()
13313{
13314
13315# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13316# define ADDR_NO_RANDOMIZE 0x0040000
13317# endif
13318 /* Test the flag could be set and stays set. */
13319 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13320 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13321 return 1
13322 ;
13323 return 0;
13324}
13325_ACEOF
81ecdfbb 13326if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
13327 have_personality=true
13328else
81ecdfbb 13329 have_personality=false
10568435 13330fi
81ecdfbb
RW
13331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13332 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 13333fi
81ecdfbb 13334
10568435
JK
13335if $have_personality
13336then
13337
81ecdfbb 13338$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
13339
13340fi
13341
e655c1a2
PA
13342case $host_os in
13343 go32* | *djgpp*)
13344 gdbinit=gdb.ini
13345 ;;
13346 *)
13347 gdbinit=.gdbinit
13348 ;;
13349esac
13350
13351cat >>confdefs.h <<_ACEOF
13352#define GDBINIT "$gdbinit"
13353_ACEOF
13354
13355
fb40c209 13356
f83d8a90
DE
13357# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
13358# except that the argument to --with-sysroot is optional.
13359# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
13360if test "x$with_sysroot" = xyes; then
13361 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
13362fi
bec39cab 13363
81ecdfbb
RW
13364# Check whether --with-sysroot was given.
13365if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
13366 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
13367else
13368 TARGET_SYSTEM_ROOT=
13369fi
030292b7 13370
030292b7 13371
f83d8a90
DE
13372 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13373 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13374 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
13375 ac_define_dir=`eval echo $ac_define_dir`
030292b7 13376
f83d8a90
DE
13377cat >>confdefs.h <<_ACEOF
13378#define TARGET_SYSTEM_ROOT "$ac_define_dir"
13379_ACEOF
bec39cab 13380
030292b7 13381
b14b1491 13382
f83d8a90
DE
13383
13384 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13385 if test "x$prefix" = xNONE; then
13386 test_prefix=/usr/local
13387 else
13388 test_prefix=$prefix
13389 fi
13390 else
13391 test_prefix=$exec_prefix
13392 fi
13393 value=0
13394 case ${ac_define_dir} in
13395 "${test_prefix}"|"${test_prefix}/"*|\
13396 '${exec_prefix}'|'${exec_prefix}/'*)
13397 value=1
13398 ;;
13399 esac
13400
13401cat >>confdefs.h <<_ACEOF
13402#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
13403_ACEOF
030292b7
DJ
13404
13405
13406
16e7150e 13407
16e7150e 13408
81ecdfbb
RW
13409# Check whether --with-system-gdbinit was given.
13410if test "${with_system_gdbinit+set}" = set; then :
13411 withval=$with_system_gdbinit;
b14b1491
TT
13412 SYSTEM_GDBINIT=$withval
13413else
13414 SYSTEM_GDBINIT=
81ecdfbb
RW
13415fi
13416
16e7150e
JG
13417
13418 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13419 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13420 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13421 ac_define_dir=`eval echo $ac_define_dir`
13422
13423cat >>confdefs.h <<_ACEOF
13424#define SYSTEM_GDBINIT "$ac_define_dir"
13425_ACEOF
13426
13427
13428
0c4a4063 13429
b14b1491
TT
13430 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13431 if test "x$prefix" = xNONE; then
13432 test_prefix=/usr/local
13433 else
13434 test_prefix=$prefix
13435 fi
13436 else
13437 test_prefix=$exec_prefix
13438 fi
13439 value=0
13440 case ${ac_define_dir} in
13441 "${test_prefix}"|"${test_prefix}/"*|\
13442 '${exec_prefix}'|'${exec_prefix}/'*)
13443 value=1
13444 ;;
13445 esac
16e7150e 13446
b14b1491
TT
13447cat >>confdefs.h <<_ACEOF
13448#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13449_ACEOF
13450
b14b1491 13451
16e7150e 13452
0c4a4063 13453
81ecdfbb
RW
13454# Check whether --enable-werror was given.
13455if test "${enable_werror+set}" = set; then :
13456 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13457 yes | y) ERROR_ON_WARNING="yes" ;;
13458 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13459 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13460 esac
81ecdfbb
RW
13461fi
13462
094a342e 13463
3bc3d82a
PA
13464# Enable -Werror by default when using gcc in C mode. Leave it off
13465# for C++ until we're warning clean. Turn it off for releases.
13466if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
13467 && test x"$enable_build_with_cxx" != x"yes" \
13468 && $development; then
094a342e
MK
13469 ERROR_ON_WARNING=yes
13470fi
13471
13472WERROR_CFLAGS=""
13473if test "${ERROR_ON_WARNING}" = yes ; then
13474 WERROR_CFLAGS="-Werror"
13475fi
13476
3bc3d82a 13477# These options work in either C or C++ modes.
aac331e4 13478build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 13479-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
13480-Wno-switch -Wno-char-subscripts \
13481-Wempty-body"
a3b362c4 13482
3bc3d82a
PA
13483# Now add in C and C++ specific options, depending on mode.
13484if test "$enable_build_with_cxx" = "yes"; then
13485 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
13486-Wno-narrowing"
13487else
aac331e4
PA
13488 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
13489-Wdeclaration-after-statement -Wmissing-parameter-type \
13490-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
13491fi
13492
3526781e
DJ
13493# Enable -Wno-format by default when using gcc on mingw since many
13494# GCC versions complain about %I64.
13495case "${host}" in
13496 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 13497 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
13498esac
13499
81ecdfbb
RW
13500# Check whether --enable-build-warnings was given.
13501if test "${enable_build_warnings+set}" = set; then :
13502 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13503 yes) ;;
13504 no) build_warnings="-w";;
13505 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13506 build_warnings="${build_warnings} ${t}";;
13507 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13508 build_warnings="${t} ${build_warnings}";;
13509 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13510esac
d4f3574e 13511if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13512 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13513fi
81ecdfbb
RW
13514fi
13515# Check whether --enable-gdb-build-warnings was given.
13516if test "${enable_gdb_build_warnings+set}" = set; then :
13517 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13518 yes) ;;
13519 no) build_warnings="-w";;
13520 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13521 build_warnings="${build_warnings} ${t}";;
13522 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13523 build_warnings="${t} ${build_warnings}";;
13524 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13525esac
13526if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13527 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13528fi
81ecdfbb 13529fi
3bc3d82a
PA
13530
13531# The set of warnings supported by a C++ compiler is not the same as
13532# of the C compiler.
13533if test "$enable_build_with_cxx" = "yes"; then
13534 ac_ext=cpp
13535ac_cpp='$CXXCPP $CPPFLAGS'
13536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13539
13540fi
13541
81ecdfbb 13542WARN_CFLAGS=""
c906108c
SS
13543if test "x${build_warnings}" != x -a "x$GCC" = xyes
13544then
81ecdfbb
RW
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13546$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13547 # Separate out the -Werror flag as some files just cannot be
13548 # compiled with it enabled.
13549 for w in ${build_warnings}; do
13550 case $w in
13551 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
13552 *)
13553 # Check whether GCC accepts it.
4536bbc6
AC
13554 saved_CFLAGS="$CFLAGS"
13555 CFLAGS="$CFLAGS $w"
3bc3d82a
PA
13556 saved_CXXFLAGS="$CXXFLAGS"
13557 CXXFLAGS="$CXXFLAGS $w"
13558
13559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13560/* end confdefs.h. */
4536bbc6 13561
bec39cab
AC
13562int
13563main ()
13564{
4536bbc6 13565
bec39cab
AC
13566 ;
13567 return 0;
13568}
13569_ACEOF
3bc3d82a 13570if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 13571 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13572fi
81ecdfbb 13573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13574 CFLAGS="$saved_CFLAGS"
3bc3d82a 13575 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
13576 esac
13577 done
81ecdfbb
RW
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13579$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13580fi
13581
13582
104c1213 13583
3bc3d82a
PA
13584if test "$enable_build_with_cxx" = "yes"; then
13585 ac_ext=c
13586ac_cpp='$CPP $CPPFLAGS'
13587ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13588ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13589ac_compiler_gnu=$ac_cv_c_compiler_gnu
13590
13591fi
13592
7a292a7a 13593# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13595$as_echo_n "checking for cygwin... " >&6; }
13596if test "${gdb_cv_os_cygwin+set}" = set; then :
13597 $as_echo_n "(cached) " >&6
bec39cab 13598else
81ecdfbb 13599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13600/* end confdefs.h. */
7a292a7a
SS
13601
13602#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13603lose
13604#endif
bec39cab 13605_ACEOF
7a292a7a 13606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 13607 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
13608 gdb_cv_os_cygwin=yes
13609else
7a292a7a
SS
13610 gdb_cv_os_cygwin=no
13611fi
13612rm -f conftest*
13613
13614fi
81ecdfbb
RW
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13616$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13617
aff38e61 13618
3eb25fda 13619SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13620case ${host} in
95cbc983
AC
13621 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13622 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13623 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13624esac
13625
13626
cd0fc7c3
SS
13627# libreadline needs libuser32.a in a cygwin environment
13628WIN32LIBS=
13629if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13630 WIN32LIBS="-luser32"
13631 case "${target}" in
13632 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13633 ;;
13634 esac
cd0fc7c3 13635fi
c906108c 13636
b4505029
MM
13637# The ser-tcp.c module requires sockets.
13638case ${host} in
13639 *mingw32*)
13640
81ecdfbb 13641$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13642
13643 WIN32LIBS="$WIN32LIBS -lws2_32"
13644 ;;
13645esac
13646
7a292a7a 13647
31d99776 13648# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13649
13650 OLD_CFLAGS=$CFLAGS
13651 OLD_LDFLAGS=$LDFLAGS
13652 OLD_LIBS=$LIBS
13653 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13654 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13655 # always want our bfd.
13656 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13657 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13658 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
def63ff0
TT
13659 LIBS="-lbfd -liberty $intl $LIBS"
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13661$as_echo_n "checking for ELF support in BFD... " >&6; }
13662if test "${gdb_cv_var_elf+set}" = set; then :
13663 $as_echo_n "(cached) " >&6
31d99776 13664else
81ecdfbb 13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13666/* end confdefs.h. */
13667#include <stdlib.h>
def63ff0
TT
13668 #include "bfd.h"
13669 #include "elf-bfd.h"
31d99776
DJ
13670
13671int
13672main ()
13673{
def63ff0 13674return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13675 ;
13676 return 0;
13677}
13678_ACEOF
81ecdfbb 13679if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13680 gdb_cv_var_elf=yes
13681else
81ecdfbb 13682 gdb_cv_var_elf=no
31d99776 13683fi
81ecdfbb
RW
13684rm -f core conftest.err conftest.$ac_objext \
13685 conftest$ac_exeext conftest.$ac_ext
31d99776 13686fi
81ecdfbb
RW
13687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13688$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13689 CFLAGS=$OLD_CFLAGS
13690 LDFLAGS=$OLD_LDFLAGS
13691 LIBS=$OLD_LIBS
31d99776 13692if test $gdb_cv_var_elf = yes; then
d4777acb 13693 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 13694
81ecdfbb 13695$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13696
075ff26d
JK
13697 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13698 if test "$plugins" = "yes"; then
a48b32c0
L
13699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13700$as_echo_n "checking for library containing dlopen... " >&6; }
13701if test "${ac_cv_search_dlopen+set}" = set; then :
13702 $as_echo_n "(cached) " >&6
13703else
13704 ac_func_search_save_LIBS=$LIBS
13705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13706/* end confdefs.h. */
13707
13708/* Override any GCC internal prototype to avoid an error.
13709 Use char because int might match the return type of a GCC
13710 builtin and then its argument prototype would still apply. */
13711#ifdef __cplusplus
13712extern "C"
13713#endif
13714char dlopen ();
13715int
13716main ()
13717{
13718return dlopen ();
13719 ;
13720 return 0;
13721}
13722_ACEOF
13723for ac_lib in '' dl; do
13724 if test -z "$ac_lib"; then
13725 ac_res="none required"
13726 else
13727 ac_res=-l$ac_lib
13728 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13729 fi
13730 if ac_fn_c_try_link "$LINENO"; then :
13731 ac_cv_search_dlopen=$ac_res
13732fi
13733rm -f core conftest.err conftest.$ac_objext \
13734 conftest$ac_exeext
13735 if test "${ac_cv_search_dlopen+set}" = set; then :
13736 break
13737fi
13738done
13739if test "${ac_cv_search_dlopen+set}" = set; then :
13740
13741else
13742 ac_cv_search_dlopen=no
13743fi
13744rm conftest.$ac_ext
13745LIBS=$ac_func_search_save_LIBS
13746fi
13747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13748$as_echo "$ac_cv_search_dlopen" >&6; }
13749ac_res=$ac_cv_search_dlopen
13750if test "$ac_res" != no; then :
13751 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13752
13753fi
13754
075ff26d 13755 fi
31d99776 13756fi
31d99776 13757
4f05add4
TT
13758# Add macho support to GDB, but only if BFD includes it.
13759
13760 OLD_CFLAGS=$CFLAGS
13761 OLD_LDFLAGS=$LDFLAGS
13762 OLD_LIBS=$LIBS
13763 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13764 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13765 # always want our bfd.
13766 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13767 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13768 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
4f05add4
TT
13769 LIBS="-lbfd -liberty $intl $LIBS"
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13771$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13772if test "${gdb_cv_var_macho+set}" = set; then :
13773 $as_echo_n "(cached) " >&6
13774else
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777#include <stdlib.h>
13778 #include "bfd.h"
13779 #include "mach-o.h"
13780
13781int
13782main ()
13783{
13784return bfd_mach_o_lookup_command (NULL, 0, NULL);
13785 ;
13786 return 0;
13787}
13788_ACEOF
13789if ac_fn_c_try_link "$LINENO"; then :
13790 gdb_cv_var_macho=yes
13791else
13792 gdb_cv_var_macho=no
13793fi
13794rm -f core conftest.err conftest.$ac_objext \
13795 conftest$ac_exeext conftest.$ac_ext
13796fi
13797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13798$as_echo "$gdb_cv_var_macho" >&6; }
13799 CFLAGS=$OLD_CFLAGS
13800 LDFLAGS=$OLD_LDFLAGS
13801 LIBS=$OLD_LIBS
13802if test $gdb_cv_var_macho = yes; then
13803 CONFIG_OBS="$CONFIG_OBS machoread.o"
13804fi
13805
b2259038
TT
13806# Add SOM support to GDB, but only if BFD includes it.
13807
13808 OLD_CFLAGS=$CFLAGS
13809 OLD_LDFLAGS=$LDFLAGS
13810 OLD_LIBS=$LIBS
13811 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13812 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13813 # always want our bfd.
13814 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13815 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13816 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
b2259038
TT
13817 LIBS="-lbfd -liberty $intl $LIBS"
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13819$as_echo_n "checking for SOM support in BFD... " >&6; }
13820if test "${gdb_cv_var_som+set}" = set; then :
13821 $as_echo_n "(cached) " >&6
13822else
13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824/* end confdefs.h. */
13825#include <stdlib.h>
13826 #include "bfd.h"
13827 #include "som.h"
13828
13829int
13830main ()
13831{
13832return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13833 ;
13834 return 0;
13835}
13836_ACEOF
13837if ac_fn_c_try_link "$LINENO"; then :
13838 gdb_cv_var_som=yes
13839else
13840 gdb_cv_var_som=no
13841fi
13842rm -f core conftest.err conftest.$ac_objext \
13843 conftest$ac_exeext conftest.$ac_ext
13844fi
13845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13846$as_echo "$gdb_cv_var_som" >&6; }
13847 CFLAGS=$OLD_CFLAGS
13848 LDFLAGS=$OLD_LDFLAGS
13849 LIBS=$OLD_LIBS
13850if test $gdb_cv_var_som = yes; then
13851 CONFIG_OBS="$CONFIG_OBS somread.o"
13852fi
13853
121ce6e5
DJ
13854# Add any host-specific objects to GDB.
13855CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13856
608e2dbb
TT
13857# If building on ELF, look for lzma support for embedded compressed debug info.
13858if test $gdb_cv_var_elf = yes; then
13859
13860# Check whether --with-lzma was given.
13861if test "${with_lzma+set}" = set; then :
13862 withval=$with_lzma;
13863else
13864 with_lzma=auto
13865fi
13866
13867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13868$as_echo_n "checking whether to use lzma... " >&6; }
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13870$as_echo "$with_lzma" >&6; }
13871
13872 if test "${with_lzma}" != no; then
13873
13874
13875
13876
13877
13878
13879
13880
13881 use_additional=yes
13882
13883 acl_save_prefix="$prefix"
13884 prefix="$acl_final_prefix"
13885 acl_save_exec_prefix="$exec_prefix"
13886 exec_prefix="$acl_final_exec_prefix"
13887
13888 eval additional_includedir=\"$includedir\"
13889 eval additional_libdir=\"$libdir\"
13890
13891 exec_prefix="$acl_save_exec_prefix"
13892 prefix="$acl_save_prefix"
13893
13894
13895# Check whether --with-liblzma-prefix was given.
13896if test "${with_liblzma_prefix+set}" = set; then :
13897 withval=$with_liblzma_prefix;
13898 if test "X$withval" = "Xno"; then
13899 use_additional=no
13900 else
13901 if test "X$withval" = "X"; then
13902
13903 acl_save_prefix="$prefix"
13904 prefix="$acl_final_prefix"
13905 acl_save_exec_prefix="$exec_prefix"
13906 exec_prefix="$acl_final_exec_prefix"
13907
13908 eval additional_includedir=\"$includedir\"
13909 eval additional_libdir=\"$libdir\"
13910
13911 exec_prefix="$acl_save_exec_prefix"
13912 prefix="$acl_save_prefix"
13913
13914 else
13915 additional_includedir="$withval/include"
13916 additional_libdir="$withval/lib"
13917 fi
13918 fi
13919
13920fi
13921
13922 LIBLZMA=
13923 LTLIBLZMA=
13924 INCLZMA=
13925 rpathdirs=
13926 ltrpathdirs=
13927 names_already_handled=
13928 names_next_round='lzma '
13929 while test -n "$names_next_round"; do
13930 names_this_round="$names_next_round"
13931 names_next_round=
13932 for name in $names_this_round; do
13933 already_handled=
13934 for n in $names_already_handled; do
13935 if test "$n" = "$name"; then
13936 already_handled=yes
13937 break
13938 fi
13939 done
13940 if test -z "$already_handled"; then
13941 names_already_handled="$names_already_handled $name"
13942 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13943 eval value=\"\$HAVE_LIB$uppername\"
13944 if test -n "$value"; then
13945 if test "$value" = yes; then
13946 eval value=\"\$LIB$uppername\"
13947 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13948 eval value=\"\$LTLIB$uppername\"
13949 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13950 else
13951 :
13952 fi
13953 else
13954 found_dir=
13955 found_la=
13956 found_so=
13957 found_a=
13958 if test $use_additional = yes; then
13959 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13960 found_dir="$additional_libdir"
13961 found_so="$additional_libdir/lib$name.$shlibext"
13962 if test -f "$additional_libdir/lib$name.la"; then
13963 found_la="$additional_libdir/lib$name.la"
13964 fi
13965 else
13966 if test -f "$additional_libdir/lib$name.$libext"; then
13967 found_dir="$additional_libdir"
13968 found_a="$additional_libdir/lib$name.$libext"
13969 if test -f "$additional_libdir/lib$name.la"; then
13970 found_la="$additional_libdir/lib$name.la"
13971 fi
13972 fi
13973 fi
13974 fi
13975 if test "X$found_dir" = "X"; then
13976 for x in $LDFLAGS $LTLIBLZMA; do
13977
13978 acl_save_prefix="$prefix"
13979 prefix="$acl_final_prefix"
13980 acl_save_exec_prefix="$exec_prefix"
13981 exec_prefix="$acl_final_exec_prefix"
13982 eval x=\"$x\"
13983 exec_prefix="$acl_save_exec_prefix"
13984 prefix="$acl_save_prefix"
13985
13986 case "$x" in
13987 -L*)
13988 dir=`echo "X$x" | sed -e 's/^X-L//'`
13989 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13990 found_dir="$dir"
13991 found_so="$dir/lib$name.$shlibext"
13992 if test -f "$dir/lib$name.la"; then
13993 found_la="$dir/lib$name.la"
13994 fi
13995 else
13996 if test -f "$dir/lib$name.$libext"; then
13997 found_dir="$dir"
13998 found_a="$dir/lib$name.$libext"
13999 if test -f "$dir/lib$name.la"; then
14000 found_la="$dir/lib$name.la"
14001 fi
14002 fi
14003 fi
14004 ;;
14005 esac
14006 if test "X$found_dir" != "X"; then
14007 break
14008 fi
14009 done
14010 fi
14011 if test "X$found_dir" != "X"; then
14012 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14013 if test "X$found_so" != "X"; then
14014 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14015 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14016 else
14017 haveit=
14018 for x in $ltrpathdirs; do
14019 if test "X$x" = "X$found_dir"; then
14020 haveit=yes
14021 break
14022 fi
14023 done
14024 if test -z "$haveit"; then
14025 ltrpathdirs="$ltrpathdirs $found_dir"
14026 fi
14027 if test "$hardcode_direct" = yes; then
14028 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14029 else
14030 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14031 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14032 haveit=
14033 for x in $rpathdirs; do
14034 if test "X$x" = "X$found_dir"; then
14035 haveit=yes
14036 break
14037 fi
14038 done
14039 if test -z "$haveit"; then
14040 rpathdirs="$rpathdirs $found_dir"
14041 fi
14042 else
14043 haveit=
14044 for x in $LDFLAGS $LIBLZMA; do
14045
14046 acl_save_prefix="$prefix"
14047 prefix="$acl_final_prefix"
14048 acl_save_exec_prefix="$exec_prefix"
14049 exec_prefix="$acl_final_exec_prefix"
14050 eval x=\"$x\"
14051 exec_prefix="$acl_save_exec_prefix"
14052 prefix="$acl_save_prefix"
14053
14054 if test "X$x" = "X-L$found_dir"; then
14055 haveit=yes
14056 break
14057 fi
14058 done
14059 if test -z "$haveit"; then
14060 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14061 fi
14062 if test "$hardcode_minus_L" != no; then
14063 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14064 else
14065 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14066 fi
14067 fi
14068 fi
14069 fi
14070 else
14071 if test "X$found_a" != "X"; then
14072 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14073 else
14074 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14075 fi
14076 fi
14077 additional_includedir=
14078 case "$found_dir" in
14079 */lib | */lib/)
14080 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14081 additional_includedir="$basedir/include"
14082 ;;
14083 esac
14084 if test "X$additional_includedir" != "X"; then
14085 if test "X$additional_includedir" != "X/usr/include"; then
14086 haveit=
14087 if test "X$additional_includedir" = "X/usr/local/include"; then
14088 if test -n "$GCC"; then
14089 case $host_os in
14090 linux*) haveit=yes;;
14091 esac
14092 fi
14093 fi
14094 if test -z "$haveit"; then
14095 for x in $CPPFLAGS $INCLZMA; do
14096
14097 acl_save_prefix="$prefix"
14098 prefix="$acl_final_prefix"
14099 acl_save_exec_prefix="$exec_prefix"
14100 exec_prefix="$acl_final_exec_prefix"
14101 eval x=\"$x\"
14102 exec_prefix="$acl_save_exec_prefix"
14103 prefix="$acl_save_prefix"
14104
14105 if test "X$x" = "X-I$additional_includedir"; then
14106 haveit=yes
14107 break
14108 fi
14109 done
14110 if test -z "$haveit"; then
14111 if test -d "$additional_includedir"; then
14112 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14113 fi
14114 fi
14115 fi
14116 fi
14117 fi
14118 if test -n "$found_la"; then
14119 save_libdir="$libdir"
14120 case "$found_la" in
14121 */* | *\\*) . "$found_la" ;;
14122 *) . "./$found_la" ;;
14123 esac
14124 libdir="$save_libdir"
14125 for dep in $dependency_libs; do
14126 case "$dep" in
14127 -L*)
14128 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14129 if test "X$additional_libdir" != "X/usr/lib"; then
14130 haveit=
14131 if test "X$additional_libdir" = "X/usr/local/lib"; then
14132 if test -n "$GCC"; then
14133 case $host_os in
14134 linux*) haveit=yes;;
14135 esac
14136 fi
14137 fi
14138 if test -z "$haveit"; then
14139 haveit=
14140 for x in $LDFLAGS $LIBLZMA; do
14141
14142 acl_save_prefix="$prefix"
14143 prefix="$acl_final_prefix"
14144 acl_save_exec_prefix="$exec_prefix"
14145 exec_prefix="$acl_final_exec_prefix"
14146 eval x=\"$x\"
14147 exec_prefix="$acl_save_exec_prefix"
14148 prefix="$acl_save_prefix"
14149
14150 if test "X$x" = "X-L$additional_libdir"; then
14151 haveit=yes
14152 break
14153 fi
14154 done
14155 if test -z "$haveit"; then
14156 if test -d "$additional_libdir"; then
14157 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14158 fi
14159 fi
14160 haveit=
14161 for x in $LDFLAGS $LTLIBLZMA; do
14162
14163 acl_save_prefix="$prefix"
14164 prefix="$acl_final_prefix"
14165 acl_save_exec_prefix="$exec_prefix"
14166 exec_prefix="$acl_final_exec_prefix"
14167 eval x=\"$x\"
14168 exec_prefix="$acl_save_exec_prefix"
14169 prefix="$acl_save_prefix"
14170
14171 if test "X$x" = "X-L$additional_libdir"; then
14172 haveit=yes
14173 break
14174 fi
14175 done
14176 if test -z "$haveit"; then
14177 if test -d "$additional_libdir"; then
14178 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14179 fi
14180 fi
14181 fi
14182 fi
14183 ;;
14184 -R*)
14185 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14186 if test "$enable_rpath" != no; then
14187 haveit=
14188 for x in $rpathdirs; do
14189 if test "X$x" = "X$dir"; then
14190 haveit=yes
14191 break
14192 fi
14193 done
14194 if test -z "$haveit"; then
14195 rpathdirs="$rpathdirs $dir"
14196 fi
14197 haveit=
14198 for x in $ltrpathdirs; do
14199 if test "X$x" = "X$dir"; then
14200 haveit=yes
14201 break
14202 fi
14203 done
14204 if test -z "$haveit"; then
14205 ltrpathdirs="$ltrpathdirs $dir"
14206 fi
14207 fi
14208 ;;
14209 -l*)
14210 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14211 ;;
14212 *.la)
14213 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14214 ;;
14215 *)
14216 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14217 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14218 ;;
14219 esac
14220 done
14221 fi
14222 else
14223 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14224 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14225 fi
14226 fi
14227 fi
14228 done
14229 done
14230 if test "X$rpathdirs" != "X"; then
14231 if test -n "$hardcode_libdir_separator"; then
14232 alldirs=
14233 for found_dir in $rpathdirs; do
14234 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14235 done
14236 acl_save_libdir="$libdir"
14237 libdir="$alldirs"
14238 eval flag=\"$hardcode_libdir_flag_spec\"
14239 libdir="$acl_save_libdir"
14240 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14241 else
14242 for found_dir in $rpathdirs; do
14243 acl_save_libdir="$libdir"
14244 libdir="$found_dir"
14245 eval flag=\"$hardcode_libdir_flag_spec\"
14246 libdir="$acl_save_libdir"
14247 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14248 done
14249 fi
14250 fi
14251 if test "X$ltrpathdirs" != "X"; then
14252 for found_dir in $ltrpathdirs; do
14253 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14254 done
14255 fi
14256
14257
14258 ac_save_CPPFLAGS="$CPPFLAGS"
14259
14260 for element in $INCLZMA; do
14261 haveit=
14262 for x in $CPPFLAGS; do
14263
14264 acl_save_prefix="$prefix"
14265 prefix="$acl_final_prefix"
14266 acl_save_exec_prefix="$exec_prefix"
14267 exec_prefix="$acl_final_exec_prefix"
14268 eval x=\"$x\"
14269 exec_prefix="$acl_save_exec_prefix"
14270 prefix="$acl_save_prefix"
14271
14272 if test "X$x" = "X$element"; then
14273 haveit=yes
14274 break
14275 fi
14276 done
14277 if test -z "$haveit"; then
14278 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14279 fi
14280 done
14281
14282
14283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
14284$as_echo_n "checking for liblzma... " >&6; }
14285if test "${ac_cv_liblzma+set}" = set; then :
14286 $as_echo_n "(cached) " >&6
14287else
14288
14289 ac_save_LIBS="$LIBS"
14290 LIBS="$LIBS $LIBLZMA"
14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292/* end confdefs.h. */
14293#include "lzma.h"
14294int
14295main ()
14296{
14297lzma_index_iter iter;
14298 lzma_index_iter_init (&iter, 0);
14299 lzma_mf_is_supported (LZMA_MF_HC3);
14300 ;
14301 return 0;
14302}
14303_ACEOF
14304if ac_fn_c_try_link "$LINENO"; then :
14305 ac_cv_liblzma=yes
14306else
14307 ac_cv_liblzma=no
14308fi
14309rm -f core conftest.err conftest.$ac_objext \
14310 conftest$ac_exeext conftest.$ac_ext
14311 LIBS="$ac_save_LIBS"
14312
14313fi
14314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
14315$as_echo "$ac_cv_liblzma" >&6; }
14316 if test "$ac_cv_liblzma" = yes; then
14317 HAVE_LIBLZMA=yes
14318
14319$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
14320
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
14322$as_echo_n "checking how to link with liblzma... " >&6; }
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
14324$as_echo "$LIBLZMA" >&6; }
14325 else
14326 HAVE_LIBLZMA=no
14327 CPPFLAGS="$ac_save_CPPFLAGS"
14328 LIBLZMA=
14329 LTLIBLZMA=
14330 fi
14331
14332
14333
14334
14335
14336
14337 if test "$HAVE_LIBLZMA" != yes; then
14338 if test "$with_lzma" = yes; then
14339 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
14340 fi
14341 fi
14342 fi
14343fi
14344
3fc11d3e
JM
14345LIBGUI="../libgui/src/libgui.a"
14346GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14347
14348
7a292a7a 14349
3fc11d3e
JM
14350WIN32LDAPP=
14351
14352
14353
d91670b9 14354case "${host}" in
686a5eed 14355*-*-cygwin* | *-*-mingw* )
d91670b9
CV
14356 configdir="win"
14357 ;;
14358*)
14359 configdir="unix"
14360 ;;
14361esac
3fc11d3e
JM
14362
14363GDBTKLIBS=
14364if test "${enable_gdbtk}" = "yes"; then
14365
d1c3b63a
KS
14366 # Gdbtk must have an absolute path to srcdir in order to run
14367 # properly when not installed.
14368 here=`pwd`
14369 cd ${srcdir}
14370 GDBTK_SRC_DIR=`pwd`
14371 cd $here
14372
bec39cab 14373
5062cc19
KS
14374 #
14375 # Ok, lets find the tcl configuration
14376 # First, look for one uninstalled.
14377 # the alternative search directory is invoked by --with-tcl
14378 #
3fc11d3e 14379
5062cc19
KS
14380 if test x"${no_tcl}" = x ; then
14381 # we reset no_tcl in case something fails here
14382 no_tcl=true
bec39cab 14383
81ecdfbb
RW
14384# Check whether --with-tcl was given.
14385if test "${with_tcl+set}" = set; then :
14386 withval=$with_tcl; with_tclconfig=${withval}
14387fi
14388
14389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14390$as_echo_n "checking for Tcl configuration... " >&6; }
14391 if test "${ac_cv_c_tclconfig+set}" = set; then :
14392 $as_echo_n "(cached) " >&6
3fc11d3e 14393else
bec39cab 14394
3fc11d3e 14395
5062cc19
KS
14396 # First check to see if --with-tcl was specified.
14397 case "${host}" in
14398 *-*-cygwin*) platDir="win" ;;
14399 *) platDir="unix" ;;
14400 esac
14401 if test x"${with_tclconfig}" != x ; then
14402 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14403 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14404 else
81ecdfbb 14405 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
14406 fi
14407 fi
14408
14409 # then check for a private Tcl installation
14410 if test x"${ac_cv_c_tclconfig}" = x ; then
14411 for i in \
14412 ../tcl \
14413 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14414 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14415 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14416 ../../tcl \
14417 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14418 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14419 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14420 ../../../tcl \
14421 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14422 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14423 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14424 if test -f "$i/$platDir/tclConfig.sh" ; then
14425 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14426 break
14427 fi
14428 done
14429 fi
14430
14431 # on Darwin, check in Framework installation locations
14432 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14433 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14434 `ls -d /Library/Frameworks 2>/dev/null` \
14435 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14436 `ls -d /System/Library/Frameworks 2>/dev/null` \
14437 ; do
14438 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14439 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14440 break
14441 fi
14442 done
14443 fi
14444
14445 # check in a few common install locations
14446 if test x"${ac_cv_c_tclconfig}" = x ; then
14447 for i in `ls -d ${libdir} 2>/dev/null` \
14448 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14449 `ls -d ${prefix}/lib 2>/dev/null` \
14450 `ls -d /usr/local/lib 2>/dev/null` \
14451 `ls -d /usr/contrib/lib 2>/dev/null` \
14452 `ls -d /usr/lib 2>/dev/null` \
14453 ; do
14454 if test -f "$i/tclConfig.sh" ; then
14455 ac_cv_c_tclconfig=`(cd $i; pwd)`
14456 break
14457 fi
14458 done
14459 fi
3fc11d3e 14460
5062cc19
KS
14461 # check in a few other private locations
14462 if test x"${ac_cv_c_tclconfig}" = x ; then
14463 for i in \
14464 ${srcdir}/../tcl \
14465 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14466 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14467 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14468 if test -f "$i/$platDir/tclConfig.sh" ; then
14469 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14470 break
14471 fi
14472 done
14473 fi
bec39cab 14474
3fc11d3e
JM
14475fi
14476
5062cc19
KS
14477
14478 if test x"${ac_cv_c_tclconfig}" = x ; then
14479 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14481$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14482 else
14483 no_tcl=
14484 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14486$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14487 fi
14488 fi
3fc11d3e 14489
bec39cab 14490
85541719
DE
14491 # If $no_tk is nonempty, then we can't do Tk, and there is no
14492 # point to doing Tcl.
bec39cab 14493
5062cc19
KS
14494 #
14495 # Ok, lets find the tk configuration
14496 # First, look for one uninstalled.
14497 # the alternative search directory is invoked by --with-tk
14498 #
3fc11d3e 14499
5062cc19
KS
14500 if test x"${no_tk}" = x ; then
14501 # we reset no_tk in case something fails here
14502 no_tk=true
bec39cab 14503
81ecdfbb
RW
14504# Check whether --with-tk was given.
14505if test "${with_tk+set}" = set; then :
14506 withval=$with_tk; with_tkconfig=${withval}
14507fi
14508
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14510$as_echo_n "checking for Tk configuration... " >&6; }
14511 if test "${ac_cv_c_tkconfig+set}" = set; then :
14512 $as_echo_n "(cached) " >&6
bec39cab 14513else
3fc11d3e
JM
14514
14515
5062cc19
KS
14516 # First check to see if --with-tkconfig was specified.
14517 if test x"${with_tkconfig}" != x ; then
14518 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14519 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14520 else
81ecdfbb 14521 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14522 fi
14523 fi
3fc11d3e 14524
5062cc19
KS
14525 # then check for a private Tk library
14526 case "${host}" in
14527 *-*-cygwin*) platDir="win" ;;
14528 *) platDir="unix" ;;
14529 esac
14530 if test x"${ac_cv_c_tkconfig}" = x ; then
14531 for i in \
14532 ../tk \
14533 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14534 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14535 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14536 ../../tk \
14537 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14538 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14539 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14540 ../../../tk \
14541 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14542 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14543 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14544 if test -f "$i/$platDir/tkConfig.sh" ; then
14545 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14546 break
14547 fi
14548 done
14549 fi
14550
14551 # on Darwin, check in Framework installation locations
14552 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14553 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14554 `ls -d /Library/Frameworks 2>/dev/null` \
14555 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14556 `ls -d /System/Library/Frameworks 2>/dev/null` \
14557 ; do
14558 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14559 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14560 break
14561 fi
14562 done
14563 fi
14564
14565 # check in a few common install locations
14566 if test x"${ac_cv_c_tkconfig}" = x ; then
14567 for i in `ls -d ${libdir} 2>/dev/null` \
14568 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14569 `ls -d ${prefix}/lib 2>/dev/null` \
14570 `ls -d /usr/local/lib 2>/dev/null` \
14571 `ls -d /usr/contrib/lib 2>/dev/null` \
14572 `ls -d /usr/lib 2>/dev/null` \
14573 ; do
14574 if test -f "$i/tkConfig.sh" ; then
14575 ac_cv_c_tkconfig=`(cd $i; pwd)`
14576 break
14577 fi
14578 done
14579 fi
14580 # check in a few other private locations
14581 if test x"${ac_cv_c_tkconfig}" = x ; then
14582 for i in \
14583 ${srcdir}/../tk \
14584 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14585 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14586 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14587 if test -f "$i/$platDir/tkConfig.sh" ; then
14588 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14589 break
14590 fi
14591 done
14592 fi
3fc11d3e 14593
3fc11d3e
JM
14594fi
14595
14596
5062cc19
KS
14597 if test x"${ac_cv_c_tkconfig}" = x ; then
14598 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14600$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14601 else
14602 no_tk=
14603 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14605$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14606 fi
3fc11d3e 14607 fi
dd2504ab 14608
dd2504ab 14609
85541719
DE
14610 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14611
81ecdfbb
RW
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14613$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14614
14615 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14617$as_echo "loading" >&6; }
85541719
DE
14618 . ${TCL_BIN_DIR}/tclConfig.sh
14619 else
81ecdfbb
RW
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14621$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14622 fi
14623
14624 # eval is required to do the TCL_DBGX substitution
14625 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14626 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14627
14628 # If the TCL_BIN_DIR is the build directory (not the install directory),
14629 # then set the common variable name to the value of the build variables.
14630 # For example, the variable TCL_LIB_SPEC will be set to the value
14631 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14632 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14633 # installed and uninstalled version of Tcl.
14634 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14635 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14636 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14637 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14638 elif test "`uname -s`" = "Darwin"; then
14639 # If Tcl was built as a framework, attempt to use the libraries
14640 # from the framework at the given location so that linking works
a68ffae9 14641 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14642 case ${TCL_DEFS} in
14643 *TCL_FRAMEWORK*)
14644 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14645 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14646 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14647 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14648 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14649 break
14650 fi
14651 done
14652 fi
14653 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14654 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14655 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14656 fi
14657 ;;
14658 esac
14659 fi
14660
14661 # eval is required to do the TCL_DBGX substitution
14662 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14663 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14664 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14665 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681 # Check for in-tree tcl
14682 here=`pwd`
14683 cd ${srcdir}/..
14684 topdir=`pwd`
14685 cd ${here}
14686
14687 intree="no"
14688 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14689 intree="yes"
14690 fi
14691
14692 # Find Tcl private headers
14693 if test x"${intree}" = xno; then
14694
81ecdfbb
RW
14695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14696$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14697 private_dir=""
14698 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14699 if test -f ${dir}/tclInt.h ; then
14700 private_dir=${dir}
14701 fi
14702
14703 if test x"${private_dir}" = x; then
81ecdfbb 14704 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14705 else
14706 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14708$as_echo "${private_dir}" >&6; }
85541719
DE
14709 fi
14710
14711 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14712 TCL_LIBRARY="${TCL_LIB_SPEC}"
14713 TCL_DEPS=""
14714 else
14715 # If building tcl in the same src tree, private headers
14716 # are not needed, but we need to be sure to use the right
14717 # headers library
14718 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14719 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14720 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14721 fi
14722
14723
14724
14725
14726
81ecdfbb
RW
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14728$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14729
5062cc19 14730 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14732$as_echo "loading" >&6; }
5062cc19 14733 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14734 else
81ecdfbb
RW
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14736$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14737 fi
bec39cab 14738
5062cc19
KS
14739 # eval is required to do the TK_DBGX substitution
14740 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14741 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14742
14743 # If the TK_BIN_DIR is the build directory (not the install directory),
14744 # then set the common variable name to the value of the build variables.
14745 # For example, the variable TK_LIB_SPEC will be set to the value
14746 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14747 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14748 # installed and uninstalled version of Tcl.
85541719 14749 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14750 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14751 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14752 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14753 elif test "`uname -s`" = "Darwin"; then
14754 # If Tk was built as a framework, attempt to use the libraries
14755 # from the framework at the given location so that linking works
a68ffae9 14756 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14757 case ${TK_DEFS} in
14758 *TK_FRAMEWORK*)
85541719 14759 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14760 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14761 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14762 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14763 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14764 break
14765 fi
14766 done
14767 fi
85541719 14768 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14769 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14770 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14771 fi
14772 ;;
14773 esac
3fc11d3e
JM
14774 fi
14775
5062cc19
KS
14776 # eval is required to do the TK_DBGX substitution
14777 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14778 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14779 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14780 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14781
3fc11d3e
JM
14782
14783
bec39cab
AC
14784
14785
14786
14787
14788
14789
14790
3fc11d3e 14791
3fc11d3e 14792
bec39cab 14793
bec39cab 14794
85541719
DE
14795 # Check for in-tree Tk
14796 intree="no"
14797 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14798 intree="yes"
14799 fi
3fc11d3e 14800
85541719
DE
14801 # Find Tk private headers
14802 if test x"${intree}" = xno; then
3fc11d3e 14803
81ecdfbb
RW
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14805$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14806 private_dir=""
14807 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14808 if test -f ${dir}/tkInt.h; then
14809 private_dir=${dir}
3fc11d3e 14810 fi
bec39cab 14811
5062cc19 14812 if test x"${private_dir}" = x; then
81ecdfbb 14813 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14814 else
5062cc19 14815 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14817$as_echo "${private_dir}" >&6; }
3fc11d3e 14818 fi
3fc11d3e 14819
85541719
DE
14820 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14821 TK_LIBRARY=${TK_LIB_SPEC}
14822 TK_DEPS=""
14823 else
14824 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14825 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14826 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14827 fi
3fc11d3e
JM
14828
14829
3fc11d3e
JM
14830
14831
3fc11d3e 14832
85541719 14833 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14834
85541719
DE
14835 # Include some libraries that Tcl and Tk want.
14836 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14837 # Yes, the ordering seems wrong here. But it isn't.
14838 # TK_LIBS is the list of libraries that need to be linked
14839 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14840 # were in LIBS then any link tests after this point would
14841 # try to include things like `$(LIBGUI)', which wouldn't work.
14842 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14843
85541719
DE
14844 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14845 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14846 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14847 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14848 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14849 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14850 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14851
85541719
DE
14852 if test x$gdb_cv_os_cygwin = xyes; then
14853 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14854 WIN32LDAPP="-Wl,--subsystem,console"
14855 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14856 fi
ffc6a242 14857
81ecdfbb 14858 subdirs="$subdirs gdbtk"
3ace7edb 14859
85541719 14860 fi
3fc11d3e
JM
14861fi
14862
14863
14864
14865
14866
14867
14868
14869
81ecdfbb
RW
14870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14871$as_echo_n "checking for X... " >&6; }
bec39cab 14872
c906108c 14873
81ecdfbb
RW
14874# Check whether --with-x was given.
14875if test "${with_x+set}" = set; then :
14876 withval=$with_x;
14877fi
c906108c
SS
14878
14879# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14880if test "x$with_x" = xno; then
14881 # The user explicitly disabled X.
14882 have_x=disabled
14883else
81ecdfbb
RW
14884 case $x_includes,$x_libraries in #(
14885 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14886 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14887 $as_echo_n "(cached) " >&6
c906108c
SS
14888else
14889 # One or both of the vars are not set, and there is no cached value.
bec39cab 14890ac_x_includes=no ac_x_libraries=no
81ecdfbb 14891rm -f -r conftest.dir
bec39cab
AC
14892if mkdir conftest.dir; then
14893 cd conftest.dir
bec39cab 14894 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14895incroot:
14896 @echo incroot='${INCROOT}'
14897usrlibdir:
14898 @echo usrlibdir='${USRLIBDIR}'
14899libdir:
14900 @echo libdir='${LIBDIR}'
14901_ACEOF
14902 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14903 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14904 for ac_var in incroot usrlibdir libdir; do
14905 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14906 done
c906108c 14907 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14908 for ac_extension in a so sl dylib la dll; do
14909 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14910 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14911 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14912 fi
14913 done
14914 # Screen out bogus values from the imake configuration. They are
14915 # bogus both because they are the default anyway, and because
14916 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14917 case $ac_im_incroot in
81ecdfbb 14918 /usr/include) ac_x_includes= ;;
bec39cab 14919 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14920 esac
bec39cab 14921 case $ac_im_usrlibdir in
81ecdfbb 14922 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14923 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14924 esac
14925 fi
14926 cd ..
81ecdfbb 14927 rm -f -r conftest.dir
c906108c
SS
14928fi
14929
bec39cab
AC
14930# Standard set of common directories for X headers.
14931# Check X11 before X11Rn because it is often a symlink to the current release.
14932ac_x_header_dirs='
14933/usr/X11/include
81ecdfbb 14934/usr/X11R7/include
bec39cab
AC
14935/usr/X11R6/include
14936/usr/X11R5/include
14937/usr/X11R4/include
14938
14939/usr/include/X11
81ecdfbb 14940/usr/include/X11R7
bec39cab
AC
14941/usr/include/X11R6
14942/usr/include/X11R5
14943/usr/include/X11R4
14944
14945/usr/local/X11/include
81ecdfbb 14946/usr/local/X11R7/include
bec39cab
AC
14947/usr/local/X11R6/include
14948/usr/local/X11R5/include
14949/usr/local/X11R4/include
14950
14951/usr/local/include/X11
81ecdfbb 14952/usr/local/include/X11R7
bec39cab
AC
14953/usr/local/include/X11R6
14954/usr/local/include/X11R5
14955/usr/local/include/X11R4
14956
14957/usr/X386/include
14958/usr/x386/include
14959/usr/XFree86/include/X11
14960
14961/usr/include
14962/usr/local/include
14963/usr/unsupported/include
14964/usr/athena/include
14965/usr/local/x11r5/include
14966/usr/lpp/Xamples/include
14967
14968/usr/openwin/include
14969/usr/openwin/share/include'
14970
14971if test "$ac_x_includes" = no; then
81ecdfbb 14972 # Guess where to find include files, by looking for Xlib.h.
c906108c 14973 # First, try using that file with no special directory specified.
81ecdfbb 14974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14975/* end confdefs.h. */
81ecdfbb 14976#include <X11/Xlib.h>
bec39cab 14977_ACEOF
81ecdfbb 14978if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14979 # We can compile using X headers with no special include directory.
14980ac_x_includes=
14981else
bec39cab 14982 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14983 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14984 ac_x_includes=$ac_dir
14985 break
14986 fi
14987done
c906108c 14988fi
bec39cab
AC
14989rm -f conftest.err conftest.$ac_ext
14990fi # $ac_x_includes = no
c906108c 14991
bec39cab 14992if test "$ac_x_libraries" = no; then
c906108c 14993 # Check for the libraries.
c906108c
SS
14994 # See if we find them without any special options.
14995 # Don't add to $LIBS permanently.
bec39cab 14996 ac_save_LIBS=$LIBS
81ecdfbb
RW
14997 LIBS="-lX11 $LIBS"
14998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14999/* end confdefs.h. */
81ecdfbb 15000#include <X11/Xlib.h>
bec39cab
AC
15001int
15002main ()
15003{
81ecdfbb 15004XrmInitialize ()
bec39cab
AC
15005 ;
15006 return 0;
15007}
15008_ACEOF
81ecdfbb 15009if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15010 LIBS=$ac_save_LIBS
c906108c
SS
15011# We can link X programs with no special library path.
15012ac_x_libraries=
15013else
81ecdfbb
RW
15014 LIBS=$ac_save_LIBS
15015for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15016do
bec39cab 15017 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15018 for ac_extension in a so sl dylib la dll; do
15019 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15020 ac_x_libraries=$ac_dir
15021 break 2
15022 fi
15023 done
15024done
15025fi
81ecdfbb
RW
15026rm -f core conftest.err conftest.$ac_objext \
15027 conftest$ac_exeext conftest.$ac_ext
bec39cab 15028fi # $ac_x_libraries = no
c906108c 15029
81ecdfbb
RW
15030case $ac_x_includes,$ac_x_libraries in #(
15031 no,* | *,no | *\'*)
15032 # Didn't find X, or a directory has "'" in its name.
15033 ac_cv_have_x="have_x=no";; #(
15034 *)
15035 # Record where we found X for the cache.
15036 ac_cv_have_x="have_x=yes\
15037 ac_x_includes='$ac_x_includes'\
15038 ac_x_libraries='$ac_x_libraries'"
15039esac
c906108c 15040fi
81ecdfbb
RW
15041;; #(
15042 *) have_x=yes;;
15043 esac
c906108c
SS
15044 eval "$ac_cv_have_x"
15045fi # $with_x != no
15046
15047if test "$have_x" != yes; then
81ecdfbb
RW
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15049$as_echo "$have_x" >&6; }
c906108c
SS
15050 no_x=yes
15051else
15052 # If each of the values was on the command line, it overrides each guess.
15053 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15054 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15055 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15056 ac_cv_have_x="have_x=yes\
15057 ac_x_includes='$x_includes'\
15058 ac_x_libraries='$x_libraries'"
15059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15060$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15061fi
15062
15063
bec39cab 15064# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15065# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15066# This code just checks for a few cases where we'd like to ignore those
15067# definitions, even when they're present in the '.mt' file. These cases
15068# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15069# not part of the source tree.
7a292a7a 15070#
81ecdfbb
RW
15071# Check whether --enable-sim was given.
15072if test "${enable_sim+set}" = set; then :
15073 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15074 echo "enableval = ${enableval}";
15075 case "${enableval}" in
15076 yes) ignore_sim=false ;;
15077 no) ignore_sim=true ;;
15078 *) ignore_sim=false ;;
15079 esac
15080else
15081 ignore_sim=false
81ecdfbb
RW
15082fi
15083
7a292a7a
SS
15084
15085if test ! -d "${srcdir}/../sim"; then
15086 ignore_sim=true
15087fi
15088
9b624dbe
UW
15089SIM=
15090SIM_OBS=
15091if test "${ignore_sim}" = "false"; then
15092 if test x"${gdb_sim}" != x ; then
15093 SIM="${gdb_sim}"
15094 SIM_OBS="remote-sim.o"
60ca704f 15095
81ecdfbb 15096$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15097
9b624dbe 15098 fi
7a292a7a
SS
15099fi
15100
15101
15102
c906108c
SS
15103
15104
15105
15106
15107
15108
dfcd3bfb 15109
e56ac5c3
AC
15110
15111
b3a90332
AC
15112
15113
c35f4ffc 15114# List of host floatformats.
bec39cab
AC
15115
15116cat >>confdefs.h <<_ACEOF
c35f4ffc 15117#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15118_ACEOF
c35f4ffc 15119
bec39cab
AC
15120
15121cat >>confdefs.h <<_ACEOF
c35f4ffc 15122#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15123_ACEOF
15124
c35f4ffc 15125
bec39cab 15126cat >>confdefs.h <<_ACEOF
c35f4ffc 15127#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15128_ACEOF
c35f4ffc
AC
15129
15130
c906108c
SS
15131# target_subdir is used by the testsuite to find the target libraries.
15132target_subdir=
15133if test "${host}" != "${target}"; then
15134 target_subdir="${target_alias}/"
15135fi
15136
15137
15138frags=
771b4502 15139if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15140 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15141 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15142 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15143 fi
15144 frags="$frags $host_makefile_frag"
15145else
15146 host_makefile_frag=/dev/null
c906108c 15147fi
c906108c 15148
c906108c
SS
15149
15150
15151
771b4502 15152if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15153# We pick this up from the host configuration file (.mh) because we
15154# do not have a native configuration Makefile fragment.
c906108c
SS
15155nativefile=`sed -n '
15156s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15157' ${host_makefile_frag}`
c906108c
SS
15158fi
15159
15160
b00a8037 15161if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15162
15163cat >>confdefs.h <<_ACEOF
b00a8037 15164#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15165_ACEOF
b00a8037
DJ
15166
15167fi
15168
8dcde887 15169# Enable multi-ice-gdb-server.
81ecdfbb
RW
15170# Check whether --enable-multi-ice was given.
15171if test "${enable_multi_ice+set}" = set; then :
15172 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15173 yes | no)
15174 ;;
81ecdfbb 15175 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15176 esac
81ecdfbb 15177fi
b4e70030 15178
81ecdfbb
RW
15179if test "x$enable_multi_ice" = xyes; then
15180 subdirs="$subdirs multi-ice"
3ace7edb 15181
a85f51e7
DJ
15182fi
15183
496c0e1b
JB
15184# Check whether --enable-gdbserver was given.
15185if test "${enable_gdbserver+set}" = set; then :
15186 enableval=$enable_gdbserver; case "${enableval}" in
15187 yes| no|auto) ;;
15188 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15189esac
15190else
15191 enable_gdbserver=auto
15192fi
15193
15194
15195# We only build gdbserver automatically in a native configuration, and
15196# only if the user did not explicitly disable its build.
15197if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15199$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15200 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15202$as_echo "yes" >&6; }
15203 subdirs="$subdirs gdbserver"
3ace7edb 15204
496c0e1b 15205 gdbserver_build_enabled=yes
8dcde887 15206 else
81ecdfbb
RW
15207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15208$as_echo "no" >&6; }
8dcde887
MK
15209 fi
15210fi
15211
496c0e1b
JB
15212# If the user explicitly request the gdbserver to be built, verify that
15213# we were in fact able to enable it.
15214if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15215 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15216fi
15217
393fd4c3
YQ
15218# Check for babeltrace and babeltrace-ctf
15219
15220# Check whether --with-babeltrace was given.
15221if test "${with_babeltrace+set}" = set; then :
15222 withval=$with_babeltrace;
15223else
15224 with_babeltrace=auto
15225fi
15226
15227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15228$as_echo_n "checking whether to use babeltrace... " >&6; }
15229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15230$as_echo "$with_babeltrace" >&6; }
15231
15232if test "x$with_babeltrace" = "xno"; then
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15234$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15235else
15236 # Append -Werror to CFLAGS so that configure can catch the warning
15237 # "assignment from incompatible pointer type", which is related to
15238 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15239 # in GDB, while babeltrace 1.0.3 is broken.
15240 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15241 # safe to save and restore CFLAGS here.
15242 saved_CFLAGS=$CFLAGS
15243 CFLAGS="$CFLAGS -Werror"
15244
15245
15246
15247
15248
15249
15250
15251
15252 use_additional=yes
15253
15254 acl_save_prefix="$prefix"
15255 prefix="$acl_final_prefix"
15256 acl_save_exec_prefix="$exec_prefix"
15257 exec_prefix="$acl_final_exec_prefix"
15258
15259 eval additional_includedir=\"$includedir\"
15260 eval additional_libdir=\"$libdir\"
15261
15262 exec_prefix="$acl_save_exec_prefix"
15263 prefix="$acl_save_prefix"
15264
15265
15266# Check whether --with-libbabeltrace-prefix was given.
15267if test "${with_libbabeltrace_prefix+set}" = set; then :
15268 withval=$with_libbabeltrace_prefix;
15269 if test "X$withval" = "Xno"; then
15270 use_additional=no
15271 else
15272 if test "X$withval" = "X"; then
15273
15274 acl_save_prefix="$prefix"
15275 prefix="$acl_final_prefix"
15276 acl_save_exec_prefix="$exec_prefix"
15277 exec_prefix="$acl_final_exec_prefix"
15278
15279 eval additional_includedir=\"$includedir\"
15280 eval additional_libdir=\"$libdir\"
15281
15282 exec_prefix="$acl_save_exec_prefix"
15283 prefix="$acl_save_prefix"
15284
15285 else
15286 additional_includedir="$withval/include"
15287 additional_libdir="$withval/lib"
15288 fi
15289 fi
15290
15291fi
15292
15293 LIBBABELTRACE=
15294 LTLIBBABELTRACE=
15295 INCBABELTRACE=
15296 rpathdirs=
15297 ltrpathdirs=
15298 names_already_handled=
15299 names_next_round='babeltrace babeltrace-ctf'
15300 while test -n "$names_next_round"; do
15301 names_this_round="$names_next_round"
15302 names_next_round=
15303 for name in $names_this_round; do
15304 already_handled=
15305 for n in $names_already_handled; do
15306 if test "$n" = "$name"; then
15307 already_handled=yes
15308 break
15309 fi
15310 done
15311 if test -z "$already_handled"; then
15312 names_already_handled="$names_already_handled $name"
15313 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15314 eval value=\"\$HAVE_LIB$uppername\"
15315 if test -n "$value"; then
15316 if test "$value" = yes; then
15317 eval value=\"\$LIB$uppername\"
15318 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
15319 eval value=\"\$LTLIB$uppername\"
15320 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
15321 else
15322 :
15323 fi
15324 else
15325 found_dir=
15326 found_la=
15327 found_so=
15328 found_a=
15329 if test $use_additional = yes; then
15330 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15331 found_dir="$additional_libdir"
15332 found_so="$additional_libdir/lib$name.$shlibext"
15333 if test -f "$additional_libdir/lib$name.la"; then
15334 found_la="$additional_libdir/lib$name.la"
15335 fi
15336 else
15337 if test -f "$additional_libdir/lib$name.$libext"; then
15338 found_dir="$additional_libdir"
15339 found_a="$additional_libdir/lib$name.$libext"
15340 if test -f "$additional_libdir/lib$name.la"; then
15341 found_la="$additional_libdir/lib$name.la"
15342 fi
15343 fi
15344 fi
15345 fi
15346 if test "X$found_dir" = "X"; then
15347 for x in $LDFLAGS $LTLIBBABELTRACE; do
15348
15349 acl_save_prefix="$prefix"
15350 prefix="$acl_final_prefix"
15351 acl_save_exec_prefix="$exec_prefix"
15352 exec_prefix="$acl_final_exec_prefix"
15353 eval x=\"$x\"
15354 exec_prefix="$acl_save_exec_prefix"
15355 prefix="$acl_save_prefix"
15356
15357 case "$x" in
15358 -L*)
15359 dir=`echo "X$x" | sed -e 's/^X-L//'`
15360 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15361 found_dir="$dir"
15362 found_so="$dir/lib$name.$shlibext"
15363 if test -f "$dir/lib$name.la"; then
15364 found_la="$dir/lib$name.la"
15365 fi
15366 else
15367 if test -f "$dir/lib$name.$libext"; then
15368 found_dir="$dir"
15369 found_a="$dir/lib$name.$libext"
15370 if test -f "$dir/lib$name.la"; then
15371 found_la="$dir/lib$name.la"
15372 fi
15373 fi
15374 fi
15375 ;;
15376 esac
15377 if test "X$found_dir" != "X"; then
15378 break
15379 fi
15380 done
15381 fi
15382 if test "X$found_dir" != "X"; then
15383 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
15384 if test "X$found_so" != "X"; then
15385 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15386 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15387 else
15388 haveit=
15389 for x in $ltrpathdirs; do
15390 if test "X$x" = "X$found_dir"; then
15391 haveit=yes
15392 break
15393 fi
15394 done
15395 if test -z "$haveit"; then
15396 ltrpathdirs="$ltrpathdirs $found_dir"
15397 fi
15398 if test "$hardcode_direct" = yes; then
15399 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15400 else
15401 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15403 haveit=
15404 for x in $rpathdirs; do
15405 if test "X$x" = "X$found_dir"; then
15406 haveit=yes
15407 break
15408 fi
15409 done
15410 if test -z "$haveit"; then
15411 rpathdirs="$rpathdirs $found_dir"
15412 fi
15413 else
15414 haveit=
15415 for x in $LDFLAGS $LIBBABELTRACE; do
15416
15417 acl_save_prefix="$prefix"
15418 prefix="$acl_final_prefix"
15419 acl_save_exec_prefix="$exec_prefix"
15420 exec_prefix="$acl_final_exec_prefix"
15421 eval x=\"$x\"
15422 exec_prefix="$acl_save_exec_prefix"
15423 prefix="$acl_save_prefix"
15424
15425 if test "X$x" = "X-L$found_dir"; then
15426 haveit=yes
15427 break
15428 fi
15429 done
15430 if test -z "$haveit"; then
15431 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15432 fi
15433 if test "$hardcode_minus_L" != no; then
15434 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15435 else
15436 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15437 fi
15438 fi
15439 fi
15440 fi
15441 else
15442 if test "X$found_a" != "X"; then
15443 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15444 else
15445 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15446 fi
15447 fi
15448 additional_includedir=
15449 case "$found_dir" in
15450 */lib | */lib/)
15451 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15452 additional_includedir="$basedir/include"
15453 ;;
15454 esac
15455 if test "X$additional_includedir" != "X"; then
15456 if test "X$additional_includedir" != "X/usr/include"; then
15457 haveit=
15458 if test "X$additional_includedir" = "X/usr/local/include"; then
15459 if test -n "$GCC"; then
15460 case $host_os in
15461 linux*) haveit=yes;;
15462 esac
15463 fi
15464 fi
15465 if test -z "$haveit"; then
15466 for x in $CPPFLAGS $INCBABELTRACE; do
15467
15468 acl_save_prefix="$prefix"
15469 prefix="$acl_final_prefix"
15470 acl_save_exec_prefix="$exec_prefix"
15471 exec_prefix="$acl_final_exec_prefix"
15472 eval x=\"$x\"
15473 exec_prefix="$acl_save_exec_prefix"
15474 prefix="$acl_save_prefix"
15475
15476 if test "X$x" = "X-I$additional_includedir"; then
15477 haveit=yes
15478 break
15479 fi
15480 done
15481 if test -z "$haveit"; then
15482 if test -d "$additional_includedir"; then
15483 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15484 fi
15485 fi
15486 fi
15487 fi
15488 fi
15489 if test -n "$found_la"; then
15490 save_libdir="$libdir"
15491 case "$found_la" in
15492 */* | *\\*) . "$found_la" ;;
15493 *) . "./$found_la" ;;
15494 esac
15495 libdir="$save_libdir"
15496 for dep in $dependency_libs; do
15497 case "$dep" in
15498 -L*)
15499 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15500 if test "X$additional_libdir" != "X/usr/lib"; then
15501 haveit=
15502 if test "X$additional_libdir" = "X/usr/local/lib"; then
15503 if test -n "$GCC"; then
15504 case $host_os in
15505 linux*) haveit=yes;;
15506 esac
15507 fi
15508 fi
15509 if test -z "$haveit"; then
15510 haveit=
15511 for x in $LDFLAGS $LIBBABELTRACE; do
15512
15513 acl_save_prefix="$prefix"
15514 prefix="$acl_final_prefix"
15515 acl_save_exec_prefix="$exec_prefix"
15516 exec_prefix="$acl_final_exec_prefix"
15517 eval x=\"$x\"
15518 exec_prefix="$acl_save_exec_prefix"
15519 prefix="$acl_save_prefix"
15520
15521 if test "X$x" = "X-L$additional_libdir"; then
15522 haveit=yes
15523 break
15524 fi
15525 done
15526 if test -z "$haveit"; then
15527 if test -d "$additional_libdir"; then
15528 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15529 fi
15530 fi
15531 haveit=
15532 for x in $LDFLAGS $LTLIBBABELTRACE; do
15533
15534 acl_save_prefix="$prefix"
15535 prefix="$acl_final_prefix"
15536 acl_save_exec_prefix="$exec_prefix"
15537 exec_prefix="$acl_final_exec_prefix"
15538 eval x=\"$x\"
15539 exec_prefix="$acl_save_exec_prefix"
15540 prefix="$acl_save_prefix"
15541
15542 if test "X$x" = "X-L$additional_libdir"; then
15543 haveit=yes
15544 break
15545 fi
15546 done
15547 if test -z "$haveit"; then
15548 if test -d "$additional_libdir"; then
15549 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15550 fi
15551 fi
15552 fi
15553 fi
15554 ;;
15555 -R*)
15556 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15557 if test "$enable_rpath" != no; then
15558 haveit=
15559 for x in $rpathdirs; do
15560 if test "X$x" = "X$dir"; then
15561 haveit=yes
15562 break
15563 fi
15564 done
15565 if test -z "$haveit"; then
15566 rpathdirs="$rpathdirs $dir"
15567 fi
15568 haveit=
15569 for x in $ltrpathdirs; do
15570 if test "X$x" = "X$dir"; then
15571 haveit=yes
15572 break
15573 fi
15574 done
15575 if test -z "$haveit"; then
15576 ltrpathdirs="$ltrpathdirs $dir"
15577 fi
15578 fi
15579 ;;
15580 -l*)
15581 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15582 ;;
15583 *.la)
15584 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15585 ;;
15586 *)
15587 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15588 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15589 ;;
15590 esac
15591 done
15592 fi
15593 else
15594 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15595 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15596 fi
15597 fi
15598 fi
15599 done
15600 done
15601 if test "X$rpathdirs" != "X"; then
15602 if test -n "$hardcode_libdir_separator"; then
15603 alldirs=
15604 for found_dir in $rpathdirs; do
15605 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15606 done
15607 acl_save_libdir="$libdir"
15608 libdir="$alldirs"
15609 eval flag=\"$hardcode_libdir_flag_spec\"
15610 libdir="$acl_save_libdir"
15611 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15612 else
15613 for found_dir in $rpathdirs; do
15614 acl_save_libdir="$libdir"
15615 libdir="$found_dir"
15616 eval flag=\"$hardcode_libdir_flag_spec\"
15617 libdir="$acl_save_libdir"
15618 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15619 done
15620 fi
15621 fi
15622 if test "X$ltrpathdirs" != "X"; then
15623 for found_dir in $ltrpathdirs; do
15624 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15625 done
15626 fi
15627
15628
15629 ac_save_CPPFLAGS="$CPPFLAGS"
15630
15631 for element in $INCBABELTRACE; do
15632 haveit=
15633 for x in $CPPFLAGS; do
15634
15635 acl_save_prefix="$prefix"
15636 prefix="$acl_final_prefix"
15637 acl_save_exec_prefix="$exec_prefix"
15638 exec_prefix="$acl_final_exec_prefix"
15639 eval x=\"$x\"
15640 exec_prefix="$acl_save_exec_prefix"
15641 prefix="$acl_save_prefix"
15642
15643 if test "X$x" = "X$element"; then
15644 haveit=yes
15645 break
15646 fi
15647 done
15648 if test -z "$haveit"; then
15649 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15650 fi
15651 done
15652
15653
15654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15655$as_echo_n "checking for libbabeltrace... " >&6; }
15656if test "${ac_cv_libbabeltrace+set}" = set; then :
15657 $as_echo_n "(cached) " >&6
15658else
15659
15660 ac_save_LIBS="$LIBS"
15661 LIBS="$LIBS $LIBBABELTRACE"
15662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663/* end confdefs.h. */
15664#include <babeltrace/babeltrace.h>
15665 #include <babeltrace/ctf/events.h>
15666 #include <babeltrace/ctf/iterator.h>
15667int
15668main ()
15669{
15670struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15671 struct bt_ctf_event *event = NULL;
15672 const struct bt_definition *scope;
15673
65c749e7 15674 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
15675 scope = bt_ctf_get_top_level_scope (event,
15676 BT_STREAM_EVENT_HEADER);
15677 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15678
15679 ;
15680 return 0;
15681}
15682_ACEOF
15683if ac_fn_c_try_link "$LINENO"; then :
15684 ac_cv_libbabeltrace=yes
15685else
15686 ac_cv_libbabeltrace=no
15687fi
15688rm -f core conftest.err conftest.$ac_objext \
15689 conftest$ac_exeext conftest.$ac_ext
15690 LIBS="$ac_save_LIBS"
15691
15692fi
15693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15694$as_echo "$ac_cv_libbabeltrace" >&6; }
15695 if test "$ac_cv_libbabeltrace" = yes; then
15696 HAVE_LIBBABELTRACE=yes
15697
15698$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15699
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15701$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15703$as_echo "$LIBBABELTRACE" >&6; }
15704 else
15705 HAVE_LIBBABELTRACE=no
15706 CPPFLAGS="$ac_save_CPPFLAGS"
15707 LIBBABELTRACE=
15708 LTLIBBABELTRACE=
15709 fi
15710
15711
15712
15713
15714
15715
15716 CFLAGS=$saved_CFLAGS
15717
15718 if test "$HAVE_LIBBABELTRACE" != yes; then
15719 if test "$with_babeltrace" = yes; then
15720 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15721 else
15722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15723$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15724 fi
15725 fi
15726fi
15727
db985757 15728# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15729# to an empty version.
c906108c
SS
15730
15731files=
15732links=
5a2402b8 15733
c906108c
SS
15734rm -f nm.h
15735if test "${nativefile}" != ""; then
0f475e27
AC
15736 case "${nativefile}" in
15737 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15738 * ) GDB_NM_FILE="${nativefile}"
15739 esac
5a2402b8
AC
15740 files="${files} ${GDB_NM_FILE}"
15741 links="${links} nm.h"
60ca704f
SE
15742
15743cat >>confdefs.h <<_ACEOF
b78960be 15744#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15745_ACEOF
5a2402b8 15746
c906108c 15747fi
5a2402b8
AC
15748
15749
bec39cab
AC
15750ac_sources="$files"
15751ac_dests="$links"
15752while test -n "$ac_sources"; do
15753 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15754 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15755 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15756done
81ecdfbb 15757ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15758
15759
c906108c
SS
15760
15761
c906108c 15762
81ecdfbb 15763$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15764
bec39cab 15765
b292c783 15766
f6a88844
JM
15767 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15768 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
15769 if test "x$GDB_TRANSFORM_NAME" = x; then
15770 GDB_TRANSFORM_NAME=gdb
15771 fi
15772
15773
15774
15775 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15776 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
15777 if test "x$GCORE_TRANSFORM_NAME" = x; then
15778 GCORE_TRANSFORM_NAME=gcore
15779 fi
15780
b292c783
JK
15781
15782ac_config_files="$ac_config_files gcore"
15783
15784
c971b7fa 15785ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15786
15787ac_config_commands="$ac_config_commands default"
89a34d1b 15788
bec39cab
AC
15789cat >confcache <<\_ACEOF
15790# This file is a shell script that caches the results of configure
15791# tests run on this system so they can be shared between configure
15792# scripts and configure runs, see configure's option --config-cache.
15793# It is not useful on other systems. If it contains results you don't
15794# want to keep, you may remove or edit it.
15795#
15796# config.status only pays attention to the cache file if you give it
15797# the --recheck option to rerun configure.
15798#
15799# `ac_cv_env_foo' variables (set or unset) will be overridden when
15800# loading this file, other *unset* `ac_cv_foo' will be assigned the
15801# following values.
15802
15803_ACEOF
15804
15805# The following way of writing the cache mishandles newlines in values,
15806# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15807# So, we kill variables containing newlines.
bec39cab
AC
15808# Ultrix sh set writes to stderr and can't be redirected directly,
15809# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15810(
15811 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15812 eval ac_val=\$$ac_var
15813 case $ac_val in #(
15814 *${as_nl}*)
15815 case $ac_var in #(
15816 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15817$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15818 esac
15819 case $ac_var in #(
15820 _ | IFS | as_nl) ;; #(
15821 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15822 *) { eval $ac_var=; unset $ac_var;} ;;
15823 esac ;;
15824 esac
15825 done
15826
bec39cab 15827 (set) 2>&1 |
81ecdfbb
RW
15828 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15829 *${as_nl}ac_space=\ *)
15830 # `set' does not quote correctly, so add quotes: double-quote
15831 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15832 sed -n \
15833 "s/'/'\\\\''/g;
15834 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15835 ;; #(
bec39cab
AC
15836 *)
15837 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15838 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15839 ;;
81ecdfbb
RW
15840 esac |
15841 sort
15842) |
bec39cab 15843 sed '
81ecdfbb 15844 /^ac_cv_env_/b end
bec39cab 15845 t clear
81ecdfbb 15846 :clear
bec39cab
AC
15847 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15848 t end
81ecdfbb
RW
15849 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15850 :end' >>confcache
15851if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15852 if test -w "$cache_file"; then
15853 test "x$cache_file" != "x/dev/null" &&
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15855$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15856 cat confcache >$cache_file
15857 else
81ecdfbb
RW
15858 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15859$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15860 fi
15861fi
15862rm -f confcache
15863
15864test "x$prefix" = xNONE && prefix=$ac_default_prefix
15865# Let make expand exec_prefix.
15866test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15867
bec39cab
AC
15868DEFS=-DHAVE_CONFIG_H
15869
15870ac_libobjs=
15871ac_ltlibobjs=
15872for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15873 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15874 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15875 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15876 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15877 # will be set to the directory where LIBOBJS objects are built.
15878 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15879 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15880done
15881LIBOBJS=$ac_libobjs
15882
15883LTLIBOBJS=$ac_ltlibobjs
15884
15885
85981d60 15886if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15887 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15888Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15889fi
a417dc56 15890if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15891 as_fn_error "conditional \"GMAKE\" was never defined.
15892Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15893fi
4df42755
DE
15894if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15895 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15896Usually this means the macro was only invoked conditionally." "$LINENO" 5
15897fi
15898if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15899 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15900Usually this means the macro was only invoked conditionally." "$LINENO" 5
15901fi
81ecdfbb
RW
15902
15903
bec39cab 15904: ${CONFIG_STATUS=./config.status}
81ecdfbb 15905ac_write_fail=0
bec39cab
AC
15906ac_clean_files_save=$ac_clean_files
15907ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15908{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15909$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15910as_write_fail=0
15911cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15912#! $SHELL
15913# Generated by $as_me.
15914# Run this file to recreate the current configuration.
15915# Compiler output produced by configure, useful for debugging
15916# configure, is in config.log if it exists.
15917
15918debug=false
15919ac_cs_recheck=false
15920ac_cs_silent=false
bec39cab 15921
81ecdfbb
RW
15922SHELL=\${CONFIG_SHELL-$SHELL}
15923export SHELL
15924_ASEOF
15925cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15926## -------------------- ##
15927## M4sh Initialization. ##
15928## -------------------- ##
15929
15930# Be more Bourne compatible
15931DUALCASE=1; export DUALCASE # for MKS sh
15932if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15933 emulate sh
15934 NULLCMD=:
81ecdfbb 15935 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15936 # is contrary to our usage. Disable this feature.
15937 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15938 setopt NO_GLOB_SUBST
15939else
15940 case `(set -o) 2>/dev/null` in #(
15941 *posix*) :
15942 set -o posix ;; #(
15943 *) :
15944 ;;
15945esac
bec39cab 15946fi
bec39cab 15947
81ecdfbb
RW
15948
15949as_nl='
15950'
15951export as_nl
15952# Printing a long string crashes Solaris 7 /usr/bin/printf.
15953as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15954as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15955as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15956# Prefer a ksh shell builtin over an external printf program on Solaris,
15957# but without wasting forks for bash or zsh.
15958if test -z "$BASH_VERSION$ZSH_VERSION" \
15959 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15960 as_echo='print -r --'
15961 as_echo_n='print -rn --'
15962elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15963 as_echo='printf %s\n'
15964 as_echo_n='printf %s'
15965else
15966 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15967 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15968 as_echo_n='/usr/ucb/echo -n'
15969 else
15970 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15971 as_echo_n_body='eval
15972 arg=$1;
15973 case $arg in #(
15974 *"$as_nl"*)
15975 expr "X$arg" : "X\\(.*\\)$as_nl";
15976 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15977 esac;
15978 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15979 '
15980 export as_echo_n_body
15981 as_echo_n='sh -c $as_echo_n_body as_echo'
15982 fi
15983 export as_echo_body
15984 as_echo='sh -c $as_echo_body as_echo'
15985fi
15986
15987# The user is always right.
15988if test "${PATH_SEPARATOR+set}" != set; then
15989 PATH_SEPARATOR=:
15990 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15991 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15992 PATH_SEPARATOR=';'
15993 }
bec39cab
AC
15994fi
15995
15996
81ecdfbb
RW
15997# IFS
15998# We need space, tab and new line, in precisely that order. Quoting is
15999# there to prevent editors from complaining about space-tab.
16000# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16001# splitting by setting IFS to empty value.)
16002IFS=" "" $as_nl"
16003
16004# Find who we are. Look in the path if we contain no directory separator.
16005case $0 in #((
16006 *[\\/]* ) as_myself=$0 ;;
16007 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16008for as_dir in $PATH
16009do
16010 IFS=$as_save_IFS
16011 test -z "$as_dir" && as_dir=.
16012 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16013 done
16014IFS=$as_save_IFS
16015
16016 ;;
16017esac
16018# We did not find ourselves, most probably we were run as `sh COMMAND'
16019# in which case we are not to be found in the path.
16020if test "x$as_myself" = x; then
16021 as_myself=$0
16022fi
16023if test ! -f "$as_myself"; then
16024 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16025 exit 1
16026fi
16027
16028# Unset variables that we do not need and which cause bugs (e.g. in
16029# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16030# suppresses any "Segmentation fault" message there. '((' could
16031# trigger a bug in pdksh 5.2.14.
16032for as_var in BASH_ENV ENV MAIL MAILPATH
16033do eval test x\${$as_var+set} = xset \
16034 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16035done
bec39cab
AC
16036PS1='$ '
16037PS2='> '
16038PS4='+ '
16039
16040# NLS nuisances.
81ecdfbb
RW
16041LC_ALL=C
16042export LC_ALL
16043LANGUAGE=C
16044export LANGUAGE
16045
16046# CDPATH.
16047(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16048
16049
16050# as_fn_error ERROR [LINENO LOG_FD]
16051# ---------------------------------
16052# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16053# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16054# script with status $?, using 1 if that was 0.
16055as_fn_error ()
16056{
16057 as_status=$?; test $as_status -eq 0 && as_status=1
16058 if test "$3"; then
16059 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16060 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16061 fi
16062 $as_echo "$as_me: error: $1" >&2
16063 as_fn_exit $as_status
16064} # as_fn_error
16065
16066
16067# as_fn_set_status STATUS
16068# -----------------------
16069# Set $? to STATUS, without forking.
16070as_fn_set_status ()
16071{
16072 return $1
16073} # as_fn_set_status
16074
16075# as_fn_exit STATUS
16076# -----------------
16077# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16078as_fn_exit ()
16079{
16080 set +e
16081 as_fn_set_status $1
16082 exit $1
16083} # as_fn_exit
16084
16085# as_fn_unset VAR
16086# ---------------
16087# Portably unset VAR.
16088as_fn_unset ()
16089{
16090 { eval $1=; unset $1;}
16091}
16092as_unset=as_fn_unset
16093# as_fn_append VAR VALUE
16094# ----------------------
16095# Append the text in VALUE to the end of the definition contained in VAR. Take
16096# advantage of any shell optimizations that allow amortized linear growth over
16097# repeated appends, instead of the typical quadratic growth present in naive
16098# implementations.
16099if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16100 eval 'as_fn_append ()
16101 {
16102 eval $1+=\$2
16103 }'
16104else
16105 as_fn_append ()
16106 {
16107 eval $1=\$$1\$2
16108 }
16109fi # as_fn_append
16110
16111# as_fn_arith ARG...
16112# ------------------
16113# Perform arithmetic evaluation on the ARGs, and store the result in the
16114# global $as_val. Take advantage of shells that can avoid forks. The arguments
16115# must be portable across $(()) and expr.
16116if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16117 eval 'as_fn_arith ()
16118 {
16119 as_val=$(( $* ))
16120 }'
16121else
16122 as_fn_arith ()
16123 {
16124 as_val=`expr "$@" || test $? -eq 1`
16125 }
16126fi # as_fn_arith
bec39cab 16127
81ecdfbb
RW
16128
16129if expr a : '\(a\)' >/dev/null 2>&1 &&
16130 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16131 as_expr=expr
16132else
16133 as_expr=false
16134fi
16135
81ecdfbb 16136if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16137 as_basename=basename
16138else
16139 as_basename=false
16140fi
16141
81ecdfbb
RW
16142if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16143 as_dirname=dirname
16144else
16145 as_dirname=false
16146fi
bec39cab 16147
81ecdfbb 16148as_me=`$as_basename -- "$0" ||
bec39cab
AC
16149$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16150 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16151 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16152$as_echo X/"$0" |
16153 sed '/^.*\/\([^/][^/]*\)\/*$/{
16154 s//\1/
16155 q
16156 }
16157 /^X\/\(\/\/\)$/{
16158 s//\1/
16159 q
16160 }
16161 /^X\/\(\/\).*/{
16162 s//\1/
16163 q
16164 }
16165 s/.*/./; q'`
b4e70030 16166
b4e70030
JB
16167# Avoid depending upon Character Ranges.
16168as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16169as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16170as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16171as_cr_digits='0123456789'
16172as_cr_alnum=$as_cr_Letters$as_cr_digits
16173
81ecdfbb
RW
16174ECHO_C= ECHO_N= ECHO_T=
16175case `echo -n x` in #(((((
16176-n*)
16177 case `echo 'xy\c'` in
16178 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16179 xy) ECHO_C='\c';;
16180 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16181 ECHO_T=' ';;
16182 esac;;
16183*)
16184 ECHO_N='-n';;
bec39cab
AC
16185esac
16186
81ecdfbb
RW
16187rm -f conf$$ conf$$.exe conf$$.file
16188if test -d conf$$.dir; then
16189 rm -f conf$$.dir/conf$$.file
bec39cab 16190else
81ecdfbb
RW
16191 rm -f conf$$.dir
16192 mkdir conf$$.dir 2>/dev/null
bec39cab 16193fi
81ecdfbb
RW
16194if (echo >conf$$.file) 2>/dev/null; then
16195 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16196 as_ln_s='ln -s'
81ecdfbb
RW
16197 # ... but there are two gotchas:
16198 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16199 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16200 # In both cases, we have to default to `cp -p'.
16201 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16202 as_ln_s='cp -p'
16203 elif ln conf$$.file conf$$ 2>/dev/null; then
16204 as_ln_s=ln
16205 else
16206 as_ln_s='cp -p'
b4e70030 16207 fi
bec39cab
AC
16208else
16209 as_ln_s='cp -p'
16210fi
81ecdfbb
RW
16211rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16212rmdir conf$$.dir 2>/dev/null
16213
16214
16215# as_fn_mkdir_p
16216# -------------
16217# Create "$as_dir" as a directory, including parents if necessary.
16218as_fn_mkdir_p ()
16219{
16220
16221 case $as_dir in #(
16222 -*) as_dir=./$as_dir;;
16223 esac
16224 test -d "$as_dir" || eval $as_mkdir_p || {
16225 as_dirs=
16226 while :; do
16227 case $as_dir in #(
16228 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16229 *) as_qdir=$as_dir;;
16230 esac
16231 as_dirs="'$as_qdir' $as_dirs"
16232 as_dir=`$as_dirname -- "$as_dir" ||
16233$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16234 X"$as_dir" : 'X\(//\)[^/]' \| \
16235 X"$as_dir" : 'X\(//\)$' \| \
16236 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16237$as_echo X"$as_dir" |
16238 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16239 s//\1/
16240 q
16241 }
16242 /^X\(\/\/\)[^/].*/{
16243 s//\1/
16244 q
16245 }
16246 /^X\(\/\/\)$/{
16247 s//\1/
16248 q
16249 }
16250 /^X\(\/\).*/{
16251 s//\1/
16252 q
16253 }
16254 s/.*/./; q'`
16255 test -d "$as_dir" && break
16256 done
16257 test -z "$as_dirs" || eval "mkdir $as_dirs"
16258 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16259
bec39cab 16260
81ecdfbb 16261} # as_fn_mkdir_p
bec39cab 16262if mkdir -p . 2>/dev/null; then
81ecdfbb 16263 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16264else
16265 test -d ./-p && rmdir ./-p
16266 as_mkdir_p=false
16267fi
16268
81ecdfbb
RW
16269if test -x / >/dev/null 2>&1; then
16270 as_test_x='test -x'
16271else
16272 if ls -dL / >/dev/null 2>&1; then
16273 as_ls_L_option=L
16274 else
16275 as_ls_L_option=
16276 fi
16277 as_test_x='
16278 eval sh -c '\''
16279 if test -d "$1"; then
16280 test -d "$1/.";
16281 else
16282 case $1 in #(
16283 -*)set "./$1";;
16284 esac;
16285 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16286 ???[sx]*):;;*)false;;esac;fi
16287 '\'' sh
16288 '
16289fi
16290as_executable_p=$as_test_x
bec39cab
AC
16291
16292# Sed expression to map a string onto a valid CPP name.
16293as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16294
16295# Sed expression to map a string onto a valid variable name.
16296as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16297
16298
bec39cab 16299exec 6>&1
81ecdfbb
RW
16300## ----------------------------------- ##
16301## Main body of $CONFIG_STATUS script. ##
16302## ----------------------------------- ##
16303_ASEOF
16304test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16305
16306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16307# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16308# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16309# values after options handling.
16310ac_log="
bec39cab 16311This file was extended by $as_me, which was
81ecdfbb 16312generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16313
16314 CONFIG_FILES = $CONFIG_FILES
16315 CONFIG_HEADERS = $CONFIG_HEADERS
16316 CONFIG_LINKS = $CONFIG_LINKS
16317 CONFIG_COMMANDS = $CONFIG_COMMANDS
16318 $ $0 $@
16319
81ecdfbb
RW
16320on `(hostname || uname -n) 2>/dev/null | sed 1q`
16321"
16322
bec39cab
AC
16323_ACEOF
16324
81ecdfbb
RW
16325case $ac_config_files in *"
16326"*) set x $ac_config_files; shift; ac_config_files=$*;;
16327esac
234b45d4 16328
81ecdfbb
RW
16329case $ac_config_headers in *"
16330"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16331esac
b4e70030 16332
b4e70030 16333
81ecdfbb
RW
16334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16335# Files that config.status was made for.
16336config_files="$ac_config_files"
16337config_headers="$ac_config_headers"
16338config_links="$ac_config_links"
16339config_commands="$ac_config_commands"
234b45d4 16340
81ecdfbb 16341_ACEOF
b4e70030 16342
81ecdfbb 16343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16344ac_cs_usage="\
81ecdfbb
RW
16345\`$as_me' instantiates files and other configuration actions
16346from templates according to the current configuration. Unless the files
16347and actions are specified as TAGs, all are instantiated by default.
234b45d4 16348
81ecdfbb 16349Usage: $0 [OPTION]... [TAG]...
234b45d4 16350
bec39cab 16351 -h, --help print this help, then exit
81ecdfbb
RW
16352 -V, --version print version number and configuration settings, then exit
16353 -q, --quiet, --silent
16354 do not print progress messages
bec39cab
AC
16355 -d, --debug don't remove temporary files
16356 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16357 --file=FILE[:TEMPLATE]
16358 instantiate the configuration file FILE
16359 --header=FILE[:TEMPLATE]
16360 instantiate the configuration header FILE
234b45d4 16361
bec39cab
AC
16362Configuration files:
16363$config_files
234b45d4 16364
bec39cab
AC
16365Configuration headers:
16366$config_headers
234b45d4 16367
bec39cab
AC
16368Configuration links:
16369$config_links
234b45d4 16370
bec39cab
AC
16371Configuration commands:
16372$config_commands
16373
81ecdfbb 16374Report bugs to the package provider."
b4e70030 16375
81ecdfbb
RW
16376_ACEOF
16377cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16378ac_cs_version="\\
16379config.status
81ecdfbb
RW
16380configured by $0, generated by GNU Autoconf 2.64,
16381 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16382
81ecdfbb 16383Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16384This config.status script is free software; the Free Software Foundation
16385gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16386
16387ac_pwd='$ac_pwd'
16388srcdir='$srcdir'
16389INSTALL='$INSTALL'
81ecdfbb
RW
16390AWK='$AWK'
16391test -n "\$AWK" || AWK=awk
bec39cab
AC
16392_ACEOF
16393
81ecdfbb
RW
16394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16395# The default lists apply if the user does not specify any file.
bec39cab
AC
16396ac_need_defaults=:
16397while test $# != 0
16398do
16399 case $1 in
16400 --*=*)
81ecdfbb
RW
16401 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16402 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16403 ac_shift=:
c906108c 16404 ;;
81ecdfbb 16405 *)
bec39cab
AC
16406 ac_option=$1
16407 ac_optarg=$2
16408 ac_shift=shift
c906108c 16409 ;;
bec39cab 16410 esac
c906108c 16411
bec39cab
AC
16412 case $ac_option in
16413 # Handling of the options.
bec39cab
AC
16414 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16415 ac_cs_recheck=: ;;
81ecdfbb
RW
16416 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16417 $as_echo "$ac_cs_version"; exit ;;
16418 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16419 debug=: ;;
16420 --file | --fil | --fi | --f )
16421 $ac_shift
81ecdfbb
RW
16422 case $ac_optarg in
16423 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16424 esac
16425 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16426 ac_need_defaults=false;;
16427 --header | --heade | --head | --hea )
16428 $ac_shift
81ecdfbb
RW
16429 case $ac_optarg in
16430 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16431 esac
16432 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16433 ac_need_defaults=false;;
81ecdfbb
RW
16434 --he | --h)
16435 # Conflict between --help and --header
16436 as_fn_error "ambiguous option: \`$1'
16437Try \`$0 --help' for more information.";;
16438 --help | --hel | -h )
16439 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16440 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16441 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16442 ac_cs_silent=: ;;
c906108c 16443
bec39cab 16444 # This is an error.
81ecdfbb
RW
16445 -*) as_fn_error "unrecognized option: \`$1'
16446Try \`$0 --help' for more information." ;;
c906108c 16447
81ecdfbb
RW
16448 *) as_fn_append ac_config_targets " $1"
16449 ac_need_defaults=false ;;
c906108c 16450
bec39cab
AC
16451 esac
16452 shift
16453done
c906108c 16454
bec39cab 16455ac_configure_extra_args=
c906108c 16456
bec39cab
AC
16457if $ac_cs_silent; then
16458 exec 6>/dev/null
16459 ac_configure_extra_args="$ac_configure_extra_args --silent"
16460fi
c906108c 16461
bec39cab 16462_ACEOF
81ecdfbb 16463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16464if \$ac_cs_recheck; then
81ecdfbb
RW
16465 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16466 shift
16467 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16468 CONFIG_SHELL='$SHELL'
16469 export CONFIG_SHELL
16470 exec "\$@"
bec39cab
AC
16471fi
16472
16473_ACEOF
81ecdfbb
RW
16474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16475exec 5>>config.log
16476{
16477 echo
16478 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16479## Running $as_me. ##
16480_ASBOX
16481 $as_echo "$ac_log"
16482} >&5
bec39cab 16483
81ecdfbb
RW
16484_ACEOF
16485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16486#
81ecdfbb 16487# INIT-COMMANDS
c906108c 16488#
a417dc56 16489ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16490
bec39cab
AC
16491_ACEOF
16492
81ecdfbb 16493cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16494
81ecdfbb 16495# Handling of arguments.
bec39cab 16496for ac_config_target in $ac_config_targets
c906108c 16497do
81ecdfbb
RW
16498 case $ac_config_target in
16499 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16500 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16501 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16502 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16503 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16504 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16505 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16506 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16507 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16508 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16509
16510 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16511 esac
16512done
16513
81ecdfbb 16514
bec39cab
AC
16515# If the user did not use the arguments to specify the items to instantiate,
16516# then the envvar interface is used. Set only those that are not.
16517# We use the long form for the default assignment because of an extremely
16518# bizarre bug on SunOS 4.1.3.
16519if $ac_need_defaults; then
16520 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16521 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16522 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16523 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16524fi
16525
b4e70030 16526# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16527# simply because there is no reason against having it here, and in addition,
b4e70030 16528# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16529# Hook for its removal unless debugging.
16530# Note that there is a small window in which the directory will not be cleaned:
16531# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16532$debug ||
16533{
81ecdfbb
RW
16534 tmp=
16535 trap 'exit_status=$?
16536 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16537' 0
16538 trap 'as_fn_exit 1' 1 2 13 15
16539}
16540# Create a (secure) tmp directory for tmp files.
16541
16542{
16543 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16544 test -n "$tmp" && test -d "$tmp"
16545} ||
16546{
16547 tmp=./conf$$-$RANDOM
16548 (umask 077 && mkdir "$tmp")
16549} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16550
16551# Set up the scripts for CONFIG_FILES section.
16552# No need to generate them if there are no CONFIG_FILES.
16553# This happens for instance with `./config.status config.h'.
16554if test -n "$CONFIG_FILES"; then
16555
16556if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16557 ac_cs_awk_getline=:
16558 ac_cs_awk_pipe_init=
16559 ac_cs_awk_read_file='
16560 while ((getline aline < (F[key])) > 0)
16561 print(aline)
16562 close(F[key])'
16563 ac_cs_awk_pipe_fini=
16564else
16565 ac_cs_awk_getline=false
16566 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16567 ac_cs_awk_read_file='
16568 print "|#_!!_#|"
16569 print "cat " F[key] " &&"
16570 '$ac_cs_awk_pipe_init
16571 # The final `:' finishes the AND list.
16572 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16573fi
16574ac_cr=`echo X | tr X '\015'`
16575# On cygwin, bash can eat \r inside `` if the user requested igncr.
16576# But we know of no other shell where ac_cr would be empty at this
16577# point, so we can use a bashism as a fallback.
16578if test "x$ac_cr" = x; then
16579 eval ac_cr=\$\'\\r\'
16580fi
16581ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16582if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16583 ac_cs_awk_cr='\r'
16584else
16585 ac_cs_awk_cr=$ac_cr
16586fi
16587
16588echo 'BEGIN {' >"$tmp/subs1.awk" &&
16589_ACEOF
16590
16591# Create commands to substitute file output variables.
16592{
16593 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16594 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16595 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16596 echo "_ACAWK" &&
16597 echo "_ACEOF"
16598} >conf$$files.sh &&
16599. ./conf$$files.sh ||
16600 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16601rm -f conf$$files.sh
16602
16603{
16604 echo "cat >conf$$subs.awk <<_ACEOF" &&
16605 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16606 echo "_ACEOF"
16607} >conf$$subs.sh ||
16608 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16609ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16610ac_delim='%!_!# '
16611for ac_last_try in false false false false false :; do
16612 . ./conf$$subs.sh ||
16613 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16614
16615 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16616 if test $ac_delim_n = $ac_delim_num; then
16617 break
16618 elif $ac_last_try; then
16619 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16620 else
16621 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16622 fi
16623done
16624rm -f conf$$subs.sh
16625
16626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16627cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16628_ACEOF
16629sed -n '
16630h
16631s/^/S["/; s/!.*/"]=/
16632p
16633g
16634s/^[^!]*!//
16635:repl
16636t repl
16637s/'"$ac_delim"'$//
16638t delim
16639:nl
16640h
16641s/\(.\{148\}\).*/\1/
16642t more1
16643s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16644p
16645n
16646b repl
16647:more1
16648s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16649p
16650g
16651s/.\{148\}//
16652t nl
16653:delim
16654h
16655s/\(.\{148\}\).*/\1/
16656t more2
16657s/["\\]/\\&/g; s/^/"/; s/$/"/
16658p
16659b
16660:more2
16661s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16662p
16663g
16664s/.\{148\}//
16665t delim
16666' <conf$$subs.awk | sed '
16667/^[^""]/{
16668 N
16669 s/\n//
16670}
16671' >>$CONFIG_STATUS || ac_write_fail=1
16672rm -f conf$$subs.awk
16673cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16674_ACAWK
16675cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16676 for (key in S) S_is_set[key] = 1
16677 FS = "\a"
16678 \$ac_cs_awk_pipe_init
16679}
16680{
16681 line = $ 0
16682 nfields = split(line, field, "@")
16683 substed = 0
16684 len = length(field[1])
16685 for (i = 2; i < nfields; i++) {
16686 key = field[i]
16687 keylen = length(key)
16688 if (S_is_set[key]) {
16689 value = S[key]
16690 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16691 len += length(value) + length(field[++i])
16692 substed = 1
16693 } else
16694 len += 1 + keylen
16695 }
16696 if (nfields == 3 && !substed) {
16697 key = field[2]
16698 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16699 \$ac_cs_awk_read_file
16700 next
16701 }
16702 }
16703 print line
b4e70030 16704}
81ecdfbb
RW
16705\$ac_cs_awk_pipe_fini
16706_ACAWK
16707_ACEOF
16708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16709if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16710 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16711else
16712 cat
16713fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16714 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16715_ACEOF
16716
16717# VPATH may cause trouble with some makes, so we remove $(srcdir),
16718# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16719# trailing colons and then remove the whole line if VPATH becomes empty
16720# (actually we leave an empty line to preserve line numbers).
16721if test "x$srcdir" = x.; then
16722 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16723s/:*\$(srcdir):*/:/
16724s/:*\${srcdir}:*/:/
16725s/:*@srcdir@:*/:/
16726s/^\([^=]*=[ ]*\):*/\1/
16727s/:*$//
16728s/^[^=]*=[ ]*$//
16729}'
16730fi
16731
16732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16733fi # test -n "$CONFIG_FILES"
16734
16735# Set up the scripts for CONFIG_HEADERS section.
16736# No need to generate them if there are no CONFIG_HEADERS.
16737# This happens for instance with `./config.status Makefile'.
16738if test -n "$CONFIG_HEADERS"; then
16739cat >"$tmp/defines.awk" <<\_ACAWK ||
16740BEGIN {
16741_ACEOF
16742
16743# Transform confdefs.h into an awk script `defines.awk', embedded as
16744# here-document in config.status, that substitutes the proper values into
16745# config.h.in to produce config.h.
4e8d927d 16746
81ecdfbb
RW
16747# Create a delimiter string that does not exist in confdefs.h, to ease
16748# handling of long lines.
16749ac_delim='%!_!# '
16750for ac_last_try in false false :; do
16751 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16752 if test -z "$ac_t"; then
16753 break
16754 elif $ac_last_try; then
16755 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16756 else
16757 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16758 fi
16759done
4e8d927d 16760
81ecdfbb
RW
16761# For the awk script, D is an array of macro values keyed by name,
16762# likewise P contains macro parameters if any. Preserve backslash
16763# newline sequences.
16764
16765ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16766sed -n '
16767s/.\{148\}/&'"$ac_delim"'/g
16768t rset
16769:rset
16770s/^[ ]*#[ ]*define[ ][ ]*/ /
16771t def
16772d
16773:def
16774s/\\$//
16775t bsnl
16776s/["\\]/\\&/g
16777s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16778D["\1"]=" \3"/p
16779s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16780d
16781:bsnl
16782s/["\\]/\\&/g
16783s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16784D["\1"]=" \3\\\\\\n"\\/p
16785t cont
16786s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16787t cont
16788d
16789:cont
16790n
16791s/.\{148\}/&'"$ac_delim"'/g
16792t clear
16793:clear
16794s/\\$//
16795t bsnlc
16796s/["\\]/\\&/g; s/^/"/; s/$/"/p
16797d
16798:bsnlc
16799s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16800b cont
16801' <confdefs.h | sed '
16802s/'"$ac_delim"'/"\\\
16803"/g' >>$CONFIG_STATUS || ac_write_fail=1
16804
16805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16806 for (key in D) D_is_set[key] = 1
16807 FS = "\a"
16808}
16809/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16810 line = \$ 0
16811 split(line, arg, " ")
16812 if (arg[1] == "#") {
16813 defundef = arg[2]
16814 mac1 = arg[3]
16815 } else {
16816 defundef = substr(arg[1], 2)
16817 mac1 = arg[2]
16818 }
16819 split(mac1, mac2, "(") #)
16820 macro = mac2[1]
16821 prefix = substr(line, 1, index(line, defundef) - 1)
16822 if (D_is_set[macro]) {
16823 # Preserve the white space surrounding the "#".
16824 print prefix "define", macro P[macro] D[macro]
16825 next
16826 } else {
16827 # Replace #undef with comments. This is necessary, for example,
16828 # in the case of _POSIX_SOURCE, which is predefined and required
16829 # on some systems where configure will not decide to define it.
16830 if (defundef == "undef") {
16831 print "/*", prefix defundef, macro, "*/"
16832 next
16833 }
16834 }
b4e70030 16835}
81ecdfbb
RW
16836{ print }
16837_ACAWK
b4e70030 16838_ACEOF
81ecdfbb
RW
16839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16840 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16841fi # test -n "$CONFIG_HEADERS"
4e8d927d 16842
4e8d927d 16843
81ecdfbb
RW
16844eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16845shift
16846for ac_tag
16847do
16848 case $ac_tag in
16849 :[FHLC]) ac_mode=$ac_tag; continue;;
16850 esac
16851 case $ac_mode$ac_tag in
16852 :[FHL]*:*);;
16853 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16854 :[FH]-) ac_tag=-:-;;
16855 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16856 esac
16857 ac_save_IFS=$IFS
16858 IFS=:
16859 set x $ac_tag
16860 IFS=$ac_save_IFS
16861 shift
16862 ac_file=$1
16863 shift
4e8d927d 16864
81ecdfbb
RW
16865 case $ac_mode in
16866 :L) ac_source=$1;;
16867 :[FH])
16868 ac_file_inputs=
16869 for ac_f
16870 do
16871 case $ac_f in
16872 -) ac_f="$tmp/stdin";;
16873 *) # Look for the file first in the build tree, then in the source tree
16874 # (if the path is not absolute). The absolute path cannot be DOS-style,
16875 # because $ac_f cannot contain `:'.
16876 test -f "$ac_f" ||
16877 case $ac_f in
16878 [\\/$]*) false;;
16879 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16880 esac ||
16881 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16882 esac
16883 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16884 as_fn_append ac_file_inputs " '$ac_f'"
16885 done
16886
16887 # Let's still pretend it is `configure' which instantiates (i.e., don't
16888 # use $as_me), people would be surprised to read:
16889 # /* config.h. Generated by config.status. */
16890 configure_input='Generated from '`
16891 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16892 `' by configure.'
16893 if test x"$ac_file" != x-; then
16894 configure_input="$ac_file. $configure_input"
16895 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16896$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16897 fi
81ecdfbb
RW
16898 # Neutralize special characters interpreted by sed in replacement strings.
16899 case $configure_input in #(
16900 *\&* | *\|* | *\\* )
16901 ac_sed_conf_input=`$as_echo "$configure_input" |
16902 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16903 *) ac_sed_conf_input=$configure_input;;
16904 esac
4e8d927d 16905
81ecdfbb
RW
16906 case $ac_tag in
16907 *:-:* | *:-) cat >"$tmp/stdin" \
16908 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16909 esac
16910 ;;
c906108c
SS
16911 esac
16912
81ecdfbb 16913 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16914$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16915 X"$ac_file" : 'X\(//\)[^/]' \| \
16916 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16917 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16918$as_echo X"$ac_file" |
16919 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16920 s//\1/
16921 q
16922 }
16923 /^X\(\/\/\)[^/].*/{
16924 s//\1/
16925 q
16926 }
16927 /^X\(\/\/\)$/{
16928 s//\1/
16929 q
16930 }
16931 /^X\(\/\).*/{
16932 s//\1/
16933 q
16934 }
16935 s/.*/./; q'`
16936 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16937 ac_builddir=.
16938
81ecdfbb
RW
16939case "$ac_dir" in
16940.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16941*)
16942 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16943 # A ".." for each directory in $ac_dir_suffix.
16944 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16945 case $ac_top_builddir_sub in
16946 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16947 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16948 esac ;;
16949esac
16950ac_abs_top_builddir=$ac_pwd
16951ac_abs_builddir=$ac_pwd$ac_dir_suffix
16952# for backward compatibility:
16953ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16954
16955case $srcdir in
81ecdfbb 16956 .) # We are building in place.
bec39cab 16957 ac_srcdir=.
81ecdfbb
RW
16958 ac_top_srcdir=$ac_top_builddir_sub
16959 ac_abs_top_srcdir=$ac_pwd ;;
16960 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16961 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16962 ac_top_srcdir=$srcdir
16963 ac_abs_top_srcdir=$srcdir ;;
16964 *) # Relative name.
16965 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16966 ac_top_srcdir=$ac_top_build_prefix$srcdir
16967 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16968esac
81ecdfbb 16969ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16970
c906108c 16971
81ecdfbb
RW
16972 case $ac_mode in
16973 :F)
16974 #
16975 # CONFIG_FILE
16976 #
c906108c 16977
bec39cab
AC
16978 case $INSTALL in
16979 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16980 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16981 esac
81ecdfbb 16982_ACEOF
121ce6e5 16983
81ecdfbb
RW
16984cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16985# If the template does not know about datarootdir, expand it.
16986# FIXME: This hack should be removed a few years after 2.60.
16987ac_datarootdir_hack=; ac_datarootdir_seen=
16988ac_sed_dataroot='
16989/datarootdir/ {
16990 p
16991 q
16992}
16993/@datadir@/p
16994/@docdir@/p
16995/@infodir@/p
16996/@localedir@/p
16997/@mandir@/p'
16998case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16999*datarootdir*) ac_datarootdir_seen=yes;;
17000*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17002$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17003_ACEOF
17004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17005 ac_datarootdir_hack='
17006 s&@datadir@&$datadir&g
17007 s&@docdir@&$docdir&g
17008 s&@infodir@&$infodir&g
17009 s&@localedir@&$localedir&g
17010 s&@mandir@&$mandir&g
17011 s&\\\${datarootdir}&$datarootdir&g' ;;
17012esac
4e8d927d 17013_ACEOF
81ecdfbb
RW
17014
17015# Neutralize VPATH when `$srcdir' = `.'.
17016# Shell code in configure.ac might set extrasub.
17017# FIXME: do we really want to maintain this feature?
17018cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17019ac_sed_extra="$ac_vpsub
bec39cab
AC
17020$extrasub
17021_ACEOF
81ecdfbb 17022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17023:t
17024/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17025s|@configure_input@|$ac_sed_conf_input|;t t
17026s&@top_builddir@&$ac_top_builddir_sub&;t t
17027s&@top_build_prefix@&$ac_top_build_prefix&;t t
17028s&@srcdir@&$ac_srcdir&;t t
17029s&@abs_srcdir@&$ac_abs_srcdir&;t t
17030s&@top_srcdir@&$ac_top_srcdir&;t t
17031s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17032s&@builddir@&$ac_builddir&;t t
17033s&@abs_builddir@&$ac_abs_builddir&;t t
17034s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17035s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17036$ac_datarootdir_hack
17037"
17038eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17039if $ac_cs_awk_getline; then
17040 $AWK -f "$tmp/subs.awk"
17041else
17042 $AWK -f "$tmp/subs.awk" | $SHELL
17043fi >$tmp/out \
17044 || as_fn_error "could not create $ac_file" "$LINENO" 5
17045
17046test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17047 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17048 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17050which seems to be undefined. Please make sure it is defined." >&5
17051$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17052which seems to be undefined. Please make sure it is defined." >&2;}
17053
17054 rm -f "$tmp/stdin"
bec39cab 17055 case $ac_file in
81ecdfbb
RW
17056 -) cat "$tmp/out" && rm -f "$tmp/out";;
17057 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17058 esac \
17059 || as_fn_error "could not create $ac_file" "$LINENO" 5
17060 ;;
17061 :H)
17062 #
17063 # CONFIG_HEADER
17064 #
bec39cab 17065 if test x"$ac_file" != x-; then
81ecdfbb
RW
17066 {
17067 $as_echo "/* $configure_input */" \
17068 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17069 } >"$tmp/config.h" \
17070 || as_fn_error "could not create $ac_file" "$LINENO" 5
17071 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17073$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17074 else
81ecdfbb
RW
17075 rm -f "$ac_file"
17076 mv "$tmp/config.h" "$ac_file" \
17077 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17078 fi
17079 else
81ecdfbb
RW
17080 $as_echo "/* $configure_input */" \
17081 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17082 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17083 fi
81ecdfbb
RW
17084 ;;
17085 :L)
17086 #
17087 # CONFIG_LINK
17088 #
c906108c 17089
81ecdfbb
RW
17090 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17091 :
b4e70030 17092 else
81ecdfbb
RW
17093 # Prefer the file from the source tree if names are identical.
17094 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17095 ac_source=$srcdir/$ac_source
17096 fi
b4e70030 17097
81ecdfbb
RW
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17099$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17100
81ecdfbb
RW
17101 if test ! -r "$ac_source"; then
17102 as_fn_error "$ac_source: file not found" "$LINENO" 5
17103 fi
17104 rm -f "$ac_file"
bec39cab 17105
81ecdfbb
RW
17106 # Try a relative symlink, then a hard link, then a copy.
17107 case $srcdir in
17108 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17109 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17110 esac
17111 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17112 ln "$ac_source" "$ac_file" 2>/dev/null ||
17113 cp -p "$ac_source" "$ac_file" ||
17114 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17115 fi
17116 ;;
17117 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17118$as_echo "$as_me: executing $ac_file commands" >&6;}
17119 ;;
c906108c 17120 esac
b4e70030 17121
bec39cab 17122
81ecdfbb
RW
17123 case $ac_file$ac_mode in
17124 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17125 "gcore":F) chmod +x gcore ;;
81ecdfbb 17126 "default":C)
c906108c
SS
17127case x$CONFIG_HEADERS in
17128xconfig.h:config.in)
17129echo > stamp-h ;;
17130esac
bec39cab 17131 ;;
81ecdfbb 17132
bec39cab 17133 esac
81ecdfbb 17134done # for ac_tag
c906108c 17135
bec39cab 17136
81ecdfbb 17137as_fn_exit 0
bec39cab 17138_ACEOF
bec39cab
AC
17139ac_clean_files=$ac_clean_files_save
17140
81ecdfbb
RW
17141test $ac_write_fail = 0 ||
17142 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17143
bec39cab
AC
17144
17145# configure is writing to config.log, and then calls config.status.
17146# config.status does its own redirection, appending to config.log.
17147# Unfortunately, on DOS this fails, as config.log is still kept open
17148# by configure, so config.status won't be able to write to it; its
17149# output is simply discarded. So we exec the FD to /dev/null,
17150# effectively closing config.log, so it can be properly (re)opened and
17151# appended to by config.status. When coming back to configure, we
17152# need to make the FD available again.
17153if test "$no_create" != yes; then
17154 ac_cs_success=:
17155 ac_config_status_args=
17156 test "$silent" = yes &&
17157 ac_config_status_args="$ac_config_status_args --quiet"
17158 exec 5>/dev/null
17159 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17160 exec 5>>config.log
17161 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17162 # would make configure fail if this is the last instruction.
81ecdfbb 17163 $ac_cs_success || as_fn_exit $?
bec39cab 17164fi
c906108c 17165
bec39cab 17166#
81ecdfbb 17167# CONFIG_SUBDIRS section.
bec39cab 17168#
c906108c
SS
17169if test "$no_recursion" != yes; then
17170
81ecdfbb
RW
17171 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17172 # so they do not pile up.
c906108c
SS
17173 ac_sub_configure_args=
17174 ac_prev=
fdc59709
PB
17175 eval "set x $ac_configure_args"
17176 shift
17177 for ac_arg
17178 do
c906108c
SS
17179 if test -n "$ac_prev"; then
17180 ac_prev=
17181 continue
17182 fi
bec39cab 17183 case $ac_arg in
c906108c
SS
17184 -cache-file | --cache-file | --cache-fil | --cache-fi \
17185 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17186 ac_prev=cache_file ;;
17187 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17188 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17189 | --c=*)
17190 ;;
17191 --config-cache | -C)
c906108c
SS
17192 ;;
17193 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17194 ac_prev=srcdir ;;
17195 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17196 ;;
bec39cab
AC
17197 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17198 ac_prev=prefix ;;
17199 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17200 ;;
81ecdfbb
RW
17201 --disable-option-checking)
17202 ;;
fdc59709
PB
17203 *)
17204 case $ac_arg in
81ecdfbb 17205 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17206 esac
81ecdfbb 17207 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17208 esac
17209 done
17210
bec39cab
AC
17211 # Always prepend --prefix to ensure using the same prefix
17212 # in subdir configurations.
fdc59709
PB
17213 ac_arg="--prefix=$prefix"
17214 case $ac_arg in
81ecdfbb 17215 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17216 esac
81ecdfbb
RW
17217 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17218
17219 # Pass --silent
17220 if test "$silent" = yes; then
17221 ac_sub_configure_args="--silent $ac_sub_configure_args"
17222 fi
17223
17224 # Always prepend --disable-option-checking to silence warnings, since
17225 # different subdirs can have different --enable and --with options.
17226 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17227
b4e70030 17228 ac_popdir=`pwd`
bec39cab 17229 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17230
17231 # Do not complain, so a configure script can configure whichever
17232 # parts of a large source tree are present.
fdc59709 17233 test -d "$srcdir/$ac_dir" || continue
c906108c 17234
81ecdfbb
RW
17235 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17236 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17237 $as_echo "$ac_msg" >&6
17238 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17239 ac_builddir=.
17240
81ecdfbb
RW
17241case "$ac_dir" in
17242.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17243*)
17244 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17245 # A ".." for each directory in $ac_dir_suffix.
17246 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17247 case $ac_top_builddir_sub in
17248 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17249 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17250 esac ;;
17251esac
17252ac_abs_top_builddir=$ac_pwd
17253ac_abs_builddir=$ac_pwd$ac_dir_suffix
17254# for backward compatibility:
17255ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17256
17257case $srcdir in
81ecdfbb 17258 .) # We are building in place.
bec39cab 17259 ac_srcdir=.
81ecdfbb
RW
17260 ac_top_srcdir=$ac_top_builddir_sub
17261 ac_abs_top_srcdir=$ac_pwd ;;
17262 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17263 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17264 ac_top_srcdir=$srcdir
17265 ac_abs_top_srcdir=$srcdir ;;
17266 *) # Relative name.
17267 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17268 ac_top_srcdir=$ac_top_build_prefix$srcdir
17269 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17270esac
81ecdfbb 17271ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17272
c906108c 17273
fdc59709 17274 cd "$ac_dir"
c906108c
SS
17275
17276 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17277 if test -f "$ac_srcdir/configure.gnu"; then
17278 ac_sub_configure=$ac_srcdir/configure.gnu
17279 elif test -f "$ac_srcdir/configure"; then
17280 ac_sub_configure=$ac_srcdir/configure
17281 elif test -f "$ac_srcdir/configure.in"; then
17282 # This should be Cygnus configure.
17283 ac_sub_configure=$ac_aux_dir/configure
c906108c 17284 else
81ecdfbb
RW
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17286$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17287 ac_sub_configure=
17288 fi
17289
17290 # The recursion is here.
17291 if test -n "$ac_sub_configure"; then
c906108c 17292 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17293 case $cache_file in
17294 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17295 *) # Relative name.
17296 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17297 esac
c906108c 17298
81ecdfbb
RW
17299 { $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
17300$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17301 # The eval makes quoting arguments work.
fdc59709
PB
17302 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17303 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17304 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17305 fi
17306
fdc59709 17307 cd "$ac_popdir"
c906108c
SS
17308 done
17309fi
81ecdfbb
RW
17310if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17312$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17313fi
c906108c
SS
17314
17315
17316exit 0
This page took 3.058472 seconds and 4 git commands to generate.